From 1e44c5b5747409c2e34fb3e4ae65bf26697adc3b Mon Sep 17 00:00:00 2001 From: pascal-fischer <32096965+pascal-fischer@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:55:00 +0100 Subject: [PATCH] [client] allow relay leader on iOS (#2795) --- client/internal/peer/ice/agent.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/client/internal/peer/ice/agent.go b/client/internal/peer/ice/agent.go index b2a966936..dc4750f24 100644 --- a/client/internal/peer/ice/agent.go +++ b/client/internal/peer/ice/agent.go @@ -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} }