diff --git a/package/gluon-mesh-vpn-core/luasrc/lib/gluon/mesh-vpn/update-config b/package/gluon-mesh-vpn-core/luasrc/lib/gluon/mesh-vpn/update-config index 45ecc2d5e3620c51dc64104cb225db74b7a14c8c..6d1dcaeda738b9542b68d00ff462362e72aebd13 100755 --- a/package/gluon-mesh-vpn-core/luasrc/lib/gluon/mesh-vpn/update-config +++ b/package/gluon-mesh-vpn-core/luasrc/lib/gluon/mesh-vpn/update-config @@ -8,6 +8,8 @@ if unistd.access('/lib/gluon/mesh-vpn/fastd') then vpn = 'fastd' elseif unistd.access('/lib/gluon/mesh-vpn/tunneldigger') then vpn = 'tunneldigger' +elseif unistd.access('/lib/gluon/mesh-vpn/parker') then + vpn = 'parker' end local vpn_config = { @@ -18,11 +20,13 @@ local vpn_config = { } uci:delete('simple-tc', 'mesh_vpn') -uci:section('simple-tc', 'interface', 'mesh_vpn', { - ifname = 'mesh-vpn', - enabled = vpn_config.limit_enabled, - limit_egress = vpn_config.limit_egress, -}) +if vpn ~= 'parker' then + uci:section('simple-tc', 'interface', 'mesh_vpn', { + ifname = 'mesh-vpn', + enabled = vpn_config.limit_enabled, + limit_egress = vpn_config.limit_egress, + }) +end if vpn == 'fastd' then uci:set('fastd', 'mesh_vpn', 'enabled', vpn_config.enabled) @@ -45,4 +49,15 @@ else end uci:save('tunneldigger') +uci:delete('simple-tc', 'client') +if vpn == 'parker' then + uci:section('simple-tc', 'interface', 'client', { + ifname = 'br-client', + enabled = vpn_config.limit_enabled, + -- limits are flipped here + limit_ingress = vpn_config.limit_egress, + limit_egress = vpn_config.limit_ingress, + }) +end + uci:save('simple-tc')