Coder Social home page Coder Social logo

liudf0716 / apfree-wifidog Goto Github PK

View Code? Open in Web Editor NEW
804.0 65.0 299.0 4.62 MB

Secure and streamline your wireless networks with apfree-wifidog: a high-performance, lightweight captive portal solution optimized for both HTTP and HTTPS traffic.

Home Page: http://wifidogx.online

License: GNU General Public License v3.0

C 89.05% CMake 6.42% HTML 3.97% Shell 0.57%
openwrt libevent c wifidog wifi captive-portal

apfree-wifidog's Introduction



Tech stack

I work with:
Bash, C, CPP, CMake, Docker, Express, Git, Markdown, Github, Gitlab, GO, Linux, MySQL, Java, Jenkins, Lua, Mongodb, Nodejs, Vue, Vim, Visualstudio, Python, Redis, Stackoverflow

apfree-wifidog's People

Contributors

apcoin avatar caizhibang avatar cooboyno111 avatar easyteacher avatar echowxsy avatar fenggui321 avatar gigibox avatar heartache1987 avatar helintongh avatar kerwinkoo avatar landrash avatar liudf0716 avatar pedrycz avatar ruichen1113 avatar sherronburtint avatar tea4go avatar tianmax avatar wangyin2016 avatar zenghi avatar zjh809 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apfree-wifidog's Issues

认证端数组取值问题

数组
$arr=array('route_id'=>1,'shop_id'=>2);
$route_id = $arr['route_id'];
echo $route_id;
在安卓认证弹窗取值正常,安卓浏览器取值正常.
苹果手机浏览器取值正常,但是在弹窗取不到值有问题。求解决办法

get_cpu_usage failed???

static int 
read_cpu_fields (FILE *fp, unsigned long long int *fields)
{
	int retval;
	char buffer[BUF_MAX] = {0};


	if (!fgets (buffer, BUF_MAX, fp)) { 
	 return 0;
	}

	retval = sscanf (buffer, "cpu %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu", 
							&fields[0], 
							&fields[1], 
							&fields[2], 
							&fields[3], 
							&fields[4], 
							&fields[5], 
							&fields[6], 
							&fields[7], 
							&fields[8], 
							&fields[9]); 
	if (retval < 4) { /* Atleast 4 fields is to be read */
		return 0;
	}
	DebugLog("%s: %s\n", __func__, buffer);
	
	DebugLog("retval=%d ", retval);
	for(int i = 0; i < 10; i++){
		DebugLog("%lu ", fields[i]);
	}
	DebugLog("\n");
	return 1;
}

结果如下:

[Tue May 30 11:54:31 2017] read_cpu_fields: cpu 30050 0 13086 3045700 0 0 14356 0 0 0

[Tue May 30 11:54:31 2017] retval=10
[Tue May 30 11:54:31 2017] 0
[Tue May 30 11:54:31 2017] 0
[Tue May 30 11:54:31 2017] 0
[Tue May 30 11:54:31 2017] 0
[Tue May 30 11:54:31 2017] 0
[Tue May 30 11:54:31 2017] 0
[Tue May 30 11:54:31 2017] 0
[Tue May 30 11:54:31 2017] 0
[Tue May 30 11:54:31 2017] 0
[Tue May 30 11:54:31 2017] 0
[Tue May 30 11:54:31 2017]

wdctl add_trusted_pdomains

wdctl add_trusted_pdomains [domain1.com, domain2.com ] doesn't take any effect event if it display "Yes" output.

can not start ?

root@OpenRouter:# /usr/bin/wifidog -c /tmp/wifidog.conf
[6][Wed May 31 11:01:00 2017]13228 Reading configuration file '/tmp/wifidog.conf'
[6][Wed May 31 11:01:00 2017]13228 Forking into background
root@OpenRouter:
# [6][Wed May 31 11:01:00 2017]13229 Setting started_time
[5][Wed May 31 11:01:00 2017]13229 Creating web server on 192.168.10.1:2060
[6][Wed May 31 11:01:00 2017]13229 Closing ICMP socket
[6][Wed May 31 11:01:02 2017]13229 Creating ICMP socket
[6][Wed May 31 11:01:02 2017]13229 Initializing Firewall
Another app is currently holding the xtables lock. Perhaps you want to use the -w option?
[3][Wed May 31 11:01:02 2017]13229 iptables command failed(4): iptables -t mangle -I PREROUTING 1 -i br-lan -j WiFiDog_br-lan_Outgoing
iptables: Chain already exists.
[3][Wed May 31 11:01:02 2017]13229 iptables command failed(1): iptables -t nat -N WiFiDog_br-lan_AuthServers
[3][Wed May 31 11:01:04 2017]13229 SSL_CTX_use_PrivateKey_file failed:

root@OpenRouter:# ps|grep wifidog
13898 root 1484 S grep wifidog
root@OpenRouter:
#

alternative for hash:mac ?

I am trying to compile for asuswrt-merlin.
However, merlin firmware use old kernel so there is no module for hash:mac.

ip_set_bitmap_ip.c
ip_set_bitmap_ipmac.c
ip_set_bitmap_port.c
ip_set_core.c
ip_set_getport.c
ip_set_hash_ip.c
ip_set_hash_ipport.c
ip_set_hash_ipportip.c
ip_set_hash_ipportnet.c
ip_set_hash_net.c
ip_set_hash_netport.c
ip_set_list_set.c

there is any alternative to rewrite fw_iptables.c?

添加apfree qos支持

优先利用apfree qos提供的主机流速流控统计数据,提升系统性能。

evhttp_request_get_connection need free

/**

  • Returns the connection object associated with the request or NULL
  • The user needs to either free the request explicitly or call
  • evhttp_send_reply_end().
    */
    EVENT2_EXPORT_SYMBOL
    struct evhttp_connection *evhttp_request_get_connection(struct evhttp_request *req);

Using apfree on x86

Hi,

Did you try to run Apfree on x86 architecture? can it handel hotel traffic with 20 APs? What are the limitations

ipset need any dependency ?

I copy ipset.c and ipset.h as a standalone program.
I need to create table by "ipset -N xxxx iphash"
But I cannot find where apfree_wifidog do that, where did it do that ?

error in package for luci apfree in openwrt 15.05.1

Hello,

I followed the instructions provided for building apfree_wifidog.
after I pulled the source for apfree_wifidog, i noticed a folder called "luci-app-apfree_wifidog"

I copied it also in the folder /package

but when i did the make menuconfig, there was an error about luci-app-apfree_wifidog.
the log sais it cannot find luci.mk

I found an error in the file luci-app-apfree_wifidog\makefile

original
include ../../luci.mk

corrected
include ../../feeds/luci/luci.mk

after this the make menuconfig is correct, the package luci-app-apfree_wifidog appears in the "LUCI" category

Sorry for not following the github functions for the pull requests, actually i am an admin not a dev so i don't know how it works really.

Oh also, you should talk about the luci-app-apfree_wifidog package in the README.md file

apfree_wifidog 反复认证

操作步骤:
1.访问网页打开两个认证页面;
2.点击一个页面上的一键上网,用户通过认证;
3.点击另外一个页面上的一键上网;
4.用户出现反复认证。

lede 17.01 make 失败

src/CMakeFiles/wifidog.dir/build.make:710: recipe for target 'src/CMakeFiles/wifidog.dir/mqtt_thread.c.o' failed
make[5]: *** [src/CMakeFiles/wifidog.dir/mqtt_thread.c.o] Error 1
make[5]: Leaving directory '/home/nulee/work/lede-17.01/build_dir/target-x86_64_musl-1.1.16/apfree_wifidog/apfree_wifidog-2.03.1061'
CMakeFiles/Makefile2:124: recipe for target 'src/CMakeFiles/wifidog.dir/all' failed
make[4]: *** [src/CMakeFiles/wifidog.dir/all] Error 2
make[4]: Leaving directory '/home/nulee/work/lede-17.01/build_dir/target-x86_64_musl-1.1.16/apfree_wifidog/apfree_wifidog-2.03.1061'
Makefile:127: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/home/nulee/work/lede-17.01/build_dir/target-x86_64_musl-1.1.16/apfree_wifidog/apfree_wifidog-2.03.1061'
Makefile:67: recipe for target '/home/nulee/work/lede-17.01/build_dir/target-x86_64_musl-1.1.16/apfree_wifidog/apfree_wifidog-2.03.1061/.built' failed
make[2]: *** [/home/nulee/work/lede-17.01/build_dir/target-x86_64_musl-1.1.16/apfree_wifidog/apfree_wifidog-2.03.1061/.built] Error 2
make[2]: Leaving directory '/home/nulee/work/lede-17.01/package/ext/apfree_wifidog'
package/Makefile:105: recipe for target 'package/ext/apfree_wifidog/compile' failed
make[1]: *** [package/ext/apfree_wifidog/compile] Error 2
make[1]: Leaving directory '/home/nulee/work/lede-17.01'
/home/nulee/work/lede-17.01/include/toplevel.mk:197: recipe for target 'package/ext/apfree_wifidog/compile' failed
make: *** [package/ext/apfree_wifidog/compile] Error 2
这个怎么处理啊 依赖包 已经更换

Failed to build for MIPS architecture

Hi,

I'am trying to compile apfree for MIPS architecture but it won't success, knowing that I'm using the same build to compile ar71x and it working fine.

PKG_MIRROR_HASH

I executing the command: sha256sum dl/apfree_wifidog-2.03.1061-2.03.1061.tar.gz, then obtain PKG_MIRROR_HASH=dc1a052bd61c1224dda9548475c1feda9332c40fc2190ca6e4901d432379b51c,
but the PKG_MIRROR_HASH in the Makefile is:40293b58d4be4ade84dc826a4a01c30a8ba97198c8040b0062fa8db0f8379987

编译并安装成功,但是运行提示:-ash: /usr/bin/wifidog: not found

root@OpenWrt:/tmp# opkg install apfree_wifidog_2.03.1061-1_x86_64.ipk
Installing apfree_wifidog (2.03.1061-1) to root...
Configuring apfree_wifidog.
uci: Entry not found
root@OpenWrt:/tmp# /usr/bin/wifidog
-ash: /usr/bin/wifidog: not found

请问是什么问题呢?
OpenWrt Chaos Calmer 15.05.1 / LuCI 15.05-149-g0d8bbd2 Release (git-15.363.78009-956be55)

添加内核模块实现认证,替代iptable规则

在内核模块中注册netfilter钩子函数管理认证。
原因:通过iptable规则打mark这种方式将会和其它程序产生冲突,比如QoS、MWAN3。而且iptable规则多了的话还会影响性能。

Apfree stop working when I put trusted domains

Hi,

Apfree stop working and connect people automatically when I set Facebook trusted domains

here my line

option trusted_domains 'facebook.com,fbcdn.net,facebook.net,web.facebook.com,akamaihd.net'

a android web browser repeat auth

1.Android手机,打开网页的后,进行授权,但是在此访问之前的那个网页,又需要授权。如果在授权后,关闭了浏览器进程,重新打开,访问,就可以正常访问不需要授权了。

2.iPhone 手机,锁屏后,一段时间wifi连接断开。

how do i add my own ca,crt,key file????

i sign my own domain with ssl ,but i use copy the file to apfree.ca,apfree.crt,apfree.key .
ssl check success, but ssl_ctx = SSL_CTX_new(SSLv23_method()); print out fail.

there are some debug info;

[6][Tue May 30 10:28:44 2017][16638](util.c:92) Closing ICMP socket
[6][Tue May 30 10:28:45 2017][16638](util.c:76) Creating ICMP socket
[6][Tue May 30 10:28:45 2017][16638](firewall.c:238) Initializing Firewall
[6][Tue May 30 10:28:46 2017][16638](https_server.c:295) Updating last_ip IP of server [192.168.2.1] to [192.168.2.1]
[6][Tue May 30 10:28:46 2017][16638](firewall.c:262) Clearing the authservers list
[6][Tue May 30 10:28:46 2017][16638](firewall.c:271) Setting the authservers list
[6][Tue May 30 10:28:46 2017][16638](wd_util.c:121) ONLINE status became ON
[6][Tue May 30 10:28:50 2017][16638](wd_util.c:849) parse domain end, end event_loop [0]
[6][Tue May 30 10:28:50 2017][16638](firewall.c:307) Setting inner trust domains list
[6][Tue May 30 10:28:50 2017][16638](firewall.c:329) Setting user trust domains list
[6][Tue May 30 10:28:50 2017][16638](firewall.c:350) Set trusted maclist
[6][Tue May 30 10:28:50 2017][16638](firewall.c:364) Set untrusted maclist
[3][Tue May 30 10:28:50 2017][16638](simple_http.c:550) SSL_CTX_new failed
[3][Tue May 30 10:28:50 2017][16638](ping_thread.c:100) evhttps_context_init failed, process exit()

Wifidog auth server

Hi,

I have two concerns right here after successfuly compiling Apfree.

  1. Can I use it with my actual auth server?
  2. How can I put my own gateway ID? /tmp/wifidog.conf lost values after restarting

Best

add update domains' ip periodly feature

when we added trusted domains , for many popular domains, for example facebook, google, qq etc, its domains' ip will change frequently, so I add this feature to get more domains' ip. If u want to use this feature, add UpdateDomainInterval to wifidog.conf, for instance:

UpdateDomainInterval 60

which means update every 1 hour, if our checkinterval is 60 seconds.

use the latest git,process FC without any error message

today ,i use the latest git version to build apfree_wifidog,build & opkg install success,but it doestn't work.
i try to run the command from the shell like '/usr/bin/wifidog -c /tmp/wifidog.conf' but is stop after some message print out.

[6][Mon May 29 23:06:07 2017][17667](conf.c:857) Reading configuration file '/tmp/wifidog.conf'
[6][Mon May 29 23:06:07 2017][17667](conf.c:1764) Locking domain
[6][Mon May 29 23:06:07 2017][17667](conf.c:1764) Domains locked
[6][Mon May 29 23:06:07 2017][17667](gateway.c:768) Forking into background
[6][Mon May 29 23:06:07 2017][17668](gateway.c:502) Setting started_time
root@LEDE:/tmp# [5][Mon May 29 23:06:07 2017][17668](gateway.c:534) Creating web server on 192.168.2.1:2060
[6][Mon May 29 23:06:07 2017][17668](util.c:92) Closing ICMP socket
[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:646) iptc_create_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:646) iptc_create_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:646) iptc_create_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:646) iptc_create_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:646) iptc_create_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:697) iptc_delete_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:697) iptc_delete_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:697) iptc_delete_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:697) iptc_delete_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:697) iptc_delete_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:646) iptc_create_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:646) iptc_create_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:646) iptc_create_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:646) iptc_create_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:646) iptc_create_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:646) iptc_create_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:646) iptc_create_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:646) iptc_create_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:646) iptc_create_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:697) iptc_delete_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:697) iptc_delete_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:697) iptc_delete_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:697) iptc_delete_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:697) iptc_delete_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:697) iptc_delete_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:697) iptc_delete_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:697) iptc_delete_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:697) iptc_delete_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:646) iptc_create_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:646) iptc_create_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:646) iptc_create_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:646) iptc_create_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:646) iptc_create_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:646) iptc_create_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:646) iptc_create_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:646) iptc_create_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:697) iptc_delete_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:697) iptc_delete_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:697) iptc_delete_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:697) iptc_delete_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:697) iptc_delete_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:697) iptc_delete_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:697) iptc_delete_chain(): No chain/target/match by that name

[3][Mon May 29 23:06:08 2017][17668](fw3_iptc.c:697) iptc_delete_chain(): No chain/target/match by that name

[6][Mon May 29 23:06:08 2017][17668](util.c:76) Creating ICMP socket
[6][Mon May 29 23:06:08 2017][17668](firewall.c:238) Initializing Firewall

i think it die and quit.

then i try to debug the code,and insert some log in some place ,after that, i found it quit after iptables -t mangle -I PREROUTING 1 -i br-lan -j WiFiDog_br-lan_Roam,when execute ·iptables -t mangle -A WiFiDog_br-lan_Roam -m set --match-set WiFiDog_br-lan_Roam src -j MARK --set-mark 2· the wifidog process exit without any error message.

there are some debug message


[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:268) iptables command failed(0): iptables -t filter -X WiFiDog_br-lan_Validate
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:259) Executing command: iptables -t filter -X WiFiDog_br-lan_Known
[3][Mon May 29 23:16:30 2017][29502](fw3_iptc.c:697) iptc_delete_chain(): No chain/target/match by that name

[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:268) iptables command failed(0): iptables -t filter -X WiFiDog_br-lan_Known
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:259) Executing command: iptables -t filter -X WiFiDog_br-lan_Unknown
[3][Mon May 29 23:16:30 2017][29502](fw3_iptc.c:697) iptc_delete_chain(): No chain/target/match by that name

[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:268) iptables command failed(0): iptables -t filter -X WiFiDog_br-lan_Unknown
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:1052) Destroying our ipset entries
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:191) Executing command: ipset destroy WiFiDog_br-lan_Trusted
[7][Mon May 29 23:16:30 2017][29502](wd_util.c:1350) Waiting for PID 29519 to exit
[7][Mon May 29 23:16:30 2017][29502](wd_util.c:1352) Process PID 29519 exited
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:191) Executing command: ipset destroy WiFiDog_br-lan_Roam
[7][Mon May 29 23:16:30 2017][29502](wd_util.c:1350) Waiting for PID 29521 to exit
[7][Mon May 29 23:16:30 2017][29502](wd_util.c:1352) Process PID 29521 exited
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:191) Executing command: ipset destroy WiFiDog_br-lan_Untrusted
[7][Mon May 29 23:16:30 2017][29502](wd_util.c:1350) Waiting for PID 29523 to exit
[7][Mon May 29 23:16:30 2017][29502](wd_util.c:1352) Process PID 29523 exited
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:191) Executing command: ipset destroy WiFiDog_br-lan_TDomains
[7][Mon May 29 23:16:30 2017][29502](wd_util.c:1350) Waiting for PID 29525 to exit
[7][Mon May 29 23:16:30 2017][29502](wd_util.c:1352) Process PID 29525 exited
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:191) Executing command: ipset destroy WiFiDog_br-lan_ITDomains
[7][Mon May 29 23:16:30 2017][29502](wd_util.c:1350) Waiting for PID 29527 to exit
[7][Mon May 29 23:16:30 2017][29502](wd_util.c:1352) Process PID 29527 exited
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:191) Executing command: ipset destroy WiFiDog_IPSET_TDomains
[7][Mon May 29 23:16:30 2017][29502](wd_util.c:1350) Waiting for PID 29529 to exit
[7][Mon May 29 23:16:30 2017][29502](wd_util.c:1352) Process PID 29529 exited
[6][Mon May 29 23:16:30 2017][29502](util.c:76) Creating ICMP socket
[6][Mon May 29 23:16:30 2017][29502](firewall.c:238) Initializing Firewall
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:191) Executing command: ipset create WiFiDog_br-lan_Trusted hash:mac timeout 0 
[7][Mon May 29 23:16:30 2017][29502](wd_util.c:1350) Waiting for PID 29531 to exit
[7][Mon May 29 23:16:30 2017][29502](wd_util.c:1352) Process PID 29531 exited
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:191) Executing command: ipset create WiFiDog_br-lan_Roam hash:mac timeout 0 
[7][Mon May 29 23:16:30 2017][29502](wd_util.c:1350) Waiting for PID 29533 to exit
[7][Mon May 29 23:16:30 2017][29502](wd_util.c:1352) Process PID 29533 exited
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:191) Executing command: ipset create WiFiDog_br-lan_Untrusted hash:mac timeout 0 
[7][Mon May 29 23:16:30 2017][29502](wd_util.c:1350) Waiting for PID 29535 to exit
[7][Mon May 29 23:16:30 2017][29502](wd_util.c:1352) Process PID 29535 exited
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:191) Executing command: ipset create WiFiDog_br-lan_TDomains hash:ip 
[7][Mon May 29 23:16:30 2017][29502](wd_util.c:1350) Waiting for PID 29537 to exit
[7][Mon May 29 23:16:30 2017][29502](wd_util.c:1352) Process PID 29537 exited
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:191) Executing command: ipset create WiFiDog_br-lan_ITDomains hash:ip 
[7][Mon May 29 23:16:30 2017][29502](wd_util.c:1350) Waiting for PID 29539 to exit
[7][Mon May 29 23:16:30 2017][29502](wd_util.c:1352) Process PID 29539 exited
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:191) Executing command: ipset create WiFiDog_IPSET_TDomains hash:ip 
[7][Mon May 29 23:16:30 2017][29502](wd_util.c:1350) Waiting for PID 29541 to exit
[7][Mon May 29 23:16:30 2017][29502](wd_util.c:1352) Process PID 29541 exited
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:259) Executing command: iptables -t mangle -N WiFiDog_br-lan_Roam
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:259) Executing command: iptables -t mangle -N WiFiDog_br-lan_Trusted
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:259) Executing command: iptables -t mangle -N WiFiDog_br-lan_Outgoing
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:259) Executing command: iptables -t mangle -N WiFiDog_br-lan_Incoming
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:259) Executing command: iptables -t mangle -N WiFiDog_br-lan_Pass
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:259) Executing command: iptables -t mangle -I PREROUTING 1 -i br-lan -j WiFiDog_br-lan_Outgoing
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:259) Executing command: iptables -t mangle -I PREROUTING 1 -i br-lan -j WiFiDog_br-lan_Trusted
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:259) Executing command: iptables -t mangle -I PREROUTING 1 -i br-lan -j WiFiDog_br-lan_Pass
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:259) Executing command: iptables -t mangle -I PREROUTING 1 -i br-lan -j WiFiDog_br-lan_Roam
[7][Mon May 29 23:16:30 2017][29502](fw_iptables.c:259) Executing command: iptables -t mangle -A WiFiDog_br-lan_Roam -m set --match-set WiFiDog_br-lan_Roam src -j MARK --set-mark 2

root@LEDE:/tmp# 
root@LEDE:/tmp# 

lede17.0.1 iptables1.6出错

iptables v1.6.1: Couldn't load match `state':No such file or directory

Try `iptables -h' or 'iptables --help' for more information.
[3][Mon May 29 13:52:45 2017][2885](fw_iptables.c:260) iptables command failed(2                                                                                        ): iptables -t filter -A WiFiDog_br-lan_Internet -m state --state INVALID -j DRO                                                                                        P
[3][Mon May 29 13:52:45 2017][2885](https_common.c:17) SSL_CTX_use_certificate_c                                                                                        hain_file failed:

error while compiling package

Hi,

I got this error while compiling IPK

make[3]: Leaving directory `/Volumes/OpenWRT/openwrt-CC/package/kernel/mac80211'
make[2]: Leaving directory `/Volumes/OpenWRT/openwrt-CC'
make[1]: *** [/Volumes/OpenWRT/openwrt-CC/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.package_compile] Error 2

I'm using MAC OS X as a compilation environment

通过mqtt接口无法删除ip白名单

操作步骤:
1.添加一个IP白名单:10.1.1.144;
2.执行mqtt命令行删除IP白名单:mosquitto_pub -h wifidog.kunteng.org -p 1883 -t wifidog/D4EE07251D16/request/111 -m "{"op":"del_trusted","type":"ip","value":"10.1.1.144","time":"201704261817"}
"
执行结果:
IP白名单未删除。

Captive portal behavior

Hi,

After two days of Apfree testing I noticed two issues:

1- Relative to android devices, each time my phone connect to WiFi a certificate error is prompting asking for confirmation in order to proceed.

2 - Apple devices doesn't automatically prompt the captive portal, I think apple domain names are allowed by default.

What do you think of this?

openwrt 15.05.1 do not compile if I add appfree wifidog

Hello,

I successfully compiled openWRT chaos Calmer 15.05.1 today, but if i add apfree_wifidog, it doesn't compile

here is the full list of commands :

git clone -b chaos_calmer git://github.com/openwrt/openwrt.git
 cd  <buildroot>
./scripts/feeds update -a
./scripts/feeds install -a

in another folder :

git clone https://github.com/liudf0716/apfree_wifidog
cd apfree_wifidog
cp -r package/apfree_wifidog/ /<buildroot>/package/

for Luci-apfree_wifidog, i used the method described in #85

I did not used you libevent2 package since I already selected the libevent2 package included with openWRT

make menuconfig

selected the following packages :

Target System: Atheros (AR7xxx/AR9xxx)
    Subtarget: Generic
    Target Profile : Ubiquiti products
    Target image : squashfs
Luci
	Collections > Luci, Luci-ssl 
	applications luci-app-diag-core, luci-app-commands, , luci-app-ntpc,  luci-app-sqm, luci-app-vnstat,luci-app-watchcat , luci-app-ddns, luci-apfree-wifidog
Administration
	htop
Utilities
	Editors > Nano 
	watchcat
Network
	Captive portals > apfree_wifidog
	File transfert > curl
	SSH > openssh-sftp-server
	iperf3
Languages
	Perl > Perl
Administration
	htop
Libraries
	SSL : libopenSSL
	libevent2

launched a download first, two times to verify in the log that everything is ok with the repositories server :
make download V=s 2>&1 | tee log-makedownload.txt | grep -i error

then i compiled :
sudo nice -n 18 make V=s 2>&1 | tee log-make-date.txt | grep -i error

the log is very long. i add it to this post. it ends with

Makefile:67: recipe for target '/media/zap/openwrtdisk/chaosCalmer2017/AirRouter/openwrt/build_dir/target-mips_34kc_uClibc-0.9.33.2/apfree_wifidog/apfree_wifidog-2.03.1061/.built' failed
make[3]: *** [/media/zap/openwrtdisk/chaosCalmer2017/AirRouter/openwrt/build_dir/target-mips_34kc_uClibc-0.9.33.2/apfree_wifidog/apfree_wifidog-2.03.1061/.built] Error 2
make[3]: Leaving directory '/media/zap/openwrtdisk/chaosCalmer2017/AirRouter/openwrt/package/apfree_wifidog'
package/Makefile:191: recipe for target 'package/apfree_wifidog/compile' failed
make[2]: *** [package/apfree_wifidog/compile] Error 2
make[2]: Leaving directory '/media/zap/openwrtdisk/chaosCalmer2017/AirRouter/openwrt'
package/Makefile:188: recipe for target '/media/zap/openwrtdisk/chaosCalmer2017/AirRouter/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.package_compile' failed
make[1]: *** [/media/zap/openwrtdisk/chaosCalmer2017/AirRouter/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.package_compile] Error 2
make[1]: Leaving directory '/media/zap/openwrtdisk/chaosCalmer2017/AirRouter/openwrt'
/media/zap/openwrtdisk/chaosCalmer2017/AirRouter/openwrt/include/toplevel.mk:181: recipe for target 'world' failed
make: *** [world] Error 2

i attach the .config file and the compile log file to this post

let me know if I can provide more information !
thanks !
config.txt
log-make-27april2017.txt

-m state --state

请使用-m conntrack --ctstate 替换 -m state --state
新版的LEDE里面的iptables默认已去掉state模块的支持。

15.05 make error

Linking C executable wifidog
CMakeFiles/wifidog.dir/wd_util.c.o: In function wd_gethostbyname': wd_util.c:(.text+0x2804): warning: gethostbyname is obsolescent, use getnameinfo() instead. /home/xlive/15.05.1-MTK/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/lib/libuci.so: warning: the use of mktemp' is dangerous, better use mkstemp' CMakeFiles/wifidog.dir/simple_http.c.o: In function evhttps_request':
simple_http.c:(.text+0x10c4): undefined reference to bufferevent_openssl_set_allow_dirty_shutdown' simple_http.c:(.text+0x10e0): undefined reference to evhttp_connection_base_bufferevent_new'
CMakeFiles/wifidog.dir/https_server.c.o: In function thread_https_server': https_server.c:(.text+0x9bc): undefined reference to evhttp_set_bevcb'
collect2: error: ld returned 1 exit status
make[5]: *** [src/wifidog] Error 1
make[5]: Leaving directory /home/xlive/15.05.1-MTK/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/apfree_wifidog/apfree_wifidog-2.03.1061' make[4]: *** [src/CMakeFiles/wifidog.dir/all] Error 2 make[4]: Leaving directory /home/xlive/15.05.1-MTK/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/apfree_wifidog/apfree_wifidog-2.03.1061'
make[3]: *** [all] Error 2
make[3]: Leaving directory /home/xlive/15.05.1-MTK/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/apfree_wifidog/apfree_wifidog-2.03.1061' make[2]: *** [/home/xlive/15.05.1-MTK/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/apfree_wifidog/apfree_wifidog-2.03.1061/.built] Error 2 make[2]: Leaving directory /home/xlive/15.05.1-MTK/package/network/apfree_wifidog'
make[1]: *** [package/network/apfree_wifidog/compile] Error 2
make[1]: Leaving directory `/home/xlive/15.05.1-MTK'
make: *** [package/apfree_wifidog/compile] Error 2

请问auth_server_port端口不支持443 ,是我编译问题还是?

路由固件版本:opnewrt CC 15.05.1
libopenssl版本: 1.0.2j
libevent2版本:release-2.1.8-stable

除了认证服务器不支持https外.

认证的时候在firefox 和 chrome中 HSTS的网站会报错. (比如https://www.google.com 貌似百度现在也启用hsts),只有忽略错误后才能弹出认证页面.

openwrt 有个luci-app-koolproxy 过滤广告支持https的.
它安装运行后在地址栏输入110.110.110.110 会弹出根证书安装.
不知道通过类似的方法能不能解决HSTS网站报错的问题.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.