-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Fix sniffing #5173
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
Fix sniffing #5173
Conversation
Updated getV2rayCustomConfig to check for the presence of a 'tun' inbound in the configuration. If not present and HevTun is not used, the method adds a 'tun' inbound from the template configuration and updates the config accordingly.
|
自定义配置中也会自动加入 tun inbound ,也需要修改。 |
|
或者把 getinbound 里面的 sniffing 部分代码独立出来复用 |
|
感觉有点做复杂了, |
|
|
| // add tun inbound from template | ||
| val templateConfig = initV2rayConfig(context) ?: return result | ||
| val inboundTun = templateConfig.inbounds.firstOrNull { it.tag == "tun" } ?: return result | ||
| inboundTun.settings?.mtu = SettingsManager.getVpnMtu() |
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.
这样吧,这里不要了,就读取默认的json 就行了。用户如果需要更细控制,自己写tun 在自定义配置里就好了,完美
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.
好了
No description provided.