1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-12 18:41:51 +00:00

Add a LuCI interface for MPTCP

This commit is contained in:
Ycarus 2018-03-21 17:30:44 +01:00
parent c2312ec7fe
commit cb6610f6bc
5 changed files with 66 additions and 1 deletions

View file

@ -65,7 +65,7 @@ start_instance() {
procd_append_param command \
retry count -1 const 5000000 \
timeout 9000 \
keepalive count 3 idle 10 interval 1
keepalive count 5 idle 60 interval 2
procd_set_param respawn 0 30 0
procd_set_param file /tmp/${PROG_NAME}-${1}.key

14
luci-app-mptcp/Makefile Normal file
View file

@ -0,0 +1,14 @@
#
# Copyright (C) 2018 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
#
#
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for MPTCP
PKG_LICENSE:=Apache-2.0
include ../luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View file

@ -0,0 +1,7 @@
module("luci.controller.mptcp", package.seeall)
function index()
entry(
{"admin", "network", "mptcp"},
cbi("mptcp"), _("MPTCP"), 55)
end

View file

@ -0,0 +1,43 @@
local net = require "luci.model.network".init()
local sys = require "luci.sys"
local ifaces = sys.net:devices()
local m, s, o
m = Map("network", translate("MPTCP"), translate("Networks MPTCP settings"))
s = m:section(TypedSection, "globals")
local mtcpg = s:option(ListValue, "multipath", translate("Multipath TCP"))
mtcpg:value("enable", translate("enable"))
mtcpg:value("disable", translate("disable"))
local mtcpck = s:option(ListValue, "mptcp_checksum", translate("Multipath TCP checksum"))
mtcpck:value("enable", translate("enable"))
mtcpck:value("disable", translate("disable"))
local mtcppm = s:option(ListValue, "mptcp_path_manager", translate("Multipath TCP path-manager"))
mtcppm:value("default", translate("default"))
mtcppm:value("fullmesh", translate("fullmesh"))
mtcppm:value("ndiffports", translate("ndiffports"))
mtcppm:value("blinder", translate("blinder"))
local mtcpsch = s:option(ListValue, "mptcp_scheduler", translate("Multipath TCP scheduler"))
mtcpsch:value("default", translate("default"))
mtcpsch:value("roundrobin", translate("round-robin"))
mtcpsch:value("redundant", translate("redundant"))
local mtcpsyn = s:option(Value, "mptcp_syn_retries", translate("Multipath TCP SYN retries"))
mtcpsyn.datatype = "uinteger"
mtcpsyn.rmempty = false
local congestion = s:option(ListValue, "congestion", translate("Congestion Control"))
local availablecong = sys.exec("sysctl net.ipv4.tcp_available_congestion_control | awk -F'= ' '{print $NF}'")
for cong in string.gmatch(availablecong, "[^%s]+") do
congestion:value(cong, translate(cong))
end
s = m:section(TypedSection, "interface", translate("Interfaces Settings"))
mptcp = s:option(ListValue, "multipath", translate("Multipath TCP"), translate("One interface must be set as master"))
mptcp:value("on", translate("enabled"))
mptcp:value("off", translate("disabled"))
mptcp:value("master", translate("master"))
mptcp:value("backup", translate("backup"))
mptcp:value("handover", translate("handover"))
mptcp.default = "off"
return m

View file

@ -63,6 +63,7 @@ MY_DEPENDS := \
luci-mod-admin-full luci-app-firewall luci-app-glorytun luci-app-shadowsocks-libev luci-app-unbound luci-theme-openmptcprouter luci-base \
luci-app-nginx-ha luci-app-omr-tracker luci-app-qos \
luci-app-vnstat omr-quota luci-app-omr-quota \
luci-app-mptcp \
speedtestc \
ip6tables-mod-nat luci-proto-ipv6 ethtool