mirror of
https://github.com/gravitl/netmaker.git
synced 2025-02-26 00:53:23 +08:00
Rebase to develop (#4)
* add nameserver in call to CreateUserSpaceConf * fixed user deletion * changed log * go mod tidy and conver azure tenant to env/conf var * added egress relayed addrs to relayed nodes * added post commands for wg quick * refactored ncutils x-platform * log fix * adding egress to relay * fixing egress on relay Co-authored-by: dcarns <75687250+0xdcarns@users.noreply.github.com> Co-authored-by: 0xdcarns <dillon.carns@gmail.com> Co-authored-by: afeiszli <alex.feiszli@gmail.com>
This commit is contained in:
parent
ec9f72d2d4
commit
b85ab18404
4 changed files with 3 additions and 11 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -16,5 +16,3 @@ netclient/netclient.exe
|
|||
config/dnsconfig/
|
||||
data/
|
||||
.vscode/
|
||||
.idea/
|
||||
.vscode/
|
||||
|
|
|
@ -43,14 +43,12 @@ type ServerConfig struct {
|
|||
GRPCHost string `yaml:"grpchost"`
|
||||
GRPCPort string `yaml:"grpcport"`
|
||||
GRPCSecure string `yaml:"grpcsecure"`
|
||||
MQHOST string `yaml:"mqhost"`
|
||||
MasterKey string `yaml:"masterkey"`
|
||||
DNSKey string `yaml:"dnskey"`
|
||||
AllowedOrigin string `yaml:"allowedorigin"`
|
||||
NodeID string `yaml:"nodeid"`
|
||||
RestBackend string `yaml:"restbackend"`
|
||||
AgentBackend string `yaml:"agentbackend"`
|
||||
MessageQueueBackend string `yaml:"messagequeuebackend"`
|
||||
ClientMode string `yaml:"clientmode"`
|
||||
DNSMode string `yaml:"dnsmode"`
|
||||
SplitDNS string `yaml:"splitdns"`
|
||||
|
@ -71,7 +69,6 @@ type ServerConfig struct {
|
|||
FrontendURL string `yaml:"frontendurl"`
|
||||
DisplayKeys string `yaml:"displaykeys"`
|
||||
AzureTenant string `yaml:"azuretenant"`
|
||||
RCE string `yaml:"rce"`
|
||||
}
|
||||
|
||||
// SQLConfig - Generic SQL Config
|
||||
|
|
|
@ -215,8 +215,3 @@ func Daemon() error {
|
|||
err := functions.Daemon()
|
||||
return err
|
||||
}
|
||||
|
||||
func Daemon() error {
|
||||
err := functions.Daemon()
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ func GetEmbedded() error {
|
|||
}
|
||||
|
||||
// CreateWireGuardConf - creates a user space WireGuard conf
|
||||
func CreateWireGuardConf(node *models.Node, privatekey string, listenPort string, peers []wgtypes.PeerConfig) (string, error) {
|
||||
func CreateWireGuardConf(node *models.Node, privatekey string, listenPort string, dns string, peers []wgtypes.PeerConfig) (string, error) {
|
||||
peersString, err := parsePeers(node.PersistentKeepalive, peers)
|
||||
var listenPortString, postDownString, postUpString string
|
||||
if node.MTU <= 0 {
|
||||
|
@ -56,6 +56,7 @@ func CreateWireGuardConf(node *models.Node, privatekey string, listenPort string
|
|||
}
|
||||
config := fmt.Sprintf(`[Interface]
|
||||
Address = %s
|
||||
DNS = %s
|
||||
PrivateKey = %s
|
||||
MTU = %s
|
||||
%s
|
||||
|
@ -66,6 +67,7 @@ MTU = %s
|
|||
|
||||
`,
|
||||
node.Address+"/32",
|
||||
dns,
|
||||
privatekey,
|
||||
strconv.Itoa(int(node.MTU)),
|
||||
postDownString,
|
||||
|
|
Loading…
Reference in a new issue