mirror of
https://github.com/netbirdio/netbird.git
synced 2026-05-18 06:39:54 +00:00
force temp relay
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
|
||||
auth "github.com/netbirdio/netbird/relay/auth/hmac"
|
||||
"github.com/netbirdio/netbird/relay/client/dialer/quic"
|
||||
"github.com/netbirdio/netbird/relay/client/dialer/ws"
|
||||
"github.com/netbirdio/netbird/relay/healthcheck"
|
||||
"github.com/netbirdio/netbird/relay/messages"
|
||||
)
|
||||
@@ -259,7 +260,14 @@ func (c *Client) Close() error {
|
||||
}
|
||||
|
||||
func (c *Client) connect() error {
|
||||
conn, err := quic.Dial(c.connectionURL)
|
||||
var conn net.Conn
|
||||
var err error
|
||||
if c.connectionURL == "rels://temp-relay-quic.relay.netbird.io:443" {
|
||||
log.Infof("connecting to relay server %s using quic protocol", c.connectionURL)
|
||||
conn, err = quic.Dial(c.connectionURL)
|
||||
} else {
|
||||
conn, err = ws.Dial(c.connectionURL)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -26,8 +26,8 @@ func Dial(address string) (net.Conn, error) {
|
||||
defer cancel()
|
||||
|
||||
tlsConf := &tls.Config{
|
||||
InsecureSkipVerify: true, // Set to true only for testing
|
||||
NextProtos: []string{"netbird-relay"}, // Ensure this matches the server's ALPN
|
||||
InsecureSkipVerify: true, // Set to true only for testing
|
||||
NextProtos: []string{"h2"}, // Ensure this matches the server's ALPN
|
||||
}
|
||||
|
||||
quicConfig := &quic.Config{
|
||||
|
||||
Reference in New Issue
Block a user