A hight performance and lightweight captive portal solution for HTTP(s)
Go to file
2016-12-23 14:24:05 +08:00
libhttpd Update protocol.c 2016-12-22 19:25:30 +08:00
package Update Makefile 2016-12-23 11:24:15 +08:00
src Update version.h 2016-12-23 11:24:55 +08:00
aclocal.m4 liudf 20151209 Begin apfree wifidog open project 2015-12-09 13:49:51 +08:00
AUTHORS liudf 20161125 Add liudengfeng to AUTHORS file 2016-11-25 14:36:44 +09:00
authserver-offline.html Rename authserver_offline.html to authserver-offline.html 2016-11-24 17:19:03 +08:00
autogen.sh liudf 20151209 Begin apfree wifidog open project 2015-12-09 13:49:51 +08:00
ChangeLog liudf 20151209 Begin apfree wifidog open project 2015-12-09 13:49:51 +08:00
CMakeLists.txt Update CMakeLists.txt 2016-11-16 17:44:42 +08:00
config.h.in liudf 20151209 Begin apfree wifidog open project 2015-12-09 13:49:51 +08:00
configure liudf 20151209 Begin apfree wifidog open project 2015-12-09 13:49:51 +08:00
configure.in Update configure.in 2016-11-29 18:28:11 +08:00
COPYING liudf 20151209 Begin apfree wifidog open project 2015-12-09 13:49:51 +08:00
FAQ liudf 20151209 Begin apfree wifidog open project 2015-12-09 13:49:51 +08:00
INSTALL liudf 20151209 Begin apfree wifidog open project 2015-12-09 13:49:51 +08:00
internet-offline.html Rename internet_offline.html to internet-offline.html 2016-11-24 17:19:26 +08:00
Makefile.am liudf 20151209 Begin apfree wifidog open project 2015-12-09 13:49:51 +08:00
Makefile.in liudf 20160227 Add wifidog-redir.html to project 2016-02-27 16:32:08 +09:00
NEWS Update NEWS 2016-12-23 14:24:05 +08:00
README_CH.md using English as the default README language, move CH README to a single file 2016-12-16 16:40:31 +08:00
README.md add Getting started information for apfree wifidog in readme.md 2016-12-20 17:09:27 +08:00
stamp-h.in liudf 20151209 Begin apfree wifidog open project 2015-12-09 13:49:51 +08:00
TODO Update TODO 2016-12-21 18:16:03 +08:00
wifidog-msg.html liudf 20161117 Add 2 file 2016-11-17 13:04:37 +09:00
wifidog-msg.html.in liudf 20160603 Change wifidog-msg page 2016-06-03 19:17:07 +09:00
wifidog-redir.html liudf 20161117 Add 2 file 2016-11-17 13:04:37 +09:00
wifidog-redir.html.front Update wifidog-redir.html.front 2016-11-25 13:29:53 +08:00
wifidog-redir.html.in liudf 20160411 move domains && mac operation to ping thread 2016-04-11 11:24:30 +09:00
wifidog-redir.html.rear Create wifidog-redir.html.rear 2016-11-24 10:48:29 +08:00
wifidog.conf liudf 20151209 Begin apfree wifidog open project 2015-12-09 13:49:51 +08:00
wifidog.spec liudf 20151209 Begin apfree wifidog open project 2015-12-09 13:49:51 +08:00
wifidog.spec.in liudf 20151209 Begin apfree wifidog open project 2015-12-09 13:49:51 +08:00

Apfree WiFiDog: Efficient captive protal solution

Apfree-WiFidog is an open source captive protal solution for wireless router which with embeddabled linux(LEDE/Openwrt).

中文介绍

Awesome

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 capture HTTPS URL request. It's a big deference between traditional WiFiDog.

  • Efficient performance. Run shell command time curl --compressed to test the Apfree WiFiDog reaction rate, HTTP response time is 0.05s and HTTPS is 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.


How To Compile

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


Getting started

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/wifidog is the executable binary daemon program, it's named wifidog for compatible.
  • /tmp/wifidog.conf is the WiFiDog's configuration file that generated by parsing /etc/config/wifidog. The UCI format file /etc/config/wifidog is 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 -d for default parameters, and you can get their by running command wifidog --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.