mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-21 18:22:37 +02: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) {
|
func parseRelayInfo(resp *mgmProto.LoginResponse) (string, *hmac.Token) {
|
||||||
// todo remove this
|
|
||||||
if ra := peer.ForcedRelayAddress(); ra != "" {
|
|
||||||
return ra, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
msg := resp.GetWiretrusteeConfig().GetRelay()
|
msg := resp.GetWiretrusteeConfig().GetRelay()
|
||||||
if msg == nil {
|
if msg == nil {
|
||||||
return "", nil
|
return "", nil
|
||||||
|
@ -16,13 +16,6 @@ const (
|
|||||||
envICEForceRelayConn = "NB_ICE_FORCE_RELAY_CONN"
|
envICEForceRelayConn = "NB_ICE_FORCE_RELAY_CONN"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ForcedRelayAddress() string {
|
|
||||||
if envRelay := os.Getenv("NB_RELAY_ADDRESS"); envRelay != "" {
|
|
||||||
return envRelay
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func iceKeepAlive() time.Duration {
|
func iceKeepAlive() time.Duration {
|
||||||
keepAliveEnv := os.Getenv(envICEKeepAliveIntervalSec)
|
keepAliveEnv := os.Getenv(envICEKeepAliveIntervalSec)
|
||||||
if keepAliveEnv == "" {
|
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
|
// 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
|
// doesn't block, discards the message if connection wasn't ready
|
||||||
func (h *Handshaker) OnRemoteOffer(offer OfferAnswer) bool {
|
func (h *Handshaker) OnRemoteOffer(offer OfferAnswer) bool {
|
||||||
// todo remove this if signaling can support relay
|
|
||||||
if ForcedRelayAddress() != "" {
|
|
||||||
offer.RelaySrvAddress = ForcedRelayAddress()
|
|
||||||
}
|
|
||||||
select {
|
select {
|
||||||
case h.remoteOffersCh <- offer:
|
case h.remoteOffersCh <- offer:
|
||||||
return true
|
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
|
// 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
|
// doesn't block, discards the message if connection wasn't ready
|
||||||
func (h *Handshaker) OnRemoteAnswer(answer OfferAnswer) bool {
|
func (h *Handshaker) OnRemoteAnswer(answer OfferAnswer) bool {
|
||||||
// todo remove this if signaling can support relay
|
|
||||||
if ForcedRelayAddress() != "" {
|
|
||||||
answer.RelaySrvAddress = ForcedRelayAddress()
|
|
||||||
}
|
|
||||||
select {
|
select {
|
||||||
case h.remoteAnswerCh <- answer:
|
case h.remoteAnswerCh <- answer:
|
||||||
return true
|
return true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user