Improve VPN video routing, profile storage and authorization reuse
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package bridge
|
||||
|
||||
// The measured macOS VLESS/Reality Vision path benefits from video TCP fallback.
|
||||
// Share the narrowly scoped policy with Android's platform-owned TUN. Native
|
||||
// UDP proxies, custom routing policies and unrelated QUIC remain unchanged.
|
||||
func (c Config) preferVideoTCPOn(platform string) bool {
|
||||
tun := (platform == "darwin" && c.DesktopTun) || (platform == "android" && c.Tun != nil)
|
||||
if !tun || c.Proxy == nil ||
|
||||
c.Proxy["type"] != "vless" || c.Proxy["flow"] != "xtls-rprx-vision" || c.Proxy["transport"] != nil {
|
||||
return false
|
||||
}
|
||||
tls, ok := c.Proxy["tls"].(map[string]any)
|
||||
if !ok || tls["enabled"] != true {
|
||||
return false
|
||||
}
|
||||
reality, ok := tls["reality"].(map[string]any)
|
||||
return ok && reality["enabled"] == true
|
||||
}
|
||||
Reference in New Issue
Block a user