mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-12 18:41:51 +00:00
Add option to restrict or not to LAN fw zone in interface, disabled by default now
This commit is contained in:
parent
8bb06c763b
commit
23556274f0
3 changed files with 15 additions and 1 deletions
|
@ -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)
|
||||
|
|
|
@ -331,6 +331,16 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Restrict proxy to LAN zone%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="checkbox" name="restricttolan" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter","settings","restrict_to_lan") == "1" then %>checked<% end %>>
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:Authorize access to proxy only from LAN firewall zone%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Disable route loop detection%></label>
|
||||
<div class="cbi-value-field">
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue