mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-05 08:47:35 +08:00

* internet gws apis * add validate check for inet request * add default gw changes to peer update * update json tag * add OS checks for inet gws * add set defaul gw pro func * allow disable and enable inet gw * add inet handlers to pro * add fields to api node * add inet allowed ips * add default gw to pull * unset node inet details on deletion * unset internet gw on network nodes * unset inet gw fix * unset inet gw fix * send default gw ip * fix inet node endpoint * add default gw endpoint ip to pull resp * validate after unset gws * add inet client peer allowedips to inet node * validate after unset gws * fix allowed ips for inet peer and gw node * fix allowed ips for inet peer and gw node * fix allowed ips for inet peer and gw node * fix allowed ips for inet peer and gw node * fix inet gw and relayed conflict * fix inet gw and relayed conflict * fix update req * fix update inet gw api * when inet gw is peer ignore other allowedIps * test relay * revert test relay * revert inet peer update changes * channel internet traffic of relayed node to relay's inetgw * channel internet traffic of relayed node to relay's inetgw * channel internet traffic of relayed node to relay's inetgw * add check for relayed node * add inet info to peer update * add inet info to peer update * fix update node to persist inet info * fix go tests * egress ranges with inet gw fix * egress ranges with inet gw fix * disallow node acting using inet gw to act as inet gw * add check to validate inet gw * fix typos * add firewall check * set inetgw on ingress req on community * set inetgw to false on community on ingress del
31 lines
615 B
Go
31 lines
615 B
Go
package logic
|
|
|
|
import (
|
|
"net"
|
|
|
|
"github.com/gravitl/netmaker/models"
|
|
)
|
|
|
|
var GetRelays = func() ([]models.Node, error) {
|
|
return []models.Node{}, nil
|
|
}
|
|
|
|
var RelayedAllowedIPs = func(peer, node *models.Node) []net.IPNet {
|
|
return []net.IPNet{}
|
|
}
|
|
|
|
var GetAllowedIpsForRelayed = func(relayed, relay *models.Node) []net.IPNet {
|
|
return []net.IPNet{}
|
|
}
|
|
|
|
var UpdateRelayed = func(currentNode, newNode *models.Node) {
|
|
}
|
|
|
|
var SetRelayedNodes = func(setRelayed bool, relay string, relayed []string) []models.Node {
|
|
return []models.Node{}
|
|
}
|
|
|
|
var RelayUpdates = func(currentNode, newNode *models.Node) bool {
|
|
return false
|
|
}
|