wangming1993 / issues

记录学习中的一些问题,体会与心得 https://wangming1993.github.io/issues
8 stars 4 forks source link

openwrt 编译 #97

Open wangming1993 opened 4 years ago

wangming1993 commented 4 years ago
wangming1993 commented 4 years ago

https://openwrt.org/toh/hwdata/d-team/d-team_newifi_d2

wangming1993 commented 4 years ago

https://hycrandom.wordpress.com/2018/09/30/compiling-openwrt-firmware-for-youhua-wr1200js/

wangming1993 commented 4 years ago

http://dev.wifidog.org/wiki/doc/developer/WiFiDogProtocol_V1

wangming1993 commented 4 years ago

## 配置系统架构

Target System     (MediaTek Ralink MIPS)

Subtarget     (MT7621 based boards)

Target Profile (Newifi D2)

## 配置 IP
Image configuration -> Preinit configuration options
vim /etc/config/network

service network restart

wifidog

make menuconfig

Network ->  Captive Portals -> wifidog
vim /etc/wifidog
AuthServer {
    Hostname                 192.168.10.117
    HTTPPort                 8080
    Path                     /wifidog/
    LoginScriptPathFragment  login?
    PortalScriptPathFragment portal?
#   MsgScriptPathFragment    (Optional; Default: gw_message.php? Note:  This is the s
    PingScriptPathFragment   ping?
    AuthScriptPathFragment   auth?
}
wangming1993 commented 4 years ago

app launch url schema

https://bbs.feng.com/read-htm-tid-8941179.html

1 首先,把你想要添加的应用下载到你的电脑上(下载的位置自己百度),下载好的应用是IPA格式的,
你需要改下它的扩展名把*.ipa改为*.zip,这样我们在WINDOWS系统下就能把这个应用解压了。

2 解压后你会看到这么一个文件夹,一个没显示后缀名的文件,一个以*.plist为后缀名的文件,
然后打开文件夹,其余两个文件不用管,打开后用电脑的搜索功能在这个文件夹内搜索*.plist文件,
你会从这个文件夹中搜出许多,但一定有一个是Info.plist,这就是我们需要的文件。

3 下载一个plist文件编辑器,网上很多,可以自己下。下载完之后打开这个Info.plist文件,
你会看到很多的代码,而我们所需要的URL代码就在其中。在代码中找到一行叫<key>CFBundleURLSchemes</key>的代码,
然后一行行往下看,下边紧接着是<array>,再紧接着是<string>********</string>,
这个你看到的********就是URL地址。

https://segmentfault.com/a/1190000009123583

wangming1993 commented 4 years ago
Network -> Web Servers/Proxies 

       ---> uhttpd-mod-lua
# test.lua
function handle_request(env)
        uhttpd.send("Status: 200 OK\r\n")
        uhttpd.send("Content-Type: text/plain\r\n\r\n")
        uhttpd.send("Hello world.\n")
end
uci set uhttpd.main.lua_prefix='/lua'
uci set uhttpd.main.lua_handler='/root/test.lua'
uci commit
wangming1993 commented 4 years ago

nodogsplash FAS

make menuconfig

Network ->  Captive Portals -> nodogsplash
Language -> PHP 
                          -> php7
                          -> php7-cgi
                          -> php7-cli
                          -> php7-mod-mbstring
                          -> php7-mod-sqlite3

/etc/config/nodogsplash

option fasport '2080'
option faspath '/nodog/fas.php'

/etc/config/uhttpd

list listen_http        0.0.0.0:2080
list interpreter    ".php=/usr/bin/php-cgi"
wangming1993 commented 4 years ago

Running NDS without Internet Access

uci add_list dhcp.@dnsmasq[0].address='/#/192.168.10.1'

/etc/init.d/dnsmasq restart
/etc/init.d/odhcpd restart

service nodogsplash restart