mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-12 18:41:51 +00:00
Add OBFS in advanced settings
This commit is contained in:
parent
b0ba81e178
commit
5329b486c8
2 changed files with 17 additions and 0 deletions
|
@ -310,6 +310,13 @@ function settings_add()
|
|||
end
|
||||
ucic:save("dhcp")
|
||||
ucic:commit("dhcp")
|
||||
|
||||
local obfs = luci.http.formvalue("obfs") or 0
|
||||
ucic:foreach("shadowsocks-libev", "ss_redir", function (section)
|
||||
ucic:set("shadowsocks-libev",section[".name"],"obfs",obfs)
|
||||
end)
|
||||
ucic:set("shadowsocks-libev","tracker","obfs",obfs)
|
||||
|
||||
ucic:save("shadowsocks-libev")
|
||||
ucic:commit("shadowsocks-libev")
|
||||
|
||||
|
|
|
@ -19,6 +19,16 @@
|
|||
<input type="checkbox" name="disable_ipv6" class="cbi-input-checkbox" value="1" <% if tonumber((luci.sys.exec("sysctl net.ipv6.conf.all.disable_ipv6")):match(" %d+")) == 1 then %>checked<% end %>>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Enable ShadowSocks OBFS%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="checkbox" name="obfs" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("shadowsocks-libev","tracker","obfs") == "1" then %>checked<% end %>>
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:OBFS must be enabled on VPS%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<% if nixio.fs.access("/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq") then %>
|
||||
<fieldset class="cbi-section" id="system">
|
||||
|
|
Loading…
Reference in a new issue