Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【讨论】探测可用性网址是否改为纯IP #50

Closed
250king opened this issue Sep 5, 2024 · 3 comments
Closed

【讨论】探测可用性网址是否改为纯IP #50

250king opened this issue Sep 5, 2024 · 3 comments

Comments

@250king
Copy link
Contributor

250king commented Sep 5, 2024

临近开学,回校就重新架设自动登录。后来宿舍反馈经常掉线。
我后来仔细分析一下,看到很多探测错误:

……
[05:58:31 022] ERROR [com.rsplwe.esurfing.DialerApp] (DialerApp$main$networkCheck$1:77) - Request Error: connect.rom.miui.com
[05:58:32 023] ERROR [com.rsplwe.esurfing.DialerApp] (DialerApp$main$networkCheck$1:77) - Request Error: connect.rom.miui.com
[05:58:33 025] ERROR [com.rsplwe.esurfing.DialerApp] (DialerApp$main$networkCheck$1:77) - Request Error: connect.rom.miui.com
[05:58:34 026] ERROR [com.rsplwe.esurfing.DialerApp] (DialerApp$main$networkCheck$1:77) - Request Error: connect.rom.miui.com
[05:58:35 027] ERROR [com.rsplwe.esurfing.DialerApp] (DialerApp$main$networkCheck$1:77) - Request Error: connect.rom.miui.com
……

重启就没事了,但过一阵子又出现问题了
后来在掉线的时候我尝试ping connect.rom.miui.com,结果发现不通,但如果curl http://223.5.5.5/(阿里云DoH)会正确302到认证网页,也就意味着如果在没有登录的情况下在部分学校连DNS都会屏蔽
后来我也根据我的想法把探测URL改为上述的网址,并稍微修改逻辑,截至目前没有问题了

@Rsplwe
Copy link
Owner

Rsplwe commented Sep 5, 2024

可以手动在hosts里设置ip

@250king
Copy link
Contributor Author

250king commented Sep 7, 2024

其实我还有一个想法,就是先ping网关来检测局域网是否正常,然后ping外网任意网站来检查网络是否可以访问,如果ping超时HTTP获得IP和AC,如果正常也可以通过HTTP增强检测

@250king
Copy link
Contributor Author

250king commented Sep 9, 2024

#56

@250king 250king closed this as completed Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants