[client] allow relay leader on iOS (#2795)

This commit is contained in:
pascal-fischer 2024-10-28 16:55:00 +01:00 committed by GitHub
parent 940f8b4547
commit 1e44c5b574
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,13 +1,14 @@
package ice
import (
"github.com/netbirdio/netbird/client/internal/stdnet"
"time"
"github.com/pion/ice/v3"
"github.com/pion/randutil"
"github.com/pion/stun/v2"
log "github.com/sirupsen/logrus"
"runtime"
"time"
"github.com/netbirdio/netbird/client/internal/stdnet"
)
const (
@ -77,10 +78,7 @@ func CandidateTypes() []ice.CandidateType {
if hasICEForceRelayConn() {
return []ice.CandidateType{ice.CandidateTypeRelay}
}
// TODO: remove this once we have refactored userspace proxy into the bind package
if runtime.GOOS == "ios" {
return []ice.CandidateType{ice.CandidateTypeHost, ice.CandidateTypeServerReflexive}
}
return []ice.CandidateType{ice.CandidateTypeHost, ice.CandidateTypeServerReflexive, ice.CandidateTypeRelay}
}