1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

change shadowsocks local listen ip when IPv6 is disable/enable

This commit is contained in:
Ycarus 2018-04-25 12:27:07 +02:00
parent d27628e641
commit 4c84e6362f

View file

@ -119,6 +119,13 @@ function settings_add()
ucic:set("firewall",ucic:get_first("firewall","defaults"),"disable_ipv6",disable_ipv6)
ucic:save("firewall")
ucic:commit("firewall")
if disable_ipv6 == 1 then
ucic:set("shadowsocks-libev","hi","local_address","0.0.0.0")
else
ucic:set("shadowsocks-libev","hi","local_address","::")
end
ucic:save("shadowsocks-libev")
ucic:commit("shadowsocks-libev")
-- Set CPU scaling minimum frequency
local scaling_min_freq = luci.http.formvalue("scaling_min_freq") or ""