Skip to content

Latest commit

 

History

History
120 lines (88 loc) · 4.39 KB

README_ZH.md

File metadata and controls

120 lines (88 loc) · 4.39 KB

WifiDog-ng

license PRs Welcome Issue Welcome Release Version

WifiDog-ng一个非常高效的无线热点认证解决方案。使用Lua实现。

请保持关注以获取最新的项目动态

特性

  • 采用Lua编写,即改即得,开发效率非常高
  • 使用ipset以及编写内核模块实现认证管理,而不是使用iptables创建防火墙规则
  • 支持漫游
  • 代码结构清晰,通俗易懂

UCI配置选项

Section gateway

名称 类型 是否必须 默认值 描述
enabled bool no 0 是否开启wifidog-ng
dhcp_host_white bool no 1 dhcp中的mac为白名单
id string no 网关ID,如果未设置,将使用ifname的macaddr
interface Openwrt interface no lan wifidog-ng监听接口
port port number no 2060 wifidog-ng监听端口
ssl_port port number no 8443 wifidog-ng监听端口(ssl)
ssid ssid no 用于微信认证
checkinterval seconds no 30 心跳间隔
temppass_time seconds no 30 临时放行时间

Section server

名称 类型 是否必须 默认值
host string yes no
port port number no 80
ssl bool no 0
path string no /wifidog
login_path string no login
portal_path string no portal
msg_path string no gw_message.php
ping_path string no ping
auth_path string no auth

Section validated_user

名称 类型 描述
mac string mac地址
comment string 注释

Section validated_domain

名称 类型 描述
domain string 可以是一个域名或者ip地址
comment string 注释

协议

网关心跳

http://authserver/wifidog/ping?gw_id=xx&sys_uptime=xx&sys_memfree=xx&sys_load=xx&wifidog_uptime=xx

认证服务器应返回:Pong

登录

http://authserver/wifidog/login?gw_address=xx&gw_port=xx&gw_id=xx&ip=xx&mac=xx&ssid=xx

认证

http://gw_address:gw_port/wifidog/auth?token=xx

认证确认

http://authserver/wifidog/auth?stage=login&ip=xx&mac=xx&token=xx&incoming=xx&outgoing=xx

认证服务器应返回:"Auth: 1" 或者 "Auth: 0"

漫游

http://authserver/wifidog/auth?stage=roam&ip=xx&max=xx

认证服务器应返回:""token=xxxxxxx" 或者其它任意字符串

临时放行

http://gw_address:gw_port/wifidog/temppass?script=startWeChatAuth();

管理

踢终端下线

wget "http://lanip:2060/wifidog/ctl?op=kick&mac=0C:1D:AF:C4:DB:FC" -O /dev/null

重载配置

wget "http://lanip:2060/wifidog/ctl?op=reload" -O /dev/null

查看在线终端

ipset list wifidog-ng-mac

谁在使用wifidog-ng

贡献代码

如果你想帮助wifidog-ng变得更好,请参考 CONTRIBUTING_ZH.md

技术交流

QQ群:153530783

如果该项目对您有帮助,请随手star,谢谢!