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

Workaround the delay between auth command return success and online command can access Internet, by adding sleep 3 #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Starrah
Copy link
Contributor

@Starrah Starrah commented Aug 30, 2024

最近观察到了一个现象(似乎以前并无这种现象):
使用goauthing认证,auth-thu auth成功返回0后,立刻发起网络请求(如auth-thu online),还是会返回自签名证书和Authentication is required。
也就是说,并不是auth4返回认证成功后就立刻能上外网,一定要等个几秒(目前测试3秒是足够的)才能成功访问外网。
测试网络环境:东配楼有线校园网 IPV4 166.111.80.0/22内。似乎IPV6无此现象。此外也有自强楼的同学反映也存在着同样的情况。

引起的问题主要是,goauthing的systemd配置实现是deauth、auth之后立刻online保活。于是由于上述延迟的存在,紧跟着auth/login命令后马上执行的online是几乎一定会挂掉(exit 1)的。于是unit failed,systemd把它自动重启,又deauth、auth、立刻online导致挂掉......导致始终无法稳定连上网。

我目前想到的比较容易的一种解决方法就是在auth/login和online之间加个sleep 3。不够优雅,但亲测有效,所以就当抛砖引玉了。

…`online`.

This is to workaround the delay between `auth` command return success and `online` command can access Internet.
@Starrah
Copy link
Contributor Author

Starrah commented Aug 30, 2024

PS:这个PR和#39 是相互冲突的,所以可能得一个一个合

@jiegec
Copy link
Collaborator

jiegec commented Aug 30, 2024

或者修改 online 的逻辑,连续试几次?

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

Successfully merging this pull request may close these issues.

2 participants