WiFidog的认证页面的/login /auth /ping和/portal

我们在wifidog.conf 文件里可以看到auth server的相关信息,未修改的.conf包含两种auth server配置:
1)第一种:

AuthServer {
       Hostname                 (Mandatory; Default: NONE)
       SSLAvailable             (Optional; Default: no; Possible values: yes, no)
       SSLPort                  (Optional; Default: 443)
       HTTPPort                 (Optional; Default: 80)
       Path                     (Optional; Default: /wifidog/ Note:  The path must be both prefixed and suffixed by /.  Use a single / for server root.)
   LoginScriptPathFragment  (Optional; Default: login/? Note:  This is the script the user will be sent to for login.)
   PortalScriptPathFragment (Optional; Default: portal/? Note:  This is the script the user will be sent to after a successfull login.)
   MsgScriptPathFragment    (Optional; Default: gw_message.php? Note:  This is the script the user will be sent to upon error to read a readable message.)
   PingScriptPathFragment    (Optional; Default: ping/? Note:  This is the script the user will be sent to upon error to read a readable message.)
   AuthScriptPathFragment    (Optional; Default: auth/? Note:  This is the script the user will be sent to upon error to read a readable message.)
}

2)第二种:

AuthServer {
    Hostname auth.ilesansfil.org
    SSLAvailable yes
    Path /
}

很明显得第一种配置的比较多一些。
区别在于,第二种使用的是默认配置,在conf.h里可以看到相关的宏定义,且conf.h里默认的值和第一种注释里的值是相同的,即
LoginScriptPathFragment Default: login/
PortalScriptPathFragment Default: portal/
MsgScriptPathFragment Default: gw_message.php?
PingScriptPathFragment Default: ping/
AuthScriptPathFragment Default: auth/

这里我们来说下login portal ping auth到底是用来做什么的。
login: 用在登录协议http://auth_server/login/?gw_id=xxx&gw_address=xxx&gw_port=xxx&url=xxx,是路由器重定向浏览器对auth server 的login的访问。

auth: http://auth_server/auth/?stage=xxx&ip=xxx&mac=xxx& token=xxx&incoming=xxx&outgoing=xxx&gw_id=xxx, stage=login/logout/counter三种,路由器向auth server验证客户端的token。

ping:http://auth_server/ping/?gw_id=xxx&sys_uptime=xxx&sys_memfree&sys_load=xxx&wifidog_uptime=xxx,路由器定时向auth server发送自己的状态,证明自己是在工作的。

portal: http://auth_server/portal/?gw_id=xxx,认证成功后,路由器重定向客户端到auth server的portal。

本文章由http://www.wifidog.pro/2015/01/27/wifidog%E8%AE%A4%E8%AF%81-2.html整理编辑,转载请注明出处

标签: wifidog认证 wifidog安装 wifidog原理 wifidog分析 wifidog配置 wifidog流程 wifidog服务器 wifidog-ddwrt wifidog openwrt