diff --git a/luci-app-mptcp/luasrc/controller/mptcp.lua b/luci-app-mptcp/luasrc/controller/mptcp.lua index 842adc6ef..89bc92c13 100755 --- a/luci-app-mptcp/luasrc/controller/mptcp.lua +++ b/luci-app-mptcp/luasrc/controller/mptcp.lua @@ -15,8 +15,10 @@ function index() entry({"admin", "network", "mptcp", "mptcp_check_trace"}, post("mptcp_check_trace")).leaf = true entry({"admin", "network", "mptcp", "mptcp_fullmesh"}, template("mptcp/mptcp_fullmesh"), _("MPTCP Fullmesh"), 5).leaf = true entry({"admin", "network", "mptcp", "mptcp_fullmesh_data"}, post("mptcp_fullmesh_data")).leaf = true - entry({"admin", "network", "mptcp", "mptcp_connections"}, template("mptcp/mptcp_connections"), _("Established connections"), 6).leaf = true - entry({"admin", "network", "mptcp", "mptcp_connections_data"}, post("mptcp_connections_data")).leaf = true + if nixio.uname().release:sub(1,4) ~= "5.15" and nixio.uname().release:sub(1,1) ~= "6" then + entry({"admin", "network", "mptcp", "mptcp_connections"}, template("mptcp/mptcp_connections"), _("Established connections"), 6).leaf = true + entry({"admin", "network", "mptcp", "mptcp_connections_data"}, post("mptcp_connections_data")).leaf = true + end entry({"admin", "network", "mptcp", "mptcp_monitor"}, template("mptcp/mptcp_monitor"), _("MPTCP monitoring"), 6).leaf = true entry({"admin", "network", "mptcp", "mptcp_monitor_data"}, post("mptcp_monitor_data")).leaf = true end diff --git a/luci-app-mptcp/luasrc/model/cbi/mptcp.lua b/luci-app-mptcp/luasrc/model/cbi/mptcp.lua index a36c3d391..d5fe52f9c 100755 --- a/luci-app-mptcp/luasrc/model/cbi/mptcp.lua +++ b/luci-app-mptcp/luasrc/model/cbi/mptcp.lua @@ -61,22 +61,22 @@ end -- if tonumber(uname.release:sub(1,4)) >= 5.15 then if uname.release:sub(1,4) == "5.15" or uname.release:sub(1,1) == "6" then - o = s:option(Value, "mptcp_subflows", translate("specifies the maximum number of additional subflows allowed for each MPTCP connection")) + o = s:option(Value, "mptcp_subflows", translate("Max subflows"),translate("specifies the maximum number of additional subflows allowed for each MPTCP connection")) o.datatype = "uinteger" o.rmempty = false o.default = 3 - - o = s:option(Value, "mptcp_add_addr_accepted", translate("specifies the maximum number of ADD_ADDR suboptions accepted for each MPTCP connection")) - o.datatype = "uinteger" - o.rmempty = false - o.default = 1 - o = s:option(Value, "mptcp_stale_loss_cnt", translate("The number of MPTCP-level retransmission intervals with no traffic and pending outstanding data on a given subflow required to declare it stale")) + o = s:option(Value, "mptcp_stale_loss_cnt", translate("Retranmission intervals"),translate("The number of MPTCP-level retransmission intervals with no traffic and pending outstanding data on a given subflow required to declare it stale")) o.datatype = "uinteger" o.rmempty = false o.default = 4 - o = s:option(Value, "mptcp_add_addr_timeout", translate("Set the timeout after which an ADD_ADDR control message will be resent to an MPTCP peer that has not acknowledged a previous ADD_ADDR message.")) + o = s:option(Value, "mptcp_add_addr_accepted", translate("Max add address"),translate("specifies the maximum number of ADD_ADDR (add address) suboptions accepted for each MPTCP connection")) + o.datatype = "uinteger" + o.rmempty = false + o.default = 1 + + o = s:option(Value, "mptcp_add_addr_timeout", translate("Control message timeout"),translate("Set the timeout after which an ADD_ADDR (add address) control message will be resent to an MPTCP peer that has not acknowledged a previous ADD_ADDR message.")) o.datatype = "uinteger" o.rmempty = false o.default = 120 diff --git a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua index 5a0cb0566..592abcc89 100755 --- a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua +++ b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua @@ -552,7 +552,7 @@ function wizard_add() ucic:set("network","omrvpn","proto","bonding") end if downloadmax ~= 0 and uploadmax ~= 0 then - ucic:set("sqm","omrvpn","enabled","1") + --ucic:set("sqm","omrvpn","enabled","1") ucic:set("sqm","omrvpn","max_download",downloadmax) ucic:set("sqm","omrvpn","max_upload",uploadmax) ucic:set("sqm","omrvpn","download",math.ceil(downloadmax*50/100)) @@ -619,7 +619,7 @@ function wizard_add() ucic:set("openmptcprouter",server,"username",openmptcprouter_vps_username:gsub("%s+", "")) ucic:set("openmptcprouter",server,"password",openmptcprouter_vps_key:gsub("%s+", "")) ucic:set("openmptcprouter",server,"disabled",openmptcprouter_vps_disabled) - if ucic:get("openmptcprouter",server,"ip") ~= aserverips then + if ucic:get_list("openmptcprouter",server,"ip") ~= aserverips then ucic:set_list("openmptcprouter",server,"ip",aserverips) if ucic:get("openmptcprouter",server,"master") == "1" then ucic:set("openmptcprouter",server,"get_config","1") @@ -805,6 +805,7 @@ function wizard_add() local encryption = luci.http.formvalue("encryption") if encryption == "none" then + ucic:set("openmptcprouter","settings","encryption","none") ucic:set("shadowsocks-libev","sss0","method","none") ucic:set("shadowsocks-libev","sss1","method","none") ucic:set("openvpn","omr","cipher","none") @@ -812,6 +813,7 @@ function wizard_add() 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("openmptcprouter","settings","encryption","aes-256-gcm") ucic:set("shadowsocks-libev","sss0","method","aes-256-gcm") ucic:set("shadowsocks-libev","sss1","method","aes-256-gcm") ucic:set("glorytun","vpn","chacha20","0") @@ -821,6 +823,7 @@ function wizard_add() ucic:set("v2ray","omrout","s_vmess_user_security","aes-128-gcm") ucic:set("v2ray","omrout","s_vless_user_security","aes-128-gcm") elseif encryption == "aes-256-cfb" then + ucic:set("openmptcprouter","settings","encryption","aes-256-cfb") ucic:set("shadowsocks-libev","sss0","method","aes-256-cfb") ucic:set("shadowsocks-libev","sss1","method","aes-256-cfb") ucic:set("glorytun","vpn","chacha20","0") @@ -830,6 +833,7 @@ function wizard_add() ucic:set("v2ray","omrout","s_vmess_user_security","aes-128-gcm") ucic:set("v2ray","omrout","s_vless_user_security","aes-128-gcm") elseif encryption == "chacha20-ietf-poly1305" then + ucic:set("openmptcprouter","settings","encryption","chacha20") ucic:set("shadowsocks-libev","sss0","method","chacha20-ietf-poly1305") ucic:set("shadowsocks-libev","sss1","method","chacha20-ietf-poly1305") ucic:set("glorytun","vpn","chacha20","1") @@ -838,6 +842,8 @@ function wizard_add() ucic:set("mlvpn","general","cleartext_data","0") ucic:set("v2ray","omrout","s_vmess_user_security","chacha20-poly1305") ucic:set("v2ray","omrout","s_vless_user_security","chacha20-poly1305") + else + ucic:set("openmptcprouter","settings","encryption","other") end ucic:save("openvpn") ucic:save("glorytun") diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm index 131df0276..349762a73 100755 --- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm +++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm @@ -269,13 +269,18 @@