Skip to content
New issue

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

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

Already on GitHub? # to your account

Android 设备无法关闭vpn #38

Open
gitHubDujianfeng opened this issue May 23, 2023 · 1 comment
Open

Android 设备无法关闭vpn #38

gitHubDujianfeng opened this issue May 23, 2023 · 1 comment
Assignees

Comments

@gitHubDujianfeng
Copy link

尝试在TunnelService 类里面的onStartCommand 方法里面添加stopRunner()方法但是这个方法关闭vpn后、再次连接无法访问网络 override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { val data = data if (data.state != VpnState.State.Stopped) { Log.i("vpn状态:","关闭事件") stopRunner() return Service.START_NOT_STICKY } Log.i("vpn状态:","开启事件") try { data.proxy = TunnelInstance() } catch (e: IllegalArgumentException) { stopRunner(false, e.message) return Service.START_NOT_STICKY }

@chenchen90845
Copy link

这个你解决了吗?@gitHubDujianfeng

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants