20181211_jeffrey - silenceuncrio/diary GitHub Wiki

0905

ๅนซๅฟ™ M360P ็š„ wifi web ui

Products/Vendor ้ธๆ“‡ LITE/3_MTK_WIFI

     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Products/Vendor โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
     โ”‚  Use the arrow keys to navigate this window or press the hotkey of โ”‚
     โ”‚  the item you wish to select followed by the <SPACE BAR>. Press    โ”‚
     โ”‚  <?> for additional information about this option.                 โ”‚
     โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
     โ”‚ โ”‚                      ( ) LITE/1_APN2                           โ”‚ โ”‚
     โ”‚ โ”‚                      ( ) LITE/2_PI                             โ”‚ โ”‚
     โ”‚ โ”‚                      (X) LITE/3_MTK_WIFI                       โ”‚ โ”‚
     โ”‚ โ”‚                                                                โ”‚ โ”‚
     โ”‚ โ”‚                                                                โ”‚ โ”‚
     โ”‚ โ”‚                                                                โ”‚ โ”‚
     โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
     โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
     โ”‚                       <Select>      < Help >                       โ”‚
     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

ๆžๅฎš commit and push

commit ce68c5722e8d628b8c679097f3913acacba281a7
Author: jeffrey <[email protected]>
Date:   Tue Dec 11 10:47:28 2018 +0800

    add 'WIFI / WIFI Config' web page
    - compile flag is 'PROSRC_WIFI_APSTA'

 proscend/prosrc/webcgi/Makefile                  |   4 +
 proscend/prosrc/webcgi/wifi_apsta.c              | 259 +++++++++++++++++++++++
 proscend/prosrc/www/app/feature/wifi_apsta.html  | 117 ++++++++++
 proscend/prosrc/www/app/feature/wifi_apsta.js    |  59 ++++++
 proscend/prosrc/www/app/locale-en.json           |  13 ++
 proscend/prosrc/www/app/locale-fr.json           |  13 ++
 proscend/prosrc/www/app/locale-zh-tw.json        |  13 ++
 proscend/prosrc/www/app/services/icos.service.js |  11 +
 proscend/prosrc/www/src/index.html.src           |   1 +
 proscend/prosrc/www/src/menu.html.src            |  19 ++
 10 files changed, 509 insertions(+)

1100

ๅ›ž้ ญ็นผ็บŒ GRE with NHRP

ไปŠๅคฉ่ฉฆ่‘—ๅ–ฎ่ฎ€ไฝฟ็”จ M300 ไพ†่ค‡่ฃฝ NHRP ็š„ๅ•้กŒ

ๅ…ˆๆŠŠ gre1 ้€™ๅ€‹ interface ๅปบ็ซ‹่ตทไพ†

ip tunnel add gre1 mode gre remote 192.168.1.200 local 192.168.1.1
ip link set gre1 up
ip addr add 172.30.96.6/29 dev gre1

ๅ†ๆบ–ๅ‚™ nhrpd ็š„ configuration

root@Cellular Router:~# cat /etc/quagga/nhrpd.conf
!
! Zebra configuration saved from vty
!   2018/12/05 03:16:29
!
log file /tmp/nhrp.log
!
interface gre1
 tunnel source 192.168.1.1
 ip nhrp network-id 1
 ip nhrp map 10.1.1.200 192.168.1.200
 ip nhrp nhs dynamic nbma 10.1.1.200
!
debug nhrp all
!
line vty
!

ๅŸท่กŒ nhrpd -d

check log

root@Cellular Router:~# cat /tmp/nhrp.log
2018/12/07 08:42:35 NHRP: nhrpd starting: vty@2612
2018/12/07 08:42:35 NHRP: vici_reconnect: failure connecting VICI socket: No such file or directory
2018/12/07 08:42:35 NHRP: if-add: can0, ifindex: 4, hw_type: 0 Unknown
2018/12/07 08:42:35 NHRP: if-add: eth0, ifindex: 5, hw_type: 1 Ethernet
2018/12/07 08:42:35 NHRP: if-addr-add: eth0: fe80::f496:71ff:fe1b:9be0/64
2018/12/07 08:42:35 NHRP: eth0: IPv6 address changed to fe80::f496:71ff:fe1b:9be0/64
2018/12/07 08:42:35 NHRP: if-add: eth1, ifindex: 6, hw_type: 1 Ethernet
2018/12/07 08:42:35 NHRP: if-add: eth2, ifindex: 15, hw_type: 1 Ethernet
2018/12/07 08:42:35 NHRP: if-add: gre0, ifindex: 7, hw_type: 35 GRE over IP
2018/12/07 08:42:35 NHRP: netlink-link-gre: get-info 7
2018/12/07 08:42:35 NHRP: netlink-link-gre: ifindex 7, receive msg_type 16, msg_flags 0
2018/12/07 08:42:35 NHRP: gre0: GRE: 0 0 0
2018/12/07 08:42:35 NHRP: if-add: gre1, ifindex: 16, hw_type: 0 Unknown
2018/12/07 08:42:35 NHRP: if-addr-add: gre1: fe80::5efe:c0a8:101/64
2018/12/07 08:42:35 NHRP: gre1: IPv6 address changed to fe80::5efe:c0a8:101/64
2018/12/07 08:42:35 NHRP: cache: gre1 10.1.1.200: accept
2018/12/07 08:42:35 NHRP: if-addr-add: gre1: 172.30.96.6/29
2018/12/07 08:42:35 NHRP: gre1: IPv4 address changed to 172.30.96.6/29
2018/12/07 08:42:35 NHRP: if-add: gretap0, ifindex: 8, hw_type: 1 Ethernet
2018/12/07 08:42:35 NHRP: if-add: ifb0, ifindex: 2, hw_type: 1 Ethernet
2018/12/07 08:42:35 NHRP: if-add: ifb1, ifindex: 3, hw_type: 1 Ethernet
2018/12/07 08:42:35 NHRP: if-add: ip6_vti0, ifindex: 10, hw_type: 27 IPIP6 Tunnel
2018/12/07 08:42:35 NHRP: if-add: ip6tnl0, ifindex: 12, hw_type: 27 IPIP6 Tunnel
2018/12/07 08:42:35 NHRP: if-add: ip_vti0, ifindex: 9, hw_type: 26 IPIP Tunnel
2018/12/07 08:42:35 NHRP: if-add: lan, ifindex: 14, hw_type: 1 Ethernet
2018/12/07 08:42:35 NHRP: if-addr-add: lan: 192.168.1.1/24
2018/12/07 08:42:35 NHRP: lan: IPv4 address changed to 192.168.1.1/24
2018/12/07 08:42:35 NHRP: if-addr-add: lan: fe80::f496:71ff:fe1b:9be0/64
2018/12/07 08:42:35 NHRP: lan: IPv6 address changed to fe80::f496:71ff:fe1b:9be0/64
2018/12/07 08:42:35 NHRP: if-add: lo, ifindex: 1, hw_type: 30 Loopback
2018/12/07 08:42:35 NHRP: if-addr-add: lo: 127.0.0.1/8
2018/12/07 08:42:35 NHRP: lo: IPv4 address changed to 127.0.0.1/8
2018/12/07 08:42:35 NHRP: if-addr-add: lo: ::1/128
2018/12/07 08:42:35 NHRP: lo: IPv6 address changed to ::1/128
2018/12/07 08:42:35 NHRP: if-add: sit0, ifindex: 11, hw_type: 33 IPv6-in-IPv4 SIT
2018/12/07 08:42:35 NHRP: if-route-add: 172.30.96.0/29 via 0.0.0.0 dev gre1
2018/12/07 08:42:35 NHRP: if-route-add: 192.168.1.0/24 via 0.0.0.0 dev lan
2018/12/07 08:42:36 NHRP: [0x1104a40] Resolving '10.1.1.200'
2018/12/07 08:42:36 NHRP: [0x1104a40] Resolved with 1 results
2018/12/07 08:42:36 NHRP: NHS: Waiting link for 10.1.1.200
2018/12/07 08:42:37 NHRP: vici_reconnect: failure connecting VICI socket: No such file or directory
2018/12/07 08:42:39 NHRP: vici_reconnect: failure connecting VICI socket: No such file or directory
2018/12/07 08:42:41 NHRP: vici_reconnect: failure connecting VICI socket: No such file or directory
2018/12/07 08:42:43 NHRP: vici_reconnect: failure connecting VICI socket: No such file or directory
2018/12/07 08:42:45 NHRP: vici_reconnect: failure connecting VICI socket: No such file or directory
2018/12/07 08:42:47 NHRP: vici_reconnect: failure connecting VICI socket: No such file or directory
2018/12/07 08:42:49 NHRP: vici_reconnect: failure connecting VICI socket: No such file or directory
2018/12/07 08:42:51 NHRP: vici_reconnect: failure connecting VICI socket: No such file or directory
root@Cellular Router:~#

ไปŠๅคฉ็š„็›ฎๆจ™้Ž–ๅฎš NHRP: vici_reconnect: failure connecting VICI socket: No such file or directory ้€™ๅ€‹้Œฏ่ชค่จŠๆฏ

1120

ๅพž source code ่‘—ๆ‰‹ไพ†ๆŸฅๅง

1300

ๆŸฅๅˆฐๆ˜ฏ็”ฑ nhrpd source code ็š„ vici.c ๆ‰“ๅฐ็š„

static int vici_reconnect(struct thread *t)
{
	struct vici_conn *vici = THREAD_ARG(t);
	int fd;

	vici->t_reconnect = NULL;
	if (vici->fd >= 0) return 0;

	fd = sock_open_unix("/var/run/charon.vici");
	if (fd < 0) {
		zlog_warn("%s: failure connecting VICI socket: %s",
			__PRETTY_FUNCTION__, strerror(errno));
		THREAD_TIMER_ON(master, vici->t_reconnect, vici_reconnect, vici, 2);
		return 0;
	}

	debugf(NHRP_DEBUG_COMMON, "VICI: Connected");
	vici->fd = fd;
	THREAD_READ_ON(master, vici->t_read, vici_read, vici, vici->fd);

	/* Send event subscribtions */
	//vici_register_event(vici, "child-updown");
	//vici_register_event(vici, "child-rekey");
	vici_register_event(vici, "child-state-installed");
	vici_register_event(vici, "child-state-rekeyed");
	vici_register_event(vici, "child-state-destroying");
	vici_register_event(vici, "list-sa");
	vici_submit_request(vici, "list-sas", VICI_END);

	return 0;
}

้‚ฃ็‚บไฝ• fd = sock_open_unix("/var/run/charon.vici"); ๆœƒๅคฑๆ•—ๅ‘ข

็ต‚ๆ–ผๆ‰พๅˆฐ็—…ๅ› ไบ†

็œ‹ๅˆฐ source code ่ฃก doc/quagga.info-1

10.4 Integration with IKE
=========================

nhrpd needs tight integration with IKE daemon for various reasons.
Currently only strongSwan is supported as IKE daemon.

   nhrpd connects to strongSwan using VICI protocol based on UNIX socket
(hardcoded now as /var/run/charon.vici).

   strongSwan currently needs few patches applied.  Please check out the
release
(http://git.alpinelinux.org/cgit/user/tteras/strongswan/log/?h=tteras-release)
and working tree
(http://git.alpinelinux.org/cgit/user/tteras/strongswan/log/?h=tteras)
git repositories for the patches.

ๅพ—ๅŽปๆ‰พ ariel ่Šไธ€ไธ‹ไบ†

ๆšซๆ™‚็š„็ต่ซ–ๅฆ‚ไธ‹

  • ๅ…ˆไธ่ฆๅ ็”จ winston ็š„ๆ™‚้–“ไบ†
  • ไธ‹ๅˆ็š„ BUII meeting ๅฏไปฅ่ชชไธ€ไธ‹
  • ๆˆ‘ๅ…ˆๆŠŠ doc/quagga.info-1 ็œ‹ๆธ…ๆฅšไธ€้ปžๅ†ๆฑบๅฎšๆ˜ฏไธๆ˜ฏ่ฆ aaron ๅƒ่ˆ‡

1335

็พๅœจๆ‰็™ผ็พๅฎ˜ๆ–นๆ–‡ไปถquagga - NHRP ๅฐฑๆœ‰ๆๅˆฐ่ทŸ strongSwan ็š„ๅˆไฝœ้—œไฟ‚ไบ†

ๆ‡‰่ฉฒๆ˜ฏไธ€้–‹ๅง‹ไนŸ็œ‹ไธๆ‡‚ๅง

็”จ dmvpn quagga google

ๅ…ˆ็œ‹ไธ€ไธ‹ cisco ็š„ dmvpn ๆ˜ฏไป€้บผ

1425

็›ดๆŽฅไพ†็œ‹ Introduction to DMVPN : Part 1

1630

ๆ‰พๅˆฐไธ€ๅฎถๅš LTE router ๆœ‰ๆ”ฏๆŒ DMVPN

้‚„ๆœ‰็›ธ้—œ็š„่จญๅฎšๆ–‡ไปถ - How do I set up dynamic multipoint VPN between a CradlePoint router and Cisco Router?

็™ผ็พ robustel ๆœ‰ๆ”ฏๆŒ DMVPN - App User Guide - DMVPN

ๆ„Ÿ่ฆบๆˆ‘ๅ€‘ DMVPN ไธ€ๅฎšๅ‹ขๅœจๅฟ…่กŒ

ไธ็„ถๆ‹‰ไธๅ‡บ็ซถ็ˆญๅทฎ่ท

้šจไพฟๆ‰พๅˆไธ€ๅฎถ - InRouter900

โš ๏ธ **GitHub.com Fallback** โš ๏ธ