diff --git a/client/internal/connect.go b/client/internal/connect.go index 1dc515203..21423455e 100644 --- a/client/internal/connect.go +++ b/client/internal/connect.go @@ -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 diff --git a/client/internal/peer/env_config.go b/client/internal/peer/env_config.go index 21269168f..87b626df7 100644 --- a/client/internal/peer/env_config.go +++ b/client/internal/peer/env_config.go @@ -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 == "" { diff --git a/client/internal/peer/handshaker.go b/client/internal/peer/handshaker.go index bff025cf8..d5ed10357 100644 --- a/client/internal/peer/handshaker.go +++ b/client/internal/peer/handshaker.go @@ -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