Skip to content

Commit

Permalink
[client] allow relay leader on iOS (#2795)
Browse files Browse the repository at this point in the history
  • Loading branch information
pascal-fischer authored Oct 28, 2024
1 parent 940f8b4 commit 1e44c5b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions client/internal/peer/ice/agent.go
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down Expand Up @@ -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}
}

Expand Down

0 comments on commit 1e44c5b

Please sign in to comment.