wifidog有时会弹出如下页面:
这个页面是wifidog.conf 中HtmlMessageFile 指定的模板页面在wifidog 运行出错时再填充这个模板页面得到的页面,可以在wifidog 的源码中查看函数send_http_page 调用之处,即为页面出现的情况。
比如http.c中:
else if (!is_auth_online()) {
/* The auth server is down at the moment - apologize and do not redirect anywhere */
char * buf;
safe_asprintf(&buf,
"<p>We apologize, but it seems that we are currently unable to re-direct you to the login screen.</p>"
"<p>The maintainers of this network are aware of this disruption. We hope that this situation will be resolved soon.</p>"
"<p>In a couple of minutes please <a href='%s'>click here</a> to try your request again.</p>", tmp_url);
send_http_page(r, "Uh oh! Login screen unavailable!", buf);
free(buf);
debug(LOG_INFO, "Sent %s an apology since auth server not online - no point sending them to auth server", r->clientAddr);
}
这段代码其实就是显示上图的地方,send_http_page把HtmlMessageFile 的title 和内容message 提供给页面,然后就显示出来了。
本文章由 http://www.wifidog.pro/2015/02/12/wifidog%E7%BB%BF%E5%B1%8F-1.html 整理编辑,转载请注明出处