原链接 https://www.noisyfox.io/android-captive-portal.html
noisyfox 2014年12月16日
叹号杀手源码在此:https://github.com/Noisyfox/NoExclamation
最新版本下载地址:https://github.com/Noisyfox/NoExclamation/releases
7.1.2
谷歌又玩我23333
自7.1.2(开始?),”captive_portal_detection_enabled”设置已被废弃,现在改为了”captive_portal_mode”选项,该选项可设置为以下3种值:
- 0:彻底禁用检测(Don’t attempt to detect captive portals.)
- 1:检测到需要登录则弹窗提醒(默认值)(When detecting a captive portal, display a notification that prompts the user to sign in.)
- 2:检测到需要登录则自动断开此热点并不再自动连接(When detecting a captive portal, immediately disconnect from the network and do not reconnect to that network in the future.)
叹号杀手已经更新以支持该版本。
但愿以后谷歌不要再乱改了233333
感谢 jingyu9575 的帮助 https://github.com/Noisyfox/NoExclamation/issues/2
7.1.1
从7.1.1开始,检测用的服务器地址储存格式发生了变化,改为了:
1 | private static String getCaptivePortalServerHttpsUrl(Context context) { |
以及
1 | public static String getCaptivePortalServerHttpUrl(Context context) { |
adb shell “settings put global captive_portal_https_url https://www.noisyfox.cn/generate_204“
1 |
|
adb shell “settings put global captive_portal_use_https 0”
adb shell “settings put global captive_portal_http_url http://www.noisyfox.cn/generate_204“
1 | 复原方法见下文。 |
adb shell “settings put global captive_portal_use_https 0”
1 | 禁用https即可。 |
adb shell “settings put global captive_portal_use_https 1”
1 | 或者 |
adb shell “settings delete global captive_portal_use_https”
1 | # 5.0-6.0 |
adb shell “settings put global captive_portal_detection_enabled 0”
1 | 2.用国内的服务器替换掉google的服务器: |
adb shell “settings put global captive_portal_server noisyfox.cn”
1 |
|
adb shell “settings put global captive_portal_detection_enabled 1”
1 | 或者 |
adb shell “settings delete global captive_portal_detection_enabled”
1 | 第二条指令的恢复直接delete即可: |
adb shell “settings delete global captive_portal_server”
1 | 如果你对本站提供的服务速度不满意,可以在文末找到网友提供的其它服务地址。 |
2.对于nginx,直接加入以下设置即可:
1 | location /generate_204 { return 204; } |
3.如果以上方法都无效,那么就要利用代码中的一个小trick来完成,直接在网站的根目录下建立一个叫做“generate_204”的空文件即可,因为安卓的源码中写了如果返回的内容为空那么也会当成204(毕竟一个空的页面怎么想都不可能是登录页面嘛!)。
一键设置工具(需要root)
锵锵锵!由于有些人不太熟悉adb之类的操作,因此就做了一个小工具方便大家直接在手机上设置!

下载地址
最新版请移步:https://github.com/Noisyfox/NoExclamation/releases
NoExclamation Portal Server 修改器 1.2
Download Now!1914 Downloads
NoExclamation Portal Server 修改器 2.0
叹号杀手 2.0
支持 Android 7.1.1
1.5
修正了应用崩溃的问题
1.4
增加图标
替换网址为英文网址
优化了重置网址功能
优化界面,在修改网址时不会导致界面卡顿
Download Now!1100 Downloads
一些其它服务网址
我会尽我所能提供长期有效的服务,但是由于本站服务器不是很快,而且网络状况有时候会不稳定,因此无法保证100%可靠的服务。不过有一些热心网友提供了其它服务网址,速度和稳定性或许会比本站要好。故在此特别列出供大家选用。如果给提供者带来不便之处请回复告知,我会及时删除。
by fengz: captive.v2ex.co V2EX建立的服务,速度不错,稳定性也很不错,具体信息请查看 https://www.v2ex.com/t/303889
by lkebin: liukebin.avosapps.com 架设于LeanCloud服务器,据lkebin称是永久有效
by Zohar: www.iwch.me 热心网友的个人站点