mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-04 22:10:56 +01:00
force temp relay
This commit is contained in:
parent
276b6126c1
commit
5b4aed781f
@ -230,7 +230,7 @@ func (c *ConnectClient) run(mobileDependency MobileDependency, probes *ProbeHold
|
||||
c.statusRecorder.MarkSignalConnected()
|
||||
|
||||
relayURLs, token := parseRelayInfo(loginResp)
|
||||
relayManager := relayClient.NewManager(engineCtx, relayURLs, myPrivateKey.PublicKey().String())
|
||||
relayManager := relayClient.NewManager(engineCtx, []string{"rels://temp-relay-quic.relay.netbird.io:443"}, myPrivateKey.PublicKey().String())
|
||||
c.statusRecorder.SetRelayMgr(relayManager)
|
||||
if len(relayURLs) > 0 {
|
||||
if token != nil {
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ func Dial(address string) (net.Conn, error) {
|
||||
|
||||
tlsConf := &tls.Config{
|
||||
InsecureSkipVerify: true, // Set to true only for testing
|
||||
NextProtos: []string{"netbird-relay"}, // Ensure this matches the server's ALPN
|
||||
NextProtos: []string{"h2"}, // Ensure this matches the server's ALPN
|
||||
}
|
||||
|
||||
quicConfig := &quic.Config{
|
||||
|
Loading…
Reference in New Issue
Block a user