Skip to content

Commit

Permalink
Add option to restrict or not to LAN fw zone in interface, disabled b…
Browse files Browse the repository at this point in the history
…y default now
  • Loading branch information
Ysurac committed Jan 23, 2024
1 parent 8bb06c7 commit 2355627
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 10 additions & 0 deletions luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,16 @@ <h3><%=servername%></h3>
</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">
Expand Down
2 changes: 1 addition & 1 deletion omr-schedule/files/usr/share/omr/schedule.d/010-services
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 2355627

Please sign in to comment.