Tornaco / Thanox

I am thanos! 😈 👌
https://tornaco.github.io/Thanox-Docs/
Apache License 2.0
2.12k stars 88 forks source link

希望增加网络状态详细变化的condition #475

Open suroot66 opened 2 years ago

suroot66 commented 2 years ago

Is your feature request related to a problem? Please describe. 【情景】 我希望监听网络状态变化的事件,从而动态修改当前dns (dns会随着网络状态的切换而自动切换,我想使用自定义的dns,不得不在每次网络状态变化后都修改一次)

Describe the solution you'd like 【期望】 添加网络详细状态变化的判断条件,包括诸如4g 到 3g的变化、2g 到 wifi的变化,wifi时切换连接状态的变化(诸如从wifi1切换到wifi2、从wifi2掉线变为未连接状态)

Describe alternatives you've considered 【alternatives】 目前没有找到什么好的shell命令解决方案,只能通过vpn软件常驻后台来保持修改dns

Additional context 目前掌握的终端命令修改方式(效果只能持续到下一次网络状态变更) getprop | grep dns # 获取dns属性名称 setprop net.dns1 223.6.6.6 # 设置dns属性值

Tornaco commented 2 years ago

后续会提供两个State用于判断当前和上一次的网络状态

stale[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.