Only consider /16 network when using direct mode

This commit is contained in:
braginini
2023-04-08 17:37:48 +02:00
parent db5f931373
commit 189321f09d

View File

@@ -340,7 +340,7 @@ func shouldUseProxy(pair *ice.CandidatePair, userspaceBind bool) bool {
return false
}
if isHostCandidateWithPrivateIP(pair.Local) && isHostCandidateWithPrivateIP(pair.Remote) && isSameNetworkPrefix(pair) {
if isHostCandidateWithPrivateIP(pair.Local) && isHostCandidateWithPrivateIP(pair.Remote) && !isSameNetworkPrefix(pair) {
return false
}