diff --git a/glorytun/glorytun.config b/glorytun/glorytun.config index 06df550f3..96b8749d2 100644 --- a/glorytun/glorytun.config +++ b/glorytun/glorytun.config @@ -7,3 +7,6 @@ config glorytun 'vpn' option mptcp '1' option proto 'tcp' option chacha20 '1' + option localip '10.0.0.2' + option remoteip '10.0.0.1' + option mtuauto '1' diff --git a/luci-app-glorytun/root/etc/hotplug.d/iface/30-glorytun b/luci-app-glorytun/root/etc/hotplug.d/iface/30-glorytun index 5210639a5..bdeb3d22b 100644 --- a/luci-app-glorytun/root/etc/hotplug.d/iface/30-glorytun +++ b/luci-app-glorytun/root/etc/hotplug.d/iface/30-glorytun @@ -17,9 +17,9 @@ set_default() { local iface config_get iface "$config" dev [ "$iface" = "$DEVICE" ] && { - config_get localip "$config" localip + config_get localip "$config" localip config_get remoteip "$config" remoteip - [ "$remoteip" != "" ] && [ "$localip" != "" ] && ip addr add $localip peer $remoteip dev $DEVICE + [ "$remoteip" != "" ] && [ "$localip" != "" ] && ifconfig $DEVICE $localip pointopoint $remoteip up } } diff --git a/luci-app-glorytun/root/etc/uci-defaults/40_luci-glorytun b/luci-app-glorytun/root/etc/uci-defaults/40_luci-glorytun index c5b9d35cf..2af7d7dfa 100644 --- a/luci-app-glorytun/root/etc/uci-defaults/40_luci-glorytun +++ b/luci-app-glorytun/root/etc/uci-defaults/40_luci-glorytun @@ -15,7 +15,10 @@ uci -q batch <<-EOF >/dev/null delete network.glorytun=interface set network.glorytun=interface set network.glorytun.ifname=tun0 - set network.glorytun.proto=dhcp + set network.glorytun.proto=static + set network.glorytun.ipaddr=10.0.0.2 + set network.glorytun.netmask=255.255.255.0 + set network.glorytun.gateway=10.0.0.1 set network.glorytun.ip4table=vpn set network.glorytun.multipath=off set network.glorytun.leasetime=12h