diff --git a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua index 5f7b1487af..b6dc76b0fc 100644 --- a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua +++ b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua @@ -1303,6 +1303,10 @@ function settings_add() local externalcheck = luci.http.formvalue("externalcheck") or "1" ucic:set("openmptcprouter","settings","external_check",externalcheck) + -- Enable/disable restrict proxy to LAN + local restricttolan = luci.http.formvalue("restricttolan") or "0" + ucic:set("openmptcprouter","settings","restrict_to_lan",restricttolan) + -- Enable/disable debug local debug = luci.http.formvalue("debug") or "0" ucic:set("openmptcprouter","settings","debug",debug) diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm index 1de7df32ec..af62dca9f7 100644 --- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm +++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm @@ -331,6 +331,16 @@

<%=servername%>

+
+ +
+ checked<% end %>> +
+
+ <%:Authorize access to proxy only from LAN firewall zone%> +
+
+
diff --git a/omr-schedule/files/usr/share/omr/schedule.d/010-services b/omr-schedule/files/usr/share/omr/schedule.d/010-services index ef220bfcdc..44e82fe8b3 100755 --- a/omr-schedule/files/usr/share/omr/schedule.d/010-services +++ b/omr-schedule/files/usr/share/omr/schedule.d/010-services @@ -153,7 +153,7 @@ set_lan_ips() { } config_load network config_foreach restart_omrtracker interface -config_foreach set_lan_ips interface +[ "$(uci -q get openmptcprouter.settings.restrict_to_lan)" = "1" ] && config_foreach set_lan_ips interface uci -q commit shadowsocks-libev.ss_rules uci -q commit shadowsocks-rust.ss_rules multipath_fix() {