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

Only display interface with mptcp enabled in mptcp check

This commit is contained in:
Ycarus 2018-08-18 09:19:32 +02:00
parent 606a74124e
commit 18468f06c1
3 changed files with 9 additions and 5 deletions

View file

@ -812,10 +812,11 @@ function _ipv6_discover(interface)
return ra6_result return ra6_result
end end
function mptcp_check_trace(interface) function mptcp_check_trace(iface)
luci.http.prepare_content("text/plain") luci.http.prepare_content("text/plain")
local tracebox local tracebox
local uci = require "luci.model.uci".cursor() local uci = require "luci.model.uci".cursor()
local interface = get_device(iface)
local server = uci:get("shadowsocks-libev", "sss0", "server") or "" local server = uci:get("shadowsocks-libev", "sss0", "server") or ""
if server == "" then return end if server == "" then return end
if interface == "" then if interface == "" then

View file

@ -4,6 +4,7 @@
local uci = require("luci.model.uci").cursor() local uci = require("luci.model.uci").cursor()
local sys = require "luci.sys" local sys = require "luci.sys"
local ifaces = sys.net:devices() local ifaces = sys.net:devices()
local net = require "luci.model.network".init()
%> %>
<script type="text/javascript" src="<%=resource%>/cbi.js?v=git-18.193.28471-ee087a1"></script> <script type="text/javascript" src="<%=resource%>/cbi.js?v=git-18.193.28471-ee087a1"></script>
@ -48,10 +49,12 @@
<div class="cbi-value-field"> <div class="cbi-value-field">
<select class="cbi-input-select" name="interface" size="1"> <select class="cbi-input-select" name="interface" size="1">
<% <%
for _, iface in ipairs(ifaces) do for _, iface in ipairs(net:get_networks()) do
if not (iface == "lo" or iface:match("^ifb.*")) then local ifname = iface:name()
local multipath = uci:get("network",ifname,"multipath")
if multipath ~= "off" then
%> %>
<option value="<%=iface%>"><%=iface%></option> <option value="<%=ifname%>"><%=ifname%></option>
<% <%
end end
end end

View file

@ -406,7 +406,7 @@
<h3>Settings</h3> <h3>Settings</h3>
<fieldset class="cbi-section"> <fieldset class="cbi-section">
<div class="cbi-value"> <div class="cbi-value">
<label class="cbi-value-title">Anonymize public IPs</label> <label class="cbi-value-title">Anonymize public IPs (at next refresh)</label>
<div class="cbi-value-field"> <div class="cbi-value-field">
<input type="checkbox" name="anon" class="cbi-input-checkbox" value="1" onclick="setAnonymize()" \> <input type="checkbox" name="anon" class="cbi-input-checkbox" value="1" onclick="setAnonymize()" \>
</div> </div>