Apfree-WiFidog is an open source captive protal solution for wireless router which with embeddabled linux(LEDE/Openwrt).
It has some awesome features:
-
Compatible with original wifodog protocol. You can seamless migration Apfree WiFidog to connect your auth server if you runned traditional wifidog.
-
HTTPS support. Not only
HTTP, Apfree WiFiDog can captureHTTPSURL request. It's a big deference between traditional WiFiDog. -
Efficient performance. Run shell command
time curl --compressedto test the Apfree WiFiDog reaction rate,HTTPresponse time is 0.05s andHTTPSis about 0.2s. -
Dynamical bulk loading. Support MAC address and IP address bulk loading with out restart Apfree WiFiDog.
-
Wide application of business. Apfree WiFidog has been installed and used in tens of thousands routers from KunTeng.Org and partners. Users have been affirmed, fully embodies the applicability, reliability.
Fork and clone the Apfree WiFiDog project:
git clone https://github.com/KerwinKoo/apfree_wifidog.git
cd apfree_wifidog
Assuming you have a working LEDE/Openwrt setup, taking LEDE as an example and assuming your LEDE root path is LEDE_ROOT:
cp -r package/apfree_wifidog/ /LEDE_ROOT/package/
To support HTTPS, you need install libevent with version 2.1.7 or latest in your LEDE environment, Or using the package copied in Apfree WiFiDog git project:
cp -r package/libevent2/ /LEDE_ROOT/package/libs/
Now Apfree WiFiDog package has been installed in LEDE packages environment.
cd /LEDE_ROOT/
make menuconfig
Chose your Target System and ApFree --> apfree_wifidog. SAVE and EXIT.
Do compiling:
make V=s
After Doing make V=s, Apfree WiFiDog ipk package is packed in path bin/packages/YOUR-TARGET-ARCH/base/apfree_wifidog_VERSION-RELEASE_YOUR-TARGET-ARCH.ipk . Push it up into your LEDE-system router, use opkg install command to install this ipk.
The CA-Certificate in this project is ONLY for Apfree WiFiDog HTTPS captive testing, CAN NOT be used for business scene
After compiling and installing Apfree WiFiDog into your local router, run the ps | grep wifidog command. The ps | grep wifidog command queries the linux system for information about Apfree WiFiDog.
root@lede:~# ps | grep wifidog
1406 root 6532 S /usr/bin/wifidog -c /tmp/wifidog.conf -f -d 0
In this example, we can see Apfree WiFiDog has run automatically. This command shows some useful information:
/usr/bin/wifidogis the executable binary daemon program, it's namedwifidogfor compatible./tmp/wifidog.confis the WiFiDog's configuration file that generated by parsing/etc/config/wifidog. TheUCIformat file/etc/config/wifidogis the main configuration file for user, and it will be used by Apfree WiFidog to generate wifidog reader file/tmp/wifidog.conf.- Using operations of
-c -f -dfor default parameters, and you can get their by running commandwifidog --help.
The default UCI configuration file like this:
config wifidog
option gateway_interface 'br-lan'
option auth_server_hostname 'entrance.yourauth.org'
option auth_server_port '80'
option auth_server_path '/wifidog/'
option check_interval '60'
option client_timeout '72000'
option httpd_max_conn '200'
option pool_mode '1'
option thread_number '5'
option queue_size '20'
option wired_passed '0'
option trusted_domains 'www.baidu.com,www.qq.com,www.qq.com.cn,www.weixin.com'
Domains of www.baidu.com,www.qq.com,www.qq.com.cn,www.weixin.com is trusted in this default configuration file, and you can modify it to what you want.
apfree wifidog使用github托管其源代码,贡献代码使用github的PR(Pull Request)的流程,十分的强大与便利:
-
创建 Issue - 对于较大的改动(如新功能,大型重构等)最好先开issue讨论一下,较小的improvement(如文档改进,bugfix等)直接发PR即可
-
Fork apfree_wifidog - 点击右上角Fork按钮
-
Clone你自己的fork:
git clone https://github.com/$userid/apfree_wifidog.git -
在dev修改并将修改push到你的fork上
-
创建从你的fork的dev分支到主项目的dev分支的[Pull Request] - 在此点击Compare & pull request
-
等待review, 需要继续改进,或者被Merge!