Workaround the delay between auth
command return success and online
command can access Internet, by adding sleep 3
#40
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
最近观察到了一个现象(似乎以前并无这种现象):
使用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。不够优雅,但亲测有效,所以就当抛砖引玉了。