-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
fix: check if service installed when toggle tun mode on tray #4975
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
base: dev
Are you sure you want to change the base?
Conversation
在勿打扰 / 未授予系统通知权限,用户无法知道发生了什么。或许可以触发安装服务、开启TUN,或者托盘禁用? |
05fc78e
to
8cc9d06
Compare
@Tunglies 从系统托盘Tun模式进行触发点击服务安装的方法涉及的地方修改太多了,需要处理不同的服务状态,重启内核操作,我认为让用户在前端侧安装服务模式可以更直观的观察服务/内核状态 |
启用 TUN,退出程序,删除 socket,进入,提示TUN不可用自动关闭,未见卡死,内核正常启动与测速。 缺陷,从不可用TUN fallback时内核正常启动,但无法使用代理,手动执行开关代理无作用,重启程序后代理正常。macos。 |
|
||
/// Toggle TUN mode on/off | ||
pub async fn toggle_tun_mode(not_save_file: Option<bool>) { | ||
if !cmd::system::is_admin().unwrap_or_default() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
现在 UI 安装服务后不会立即刷新页面状态,需要切换页面几次。 |
Closes: #4864
修复自动关闭 Tun 模式操作导致应用卡死
通过系统托盘启用Tun模式前,检查用户和服务状态
如果用户为 非管理员,并且 服务未安装,弹出系统通知消息,告知用户需要安装服务模式