diff options
author | Whitronic <joao.f.vieira@gmail.com> | 2018-11-08 11:25:43 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-11-15 07:44:06 +0100 |
commit | f4212285d474a9f75a55d7c39ae1ac70dc04d1e0 (patch) | |
tree | d1353b2c8d9d5f90fd702099719f89bb207ad7e4 | |
parent | a57ba0083ec65aa112f2590a9078845da56aa7e3 (diff) |
luci-proto-vpnc: expose defaultroute option in proto_vpnc.lua
Sometimes people only want the VPN connection to be a route to a specific
network, not the default gateway for all traffic.
I've tested this on my router and works fine!
Submitted-by: Whitronic <joao.f.vieira@gmail.com>
[reword commit message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | protocols/luci-proto-vpnc/luasrc/model/cbi/admin_network/proto_vpnc.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/protocols/luci-proto-vpnc/luasrc/model/cbi/admin_network/proto_vpnc.lua b/protocols/luci-proto-vpnc/luasrc/model/cbi/admin_network/proto_vpnc.lua index d8217ce8d..3d85d02f4 100644 --- a/protocols/luci-proto-vpnc/luasrc/model/cbi/admin_network/proto_vpnc.lua +++ b/protocols/luci-proto-vpnc/luasrc/model/cbi/admin_network/proto_vpnc.lua @@ -8,7 +8,7 @@ local authgroup, interface, passgroup, hexpassgroup local domain, vendor, natt_mode, dh_group local pfs, enable_single_des, enable_no_enc local mtu, local_addr, local_port, dpd_idle -local auth_mode, target_network +local auth_mode, target_network, defaultroute local ifc = net:get_interface():name() @@ -77,3 +77,9 @@ dpd_idle.placeholder = "600" ifname = section:taboption("general", Value, "target_network", translate("Target network")) port.placeholder = "0.0.0.0/0" port.datatype = "network" + +defaultroute = section:taboption("general", ListValue, "defaultroute", + translate("Default Route"), + translate("Set VPN as Default Route")) +defaultroute:value("0", translate("No")) +defaultroute:value("1", translate("Yes")) |