TUN-4926: Implement --region configuration option

This commit is contained in:
Areg Harutyunyan
2021-08-26 12:20:52 -05:00
committed by Nuno Diegues
parent 2afa307765
commit d0a1daac3b
4 changed files with 8 additions and 1 deletions

View File

@@ -74,7 +74,7 @@ func NewSupervisor(config *TunnelConfig, reconnectCh chan ReconnectSignal, grace
if len(config.EdgeAddrs) > 0 {
edgeIPs, err = edgediscovery.StaticEdge(config.Log, config.EdgeAddrs)
} else {
edgeIPs, err = edgediscovery.ResolveEdge(config.Log, "")
edgeIPs, err = edgediscovery.ResolveEdge(config.Log, config.Region)
}
if err != nil {
return nil, err

View File

@@ -45,6 +45,7 @@ type TunnelConfig struct {
ClientID string
CloseConnOnce *sync.Once // Used to close connectedSignal no more than once
EdgeAddrs []string
Region string
HAConnections int
IncidentLookup IncidentLookup
IsAutoupdated bool