mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Merge branch 'test' into develop
This commit is contained in:
commit
2f93e99a09
5 changed files with 46 additions and 15 deletions
|
@ -240,6 +240,7 @@ function wizard_add()
|
|||
local netmask = luci.http.formvalue("cbid.network.%s.netmask" % intf) or ""
|
||||
local gateway = luci.http.formvalue("cbid.network.%s.gateway" % intf) or ""
|
||||
local ip6gw = luci.http.formvalue("cbid.network.%s.ip6gw" % intf) or ""
|
||||
local ipv6 = luci.http.formvalue("cbid.network.%s.ipv6" % intf) or "0"
|
||||
local apn = luci.http.formvalue("cbid.network.%s.apn" % intf) or ""
|
||||
local pincode = luci.http.formvalue("cbid.network.%s.pincode" % intf) or ""
|
||||
local delay = luci.http.formvalue("cbid.network.%s.delay" % intf) or ""
|
||||
|
@ -282,6 +283,7 @@ function wizard_add()
|
|||
ucic:set("network",intf,"auth",auth)
|
||||
ucic:set("network",intf,"mode",mode)
|
||||
ucic:set("network",intf,"label",label)
|
||||
ucic:set("network",intf,"ipv6",ipv6)
|
||||
if lan == "1" then
|
||||
ucic:set("network",intf,"multipath","off")
|
||||
else
|
||||
|
@ -635,11 +637,13 @@ function wizard_add()
|
|||
local encryption = luci.http.formvalue("encryption")
|
||||
if encryption == "none" then
|
||||
ucic:set("shadowsocks-libev","sss0","method","none")
|
||||
ucic:set("shadowsocks-libev","sss1","method","none")
|
||||
ucic:set("openvpn","omr","cipher","none")
|
||||
ucic:set("v2ray","omrout","s_vmess_user_security","none")
|
||||
ucic:set("v2ray","omrout","s_vless_user_security","none")
|
||||
elseif encryption == "aes-256-gcm" then
|
||||
ucic:set("shadowsocks-libev","sss0","method","aes-256-gcm")
|
||||
ucic:set("shadowsocks-libev","sss1","method","aes-256-gcm")
|
||||
ucic:set("glorytun","vpn","chacha20","0")
|
||||
ucic:set("glorytun-udp","vpn","chacha","0")
|
||||
ucic:set("openvpn","omr","cipher","AES-256-GCM")
|
||||
|
@ -647,6 +651,7 @@ function wizard_add()
|
|||
ucic:set("v2ray","omrout","s_vless_user_security","aes-128-gcm")
|
||||
elseif encryption == "aes-256-cfb" then
|
||||
ucic:set("shadowsocks-libev","sss0","method","aes-256-cfb")
|
||||
ucic:set("shadowsocks-libev","sss1","method","aes-256-cfb")
|
||||
ucic:set("glorytun","vpn","chacha20","0")
|
||||
ucic:set("glorytun-udp","vpn","chacha","0")
|
||||
ucic:set("openvpn","omr","cipher","AES-256-CFB")
|
||||
|
@ -654,6 +659,7 @@ function wizard_add()
|
|||
ucic:set("v2ray","omrout","s_vless_user_security","aes-128-gcm")
|
||||
elseif encryption == "chacha20-ietf-poly1305" then
|
||||
ucic:set("shadowsocks-libev","sss0","method","chacha20-ietf-poly1305")
|
||||
ucic:set("shadowsocks-libev","sss1","method","chacha20-ietf-poly1305")
|
||||
ucic:set("glorytun","vpn","chacha20","1")
|
||||
ucic:set("glorytun-udp","vpn","chacha","1")
|
||||
ucic:set("openvpn","omr","cipher","AES-256-CBC")
|
||||
|
@ -674,6 +680,7 @@ function wizard_add()
|
|||
--end
|
||||
if shadowsocks_key ~= "" then
|
||||
ucic:set("shadowsocks-libev","sss0","key",shadowsocks_key)
|
||||
ucic:set("shadowsocks-libev","sss1","key",shadowsocks_key)
|
||||
--ucic:set("shadowsocks-libev","sss0","method","chacha20-ietf-poly1305")
|
||||
--ucic:set("shadowsocks-libev","sss0","server_port","65101")
|
||||
--ucic:set("shadowsocks-libev","sss0","disabled",shadowsocks_disable)
|
||||
|
@ -685,8 +692,10 @@ function wizard_add()
|
|||
else
|
||||
if serversnb == 0 then
|
||||
ucic:set("shadowsocks-libev","sss0","disabled",shadowsocks_disable)
|
||||
ucic:set("shadowsocks-libev","sss1","disabled",shadowsocks_disable)
|
||||
end
|
||||
ucic:set("shadowsocks-libev","sss0","key","")
|
||||
ucic:set("shadowsocks-libev","sss1","key","")
|
||||
ucic:save("shadowsocks-libev")
|
||||
ucic:commit("shadowsocks-libev")
|
||||
luci.sys.call("/etc/init.d/shadowsocks rules_down >/dev/null 2>/dev/null")
|
||||
|
@ -965,7 +974,7 @@ function settings_add()
|
|||
local disableserverping = luci.http.formvalue("disableserverping") or "0"
|
||||
ucic:set("openmptcprouter","settings","disableserverping",disableserverping)
|
||||
|
||||
-- Enable/disable shadowsocks upd
|
||||
-- Enable/disable shadowsocks udp
|
||||
local shadowsocksudp = luci.http.formvalue("shadowsocksudp") or "0"
|
||||
ucic:set("openmptcprouter","settings","shadowsocksudp",shadowsocksudp)
|
||||
|
||||
|
@ -1070,7 +1079,13 @@ end
|
|||
function get_device(interface)
|
||||
local dump = require("luci.util").ubus("network.interface.%s" % interface, "status", {})
|
||||
if dump ~= nil then
|
||||
return dump['l3_device']
|
||||
if dump['l3_device'] ~= nil then
|
||||
return dump['l3_device']
|
||||
elseif dump['device'] ~= nil then
|
||||
return dump['device']
|
||||
else
|
||||
return ""
|
||||
end
|
||||
else
|
||||
return ""
|
||||
end
|
||||
|
|
|
@ -561,12 +561,14 @@
|
|||
<%
|
||||
iffind=0
|
||||
uciifname=uci:get("network",ifname,"ifname")
|
||||
if uciifname:match("/") then
|
||||
realifname=uciifname
|
||||
vlan=""
|
||||
else
|
||||
realifname=splitstring(uciifname,'.')[1] or ""
|
||||
vlan=splitstring(uciifname,'.')[2] or ""
|
||||
if uciifname ~= nil then
|
||||
if uciifname:match("/") then
|
||||
realifname=uciifname
|
||||
vlan=""
|
||||
else
|
||||
realifname=splitstring(uciifname,'.')[1] or ""
|
||||
vlan=splitstring(uciifname,'.')[2] or ""
|
||||
end
|
||||
end
|
||||
for _, ifacea in ipairs(ifaces) do
|
||||
if not (ifacea == "lo" or ifacea == "6in4-omr6in4" or ifacea == "mlvpn0" or ifacea:match("^ifb.*") or ifacea:match("^sit.*") or ifacea:match("^gre.*") or ifacea:match("^ip6.*") or ifacea:match("^teql.*") or ifacea:match("^erspan.*") or ifacea:match("^tun.*")) and device_notvirtual(ifacea) then
|
||||
|
@ -671,6 +673,13 @@
|
|||
<%
|
||||
end
|
||||
%>
|
||||
<div class="cbi-value" id="cbi-network-<%=ifname%>-ip6" data-depends="[{"enableipv6":"0","cbid.network.<%=ifname%>.proto":"static"}]" data-index="10">
|
||||
<label class="cbi-value-title"><%:Accept IPv6 RA%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="checkbox" id="cbid.network.<%=ifname%>.ipv6" name="cbid.network.<%=ifname%>.ipv6" value="1" <% if uci:get("network",ifname,"ipv6") == "1" then %>checked<% end %> />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cbi-value" id="cbi-network-<%=ifname%>-device-ncm" data-depends="[{"cbid.network.<%=ifname%>.proto":"ncm"}]" data-index="5">
|
||||
<label class="cbi-value-title"><%:Device%></label>
|
||||
<div class="cbi-value-field">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue