20190618_jeffrey - silenceuncrio/diary GitHub Wiki
0900
繼續 M300 - feature/lighttpd
的 IPv6
先透過 web 的 Management > Web
作以下設定
- HTTP Port = 3000
- HTTPS Port = 3443
再把 lighttpd 的設定檔 - /tmp/icos/web/lighttpd.conf
另存成 /tmp/icos/web/lighttpd_ip6.conf
參考官網的 IPv6-Config 試試看
搭配以下的 /tmp/icos/web/lighttpd_ip6.conf
server.document-root = "/www/"
# listen to ipv4
server.bind = "0.0.0.0"
server.port = "80"
# listen to ipv6
$SERVER["socket"] == "[::]:80" { }
# we need ssl
$SERVER["socket"] == "0.0.0.0:443" {
ssl.engine = "enable"
ssl.pemfile = "/etc/icos/web/lighttpd.pem"
}
$SERVER["socket"] == "[::]:443" {
ssl.engine = "enable"
ssl.pemfile = "/etc/icos/web/lighttpd.pem"
}
server.modules = ( "mod_rewrite", "mod_access", "mod_cgi", "mod_openssl", "mod_accesslog" )
index-file.names = ( "index.html" )
mimetype.assign = (
".gif" => "image/gif",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".css" => "text/css",
".html" => "text/html",
".htm" => "text/html",
".txt" => "text/plain",
)
cgi.assign = ( ".cgi" => "" )
url.rewrite = (
"^/api/([a-zA-Z]+)[0-9a-zA-Z=.?]*$" => "/cgi-bin/api.cgi?act=$1",
"^/(DO_ON|DO_OFF|DO_PULSE|RESTORE_DO_ALARM)$" => "/cgi-bin/api.cgi?act=$1",
)
目前 lan 端狀態如下
lan Link encap:Ethernet HWaddr 06:35:4E:0C:48:3D
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::435:4eff:fe0c:483d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:105782 errors:0 dropped:0 overruns:0 frame:0
TX packets:166674 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:13314820 (12.6 MiB) TX bytes:104754807 (99.9 MiB)
確認 IPv4 以及 IPv6 均可行
http://192.168.1.1
https://192.168.1.1
http://[fe80::435:4eff:fe0c:483d]
https://[fe80::435:4eff:fe0c:483d]
可以來改 icos module 了
1010
commit 2f0fda8a8daafef714741c4986b24375bad45dc1
Refs: [feature/lighttpd], {origin/feature/lighttpd}
Author: jeffrey <[email protected]>
Date: Tue Jun 18 10:06:05 2019 +0800
our lighttpd support IPv6 now
proscend/prosrc/icos/icoslib/web/webcfg.c | 49 ++++++++++++++++++++++++-------
1 file changed, 38 insertions(+), 11 deletions(-)
重 build 一份 image 試試
1110
測試 PASS
差不多可以開始把 lighttpd porting 到 M330 去了
M330 - Change web server to avoid https unstable
- start: 06/25
- end: 07/03
1140
先回 M300 - feature/web_ui_intro
再幫忙準備一些範例讓新人練習
commit c7eb7c4b20d01cadf25c450e161452441f864e4e
Refs: [feature/web_ui_intro], {origin/feature/web_ui_intro}
Author: jeffrey <[email protected]>
Date: Tue Jun 18 11:37:02 2019 +0800
web introduction:
- add a cgi intro_02.cgi for introduction
intro_02.cgi has:
- cgi-bin/intro_02.cgi?act=config
- a json object with 2 `int` and 2 `string`
- cgi-bin/intro_02.cgi?act=help
proscend/prosrc/webcgi/Makefile | 2 +-
proscend/prosrc/webcgi/intro_02.c | 57 +++++++++++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+), 1 deletion(-)
這個範例開始說到 apply 的部分
一樣從 CGI 出發
1310
繼續 M300 - feature/web_ui_intro
commit 1527fb96008a07daa4e7aa9a532827c9e95e2346
Refs: [feature/web_ui_intro], {origin/feature/web_ui_intro}
Author: jeffrey <[email protected]>
Date: Tue Jun 18 13:09:48 2019 +0800
web introduction:
- add a function '02' in group 'Web Intro'
- add a page 'Web Intro 02'
- nothing but a '<h2>'
proscend/prosrc/www/app/feature/web_intro_02.html | 21 ++++++++++++++
proscend/prosrc/www/app/feature/web_intro_02.js | 34 +++++++++++++++++++++++
proscend/prosrc/www/src/index.html.src | 1 +
proscend/prosrc/www/src/menu.html.src | 1 +
4 files changed, 57 insertions(+)
commit 741700676e295ac9af8ecc4ec183996321421354
Refs: [feature/web_ui_intro], {origin/feature/web_ui_intro}
Author: jeffrey <[email protected]>
Date: Tue Jun 18 13:17:38 2019 +0800
web introduction:
- add a 'config' button at page 'Web Intro 02' serve for the following CGI request:
- cgi-bin/intro_02.cgi?act=config
proscend/prosrc/www/app/feature/web_intro_02.html | 5 +++++
proscend/prosrc/www/app/feature/web_intro_02.js | 12 ++++++++++++
2 files changed, 17 insertions(+)
這個步驟對新人來說應該屬於比較難以理解的部分
commit 835a7e88b5c438991442acb9de5e3f2ae8c999b3
Refs: [feature/web_ui_intro], {origin/feature/web_ui_intro}
Author: jeffrey <[email protected]>
Date: Tue Jun 18 13:29:48 2019 +0800
web introduction:
- add resolve to route parameter of when(path, route) method of $routeProvider
- add a `config` dependency which are promise
- let the router wait for it to be resolved before the controller is instantiated
proscend/prosrc/www/app/feature/web_intro_02.js | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
不過用起來就是那麼一回事了
跟理解多少細節沒有多大關係
1405
commit af51808d844838d468a0d4c0c5edc9ef3338e215
Author: jeffrey <[email protected]>
Date: Tue Jun 18 14:03:17 2019 +0800
web introduction:
- rename click hander to `click_config`
- prevent same name as the `config` dependency
- return result.data.config at `config` dependency
proscend/prosrc/www/app/feature/web_intro_02.html | 2 +-
proscend/prosrc/www/app/feature/web_intro_02.js | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
commit 69d02d96a70df460b745960a1b686c1cab21db58
Refs: [feature/web_ui_intro], {origin/feature/web_ui_intro}
Author: jeffrey <[email protected]>
Date: Tue Jun 18 14:06:00 2019 +0800
web introduction:
- use AngularJS Expression to display vm.config
- diaplay vm.config as a JSON string - use AngularJS JSON filter
proscend/prosrc/www/app/feature/web_intro_02.html | 2 ++
1 file changed, 2 insertions(+)
1435
M300 release v2.00 明天繼續
ariel 提醒我做點小修改
commit 11819cb807a0f73e55eb86e82602dbba8edb3665
Refs: [release/v2.00], {origin/release/v2.00}
Author: jeffrey <[email protected]>
Date: Tue Jun 18 14:34:27 2019 +0800
change wording `ETH First` to `Auto` at
- top banner
- WAN > Priority
explain what is `Auto` at online manual
proscend/prosrc/www/app/locale-en.json | 4 ++--
proscend/prosrc/www/app/locale-fr.json | 4 ++--
proscend/prosrc/www/app/locale-zh-tw.json | 4 ++--
proscend/prosrc/www/src/manual/wan_priority.h.html | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
1855
M330 臨時追加的修改
commit 0292420e32b2121541f5d382d69a469deecfec36
Author: jeffrey <[email protected]>
Date: Tue Jun 18 18:25:41 2019 +0800
change wording "LTE APN1 DNS" to "WAN DNS" at status page
proscend/prosrc/www/app/locale-en.json | 1 +
proscend/prosrc/www/app/locale-fr.json | 1 +
proscend/prosrc/www/app/locale-zh-tw.json | 1 +
proscend/prosrc/www/src/app/feature/status.html.src | 10 +++++-----
4 files changed, 8 insertions(+), 5 deletions(-)
commit 4abd81f9e1b0201acf36b71e763d870ca267de03
Author: jeffrey <[email protected]>
Date: Tue Jun 18 18:32:22 2019 +0800
change wording `Auto (ETH -> LTE)` to `Auto` at
- top banner
- WAN > Priority
explain what is `Auto` at online manual
proscend/prosrc/www/app/locale-en.json | 4 ++--
proscend/prosrc/www/app/locale-fr.json | 4 ++--
proscend/prosrc/www/app/locale-zh-tw.json | 4 ++--
proscend/prosrc/www/src/manual/wan_priority.h.html | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
commit e1e4cc6f404863b9c734c9ae8b66a34754835815
Refs: [release/v0.03], {origin/release/v0.03}
Author: jeffrey <[email protected]>
Date: Tue Jun 18 18:54:13 2019 +0800
display the operator name without according to the value of vm.top.lte_cur_proto_state
proscend/prosrc/www/app/app.controller.js | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)