mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-05 16:57:51 +08:00
make proxy optional
This commit is contained in:
@@ -175,16 +175,19 @@ func ServerJoin(networkSettings *models.Network) (models.Node, error) {
|
||||
if err != nil {
|
||||
return returnNode, err
|
||||
}
|
||||
proxyPayload, err := GetPeersForProxy(node, false)
|
||||
if err != nil && !ncutils.IsEmptyRecord(err) {
|
||||
logger.Log(1, "failed to retrieve peers")
|
||||
return returnNode, err
|
||||
if servercfg.IsProxyEnabled() {
|
||||
proxyPayload, err := GetPeersForProxy(node, false)
|
||||
if err != nil && !ncutils.IsEmptyRecord(err) {
|
||||
logger.Log(1, "failed to retrieve peers")
|
||||
return returnNode, err
|
||||
}
|
||||
|
||||
ProxyMgmChan <- &manager.ManagerAction{
|
||||
Action: manager.AddInterface,
|
||||
Payload: proxyPayload,
|
||||
}
|
||||
}
|
||||
|
||||
ProxyMgmChan <- &manager.ManagerAction{
|
||||
Action: manager.AddInterface,
|
||||
Payload: proxyPayload,
|
||||
}
|
||||
return *node, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user