mirror of
https://github.com/netbirdio/netbird.git
synced 2026-05-08 17:59:56 +00:00
Add IPv6 cases to relay WS prepareURL tests
This commit is contained in:
@@ -41,6 +41,16 @@ func TestPrepareURL(t *testing.T) {
|
||||
input: "rel://relay.example.com:45678",
|
||||
want: "ws://relay.example.com:45678/relay",
|
||||
},
|
||||
{
|
||||
name: "rel scheme with IPv6 and port",
|
||||
input: "rel://[2001:db8::1]:45678",
|
||||
want: "ws://[2001:db8::1]:45678/relay",
|
||||
},
|
||||
{
|
||||
name: "rels scheme with IPv6 loopback and port",
|
||||
input: "rels://[::1]:45678",
|
||||
want: "wss://[::1]:45678/relay",
|
||||
},
|
||||
{
|
||||
name: "unsupported scheme",
|
||||
input: "http://test-domain-2:45678",
|
||||
|
||||
Reference in New Issue
Block a user