Allow setting tun name in daemon config

main
Brian Picciano 8 months ago
parent d2d25d3621
commit 0b486d5d27
  1. 4
      AppDir/etc/daemon.yml
  2. 2
      default.nix
  3. 2
      go/cmd/entrypoint/nebula_util.go
  4. 5
      go/daemon/config.go

@ -52,6 +52,10 @@ vpn:
# That's it.
tun:
# Name of the tun network device which will route VPN traffic.
device: isle-tun
storage:
# Allocations defined here are used to store data in the distributed storage

@ -165,7 +165,7 @@ in rec {
};
tests = pkgs.writeShellScript "isle-tests" ''
export PATH=$PATH:${appImage}/bin
export PATH=${appImage}/bin:$PATH
test_dir=${./tests}
exec $SHELL $test_dir/entrypoint.sh "$@"
'';

@ -68,7 +68,7 @@ func nebulaPmuxProcConfig(
"respond": true,
},
"tun": map[string]interface{}{
"dev": "isle-tun",
"dev": daemonConfig.VPN.Tun.Device,
},
"firewall": daemonConfig.VPN.Firewall,
}

@ -2,6 +2,10 @@ package daemon
import "strconv"
type ConfigTun struct {
Device string `yaml:"device"`
}
type ConfigFirewall struct {
Conntrack ConfigConntrack `yaml:"conntrack"`
Outbound []ConfigFirewallRule `yaml:"outbound"`
@ -50,6 +54,7 @@ type Config struct {
VPN struct {
PublicAddr string `yaml:"public_addr"`
Firewall ConfigFirewall `yaml:"firewall"`
Tun ConfigTun `yaml:"tun"`
} `yaml:"vpn"`
Storage struct {
Allocations []ConfigStorageAllocation

Loading…
Cancel
Save