mirror of
https://github.com/unraid/webgui.git
synced 2026-04-26 04:11:12 -05:00
Docker: add route for remote WireGuard access
This commit is contained in:
@@ -16,7 +16,7 @@ function addRoute($ct) {
|
||||
// add static route(s) for remote WireGuard access
|
||||
[$pid,$net] = explode(' ',exec("docker inspect --format='{{.State.Pid}} {{.NetworkSettings.Networks}}' $ct"));
|
||||
$net = substr($net,4,strpos($net,':')-4);
|
||||
if ($net != 'br0') return;
|
||||
if ($pid==0 || $net!='br0') return;
|
||||
$thisip = ipaddr();
|
||||
foreach (glob('/etc/wireguard/wg*.cfg') as $cfg) {
|
||||
$network = exec("grep -Pom1 '^Network:0=\"\\K[^\"]+' $cfg");
|
||||
|
||||
Reference in New Issue
Block a user