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 }