mirror of
https://github.com/pion/ice.git
synced 2025-11-02 19:44:00 +08:00
Add Username/Password to URL
Needed to allow auth for TURN
This commit is contained in:
@@ -41,4 +41,10 @@ var (
|
||||
|
||||
// ErrRemotePwdEmpty indicates agent was started with an empty remote pwd
|
||||
ErrRemotePwdEmpty = errors.New("remote pwd is empty")
|
||||
|
||||
// ErrUsernameEmpty indicates agent was give TURN URL with an empty Username
|
||||
ErrUsernameEmpty = errors.New("username is empty")
|
||||
|
||||
// ErrPasswordEmpty indicates agent was give TURN URL with an empty Password
|
||||
ErrPasswordEmpty = errors.New("password is empty")
|
||||
)
|
||||
|
||||
10
url.go
10
url.go
@@ -99,10 +99,12 @@ func (t ProtoType) String() string {
|
||||
|
||||
// URL represents a STUN (rfc7064) or TURN (rfc7065) URL
|
||||
type URL struct {
|
||||
Scheme SchemeType
|
||||
Host string
|
||||
Port int
|
||||
Proto ProtoType
|
||||
Scheme SchemeType
|
||||
Host string
|
||||
Port int
|
||||
Username string
|
||||
Password string
|
||||
Proto ProtoType
|
||||
}
|
||||
|
||||
// ParseURL parses a STUN or TURN urls following the ABNF syntax described in
|
||||
|
||||
Reference in New Issue
Block a user