mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-15 03:11:02 +01:00
Remove env var for debug purpose
This commit is contained in:
parent
e75fbd34a7
commit
233a7b9802
@ -316,11 +316,6 @@ func (c *ConnectClient) run(
|
||||
}
|
||||
|
||||
func parseRelayInfo(resp *mgmProto.LoginResponse) (string, *hmac.Token) {
|
||||
// todo remove this
|
||||
if ra := peer.ForcedRelayAddress(); ra != "" {
|
||||
return ra, nil
|
||||
}
|
||||
|
||||
msg := resp.GetWiretrusteeConfig().GetRelay()
|
||||
if msg == nil {
|
||||
return "", nil
|
||||
|
@ -16,13 +16,6 @@ const (
|
||||
envICEForceRelayConn = "NB_ICE_FORCE_RELAY_CONN"
|
||||
)
|
||||
|
||||
func ForcedRelayAddress() string {
|
||||
if envRelay := os.Getenv("NB_RELAY_ADDRESS"); envRelay != "" {
|
||||
return envRelay
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func iceKeepAlive() time.Duration {
|
||||
keepAliveEnv := os.Getenv(envICEKeepAliveIntervalSec)
|
||||
if keepAliveEnv == "" {
|
||||
|
@ -103,10 +103,6 @@ func (h *Handshaker) SendOffer() error {
|
||||
// OnRemoteOffer handles an offer from the remote peer and returns true if the message was accepted, false otherwise
|
||||
// doesn't block, discards the message if connection wasn't ready
|
||||
func (h *Handshaker) OnRemoteOffer(offer OfferAnswer) bool {
|
||||
// todo remove this if signaling can support relay
|
||||
if ForcedRelayAddress() != "" {
|
||||
offer.RelaySrvAddress = ForcedRelayAddress()
|
||||
}
|
||||
select {
|
||||
case h.remoteOffersCh <- offer:
|
||||
return true
|
||||
@ -120,10 +116,6 @@ func (h *Handshaker) OnRemoteOffer(offer OfferAnswer) bool {
|
||||
// OnRemoteAnswer handles an offer from the remote peer and returns true if the message was accepted, false otherwise
|
||||
// doesn't block, discards the message if connection wasn't ready
|
||||
func (h *Handshaker) OnRemoteAnswer(answer OfferAnswer) bool {
|
||||
// todo remove this if signaling can support relay
|
||||
if ForcedRelayAddress() != "" {
|
||||
answer.RelaySrvAddress = ForcedRelayAddress()
|
||||
}
|
||||
select {
|
||||
case h.remoteAnswerCh <- answer:
|
||||
return true
|
||||
|
Loading…
Reference in New Issue
Block a user