Bypass other host candidates with UDPMux

Separate candidate gathering when UDPMux is enabled.
Only a single UDP host candidate should be generated
that points to the mux.
This commit is contained in:
David Zhao
2021-04-23 00:05:52 -07:00
parent 894452d0c3
commit c4d5d1c670
3 changed files with 78 additions and 18 deletions

View File

@@ -109,9 +109,6 @@ var (
// ErrTCPRemoteAddrAlreadyExists indicates we already have the connection with same remote addr.
ErrTCPRemoteAddrAlreadyExists = errors.New("conn with same remote addr already exists")
// ErrMuxNotStarted indicates the Mux has not been started prior to use
ErrMuxNotStarted = errors.New("mux must be started first")
errSendPacket = errors.New("failed to send packet")
errAttributeTooShortICECandidate = errors.New("attribute not long enough to be ICE candidate")
errParseComponent = errors.New("could not parse component")
@@ -132,4 +129,6 @@ var (
errUnknownRole = errors.New("unknown role")
errMismatchUsername = errors.New("username mismatch")
errICEWriteSTUNMessage = errors.New("the ICE conn can't write STUN messages")
errUDPMuxDisabled = errors.New("UDPMux is not enabled")
errCandidateIPNotFound = errors.New("could not determine local IP for Mux candidate")
)