Skip to content

Commit

Permalink
fix: accept-routes and accept-dns
Browse files Browse the repository at this point in the history
  • Loading branch information
dkaser committed Jul 17, 2023
1 parent 4a9bb50 commit 88da2b0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,22 @@ function run_command($command)
}
}

$command = "Ignoring accept-routes";
switch ($settings_config['ACCEPT_ROUTES']) {
case 0:
switch ($tailscale_config['ACCEPT_ROUTES']) {
case "0":
run_command("/usr/local/sbin/tailscale set --accept-routes=false");
break;
case 1:
case "1":
run_command("/usr/local/sbin/tailscale set --accept-routes=true");
break;
default:
logmsg("Ignoring accept-routes");
}

switch ($settings_config['ACCEPT_DNS']) {
case 0:
switch ($tailscale_config['ACCEPT_DNS']) {
case "0":
run_command("/usr/local/sbin/tailscale set --accept-dns=false");
break;
case 1:
case "1":
run_command("/usr/local/sbin/tailscale set --accept-dns=true");
break;
default:
Expand Down
8 changes: 8 additions & 0 deletions src/usr/local/emhttp/plugins/tailscale/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,13 @@
"USAGE": {
"default": "1",
"description": "Allow collection of usage data"
},
"ACCEPT_DNS": {
"default": "0",
"description": "Use MagicDNS"
},
"ACCEPT_ROUTES": {
"default": "0",
"description": "Use routes from the tailnet"
}
}

0 comments on commit 88da2b0

Please sign in to comment.