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
89460b0cd8
23 changed files with 473 additions and 276 deletions
|
@ -251,7 +251,7 @@ function wizard_add()
|
|||
if typeintf == "macvlan" and masterintf ~= "" then
|
||||
ucic:set("network",intf,"type","macvlan")
|
||||
ucic:set("network",intf,"masterintf",masterintf)
|
||||
elseif typeintf == "" and ifname ~= "" and (proto == "static" or proto == "dhcp" ) then
|
||||
elseif typeintf == "" and ifname ~= "" and (proto == "static" or proto == "dhcp" or proto == "dhcpv6") then
|
||||
ucic:set("network",intf,"ifname",ifname)
|
||||
elseif typeintf == "" and device ~= "" and proto == "ncm" then
|
||||
ucic:set("network",intf,"device",device_ncm)
|
||||
|
@ -295,6 +295,11 @@ function wizard_add()
|
|||
ucic:set("network",intf,"ip6addr","")
|
||||
ucic:set("network",intf,"ip6gw","")
|
||||
end
|
||||
|
||||
if proto == "dhcpv6" then
|
||||
ucic:set("network",intf,"reqaddress","try")
|
||||
ucic:set("network",intf,"reqprefix","auto")
|
||||
end
|
||||
|
||||
ucic:delete("openmptcprouter",intf,"lc")
|
||||
ucic:save("openmptcprouter")
|
||||
|
@ -437,6 +442,11 @@ function wizard_add()
|
|||
table.insert(aserverips,ip)
|
||||
end
|
||||
end
|
||||
if disableipv6 == "1" then
|
||||
if table.getn(aserverips) == 2 then
|
||||
table.remove(aserverips, 2)
|
||||
end
|
||||
end
|
||||
|
||||
local master = luci.http.formvalue("master") or ""
|
||||
|
||||
|
@ -477,7 +487,9 @@ function wizard_add()
|
|||
ucic:set("v2ray","main","enabled","0")
|
||||
ucic:foreach("shadowsocks-libev", "server", function(s)
|
||||
local sectionname = s[".name"]
|
||||
ucic:set("shadowsocks-libev",sectionname,"disabled","0")
|
||||
if sectionname:match("^sss.*") then
|
||||
ucic:set("shadowsocks-libev",sectionname,"disabled","0")
|
||||
end
|
||||
end)
|
||||
elseif default_proxy == "v2ray" and serversnb > 0 and serversnb > disablednb then
|
||||
--ucic:set("shadowsocks-libev","sss0","disabled","1")
|
||||
|
@ -543,9 +555,12 @@ function wizard_add()
|
|||
local nbip = 0
|
||||
for _, ssip in pairs(server_ips) do
|
||||
ucic:set("shadowsocks-libev","sss" .. nbip,"server",ssip)
|
||||
if default_proxy == "shadowsocks" then
|
||||
if default_proxy == "shadowsocks" and serversnb > disablednb then
|
||||
ucic:set("shadowsocks-libev","sss" .. nbip,"disabled","0")
|
||||
end
|
||||
if disableipv6 == "1" and nbip > 0 then
|
||||
break
|
||||
end
|
||||
nbip = nbip + 1
|
||||
end
|
||||
end
|
||||
|
@ -573,10 +588,13 @@ function wizard_add()
|
|||
local nbip = 0
|
||||
for _, ssip in pairs(server_ips) do
|
||||
ucic:set("shadowsocks-libev","sss" .. nbip,"server",ssip)
|
||||
if default_proxy == "shadowsocks" then
|
||||
if default_proxy == "shadowsocks" and serversnb > disablednb then
|
||||
ucic:set("shadowsocks-libev","sss" .. nbip,"disabled","0")
|
||||
end
|
||||
nbip = nbip + 1
|
||||
if disableipv6 == "1" and nbip > 0 then
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -404,17 +404,26 @@ local statuslogo = ucic:get("openmptcprouter","settings","statuslogo") or "openm
|
|||
}
|
||||
// Populate info
|
||||
var wanip = mArray.wans[i].wanip;
|
||||
var wanip6 = mArray.wans[i].wanip6;
|
||||
if (anonymize == "true" && testPrivateIP(wanip) == false)
|
||||
{
|
||||
wanip=replaceLastNChars(wanip,"x",6);
|
||||
}
|
||||
var wanip6 = mArray.wans[i].wanip6;
|
||||
if (anonymize == "true")
|
||||
{
|
||||
wanip6=replaceLastNChars(wanip6,"x",6);
|
||||
}
|
||||
var ipaddr = mArray.wans[i].ipaddr;
|
||||
var ip6addr = mArray.wans[i].ip6addr;
|
||||
if (anonymize == "true" && testPrivateIP(ipaddr) == false)
|
||||
{
|
||||
ipaddr=replaceLastNChars(ipaddr,"x",6);
|
||||
}
|
||||
var ip6addr = mArray.wans[i].ip6addr;
|
||||
if (anonymize == "true")
|
||||
{
|
||||
ip6addr=replaceLastNChars(ip6addr,"x",6);
|
||||
}
|
||||
var ifname = mArray.wans[i].ifname;
|
||||
var whois = mArray.wans[i].whois;
|
||||
var whois6 = mArray.wans[i].whois6;
|
||||
var signal = mArray.wans[i].signal;
|
||||
|
@ -469,7 +478,7 @@ local statuslogo = ucic:get("openmptcprouter","settings","statuslogo") or "openm
|
|||
{
|
||||
content += String.format('%s <strong>%s</strong><br />','<%:ip address:%>', ipaddr);
|
||||
}
|
||||
if(ip6addr !== '' && gateway6 != '')
|
||||
if(ip6addr !== '' && gateway6 !== '')
|
||||
{
|
||||
content += String.format('%s <strong>%s</strong><br />','<%:ipv6 address:%>', ip6addr);
|
||||
}
|
||||
|
@ -481,6 +490,10 @@ local statuslogo = ucic:get("openmptcprouter","settings","statuslogo") or "openm
|
|||
{
|
||||
content += String.format('%s <strong>%s</strong><br />','<%:wan ipv6 address:%>', wanip6);
|
||||
}
|
||||
if(ifname !== '' && ifname !== mArray.wans[i].label)
|
||||
{
|
||||
content += String.format('%s %s<br />','<%:interface:%>', ifname);
|
||||
}
|
||||
if(whois !== '')
|
||||
{
|
||||
content += String.format('%s %s<br />','<%:whois:%>', whois);
|
||||
|
|
|
@ -65,7 +65,16 @@
|
|||
</div>
|
||||
<h3><%=servername%></h3>
|
||||
<div class="cbi-section-node" id="cbi-omr-wizard-<%=servername%>">
|
||||
<div class="cbi-value">
|
||||
<div class="cbi-value" id="<%=servername%>.server_ip" data-depends="[{"enableipv6":"1"}]" data-index="8">
|
||||
<label class="cbi-value-title" for="server_ip.1"><%:Server IP%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input name="<%=servername%>.serverip.ip1" id="<%=servername%>.server_ip.1" placeholder="<%:Server IP%>" class="cbi-input-text" value="<%=uci:get_list("openmptcprouter",servername,"ip")[1]%>" data-optional="false">
|
||||
<div class="cbi-value-description">
|
||||
<%:Server IP will be set for proxy and VPN%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value" id="<%=servername%>.server_ipv6" data-depends="[{"enableipv6":"0"}]" data-index="8">
|
||||
<label class="cbi-value-title" for="server_ip.1"><%:Server IP%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input name="<%=servername%>.serverip.ip1" id="<%=servername%>.server_ip.1" placeholder="<%:Primary server IP%>" class="cbi-input-text" value="<%=uci:get_list("openmptcprouter",servername,"ip")[1]%>" data-optional="false">
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue