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

Merge branch 'develop'

This commit is contained in:
suyuan 2022-08-26 22:53:53 +08:00
commit 8647a77e86
62 changed files with 3373 additions and 1960 deletions

View file

@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bcm27xx-eeprom
PKG_VERSION:=47976e4409c6999a8e211976c75c60a97c90275c
PKG_RELEASE:=4
PKG_VERSION:=v2022.04.26-138a1
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/raspberrypi/rpi-eeprom/tar.gz/$(PKG_VERSION)?
PKG_HASH:=skip
PKG_HASH:=7c54839e68f226c5853fb63c8a1539b729d84b2e6bac311a51766c601d10a413
PKG_LICENSE:=BSD-3-Clause Custom
PKG_LICENSE_FILES:=LICENSE
@ -21,7 +21,7 @@ TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
define Package/bcm27xx-eeprom
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=bcm27xx-userland +blkid +pciutils +python3-light +coreutils +coreutils-od
DEPENDS:=bcm27xx-userland +blkid +coreutils +coreutils-od +pciutils +python3-light
TITLE:=BCM27xx EEPROM tools
endef
@ -43,6 +43,7 @@ define Package/bcm27xx-eeprom/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/rpi-eeprom-config $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/rpi-eeprom-digest $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/rpi-eeprom-update $(1)/usr/bin
$(INSTALL_DIR) $(1)/lib/firmware/raspberrypi/bootloader

View file

@ -0,0 +1,33 @@
From 8376ac74390af0ad736c88615e128b82a75eebc0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
Date: Fri, 19 Feb 2021 10:54:23 +0100
Subject: [PATCH] rpi-eeprom-update: chmod silent (-f) is not supported
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
rpi-eeprom-update | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/rpi-eeprom-update
+++ b/rpi-eeprom-update
@@ -200,7 +200,7 @@ applyRecoveryUpdate()
|| die "Failed to copy ${TMP_EEPROM_IMAGE} to ${BOOTFS}"
# For NFS mounts ensure that the files are readable to the TFTP user
- chmod -f go+r "${BOOTFS}/pieeprom.upd" "${BOOTFS}/pieeprom.sig" \
+ chmod go+r "${BOOTFS}/pieeprom.upd" "${BOOTFS}/pieeprom.sig" \
|| die "Failed to set permissions on eeprom update files"
fi
@@ -211,7 +211,7 @@ applyRecoveryUpdate()
|| die "Failed to copy ${VL805_UPDATE_IMAGE} to ${BOOTFS}/vl805.bin"
# For NFS mounts ensure that the files are readable to the TFTP user
- chmod -f go+r "${BOOTFS}/vl805.bin" "${BOOTFS}/vl805.sig" \
+ chmod go+r "${BOOTFS}/vl805.bin" "${BOOTFS}/vl805.sig" \
|| die "Failed to set permissions on eeprom update files"
fi

View file

@ -1,24 +0,0 @@
--- a/rpi-eeprom-update 2020-11-05 21:58:02.247836497 +0100
+++ b/rpi-eeprom-update 2020-11-05 21:58:36.911266307 +0100
@@ -186,8 +186,8 @@
|| die "Failed to copy ${TMP_EEPROM_IMAGE} to ${BOOTFS}"
# For NFS mounts ensure that the files are readable to the TFTP user
- chmod -f go+r "${BOOTFS}/pieeprom.upd" "${BOOTFS}/pieeprom.sig" \
- || die "Failed to set permissions on eeprom update files"
+ #chmod -f go+r "${BOOTFS}/pieeprom.upd" "${BOOTFS}/pieeprom.sig" \
+ # || die "Failed to set permissions on eeprom update files"
fi
if [ -n "${VL805_UPDATE_IMAGE}" ]; then
@@ -198,8 +198,8 @@
|| die "Failed to copy ${VL805_UPDATE_IMAGE} to ${BOOTFS}/vl805.bin"
# For NFS mounts ensure that the files are readable to the TFTP user
- chmod -f go+r "${BOOTFS}/vl805.bin" "${BOOTFS}/vl805.sig" \
- || die "Failed to set permissions on eeprom update files"
+ #chmod -f go+r "${BOOTFS}/vl805.bin" "${BOOTFS}/vl805.sig" \
+ # || die "Failed to set permissions on eeprom update files"
fi
cp -f "${RECOVERY_BIN}" "${BOOTFS}/recovery.bin" \

View file

@ -0,0 +1,22 @@
--- a/rpi-eeprom-config
+++ b/rpi-eeprom-config
@@ -166,8 +166,8 @@ def edit_config(eeprom=None):
"""
Implements something like 'git commit' for editing EEPROM configs.
"""
- # Default to nano if $EDITOR is not defined.
- editor = 'nano'
+ # Default to vi if $EDITOR is not defined.
+ editor = 'vi'
if 'EDITOR' in os.environ:
editor = os.environ['EDITOR']
@@ -428,7 +428,7 @@ Operating modes:
To cancel the pending update run 'sudo rpi-eeprom-update -r'
- The default text editor is nano and may be overridden by setting the 'EDITOR'
+ The default text editor is vi and may be overridden by setting the 'EDITOR'
environment variable and passing '-E' to 'sudo' to preserve the environment.
6. Signing the bootloader config file.

9
contributors/ta264.md Normal file
View file

@ -0,0 +1,9 @@
2022-08-26
I hereby agree to the terms of the "OpenMPTCProuter Individual Contributor License Agreement", with MD5 checksum bc827a07eb93611d793ddb7c75083c00.
I furthermore declare that I am authorized and able to make this agreement and sign this declaration.
Signed,
ta264 https://github.com/ta264

View file

@ -56,11 +56,17 @@ start_instance() {
_log "starting ${PROG_NAME} ${1} instance $*"
host=$(resolveip $host)
if [ "$mode" = "to" ]; then
bind="bind from addr :: port 5000 to addr $host port $port"
else
bind="bind from addr $host port $port to addr :: port 5000"
fi
procd_open_instance
procd_set_param command ${PROG} \
${host:+bind ${mode} addr "$host"} \
${port:+port "$port"} \
${bind} \
${dev:+dev "$dev"} \
keyfile /tmp/${PROG_NAME}-${1}.key \
persist

View file

@ -65,6 +65,11 @@ if uname.release:sub(1,4) == "5.15" then
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.datatype = "uinteger"
o.rmempty = false
o.default = 4
else
o = s:option(Value, "mptcp_fullmesh_num_subflows", translate("Fullmesh subflows for each pair of IP addresses"))
o.datatype = "uinteger"

View file

@ -37,11 +37,11 @@ msgstr ""
"Prüfung auf transparenten Transport von MPTCP-Paketen zwischen Anschluss und "
"Server."
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:40
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:52
msgid "Congestion Control"
msgstr "Überlauf-Steuerung"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:69
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:97
msgid "Consecutive segments that should be sent for round robin"
msgstr ""
@ -51,7 +51,7 @@ msgstr ""
msgid "Current:"
msgstr "derzeit:"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:40
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:52
#, fuzzy
msgid "Default is cubic"
msgstr "Voreinstellung ist 'bbr'"
@ -76,11 +76,11 @@ msgstr "Fehler"
msgid "Established connections"
msgstr "aufgebaute Verbindungen"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:63
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:91
msgid "Fill the congestion window on all subflows for round robin"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:46
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:74
msgid "Fullmesh subflows for each pair of IP addresses"
msgstr ""
"Datenströme im vollvermaschter Betrieb für die jeweiligen Gegegenstellen-"
@ -105,7 +105,7 @@ msgstr "Ankommend:"
msgid "Interface"
msgstr "Schnittstelle"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:75
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:104
msgid "Interfaces Settings"
msgstr "Anschluss-Einstellungen"
@ -150,11 +150,11 @@ msgid "Multipath Debug"
msgstr "Mehrfachausbreitungspfad-Analyse"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:12
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:76
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:108
msgid "Multipath TCP"
msgstr "Multipath-TCP"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:37
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:42
msgid "Multipath TCP SYN retries"
msgstr "Multipath TCP SYN Wiederholungen"
@ -166,11 +166,17 @@ msgstr "Multipath TCP Prüfummen"
msgid "Multipath TCP path-manager"
msgstr "Multipath TCP Pfadkontrolle"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:29
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:31
msgid "Multipath TCP scheduler"
msgstr "Multpath TCP Priorisierungskontrolle"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:27
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:47
#, fuzzy
#| msgid "Multipath TCP"
msgid "Multipath TCP version"
msgstr "Multipath-TCP"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:28
msgid "Netlink"
msgstr "Netlink-Layer"
@ -184,7 +190,7 @@ msgstr ""
"tcp.org/pmwiki.php/Users/ConfigureMPTCP'>http://multipath-tcp.org/pmwiki.php/"
"Users/ConfigureMPTCP</a> (english)."
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:76
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:108
msgid "One interface must be set as master"
msgstr "Ein Anschluss muss als 'primär' defininiert werden."
@ -200,7 +206,7 @@ msgstr "Abgehend:"
msgid "Peak:"
msgstr "Spitze:"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:52
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:80
msgid "Re-create fullmesh subflows after a timeout"
msgstr "Wiederverbindungs-Wartezeit der Vollvermaschungs-Verbindungen"
@ -217,6 +223,12 @@ msgstr "Einstellungen"
msgid "Test"
msgstr "Test"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:69
msgid ""
"The number of MPTCP-level retransmission intervals with no traffic and "
"pending outstanding data on a given subflow required to declare it stale"
msgstr ""
#: luci-app-mptcp/luasrc/view/mptcp/multipath.htm:914
msgid "Upload:"
msgstr "Upstream:"
@ -228,36 +240,36 @@ msgstr "Upstream:"
msgid "Waiting for command to complete..."
msgstr "Warte auf Abschluss der Aufgaben"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:80
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:112
msgid "backup"
msgstr "Sicherung"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:22
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:30
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:32
msgid "default"
msgstr "Voreinstellung"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:14
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:17
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:20
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:54
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:65
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:82
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:93
msgid "disable"
msgstr "ausschalten"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:78
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:110
msgid "disabled"
msgstr "aus"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:13
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:16
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:19
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:53
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:64
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:81
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:92
msgid "enable"
msgstr "anschalten"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:77
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:109
msgid "enabled"
msgstr "an"
@ -295,14 +307,26 @@ msgstr "kBytes/s"
msgid "kbit/s"
msgstr "kBit/s"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:79
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:111
msgid "master"
msgstr "primär"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:57
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:85
msgid "ndiffports subflows number"
msgstr "ndiff-Ports Verbindungs-Nummer"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:64
msgid ""
"specifies the maximum number of ADD_ADDR suboptions accepted for each MPTCP "
"connection"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:59
msgid ""
"specifies the maximum number of additional subflows allowed for each MPTCP "
"connection"
msgstr ""
#~ msgid "BLEST"
#~ msgstr "Blockierungsvorhersage-Betrieb"

View file

@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2022-02-19 07:53+0000\n"
"PO-Revision-Date: 2022-08-10 18:51+0000\n"
"Last-Translator: Weblate Admin <contact@openmptcprouter.com>\n"
"Language-Team: French <http://weblate.openmptcprouter.com/projects/omr/"
"luciapplicationsmptcp/fr/>\n"
@ -11,7 +11,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.6.1\n"
"X-Generator: Weblate 4.10.1\n"
#: luci-app-mptcp/luasrc/view/mptcp/multipath.htm:775
msgid "(%d minute window, %d second interval)"
@ -38,11 +38,11 @@ msgstr "Bande passante"
msgid "Check if MPTCP between interface and server is working."
msgstr "Vérifiez si MPTCP entre l'interface et le serveur fonctionne."
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:40
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:52
msgid "Congestion Control"
msgstr "Contrôle de la congestion"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:69
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:97
msgid "Consecutive segments that should be sent for round robin"
msgstr "Segments consécutifs à envoyer pour round robin"
@ -52,7 +52,7 @@ msgstr "Segments consécutifs à envoyer pour round robin"
msgid "Current:"
msgstr "Actuellement :"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:40
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:52
msgid "Default is cubic"
msgstr "La valeur par défaut est cubic"
@ -75,11 +75,12 @@ msgstr "Erreur"
msgid "Established connections"
msgstr "Connexions établies"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:63
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:91
msgid "Fill the congestion window on all subflows for round robin"
msgstr "Remplir la fenêtre de congestion de tous les sous-flux pour round robin"
msgstr ""
"Remplir la fenêtre de congestion de tous les sous-flux pour round robin"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:46
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:74
msgid "Fullmesh subflows for each pair of IP addresses"
msgstr "Sous-flux Fullmesh pour chaque paire d'adresses IP"
@ -105,7 +106,7 @@ msgstr "Entrant :"
msgid "Interface"
msgstr "Interface"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:75
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:104
msgid "Interfaces Settings"
msgstr "Paramètres des interfaces"
@ -150,11 +151,11 @@ msgid "Multipath Debug"
msgstr "Débogage multipath"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:12
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:76
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:108
msgid "Multipath TCP"
msgstr "Multipath TCP"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:37
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:42
msgid "Multipath TCP SYN retries"
msgstr "Tentatives Multipath TCP SYN"
@ -166,11 +167,15 @@ msgstr "Somme de contrôle Multipath TCP"
msgid "Multipath TCP path-manager"
msgstr "Gestionnaire de chemins Multipath TCP"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:29
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:31
msgid "Multipath TCP scheduler"
msgstr "Planificateur Multipath TCP"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:27
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:47
msgid "Multipath TCP version"
msgstr "Version de Multipath TCP"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:28
msgid "Netlink"
msgstr "Netlink"
@ -184,7 +189,7 @@ msgstr ""
"php/Users/ConfigureMPTCP'>http://multipath-tcp.org/pmwiki.php/Users/"
"ConfigureMPTCP</a> pour de l'aide."
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:76
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:108
msgid "One interface must be set as master"
msgstr "Une interface doit être configuré en temps que maître"
@ -200,7 +205,7 @@ msgstr "Sortant :"
msgid "Peak:"
msgstr "Pointe :"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:52
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:80
msgid "Re-create fullmesh subflows after a timeout"
msgstr "Recréer les sous-flux fullmesh après le délai d'expiration"
@ -217,6 +222,14 @@ msgstr "Paramètres"
msgid "Test"
msgstr "Essai"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:69
msgid ""
"The number of MPTCP-level retransmission intervals with no traffic and "
"pending outstanding data on a given subflow required to declare it stale"
msgstr ""
"Le nombre d'intervalles de retransmission au niveau de MPTCP sans trafic et "
"en attente de données sur un sous-flux requis pour le déclarer obsolète"
#: luci-app-mptcp/luasrc/view/mptcp/multipath.htm:914
msgid "Upload:"
msgstr "Envoie :"
@ -228,36 +241,36 @@ msgstr "Envoie :"
msgid "Waiting for command to complete..."
msgstr "En attente de la réponse de la commande..."
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:80
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:112
msgid "backup"
msgstr "remplaçant"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:22
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:30
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:32
msgid "default"
msgstr "Défaut"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:14
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:17
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:20
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:54
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:65
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:82
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:93
msgid "disable"
msgstr "Désactive"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:78
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:110
msgid "disabled"
msgstr "Désactivé"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:13
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:16
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:19
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:53
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:64
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:81
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:92
msgid "enable"
msgstr "Active"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:77
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:109
msgid "enabled"
msgstr "Activé"
@ -295,14 +308,30 @@ msgstr "Ko/s"
msgid "kbit/s"
msgstr "kbit/s"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:79
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:111
msgid "master"
msgstr "maître"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:57
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:85
msgid "ndiffports subflows number"
msgstr "Nombre de sous-flux ndiffports"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:64
msgid ""
"specifies the maximum number of ADD_ADDR suboptions accepted for each MPTCP "
"connection"
msgstr ""
"spécifie le nombre maximum de sous-options ADD_ADDR acceptées pour chaque "
"connexion MPTCP"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:59
msgid ""
"specifies the maximum number of additional subflows allowed for each MPTCP "
"connection"
msgstr ""
"spécifie le nombre maximum de sous-flux ADD_ADDR acceptées pour chaque "
"connexion MPTCP"
#~ msgid "binder"
#~ msgstr "lier"

View file

@ -35,11 +35,11 @@ msgstr "Larghezza banda"
msgid "Check if MPTCP between interface and server is working."
msgstr "Controlla se MPTCP tra l'interfaccia e il server funziona."
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:40
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:52
msgid "Congestion Control"
msgstr "Controllo della congestione"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:69
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:97
msgid "Consecutive segments that should be sent for round robin"
msgstr ""
@ -49,7 +49,7 @@ msgstr ""
msgid "Current:"
msgstr "Corrente:"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:40
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:52
#, fuzzy
msgid "Default is cubic"
msgstr "L&#39;impostazione predefinita è bbr"
@ -74,11 +74,11 @@ msgstr "Errore"
msgid "Established connections"
msgstr "Connessioni stabilite"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:63
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:91
msgid "Fill the congestion window on all subflows for round robin"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:46
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:74
msgid "Fullmesh subflows for each pair of IP addresses"
msgstr "Flussi secondari fullmesh per ogni coppia di indirizzi IP"
@ -101,7 +101,7 @@ msgstr "In entrata:"
msgid "Interface"
msgstr "Interfaccia"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:75
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:104
msgid "Interfaces Settings"
msgstr "Impostazioni delle interfacce"
@ -146,11 +146,11 @@ msgid "Multipath Debug"
msgstr "Debug multipath"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:12
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:76
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:108
msgid "Multipath TCP"
msgstr "Multipath TCP"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:37
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:42
msgid "Multipath TCP SYN retries"
msgstr "Multipath TCP SYN riprova"
@ -162,11 +162,17 @@ msgstr "Multipath TCP checksum"
msgid "Multipath TCP path-manager"
msgstr "Multipath TCP path-manager"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:29
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:31
msgid "Multipath TCP scheduler"
msgstr "Multipath TCP scheduler"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:27
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:47
#, fuzzy
#| msgid "Multipath TCP"
msgid "Multipath TCP version"
msgstr "Multipath TCP"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:28
msgid "Netlink"
msgstr "Netlink"
@ -177,7 +183,7 @@ msgid ""
"ConfigureMPTCP</a> for help."
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:76
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:108
msgid "One interface must be set as master"
msgstr "Un'interfaccia deve essere impostata come master"
@ -193,7 +199,7 @@ msgstr "Upload:"
msgid "Peak:"
msgstr "Picco:"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:52
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:80
msgid "Re-create fullmesh subflows after a timeout"
msgstr "Ricrea i flussi secondari fullmesh dopo un timeout"
@ -210,6 +216,12 @@ msgstr "Impostazioni"
msgid "Test"
msgstr "Test"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:69
msgid ""
"The number of MPTCP-level retransmission intervals with no traffic and "
"pending outstanding data on a given subflow required to declare it stale"
msgstr ""
#: luci-app-mptcp/luasrc/view/mptcp/multipath.htm:914
msgid "Upload:"
msgstr "Upload:"
@ -221,36 +233,36 @@ msgstr "Upload:"
msgid "Waiting for command to complete..."
msgstr "In attesa del completamento del comando ..."
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:80
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:112
msgid "backup"
msgstr "backup"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:22
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:30
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:32
msgid "default"
msgstr "predefinito"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:14
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:17
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:20
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:54
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:65
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:82
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:93
msgid "disable"
msgstr "disabilita"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:78
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:110
msgid "disabled"
msgstr "disabilitato"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:13
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:16
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:19
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:53
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:64
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:81
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:92
msgid "enable"
msgstr "Attivare"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:77
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:109
msgid "enabled"
msgstr "Abilitato"
@ -288,14 +300,26 @@ msgstr "kB/s"
msgid "kbit/s"
msgstr "kbit/s"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:79
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:111
msgid "master"
msgstr "Principale"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:57
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:85
msgid "ndiffports subflows number"
msgstr "ndiffports subflows number"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:64
msgid ""
"specifies the maximum number of ADD_ADDR suboptions accepted for each MPTCP "
"connection"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:59
msgid ""
"specifies the maximum number of additional subflows allowed for each MPTCP "
"connection"
msgstr ""
#~ msgid "BLEST"
#~ msgstr "BLEST"

View file

@ -35,11 +35,11 @@ msgstr "Benda passanta"
msgid "Check if MPTCP between interface and server is working."
msgstr "Verificar se MPTCP entre linterfàcia e lo servidor fonciona."
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:40
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:52
msgid "Congestion Control"
msgstr "Contraròtle de congestion"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:69
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:97
msgid "Consecutive segments that should be sent for round robin"
msgstr ""
@ -49,7 +49,7 @@ msgstr ""
msgid "Current:"
msgstr "Actualament:"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:40
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:52
#, fuzzy
msgid "Default is cubic"
msgstr "Per defaut bbr"
@ -74,11 +74,11 @@ msgstr "Error"
msgid "Established connections"
msgstr "Connexions establidas"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:63
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:91
msgid "Fill the congestion window on all subflows for round robin"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:46
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:74
msgid "Fullmesh subflows for each pair of IP addresses"
msgstr "Jos flux Fullmesh per cada parelh dadreças IP"
@ -101,7 +101,7 @@ msgstr "Dintrant:"
msgid "Interface"
msgstr "Interfàcia"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:75
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:104
msgid "Interfaces Settings"
msgstr "Paramètres de las interfàcias"
@ -146,11 +146,11 @@ msgid "Multipath Debug"
msgstr "Desbugatge multipath"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:12
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:76
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:108
msgid "Multipath TCP"
msgstr "Multipath TCP"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:37
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:42
msgid "Multipath TCP SYN retries"
msgstr "Ensages Multipath TCP SYN"
@ -162,11 +162,17 @@ msgstr "Sòma de contraròtle Multipath TCP"
msgid "Multipath TCP path-manager"
msgstr "Gestionari dels camins Multipath TCP"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:29
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:31
msgid "Multipath TCP scheduler"
msgstr "Planificator Multipath TCP"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:27
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:47
#, fuzzy
#| msgid "Multipath TCP"
msgid "Multipath TCP version"
msgstr "Multipath TCP"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:28
msgid "Netlink"
msgstr "Ligam ret"
@ -180,7 +186,7 @@ msgstr ""
"Users/ConfigureMPTCP'>http://multipath-tcp.org/pmwiki.php/Users/"
"ConfigureMPTCP</a> per dajuda."
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:76
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:108
msgid "One interface must be set as master"
msgstr "Una interfàcia deu èsser configurada coma principala"
@ -196,7 +202,7 @@ msgstr "Sortent:"
msgid "Peak:"
msgstr "Punta:"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:52
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:80
msgid "Re-create fullmesh subflows after a timeout"
msgstr "Tornar crear los jos-flus fullmesh aprèp lo relambi dexpiracion"
@ -213,6 +219,12 @@ msgstr "Paramètres"
msgid "Test"
msgstr "Pròva"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:69
msgid ""
"The number of MPTCP-level retransmission intervals with no traffic and "
"pending outstanding data on a given subflow required to declare it stale"
msgstr ""
#: luci-app-mptcp/luasrc/view/mptcp/multipath.htm:914
msgid "Upload:"
msgstr "Mandadís:"
@ -224,36 +236,36 @@ msgstr "Mandadís:"
msgid "Waiting for command to complete..."
msgstr "En espèra duna responsa de la comanda..."
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:80
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:112
msgid "backup"
msgstr "subordinat"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:22
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:30
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:32
msgid "default"
msgstr "Defaut"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:14
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:17
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:20
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:54
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:65
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:82
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:93
msgid "disable"
msgstr "desactivar"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:78
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:110
msgid "disabled"
msgstr "desactivat"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:13
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:16
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:19
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:53
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:64
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:81
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:92
msgid "enable"
msgstr "Activar"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:77
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:109
msgid "enabled"
msgstr "Activat"
@ -291,14 +303,26 @@ msgstr "kB/s"
msgid "kbit/s"
msgstr "kbit/s"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:79
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:111
msgid "master"
msgstr "màger"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:57
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:85
msgid "ndiffports subflows number"
msgstr "Nombre de jos-flux ndiffports"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:64
msgid ""
"specifies the maximum number of ADD_ADDR suboptions accepted for each MPTCP "
"connection"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:59
msgid ""
"specifies the maximum number of additional subflows allowed for each MPTCP "
"connection"
msgstr ""
#, fuzzy
#~ msgid "BLEST"
#~ msgstr "BLEST"

View file

@ -36,11 +36,11 @@ msgstr "Пропускная способность"
msgid "Check if MPTCP between interface and server is working."
msgstr "Проверьте, работает ли MPTCP между интерфейсом и сервером."
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:40
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:52
msgid "Congestion Control"
msgstr "Контроль перегрузки"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:69
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:97
msgid "Consecutive segments that should be sent for round robin"
msgstr "Последовательные сегменты, которые следует отправлять для round-robin"
@ -50,7 +50,7 @@ msgstr "Последовательные сегменты, которые сле
msgid "Current:"
msgstr "Текущая:"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:40
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:52
msgid "Default is cubic"
msgstr "По умолчанию кубический"
@ -73,11 +73,11 @@ msgstr "Ошибка"
msgid "Established connections"
msgstr "Установленные соединения"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:63
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:91
msgid "Fill the congestion window on all subflows for round robin"
msgstr "Заполнение окна перегрузки для всех подпотоков для round-robin"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:46
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:74
msgid "Fullmesh subflows for each pair of IP addresses"
msgstr "Подпотоки Fullmesh для каждой пары IP-адресов"
@ -102,7 +102,7 @@ msgstr "Входящий:"
msgid "Interface"
msgstr "Интерфейс"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:75
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:104
msgid "Interfaces Settings"
msgstr "Настройки интерфейсов"
@ -147,11 +147,11 @@ msgid "Multipath Debug"
msgstr "Многоуровневая отладка"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:12
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:76
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:108
msgid "Multipath TCP"
msgstr "Многопоточный TCP"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:37
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:42
msgid "Multipath TCP SYN retries"
msgstr "Попытки многопоточной TCP SYN"
@ -163,11 +163,17 @@ msgstr "Контрольная сумма многопоточного TCP"
msgid "Multipath TCP path-manager"
msgstr "Многопоточный TCP менеджер"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:29
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:31
msgid "Multipath TCP scheduler"
msgstr "Планировщик многопоточного TCP"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:27
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:47
#, fuzzy
#| msgid "Multipath TCP"
msgid "Multipath TCP version"
msgstr "Многопоточный TCP"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:28
msgid "Netlink"
msgstr "Netlink"
@ -181,7 +187,7 @@ msgstr ""
"Users/ConfigureMPTCP'>http://multipath-tcp.org/pmwiki.php/Users/"
"ConfigureMPTCP</a> для справки."
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:76
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:108
msgid "One interface must be set as master"
msgstr "Один интерфейс должен быть установлен как главный"
@ -197,7 +203,7 @@ msgstr "Отправка:"
msgid "Peak:"
msgstr "Пиковое значение:"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:52
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:80
msgid "Re-create fullmesh subflows after a timeout"
msgstr "Повторно создать подпотоки fullmesh после тайм-аута"
@ -214,6 +220,12 @@ msgstr "Настройки"
msgid "Test"
msgstr "Тест"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:69
msgid ""
"The number of MPTCP-level retransmission intervals with no traffic and "
"pending outstanding data on a given subflow required to declare it stale"
msgstr ""
#: luci-app-mptcp/luasrc/view/mptcp/multipath.htm:914
msgid "Upload:"
msgstr "Отправка:"
@ -225,36 +237,36 @@ msgstr "Отправка:"
msgid "Waiting for command to complete..."
msgstr "Ожидание завершения команды..."
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:80
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:112
msgid "backup"
msgstr "Резервирование"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:22
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:30
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:32
msgid "default"
msgstr "По умолчанию"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:14
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:17
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:20
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:54
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:65
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:82
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:93
msgid "disable"
msgstr "отключить"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:78
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:110
msgid "disabled"
msgstr "отключить"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:13
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:16
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:19
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:53
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:64
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:81
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:92
msgid "enable"
msgstr "включить"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:77
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:109
msgid "enabled"
msgstr "Установлено"
@ -292,10 +304,22 @@ msgstr "kB/s"
msgid "kbit/s"
msgstr "kbit/s"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:79
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:111
msgid "master"
msgstr "мастер"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:57
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:85
msgid "ndiffports subflows number"
msgstr "количество подпотоков ndiffports"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:64
msgid ""
"specifies the maximum number of ADD_ADDR suboptions accepted for each MPTCP "
"connection"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:59
msgid ""
"specifies the maximum number of additional subflows allowed for each MPTCP "
"connection"
msgstr ""

View file

@ -26,11 +26,11 @@ msgstr ""
msgid "Check if MPTCP between interface and server is working."
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:40
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:52
msgid "Congestion Control"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:69
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:97
msgid "Consecutive segments that should be sent for round robin"
msgstr ""
@ -40,7 +40,7 @@ msgstr ""
msgid "Current:"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:40
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:52
msgid "Default is cubic"
msgstr ""
@ -63,11 +63,11 @@ msgstr ""
msgid "Established connections"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:63
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:91
msgid "Fill the congestion window on all subflows for round robin"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:46
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:74
msgid "Fullmesh subflows for each pair of IP addresses"
msgstr ""
@ -90,7 +90,7 @@ msgstr ""
msgid "Interface"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:75
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:104
msgid "Interfaces Settings"
msgstr ""
@ -135,11 +135,11 @@ msgid "Multipath Debug"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:12
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:76
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:108
msgid "Multipath TCP"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:37
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:42
msgid "Multipath TCP SYN retries"
msgstr ""
@ -151,11 +151,15 @@ msgstr ""
msgid "Multipath TCP path-manager"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:29
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:31
msgid "Multipath TCP scheduler"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:27
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:47
msgid "Multipath TCP version"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:28
msgid "Netlink"
msgstr ""
@ -166,7 +170,7 @@ msgid ""
"ConfigureMPTCP</a> for help."
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:76
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:108
msgid "One interface must be set as master"
msgstr ""
@ -182,7 +186,7 @@ msgstr ""
msgid "Peak:"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:52
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:80
msgid "Re-create fullmesh subflows after a timeout"
msgstr ""
@ -199,6 +203,12 @@ msgstr ""
msgid "Test"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:69
msgid ""
"The number of MPTCP-level retransmission intervals with no traffic and "
"pending outstanding data on a given subflow required to declare it stale"
msgstr ""
#: luci-app-mptcp/luasrc/view/mptcp/multipath.htm:914
msgid "Upload:"
msgstr ""
@ -210,36 +220,36 @@ msgstr ""
msgid "Waiting for command to complete..."
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:80
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:112
msgid "backup"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:22
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:30
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:32
msgid "default"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:14
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:17
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:20
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:54
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:65
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:82
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:93
msgid "disable"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:78
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:110
msgid "disabled"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:13
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:16
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:19
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:53
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:64
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:81
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:92
msgid "enable"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:77
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:109
msgid "enabled"
msgstr ""
@ -277,10 +287,22 @@ msgstr ""
msgid "kbit/s"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:79
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:111
msgid "master"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:57
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:85
msgid "ndiffports subflows number"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:64
msgid ""
"specifies the maximum number of ADD_ADDR suboptions accepted for each MPTCP "
"connection"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:59
msgid ""
"specifies the maximum number of additional subflows allowed for each MPTCP "
"connection"
msgstr ""

View file

@ -1,14 +1,14 @@
msgid ""
msgstr ""
"PO-Revision-Date: 2021-06-02 09:51+0000\n"
"Last-Translator: antrouter <xinyangla@188.com>\n"
"PO-Revision-Date: 2022-08-12 19:29+0000\n"
"Last-Translator: Weblate Admin <contact@openmptcprouter.com>\n"
"Language-Team: Chinese (Simplified) <http://weblate.openmptcprouter.com/"
"projects/omr/luciapplicationsmptcp/zh_Hans/>\n"
"Language: zh_Hans\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 4.6.1\n"
"X-Generator: Weblate 4.10.1\n"
#: luci-app-mptcp/luasrc/view/mptcp/multipath.htm:775
msgid "(%d minute window, %d second interval)"
@ -35,11 +35,11 @@ msgstr "带宽"
msgid "Check if MPTCP between interface and server is working."
msgstr "检查接口和服务器之间的MPTCP是否正常工作."
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:40
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:52
msgid "Congestion Control"
msgstr "阻塞控制"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:69
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:97
msgid "Consecutive segments that should be sent for round robin"
msgstr "连续轮播应发送的连续段"
@ -49,7 +49,7 @@ msgstr "连续轮播应发送的连续段"
msgid "Current:"
msgstr "实时:"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:40
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:52
msgid "Default is cubic"
msgstr "默认设置 cubic"
@ -72,11 +72,11 @@ msgstr "错误"
msgid "Established connections"
msgstr "建立的连接"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:63
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:91
msgid "Fill the congestion window on all subflows for round robin"
msgstr "在循环的所有子流上填充拥塞窗口"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:46
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:74
msgid "Fullmesh subflows for each pair of IP addresses"
msgstr "每对IP地址的全网格子流"
@ -89,9 +89,7 @@ msgid ""
"If you get \"TCPOptionMPTCPCapable [...] Sender's Key\" at the end, then "
"MPTCP is supported. If there is a \"-TCPOptionMPTCPCapable\", then it's "
"blocked."
msgstr ""
"如果最后得到“ TCPOptionMPTCPCapable发件人的密钥”则支持MPTCP。unesdoc.unesco.org "
"unesdoc.unesco.org 如果存在“ -TCPOptionMPTCPCapable”则将其阻止。"
msgstr "如果您在末尾获得“TCPOptionMPTCPCapable [...] Sender 's Key” 则支持MPTCP"
#: luci-app-mptcp/luasrc/view/mptcp/multipath.htm:929
msgid "Inbound:"
@ -101,7 +99,7 @@ msgstr "入站:"
msgid "Interface"
msgstr "接口"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:75
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:104
msgid "Interfaces Settings"
msgstr "网卡设置"
@ -146,11 +144,11 @@ msgid "Multipath Debug"
msgstr "Multipath 调试"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:12
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:76
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:108
msgid "Multipath TCP"
msgstr "多路径TCP"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:37
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:42
msgid "Multipath TCP SYN retries"
msgstr "多路径 TCP SYN 重试"
@ -162,11 +160,16 @@ msgstr "多路径TCP校验和"
msgid "Multipath TCP path-manager"
msgstr "多路径TCP路径管理器"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:29
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:31
msgid "Multipath TCP scheduler"
msgstr "多路径TCP调度程序"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:27
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:47
#, fuzzy
msgid "Multipath TCP version"
msgstr "多路径TCP"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:28
msgid "Netlink"
msgstr "网络链接"
@ -180,7 +183,7 @@ msgstr ""
"ConfigureMPTCP'>http://multipath-tcp.org/pmwiki.php/Users/ConfigureMPTCP4</"
"a> 获取更多的支持."
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:76
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:108
msgid "One interface must be set as master"
msgstr "必须设置一个网卡为主接口"
@ -196,7 +199,7 @@ msgstr "出站:"
msgid "Peak:"
msgstr "峰值:"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:52
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:80
msgid "Re-create fullmesh subflows after a timeout"
msgstr "超时后重新创建全网格子流"
@ -213,6 +216,12 @@ msgstr "设置"
msgid "Test"
msgstr "测试"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:69
msgid ""
"The number of MPTCP-level retransmission intervals with no traffic and "
"pending outstanding data on a given subflow required to declare it stale"
msgstr ""
#: luci-app-mptcp/luasrc/view/mptcp/multipath.htm:914
msgid "Upload:"
msgstr "上传:"
@ -224,36 +233,36 @@ msgstr "上传:"
msgid "Waiting for command to complete..."
msgstr "等待命令完成..."
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:80
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:112
msgid "backup"
msgstr "备份"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:22
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:30
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:32
msgid "default"
msgstr "默认"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:14
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:17
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:20
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:54
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:65
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:82
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:93
msgid "disable"
msgstr "禁用"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:78
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:110
msgid "disabled"
msgstr "禁用"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:13
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:16
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:19
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:53
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:64
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:81
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:92
msgid "enable"
msgstr "启用"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:77
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:109
msgid "enabled"
msgstr "启用"
@ -291,14 +300,26 @@ msgstr "kB/秒"
msgid "kbit/s"
msgstr "kbit/秒"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:79
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:111
msgid "master"
msgstr "主"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:57
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:85
msgid "ndiffports subflows number"
msgstr "ndiffports子流数"
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:64
msgid ""
"specifies the maximum number of ADD_ADDR suboptions accepted for each MPTCP "
"connection"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:59
msgid ""
"specifies the maximum number of additional subflows allowed for each MPTCP "
"connection"
msgstr ""
#~ msgid "BLEST"
#~ msgstr "最好的"

View file

@ -223,6 +223,9 @@ return L.view.extend({
o.noinactive = true;
o.nocreate = true;
o = s.option(form.Flag, 'ndpi', _('Enable ndpi'));
o.default = o.enabled;
o = s.option(form.Value, 'note', _('Note'));
o.rmempty = true;

View file

@ -1,14 +1,14 @@
msgid ""
msgstr ""
"PO-Revision-Date: 2020-10-02 08:44+0000\n"
"Last-Translator: Weblate Admin <contact@openmptcprouter.com>\n"
"PO-Revision-Date: 2022-02-21 21:14+0000\n"
"Last-Translator: Deleted User <noreply+28@weblate.org>\n"
"Language-Team: Italian <http://weblate.openmptcprouter.com/projects/omr/"
"luciapplicationsomr-bypass/it/>\n"
"Language: it\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.0.4\n"
"X-Generator: Weblate 4.10.1\n"
#: luci-app-omr-bypass/htdocs/luci-static/resources/view/services/omr-bypass.js:166
#: luci-app-omr-bypass/htdocs/luci-static/resources/view/services/omr-bypass.js:174
@ -32,7 +32,7 @@ msgstr "Domini"
#: luci-app-omr-bypass/htdocs/luci-static/resources/view/services/omr-bypass.js:171
#: luci-app-omr-bypass/htdocs/luci-static/resources/view/services/omr-bypass.js:190
msgid "Enabled"
msgstr ""
msgstr "Abilitato"
#: luci-app-omr-bypass/root/usr/share/rpcd/acl.d/luci-app-omr-bypass.json:3
msgid "Grant access to ndpi resources"

View file

@ -1,2 +1,2 @@
#!/bin/sh
/etc/init.d/omr-bypass reload_rules
[ -z "$(pgrep -f omr-bypass)" ] && /etc/init.d/omr-bypass reload_rules

View file

@ -341,6 +341,7 @@ _bypass_proto() {
config_get proto $1 proto
config_get intf $1 interface
config_get enabled $1 enabled
config_get ndpi $1 ndpi
[ "$enabled" = "0" ] && return
intf=$(echo $intf | sed -e 's/\./_/')
[ -n "$intf" ] && [ -z "$(ipset --list | grep omr_dst_bypass_$intf)" ] && return
@ -348,17 +349,19 @@ _bypass_proto() {
[ -z "$intf" ] && intf="all"
[ -z "$proto" ] && return
if [ "$(uci -q get openmptcprouter.settings.ndpi)" != "0" ]; then
if [ "$(uci -q get openmptcprouter.settings.ndpi)" != "0" ] && [ "$ndpi" != "0" ]; then
if [ "$intf" = "all" ]; then
iptables-restore -w --wait=60 --noflush <<-EOF
*mangle
-A omr-bypass-dpi -m ndpi --proto $proto -j MARK --set-mark 0x539
-A omr-bypass-dpi -m mark --mark 0x539 -j RETURN
COMMIT
EOF
if [ "$disableipv6" = "0" ]; then
ip6tables-restore -w --wait=60 --noflush <<-EOF
*mangle
-A omr-bypass6-dpi -m ndpi --proto $proto -j MARK --set-mark 0x6539
-A omr-bypass6-dpi -m mark --mark 0x6539 -j RETURN
COMMIT
EOF
fi
@ -366,12 +369,14 @@ _bypass_proto() {
iptables-restore -w --wait=60 --noflush <<-EOF
*mangle
-A omr-bypass-dpi -m ndpi --proto $proto -j MARK --set-mark 0x539$intfid
-A omr-bypass-dpi -m mark --mark 0x539$intfid -j RETURN
COMMIT
EOF
if [ "$disableipv6" = "0" ]; then
ip6tables-restore -w --wait=60 --noflush <<-EOF
*mangle
-A omr-bypass6-dpi -m ndpi --proto $proto -j MARK --set-mark 0x6539$intfid
-A omr-bypass6-dpi -m mark --mark 0x6539$intfid -j RETURN
COMMIT
EOF
fi
@ -471,18 +476,32 @@ _intf_rule_v2ray_rules() {
#rule_name=$1
#[ "$rule_name" = "ss_rules" ] && rule_name="def"
rule_name="def"
if [ "$(iptables --wait=40 -t nat -L -n | grep v2r_${rule_name}_pre_src)" != "" ] && [ "$(iptables-save | grep v2r | grep omr_dst_bypass_$intf)" = "" ]; then
if [ "$(iptables --wait=40 -t nat -L -n | grep v2r_${rule_name}_dst)" != "" ] && [ "$(iptables-save | grep v2r_${rule_name}_dst | grep omr_dst_bypass_$intf)" = "" ]; then
iptables-restore -w --wait=60 --noflush <<-EOF
*nat
-I v2r_${rule_name}_dst 1 -m set --match-set omr_dst_bypass_$intf dst -j MARK --set-mark 0x539$count
-I v2r_${rule_name}_dst 2 -m mark --mark 0x539$count -j RETURN
COMMIT
EOF
fi
if [ "$(iptables --wait=40 -t nat -L -n | grep v2r_${rule_name}_local_out)" != "" ] && [ "$(iptables-save | grep v2r_${rule_name}_local_out | grep omr_dst_bypass_$intf)" = "" ]; then
iptables-restore -w --wait=60 --noflush <<-EOF
*nat
-I v2r_${rule_name}_local_out 1 -m set --match-set omr_dst_bypass_$intf dst -j MARK --set-mark 0x539$count
-I v2r_${rule_name}_local_out 2 -m mark --mark 0x539$count -j RETURN
COMMIT
EOF
fi
if [ "$(iptables --wait=40 -t nat -L -n | grep v2r_${rule_name}_pre_src)" != "" ] && [ "$(iptables-save | grep v2r_${rule_name}_pre_src | grep omr_dst_bypass_$intf)" = "" ]; then
iptables-restore -w --wait=60 --noflush <<-EOF
*nat
-I v2r_${rule_name}_pre_src 1 -m set --match-set omr_dst_bypass_$intf dst -j MARK --set-mark 0x539$count
-I v2r_${rule_name}_pre_src 2 -m mark --mark 0x539$count -j RETURN
COMMIT
EOF
fi
if [ "$disableipv6" = "0" ]; then
if [ "$(ip6tables-save | grep omr-bypass6 | grep omr6_dst_bypass_$intf)" = "" ]; then
ip6tables-restore -w --wait=60 --noflush <<-EOF
@ -552,7 +571,9 @@ _intf_rule() {
iptables-restore -w --wait=60 --noflush <<-EOF
*mangle
-I omr-bypass 1 -m set --match-set omr_dst_bypass_$intf dst -j MARK --set-mark 0x539$count
-I omr-bypass 2 -m mark --mark 0x539$count -j RETURN
-I omr-bypass-local 1 -m set --match-set omr_dst_bypass_$intf dst -j MARK --set-mark 0x539$count
-I omr-bypass-local 2 -m mark --mark 0x539$count -j RETURN
COMMIT
EOF
fi
@ -610,7 +631,7 @@ _ss_rules_config() {
iptables-restore -w --wait=60 --noflush <<-EOF
*nat
-I ssr_${rule_name}_dst 1 -m set --match-set omr_dst_bypass_all dst -j MARK --set-mark 0x539
-I ssr_${rule_name}_dst 1 -m mark --mark 0x539 -j RETURN
-I ssr_${rule_name}_dst 2 -m mark --mark 0x539 -j RETURN
-I ssr_${rule_name}_local_out 1 -m set --match-set omr_dst_bypass_all dst -j MARK --set-mark 0x539
-I ssr_${rule_name}_local_out 2 -m mark --mark 0x539 -j RETURN
-I ssr_${rule_name}_pre_src 1 -m set --match-set omr_dst_bypass_all dst -j MARK --set-mark 0x539
@ -649,7 +670,7 @@ _v2ray_rules_config() {
iptables-restore -w --wait=60 --noflush <<-EOF
*nat
-I v2r_${rule_name}_dst 1 -m set --match-set omr_dst_bypass_all dst -j MARK --set-mark 0x539
-I v2r_${rule_name}_dst 1 -m mark --mark 0x539 -j RETURN
-I v2r_${rule_name}_dst 2 -m mark --mark 0x539 -j RETURN
-I v2r_${rule_name}_local_out 1 -m set --match-set omr_dst_bypass_all dst -j MARK --set-mark 0x539
-I v2r_${rule_name}_local_out 2 -m mark --mark 0x539 -j RETURN
-I v2r_${rule_name}_pre_src 1 -m set --match-set omr_dst_bypass_all dst -j MARK --set-mark 0x539
@ -708,13 +729,13 @@ start_service() {
iptables-restore -w --wait=60 --noflush <<-EOF
*mangle
:omr-bypass -
-I PREROUTING -m addrtype ! --dst-type LOCAL -j omr-bypass
-A PREROUTING -j omr-bypass
COMMIT
EOF
iptables-restore -w --wait=60 --noflush <<-EOF
*mangle
:omr-bypass-local -
-I OUTPUT -m addrtype ! --dst-type LOCAL -j omr-bypass-local
-A OUTPUT -m addrtype ! --dst-type LOCAL -j omr-bypass-local
COMMIT
EOF
if [ "$disableipv6" = "0" ]; then
@ -722,7 +743,7 @@ start_service() {
ip6tables-restore -w --wait=60 --noflush <<-EOF
*mangle
:omr-bypass6 -
-I PREROUTING -m addrtype ! --dst-type LOCAL -j omr-bypass6
-A PREROUTING -j omr-bypass6
COMMIT
EOF
fi
@ -769,11 +790,13 @@ start_service() {
iptables-restore -w --wait=60 --noflush <<-EOF
*mangle
-A omr-bypass -m set --match-set omr_dst_bypass_all dst -j MARK --set-mark 0x539
-A omr-bypass -m mark --mark 0x539 -j RETURN
COMMIT
EOF
iptables-restore -w --wait=60 --noflush <<-EOF
*mangle
-A omr-bypass-local -m set --match-set omr_dst_bypass_all dst -j MARK --set-mark 0x539
-A omr-bypass-local -m mark --mark 0x539 -j RETURN
COMMIT
EOF
fi
@ -786,9 +809,8 @@ start_service() {
iptables-restore -w --wait=60 --noflush <<-EOF
*mangle
:omr-bypass-dpi -
-A PREROUTING -m addrtype ! --dst-type LOCAL -j omr-bypass-dpi
-A OUTPUT -m addrtype ! --dst-type LOCAL -j omr-bypass-dpi
-A POSTROUTING -m addrtype --dst-type LOCAL -j omr-bypass-dpi
-A INPUT -j omr-bypass-dpi
-A FORWARD -j omr-bypass-dpi
COMMIT
EOF
if [ "$disableipv6" = "0" ]; then
@ -796,9 +818,8 @@ start_service() {
ip6tables-restore -w --wait=60 --noflush <<-EOF
*mangle
:omr-bypass6-dpi -
-A PREROUTING -m addrtype ! --dst-type LOCAL -j omr-bypass6-dpi
-A OUTPUT -m addrtype ! --dst-type LOCAL -j omr-bypass6-dpi
-A POSTROUTING -m addrtype --dst-type LOCAL -j omr-bypass6-dpi
-A INPUT -j omr-bypass6-dpi
-A FORWARD -j omr-bypass6-dpi
COMMIT
EOF
fi

View file

@ -1,14 +1,14 @@
msgid ""
msgstr ""
"PO-Revision-Date: 2020-09-21 12:51+0000\n"
"Last-Translator: Weblate Admin <contact@openmptcprouter.com>\n"
"PO-Revision-Date: 2022-02-21 21:14+0000\n"
"Last-Translator: Deleted User <noreply+28@weblate.org>\n"
"Language-Team: Italian <http://weblate.openmptcprouter.com/projects/omr/"
"luciapplicationsomr-dscp/it/>\n"
"Language: it\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.0.4\n"
"X-Generator: Weblate 4.10.1\n"
#: luci-app-omr-dscp/luasrc/model/cbi/dscp-domains.lua:21
#: luci-app-omr-dscp/luasrc/model/cbi/dscp.lua:73
@ -93,7 +93,7 @@ msgstr "Servizi differenziati"
#: luci-app-omr-dscp/luasrc/model/cbi/dscp.lua:29
msgid "Direction"
msgstr ""
msgstr "Direzione"
#: luci-app-omr-dscp/luasrc/model/cbi/dscp-domains.lua:15
msgid "Domain"

View file

@ -1,14 +1,14 @@
msgid ""
msgstr ""
"PO-Revision-Date: 2020-09-21 12:51+0000\n"
"Last-Translator: Weblate Admin <contact@openmptcprouter.com>\n"
"PO-Revision-Date: 2022-02-20 20:24+0000\n"
"Last-Translator: tiziano <tiziano@suonovivo.com>\n"
"Language-Team: Italian <http://weblate.openmptcprouter.com/projects/omr/"
"luciapplicationsomr-quota/it/>\n"
"Language: it\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.0.4\n"
"X-Generator: Weblate 4.10.1\n"
#: luci-app-omr-quota/luasrc/view/omr-quota/cbi-select-add.htm:8
msgid "Add"
@ -24,7 +24,7 @@ msgstr ""
#: luci-app-omr-quota/luasrc/model/cbi/quota/quota.lua:10
msgid "Interfaces"
msgstr "Interfaccia"
msgstr "Interfacce"
#: luci-app-omr-quota/luasrc/model/cbi/quota/quota.lua:33
msgid "Interval between check (s)"

View file

@ -1,14 +1,14 @@
msgid ""
msgstr ""
"PO-Revision-Date: 2022-02-11 13:53+0000\n"
"Last-Translator: Riccardo Tornesello <riccardo.tornesello@gmail.com>\n"
"PO-Revision-Date: 2022-02-20 20:24+0000\n"
"Last-Translator: tiziano <tiziano@suonovivo.com>\n"
"Language-Team: Italian <http://weblate.openmptcprouter.com/projects/omr/"
"luciapplicationsomr-tracker/it/>\n"
"Language: it\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.6.1\n"
"X-Generator: Weblate 4.10.1\n"
#: luci-app-omr-tracker/luasrc/view/omr-tracker/cbi-select-add.htm:8
msgid "Add"
@ -69,7 +69,7 @@ msgstr ""
#: luci-app-omr-tracker/luasrc/model/cbi/omr-tracker.lua:154
msgid "Interfaces"
msgstr ""
msgstr "Interfacce"
#: luci-app-omr-tracker/luasrc/view/omr-tracker/cbi-select-add.htm:9
msgid "Invalid"

View file

@ -584,10 +584,12 @@ function wizard_add()
ucic:set("openmptcprouter",server,"get_config","1")
end
ucic:set("openmptcprouter",server,"master","1")
ucic:set("openmptcprouter",server,"current","1")
ucic:set("openmptcprouter",server,"backup","0")
else
ucic:set("openmptcprouter",server,"get_config","0")
ucic:set("openmptcprouter",server,"master","0")
ucic:set("openmptcprouter",server,"current","0")
ucic:set("openmptcprouter",server,"backup","1")
end
if openmptcprouter_vps_disabled == "1" then
@ -600,8 +602,14 @@ 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
ucic:set_list("openmptcprouter",server,"ip",aserverips)
if ucic:get("openmptcprouter",server,"master") == "1" then
ucic:set("openmptcprouter",server,"get_config","1")
end
end
ucic:set("openmptcprouter",server,"port","65500")
ucic:set("openmptcprouter",server,"set_firewall","1")
ucic:save("openmptcprouter")
end
@ -634,7 +642,7 @@ function wizard_add()
ucic:set("v2ray","main","enabled","0")
ucic:foreach("shadowsocks-libev", "server", function(s)
local sectionname = s[".name"]
if sectionname:match("^sss.*") then
if sectionname:match("^sss.*") and ucic:get("shadowsocks-libev",sectionname,"server") ~= "" then
ucic:set("shadowsocks-libev",sectionname,"disabled","0")
end
end)
@ -703,7 +711,7 @@ 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" and serversnb > disablednb then
if default_proxy == "shadowsocks" and serversnb > disablednb and ssip ~= "" then
ucic:set("shadowsocks-libev","sss" .. nbip,"disabled","0")
end
nbip = nbip + 1
@ -741,7 +749,7 @@ 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" and serversnb > disablednb then
if default_proxy == "shadowsocks" and serversnb > disablednb and ssip ~= "" then
ucic:set("shadowsocks-libev","sss" .. nbip,"disabled","0")
end
nbip = nbip + 1
@ -837,8 +845,8 @@ function wizard_add()
end
else
if serversnb == 0 then
ucic:set("shadowsocks-libev","sss0","disabled",shadowsocks_disable)
ucic:set("shadowsocks-libev","sss1","disabled",shadowsocks_disable)
ucic:set("shadowsocks-libev","sss0","disabled","1")
ucic:set("shadowsocks-libev","sss1","disabled","1")
end
ucic:set("shadowsocks-libev","sss0","key","")
ucic:set("shadowsocks-libev","sss1","key","")
@ -1147,6 +1155,10 @@ function settings_add()
local shadowsocksudp = luci.http.formvalue("shadowsocksudp") or "0"
ucic:set("openmptcprouter","settings","shadowsocksudp",shadowsocksudp)
-- Enable/disable v2ray udp
local shadowsocksudp = luci.http.formvalue("v2rayudp") or "1"
ucic:set("v2ray","main_transparent_proxy","redirect_udp",v2rayudp)
-- Enable/disable nDPI
local ndpi = luci.http.formvalue("ndpi") or "1"
ucic:set("openmptcprouter","settings","ndpi",ndpi)

View file

@ -297,6 +297,12 @@
<input type="checkbox" name="shadowsocksudp" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter","settings","shadowsocksudp") == "1" then %>checked<% end %>>
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:When proxy V2Ray is used, use it for UDP%></label>
<div class="cbi-value-field">
<input type="checkbox" name="v2rayudp" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("v2ray","main_transparent_proxy","redirect_udp") == "1" then %>checked<% end %>>
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:Disable default gateway%></label>
<div class="cbi-value-field">

View file

@ -514,13 +514,13 @@
<%
end
%>
<div class="cbi-value" id="cbi-network-<%=ifname%>-address" data-depends="[{&#34;cbid.network.<%=ifname%>.proto&#34;:&#34;static&#34;},{&#34;cbid.network.<%=ifname%>.type&#34;:&#34;macvlan&#34;}]" data-index="5">
<div class="cbi-value" id="cbi-network-<%=ifname%>-address" data-depends="[{&#34;cbid.network.<%=ifname%>.proto&#34;:&#34;static&#34;},{&#34;cbid.network.<%=ifname%>.proto&#34;:&#34;other&#34;},{&#34;cbid.network.<%=ifname%>.type&#34;:&#34;macvlan&#34;}]" data-index="5">
<label class="cbi-value-title"><%:IPv4 address%></label>
<div class="cbi-value-field">
<input type="text" id="cbid.network.<%=ifname%>.ipaddr" name="cbid.network.<%=ifname%>.ipaddr" class="cbi-input-text" value="<%=uci:get("network",ifname,"ipaddr")%>" data-type="ip4addr">
</div>
</div>
<div class="cbi-value" id="cbi-network-<%=ifname%>-netmask" data-depends="[{&#34;cbid.network.<%=ifname%>.proto&#34;:&#34;static&#34;},{&#34;cbid.network.<%=ifname%>.type&#34;:&#34;macvlan&#34;}]" data-index="6">
<div class="cbi-value" id="cbi-network-<%=ifname%>-netmask" data-depends="[{&#34;cbid.network.<%=ifname%>.proto&#34;:&#34;static&#34;},{&#34;cbid.network.<%=ifname%>.proto&#34;:&#34;other&#34;},{&#34;cbid.network.<%=ifname%>.type&#34;:&#34;macvlan&#34;}]" data-index="6">
<label class="cbi-value-title"><%:IPv4 netmask%></label>
<div class="cbi-value-field">
<input type="text" id="cbid.network.<%=ifname%>.netmask" name="cbid.network.<%=ifname%>.netmask" class="cbi-input-text" value="<%=uci:get("network",ifname,"netmask") or "255.255.255.0"%>" data-type="ip4addr">

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -20,21 +20,26 @@ _set_intf_name() {
fi
[ -n "$modalias" ] && {
if [ -f /sys/class/net/${INTERFACE}/device/uevent ]; then
mac=""
if [ -f /sys/class/net/${INTERFACE}/address ]; then
mac="$(cat /sys/class/net/${INTERFACE}/address | tr -d '\n')"
fi
chk_modalias=$MODALIAS
[ -z "$chk_modalias" ] && chk_modalias="$(cat /sys/class/net/${INTERFACE}/device/uevent | grep MODALIAS | cut -d '=' -f2 | tr -d '\n')"
if [ -n "$chk_modalias" ]; then
logger -t "OMR-Rename" "dir: $i - modalias: $modalias - chk_modalias: $chk_modalias - ifname: $ifname - INTERFACE: $INTERFACE"
chk_modalias="${chk_modalias}-${mac}"
logger -t "OMR-Rename" "modalias: $modalias - chk_modalias: $chk_modalias - ifname: $ifname - INTERFACE: $INTERFACE"
if [ "$modalias" = "$chk_modalias" ] && [ "$INTERFACE" != "$ifname" ]; then
logger -t "OMR-Rename" "Rename ${INTERFACE} to ${ifname}"
existif=0
existif="0"
ip link set ${INTERFACE} down 2>&1 >/dev/null
[ "$(ip link show ${ifname} 2>/dev/null)" != "" ] && {
ip link set ${ifname} name ${ifname}tmp 2>&1 >/dev/null
existif=1
existif="1"
}
ip link set ${INTERFACE} name ${ifname} 2>&1 >/dev/null
ip link set ${ifname} up 2>&1 >/dev/null
[ "$existif" = "1" ] && ip link set ${ifname}tmp ${$INTERFACE} 2>&1 >/dev/null
[ "$existif" = "1" ] && ip link set ${ifname}tmp name ${INTERFACE} 2>&1 >/dev/null
fi
fi
elif [ -f /dev/${DEVICE_NAME} ] && [ -n "$MODALIAS" ] && [ "$modalias" = "$MODALIAS" ]; then
@ -45,21 +50,22 @@ _set_intf_name() {
fi
}
[ -z "$modalias" ] && [ -n "$device" ] && [ -n "$ifname" ] && [ "/sys${DEVPATH}" = "$device" ] && [ "$INTERFACE" != "$ifname" ] && {
logger -t "OMR-Rename" "device: $device - devpath: $DEVPATH - ifname: $ifname - INTERFACE: $INTERFACE"
logger -t "OMR-Rename" "Rename ${INTERFACE} to ${ifname}"
ip link set ${INTERFACE} down 2>&1 >/dev/null
existif=0
existif="0"
[ "$(ip link show ${ifname} 2>/dev/null)" != "" ] && {
ip link set ${ifname} name ${ifname}tmp 2>&1 >/dev/null
existif=1
existif="1"
}
ip link set ${INTERFACE} name ${ifname} 2>&1 >/dev/null
ip link set ${ifname} up 2>&1 >/dev/null
[ "$existif" = "1" ] && ip link set ${ifname}tmp ${$INTERFACE} 2>&1 >/dev/null
[ "$existif" = "1" ] && ip link set ${ifname}tmp ${INTERFACE} 2>&1 >/dev/null
}
}
if [ "$(uci -q get openmptcprouter.settings.disableintfrename)" != "0" ]; then
if [ "$(uci -q get openmptcprouter.settings.disableintfrename)" != "1" ]; then
config_load network
config_foreach _set_intf_name interface
config_foreach _set_intf_name interface
# config_foreach _set_intf_name interface
fi

View file

@ -104,7 +104,7 @@ omr_set_settings() {
tc qdisc del dev ${ifname} root netem 2>&1 >/dev/null
fi
if [ "$addlatency" != "0" ]; then
if [ "$(tc qdisc show dev $ifname | grep delay)" != "" ]; then
if [ "$(tc qdisc show dev $ifname | grep delay)" = "" ]; then
tc qdisc add dev ${ifname} root netem delay ${addlatency}ms 2>&1 >/dev/null
elif [ "$(tc qdisc show dev $ifname | awk '/delay/ { print $10 }' | sed 's/ms//')" != "$addlatency" ]; then
tc qdisc replace dev ${ifname} root netem delay ${addlatency}ms 2>&1 >/dev/null

View file

@ -93,8 +93,8 @@ function add_interface(add_interface_ifname)
ucic:set("qos","wan" .. i,"interface")
ucic:set("qos","wan" .. i,"classgroup","Default")
ucic:set("qos","wan" .. i,"enabled","0")
ucic:set("qos","wan" .. i,"upload","4000")
ucic:set("qos","wan" .. i,"download","100000")
ucic:set("qos","wan" .. i,"upload","1000000")
ucic:set("qos","wan" .. i,"download","1000000")
ucic:save("qos")
ucic:commit("qos")
@ -163,7 +163,7 @@ function set_interface(intf,proto,ipaddr,netmask,gateway,sqmenabled,downloadspee
ucic:set("qos",intf,"interface")
ucic:set("qos",intf,"classgroup","Default")
ucic:set("qos",intf,"enabled","0")
ucic:set("qos",intf,"upload","4000")
ucic:set("qos",intf,"upload","100000")
ucic:set("qos",intf,"download","100000")
end
@ -824,7 +824,7 @@ function interfaces_status()
if mArray.openmptcprouter["external_check"] ~= false then
mArray.openmptcprouter["proxy_addr"] = ut.trim(sys.exec("curl -s -4 --socks5 " .. tracker_ip .. ":" .. tracker_port .. " -m " .. timeout .. " " .. check_ipv4_website))
if mArray.openmptcprouter["proxy_addr"] == "" then
mArray.openmptcprouter["proxy_addr"] = ut.trim(sys.exec("curl -s -4 --socks5 " .. tracker_ip .. ":" .. tracker_port .. " -m " .. timeout .. " ifconfig.me"))
mArray.openmptcprouter["proxy_addr"] = ut.trim(sys.exec("curl -s -4 --socks5 " .. tracker_ip .. ":" .. tracker_port .. " -m " .. timeout .. " ifconfig.co"))
end
--mArray.openmptcprouter["ss_addr6"] = sys.exec("curl -s -6 --socks5 " .. tracker_ip .. ":" .. tracker_port .. " -m 3 http://ipv6.openmptcprouter.com")
end
@ -1037,7 +1037,8 @@ function interfaces_status()
mArray.openmptcprouter["shadowsocks_enabled"] = true
local ss_server = "1"
ucic:foreach("shadowsocks-libev", "server", function(s)
if uci:get("shadowsocks-libev",s[".name"],"disabled") == "0" then
local ss_server_disabled = uci:get("shadowsocks-libev",s[".name"],"disabled") or "0"
if ss_server_disabled == "0" then
ss_server = "0"
end
end)
@ -1244,18 +1245,10 @@ function interfaces_status()
-- Detect WAN gateway status
local gw_ping = "UP"
local gw_ping6 = "UP"
if ifname ~= nil and not (ifname:match("^tun.*") or interface:match("^ovpn.*") or interface:match("^wg.*")) then
if proto ~= "dhcpv6" then
gateway = ut.trim(sys.exec("ip -4 r list dev " .. ifname .. " | grep via | grep -v default | grep -v metric | awk '{print $1}' | tr -d '\n'"))
end
if ipv6 == "1" or ipv6 == "auto" then
gateway6 = ut.trim(sys.exec("ip -6 r list dev " .. ifname .. " | grep via | grep -v default | grep -v metric | awk '{print $1}' | tr -d '\n'"))
end
end
if gateway == "" and proto ~= "dhcpv6" then
gateway = get_gateway(interface)
end
if gateway == "" and ifname ~= nil and ifname ~= "" and ipv6 ~= "1" and ipv6 ~= "auto" then
if fs.access("/sys/class/net/" .. ifname) then
gateway = ut.trim(sys.exec("ip -4 r list dev " .. ifname .. " | grep kernel | awk '/proto kernel/ {print $1}' | grep -v / | tr -d '\n'"))
@ -1264,6 +1257,11 @@ function interfaces_status()
end
end
end
if ifname ~= nil and not (ifname:match("^tun.*") or interface:match("^ovpn.*") or interface:match("^wg.*")) then
if proto ~= "dhcpv6" and gateway == "" then
gateway = ut.trim(sys.exec("ip -4 r list dev " .. ifname .. " | grep via | grep -v default | grep -v metric | awk '{print $1}' | tr -d '\n'"))
end
end
if gateway6 == "" and (ipv6 == "1" or ipv6 == "auto") then
gateway6 = get_gateway6(interface)
end
@ -1275,6 +1273,11 @@ function interfaces_status()
end
end
end
if ifname ~= nil and not (ifname:match("^tun.*") or interface:match("^ovpn.*") or interface:match("^wg.*")) then
if ipv6 == "1" or ipv6 == "auto" and gateway6 == ""then
gateway6 = ut.trim(sys.exec("ip -6 r list dev " .. ifname .. " | grep via | grep -v default | grep -v metric | awk '{print $1}' | tr -d '\n'"))
end
end
local signal = ""
local operator = ""
local phonenumber = ""

View file

@ -1,14 +1,14 @@
msgid ""
msgstr ""
"PO-Revision-Date: 2020-09-21 12:51+0000\n"
"Last-Translator: Weblate Admin <contact@openmptcprouter.com>\n"
"PO-Revision-Date: 2022-02-21 21:14+0000\n"
"Last-Translator: Deleted User <noreply+28@weblate.org>\n"
"Language-Team: Italian <http://weblate.openmptcprouter.com/projects/omr/"
"luciapplicationssnmpd/it/>\n"
"Language: it\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.0.4\n"
"X-Generator: Weblate 4.10.1\n"
#: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:82
msgid "Access"
@ -51,13 +51,13 @@ msgstr "Abilitato"
#: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:132
msgid "Exec"
msgstr ""
msgstr "Esegui"
#: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:6
#: luci-app-snmpd/luasrc/view/snmpd.htm:21
#: luci-app-snmpd/luasrc/view/snmpd.htm:48
msgid "General"
msgstr ""
msgstr "Generale"
#: luci-app-snmpd/root/usr/share/rpcd/acl.d/luci-app-snmpd.json:3
msgid "Grant UCI access for luci-app-snmpd"

View file

@ -1,14 +1,14 @@
msgid ""
msgstr ""
"PO-Revision-Date: 2020-08-08 14:26+0000\n"
"Last-Translator: ButterflyOfFire <ButterflyOfFire@protonmail.com>\n"
"Language-Team: French <https://hosted.weblate.org/projects/openwrt/"
"luciapplicationssqm/fr/>\n"
"PO-Revision-Date: 2022-08-10 18:51+0000\n"
"Last-Translator: Weblate Admin <contact@openmptcprouter.com>\n"
"Language-Team: French <http://weblate.openmptcprouter.com/projects/omr/"
"luciapplicationssqm-autorate/fr/>\n"
"Language: fr\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.2-dev\n"
"X-Generator: Weblate 4.10.1\n"
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:183
msgid ""
@ -49,7 +49,7 @@ msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:58
msgid "Enable SQM"
msgstr ""
msgstr "Active SQM"
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:78
msgid "Enable this SQM instance."

View file

@ -1,199 +1,265 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:183
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:207
msgid ""
"Advanced option string to pass to the egress queueing disciplines; no error "
"checking, use very carefully."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:180
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:204
msgid ""
"Advanced option string to pass to the ingress queueing disciplines; no error "
"checking, use very carefully."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:72
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:75
msgid "Autorate settings"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:96
msgid "Base download speed (kbit/s) (ingress):"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:110
msgid "Base upload speed (kbit/s) (egress):"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:72
msgid "Basic Settings"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:100
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:124
msgid ""
"Create log file for this SQM instance under /var/run/sqm/${Interface_name}."
"[start|stop]-sqm.log."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:92
msgid ""
"Download speed (kbit/s) (ingress) set to 0 to selectively disable ingress "
"shaping:"
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:259
msgid "Debug"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:58
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:58
msgid "Enable SQM"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:78
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:90
msgid "Enable SQM autorate"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:79
msgid "Enable this SQM instance."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:148
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:172
msgid ""
"Explicit congestion notification (ECN) status on inbound packets (ingress):"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:154
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:178
msgid ""
"Explicit congestion notification (ECN) status on outbound packets (egress)."
msgstr ""
#: applications/luci-app-sqm/root/usr/share/rpcd/acl.d/luci-app-sqm.json:3
#: luci-app-sqm-autorate/root/usr/share/rpcd/acl.d/luci-app-sqm.json:3
msgid "Grant UCI access for luci-app-sqm"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:168
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:192
msgid "Hard limit on egress queues; leave empty for default."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:164
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:188
msgid "Hard limit on ingress queues; leave empty for default."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:142
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:166
msgid "Ignore DSCP on ingress:"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:89
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:93
msgid "Interface name"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:176
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:200
msgid ""
"Latency target for egress, e.g. 5ms [units: s, ms, or us]; leave empty for "
"automatic selection, put in the word default for the qdisc's default."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:172
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:196
msgid ""
"Latency target for ingress, e.g 5ms [units: s, ms, or us]; leave empty for "
"automatic selection, put in the word default for the qdisc's default."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:74
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:74
msgid "Link Layer Adaptation"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:203
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:227
msgid ""
"Maximal Size for size and rate calculations, tcMTU (byte); needs to be >= "
"interface MTU + overhead:"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:213
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:105
msgid "Maximum download speed (kbit/s):"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:119
msgid "Maximum upload speed (kbit/s):"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:237
msgid ""
"Minimal packet size, MPU (byte); needs to be > 0 for ethernet size tables:"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:208
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:100
msgid "Minimum download speed (kbit/s):"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:114
msgid "Minimum upload speed (kbit/s):"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:136
msgid "Must be set to cake if autorate is used."
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:232
msgid ""
"Number of entries in size/rate tables, TSIZE; for ATM choose TSIZE = (tcMTU "
"+ 1) / 16:"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:193
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:287
msgid "Number of seconds to wait on startup:"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:255
msgid "Output monitoring lines showing cake bandwidth changes"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:251
msgid "Output monitoring lines showing processing stats"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:217
msgid "Per Packet Overhead (byte):"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:73
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:267
msgid "Pingers numbers:"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:73
msgid "Queue Discipline"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:120
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:144
msgid "Queue setup script"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:71
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:71
msgid "Queues"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:112
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:136
msgid ""
"Queuing disciplines useable on this system. After installing a new qdisc, "
"you need to restart the router to see updates!"
msgstr ""
#: applications/luci-app-sqm/root/usr/share/luci/menu.d/luci-app-sqm.json:3
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:263
msgid "Reflector ping interval in seconds:"
msgstr ""
#: luci-app-sqm-autorate/root/usr/share/luci/menu.d/luci-app-sqm.json:3
msgid "SQM QoS"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:199
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:223
msgid ""
"Show Advanced Linklayer Options, (only needed if MTU > 1500). Advanced "
"options will only be used as long as this box is checked."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:133
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:157
msgid ""
"Show and Use Advanced Configuration. Advanced options will only be used as "
"long as this box is checked."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:160
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:184
msgid ""
"Show and Use Dangerous Configuration. Dangerous options will only be used as "
"long as this box is checked."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:64
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:275
msgid "Sleep functionnality"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:64
msgid "Smart Queue Management"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:136
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:160
msgid "Squash DSCP on inbound packets (ingress):"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:83
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:84
msgid ""
"The SQM GUI has just enabled the sqm initscript on your behalf. Remember to "
"disable the sqm initscript manually under System Startup menu in case this "
"change was not wished for."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:48
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:48
msgid ""
"The SQM service seems to be disabled. Please use the button below to "
"activate this service."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:96
msgid ""
"Upload speed (kbit/s) (egress) set to 0 to selectively disable egress "
"shaping:"
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:279
msgid "Threshold in Kbit/s below which dl/ul is considered idle"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:103
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:283
msgid ""
"Time threshold to put pingers to sleep on substained dl/ul achieved rate < "
"idle_threshold"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:127
msgid "Verbosity of SQM's output into the system log."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:187
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:211
msgid "Which link layer to account for:"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:218
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:242
msgid "Which linklayer adaptation mechanism to use; for testing only"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:65
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:65
msgid ""
"With <abbr title=\"Smart Queue Management\">SQM</abbr> you can enable "
"traffic shaping, better mixing (Fair Queueing), active queue length "
"management (AQM) and prioritisation on one network interface."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:107
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:149
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:155
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:188
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:219
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:131
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:173
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:179
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:212
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:243
msgid "default"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:271
msgid "delay threshold in ms:"
msgstr ""

View file

@ -25,7 +25,7 @@ _launch_autorate() {
# shellcheck disable=SC2086
procd_set_param command /usr/share/sqm-autorate/CAKE-autorate.sh "$1"
# procd_append_param env "OMR_TRACKER_SERVER_HTTP_TEST=$server_http_test"
procd_set_param limits nofile="51200 51200"
procd_set_param limits nofile="512000 512000"
procd_set_param respawn 0 10 0
procd_set_param stderr 1
procd_close_instance

View file

@ -19,7 +19,9 @@ cleanup_and_killall()
echo "Killing all background processes and cleaning up /tmp files."
trap - INT TERM EXIT
kill $monitor_achieved_rates_pid 2> /dev/null
# Initiate termination of ping processes and wait until complete
kill $maintain_pingers_pid 2> /dev/null
wait $maintain_pingers_pid
[[ -d /tmp/CAKE-autorate-${dl_if} ]] && rm -r /tmp/CAKE-autorate-${dl_if}
exit
}
@ -45,35 +47,42 @@ get_next_shaper_rate()
case $load_condition in
# upload Starlink satelite switching compensation, so drop down to minimum rate for upload through switching period
ul*sss)
shaper_rate_kbps=$min_shaper_rate_kbps
;;
# download Starlink satelite switching compensation, so drop down to base rate for download through switching period
dl*sss)
shaper_rate_kbps=$base_shaper_rate_kbps
;;
# bufferbloat detected, so decrease the rate providing not inside bufferbloat refractory period
*delayed)
*bb*)
if (( $t_next_rate_us > ($t_last_bufferbloat_us+$bufferbloat_refractory_period_us) )); then
adjusted_achieved_rate_kbps=$(( ($achieved_rate_kbps*$achieved_rate_adjust_bufferbloat)/1000 ))
adjusted_shaper_rate_kbps=$(( ($shaper_rate_kbps*$shaper_rate_adjust_bufferbloat)/1000 ))
adjusted_achieved_rate_kbps=$(( ($achieved_rate_kbps*$achieved_rate_adjust_down_bufferbloat)/1000 ))
adjusted_shaper_rate_kbps=$(( ($shaper_rate_kbps*$shaper_rate_adjust_down_bufferbloat)/1000 ))
shaper_rate_kbps=$(( $adjusted_achieved_rate_kbps < $adjusted_shaper_rate_kbps ? $adjusted_achieved_rate_kbps : $adjusted_shaper_rate_kbps ))
t_last_bufferbloat_us=${EPOCHREALTIME/./}
fi
;;
# high load, so increase rate providing not inside bufferbloat refractory period
high)
*high*)
if (( $t_next_rate_us > ($t_last_bufferbloat_us+$bufferbloat_refractory_period_us) )); then
shaper_rate_kbps=$(( ($shaper_rate_kbps*$shaper_rate_adjust_load_high)/1000 ))
shaper_rate_kbps=$(( ($shaper_rate_kbps*$shaper_rate_adjust_up_load_high)/1000 ))
fi
;;
# medium load, so just maintain rate as is, i.e. do nothing
medium)
*med*)
:
;;
# low or idle load, so determine whether to decay down towards base rate, decay up towards base rate, or set as base rate
low|idle)
*low*|*idle*)
if (($t_next_rate_us > ($t_last_decay_us+$decay_refractory_period_us) )); then
if (($shaper_rate_kbps > $base_shaper_rate_kbps)); then
decayed_shaper_rate_kbps=$(( ($shaper_rate_kbps*$shaper_rate_adjust_load_low)/1000 ))
decayed_shaper_rate_kbps=$(( ($shaper_rate_kbps*$shaper_rate_adjust_down_load_low)/1000 ))
shaper_rate_kbps=$(( $decayed_shaper_rate_kbps > $base_shaper_rate_kbps ? $decayed_shaper_rate_kbps : $base_shaper_rate_kbps))
elif (($shaper_rate_kbps < $base_shaper_rate_kbps)); then
decayed_shaper_rate_kbps=$(( ((2000-$shaper_rate_adjust_load_low)*$shaper_rate_kbps)/1000 ))
decayed_shaper_rate_kbps=$(( ($shaper_rate_kbps*$shaper_rate_adjust_up_load_low)/1000 ))
shaper_rate_kbps=$(( $decayed_shaper_rate_kbps < $base_shaper_rate_kbps ? $decayed_shaper_rate_kbps : $base_shaper_rate_kbps))
fi
@ -122,7 +131,7 @@ monitor_achieved_rates()
prev_tx_bytes=$tx_bytes
# read in the max_wire_packet_rtt_us
concurrent_read max_wire_packet_rtt_us /tmp/CAKE-autorate-${dl_if}/max_wire_packet_rtt_us
concurrent_read_positive_integer max_wire_packet_rtt_us /tmp/CAKE-autorate-${dl_if}/max_wire_packet_rtt_us
compensated_monitor_achieved_rates_interval_us=$(( (($monitor_achieved_rates_interval_us>(10*$max_wire_packet_rtt_us) )) ? $monitor_achieved_rates_interval_us : $((10*$max_wire_packet_rtt_us)) ))
@ -134,8 +143,8 @@ get_loads()
{
# read in the dl/ul achived rates and determine the loads
concurrent_read dl_achieved_rate_kbps /tmp/CAKE-autorate-${dl_if}/dl_achieved_rate_kbps
concurrent_read ul_achieved_rate_kbps /tmp/CAKE-autorate-${dl_if}/ul_achieved_rate_kbps
concurrent_read_positive_integer dl_achieved_rate_kbps /tmp/CAKE-autorate-${dl_if}/dl_achieved_rate_kbps
concurrent_read_positive_integer ul_achieved_rate_kbps /tmp/CAKE-autorate-${dl_if}/ul_achieved_rate_kbps
dl_load_percent=$(((100*10#${dl_achieved_rate_kbps})/$dl_shaper_rate_kbps))
ul_load_percent=$(((100*10#${ul_achieved_rate_kbps})/$ul_shaper_rate_kbps))
@ -152,14 +161,25 @@ classify_load()
if (( $load_percent > $high_load_thr_percent )); then
load_condition="high"
elif (( $load_percent > $medium_load_thr_percent )); then
load_condition="medium"
load_condition="med"
elif (( $achieved_rate_kbps > $connection_active_thr_kbps )); then
load_condition="low"
else
load_condition="idle"
fi
(($bufferbloat_detected)) && load_condition=$load_condition"_delayed"
(($bufferbloat_detected)) && load_condition=$load_condition"_bb"
if ((sss_compensation)); then
for sss_time_us in "${sss_times_us[@]}"
do
((timestamp_usecs_past_minute=${EPOCHREALTIME/./}%60000000))
if (( ($timestamp_usecs_past_minute > ($sss_time_us-$sss_compensation_pre_duration_us)) && ($timestamp_usecs_past_minute < ($sss_time_us+$sss_compensation_post_duration_us)) )); then
load_condition=$load_condition"_sss"
break
fi
done
fi
}
monitor_reflector_responses()
@ -245,7 +265,7 @@ maintain_pingers()
for ((pinger=0; pinger<$no_pingers; pinger++))
do
reflector_check_time_us=${EPOCHREALTIME/./}
concurrent_read reflector_last_timestamp_us /tmp/CAKE-autorate-${dl_if}/reflector_${pinger}_last_timestamp_us
concurrent_read_positive_integer reflector_last_timestamp_us /tmp/CAKE-autorate-${dl_if}/reflector_${pinger}_last_timestamp_us
declare -n reflector_offences="reflector_${pinger}_offences"
(( ${reflector_offences[$reflector_offences_idx]} )) && ((sum_reflector_offences[$pinger]--))
@ -367,7 +387,7 @@ update_max_wire_packet_compensation()
printf '%s' "$max_wire_packet_rtt_us" > /tmp/CAKE-autorate-${dl_if}/max_wire_packet_rtt_us
}
concurrent_read()
concurrent_read_positive_integer()
{
# in the context of separate processes writing using > and reading form file
# it seems costly calls to the external flock binary can be avoided
@ -376,10 +396,20 @@ concurrent_read()
local -n value=$1
local path=$2
read -r value < $path
while [[ -z $value ]]; do
sleep_us $concurrent_read_interval_us
while true
do
read -r value < $path;
if [[ -z "${value##*[!0-9]*}" ]]; then
if (($debug)); then
read -r caller_output< <(caller)
echo "DEBUG concurrent_read_positive_integer() misfire with the following particulars:"
echo "DEBUG caller="$caller_output"; value="$value"; and path="$path
fi
sleep_us $concurrent_read_positive_integer_interval_us
continue
else
break
fi
done
}
@ -474,10 +504,11 @@ verify_ifs_up
# Convert human readable parameters to values that work with integer arithmetic
printf -v alpha_baseline_increase %.0f\\n "${alpha_baseline_increase}e3"
printf -v alpha_baseline_decrease %.0f\\n "${alpha_baseline_decrease}e3"
printf -v achieved_rate_adjust_bufferbloat %.0f\\n "${achieved_rate_adjust_bufferbloat}e3"
printf -v shaper_rate_adjust_bufferbloat %.0f\\n "${shaper_rate_adjust_bufferbloat}e3"
printf -v shaper_rate_adjust_load_high %.0f\\n "${shaper_rate_adjust_load_high}e3"
printf -v shaper_rate_adjust_load_low %.0f\\n "${shaper_rate_adjust_load_low}e3"
printf -v achieved_rate_adjust_down_bufferbloat %.0f\\n "${achieved_rate_adjust_down_bufferbloat}e3"
printf -v shaper_rate_adjust_down_bufferbloat %.0f\\n "${shaper_rate_adjust_down_bufferbloat}e3"
printf -v shaper_rate_adjust_up_load_high %.0f\\n "${shaper_rate_adjust_up_load_high}e3"
printf -v shaper_rate_adjust_down_load_low %.0f\\n "${shaper_rate_adjust_down_load_low}e3"
printf -v shaper_rate_adjust_up_load_low %.0f\\n "${shaper_rate_adjust_up_load_low}e3"
printf -v high_load_thr_percent %.0f\\n "${high_load_thr}e2"
printf -v medium_load_thr_percent %.0f\\n "${medium_load_thr}e2"
printf -v reflector_ping_interval_us %.0f\\n "${reflector_ping_interval_s}e6"
@ -488,9 +519,16 @@ bufferbloat_refractory_period_us=$(( 1000*$bufferbloat_refractory_period_ms ))
decay_refractory_period_us=$(( 1000*$decay_refractory_period_ms ))
delay_thr_us=$(( 1000*$delay_thr_ms ))
for (( i=0; i<${#sss_times_s[@]}; i++ ));
do
printf -v sss_times_us[i] %.0f\\n "${sss_times_s[i]}e6"
done
printf -v sss_compensation_pre_duration_us %.0f\\n "${sss_compensation_pre_duration_ms}e3"
printf -v sss_compensation_post_duration_us %.0f\\n "${sss_compensation_post_duration_ms}e3"
ping_response_interval_us=$(($reflector_ping_interval_us/$no_pingers))
concurrent_read_interval_us=$(($ping_response_interval_us/4))
concurrent_read_positive_integer_interval_us=$(($ping_response_interval_us/4))
dl_shaper_rate_kbps=$base_dl_shaper_rate_kbps
ul_shaper_rate_kbps=$base_ul_shaper_rate_kbps
@ -533,12 +571,20 @@ monitor_achieved_rates_pid=$!
prev_timestamp=0
if (($debug)); then
if (( $bufferbloat_refractory_period_us <= ($bufferbloat_detection_window*$ping_response_interval_us) )); then
echo "DEBUG Warning: bufferbloat refractory period: " $bufferbloat_refractory_period_us " us."
echo "DEBUG Warning: but expected time to overwrite samples in bufferbloat detection window is: " $(($bufferbloat_detection_window*$ping_response_interval_us)) " us."
echo "DEBUG Warning: Consider increasing bufferbloat refractory period or decreasing bufferbloat detection window."
fi
fi
while true
do
while read -t $global_ping_response_timeout_s -r timestamp reflector seq rtt_baseline_us rtt_us rtt_delta_us
do
t_start_us=${EPOCHREALTIME/./}
if ((($t_start_us - "${timestamp//[[\[\].]}")>500000)); then
if ((($t_start_us - 10#"${timestamp//[[\[\].]}")>500000)); then
(($debug)) && echo "DEBUG processed response from [" $reflector "] that is > 500ms old. Skipping."
continue
fi
@ -556,6 +602,9 @@ do
classify_load $dl_load_percent $dl_achieved_rate_kbps dl_load_condition
classify_load $ul_load_percent $ul_achieved_rate_kbps ul_load_condition
dl_load_condition="dl_"$dl_load_condition
ul_load_condition="ul_"$ul_load_condition
get_next_shaper_rate $min_dl_shaper_rate_kbps $base_dl_shaper_rate_kbps $max_dl_shaper_rate_kbps $dl_achieved_rate_kbps $dl_load_condition $t_start_us t_dl_last_bufferbloat_us t_dl_last_decay_us dl_shaper_rate_kbps
get_next_shaper_rate $min_ul_shaper_rate_kbps $base_ul_shaper_rate_kbps $max_ul_shaper_rate_kbps $ul_achieved_rate_kbps $ul_load_condition $t_start_us t_ul_last_bufferbloat_us t_ul_last_decay_us ul_shaper_rate_kbps
@ -584,8 +633,9 @@ do
ul_shaper_rate_kbps=$min_ul_shaper_rate_kbps
set_shaper_rates
# Kill off ping processes
# Initiate termination of ping processes and wait until complete
kill $maintain_pingers_pid 2> /dev/null
wait $maintain_pingers_pid
# reset idle timer
t_sustained_connection_idle_us=0

View file

@ -29,6 +29,7 @@ global_multipath_settings() {
config_get mptcp_rr_cwnd_limited globals mptcp_rr_cwnd_limited
config_get mptcp_rr_num_segments globals mptcp_rr_num_segments
config_get mptcp_version globals mptcp_version "0"
config_get mptcp_stale_loss_cnt globals mptcp_stale_loss_cnt "4"
[ "$multipath" = "enable" ] && multipath_status=1
@ -51,6 +52,7 @@ global_multipath_settings() {
ip mptcp limits set add_addr_accepted $mptcp_add_addr_accepted subflows $mptcp_subflows 2>&1 >/dev/null
[ -z "$mptcp_add_addr_timeout" ] || sysctl -qew net.mptcp.add_addr_timeout="$mptcp_add_addr_timeout"
[ -z "$mptcp_checksum" ] || sysctl -qew net.mptcp.checksum_enabled="$mptcp_checksum"
[ -z "$mptcp_stale_loss_cnt" ] || sysctl -qew net.mptcp.stale_loss_cnt="$mptcp_stale_loss_cnt"
fi
[ -z "$congestion" ] || sysctl -qew net.ipv4.tcp_congestion_control="$congestion"
}
@ -168,6 +170,7 @@ interface_multipath_settings() {
[ -n "$(ifconfig | grep $iface)" ] || return 0
[ "$(echo $iface | grep _dev)" != "" ] && return 0
[ "$(echo $iface | grep '^if')" != "" ] && return 0
[ "$iface" = "lo" ] && return 0
if [ "$mode" = "master" ]; then
multipath "$iface" "on"
@ -260,8 +263,8 @@ interface_multipath_settings() {
EOF
else
#echo "Add routes for $ipaddr table $id"
[ -n "$ipaddr" ] && ip rule add from $ipaddr table $id pref 0
ip rule add oif $iface table $id pref 0
[ -n "$ipaddr" ] && [ -z "$(ip rule show from $ipaddr table $id)" ] && ip rule add from $ipaddr table $id pref 0
[ -z "$(ip rule show oif $iface table $id)" ] && ip rule add oif $iface table $id pref 0
ip route replace $network/$netmask dev $iface scope link metric $id 2>&1 >/dev/null
ip route replace $network/$netmask dev $iface scope link table $id 2>&1 >/dev/null
ip route replace default via $gateway dev $iface table $id 2>&1 >/dev/null
@ -387,11 +390,15 @@ set_multipath() {
exist=1
fi
done
[ "$exist" = "0" ] && multipath $iface off
[ "$exist" = "0" ] && {
multipath $iface off
}
done
}
add_route() {
config_get disabled "$1" disabled
[ "$disabled" = "1" ] && return 0
config_get target "$1" target
routeset="$target"
config_get netmask "$1" netmask
@ -415,10 +422,14 @@ add_route() {
[ -n "$(echo $iface | grep '@')" ] && iface=$(ifstatus "$interface" | jsonfilter -q -e '@["device"]')
[ -n "$iface" ] && routeset="$routeset dev $iface"
logger -t "MPTCP" "Add route $routeset"
[ -n "$routeset" ] && ip route replace $routeset 2>&1 >/dev/null
[ -n "$routeset" ] && {
ip route replace ${routeset} 2>&1 >/dev/null
}
}
add_route6() {
config_get disabled "$1" disabled
[ "$disabled" = "1" ] && return 0
config_get target "$1" target
routeset="$target"
config_get gateway "$1" gateway
@ -436,7 +447,9 @@ add_route6() {
[ -n "$(echo $iface | grep '@')" ] && iface=$(ifstatus "$interface" | jsonfilter -q -e '@["device"]')
[ -n "$iface" ] && routeset="$routeset dev $iface"
logger -t "MPTCP" "Add IPv6 route $routeset"
[ -n "$routeset" ] && ip -6 route replace $routeset 2>&1 >/dev/null
[ -n "$routeset" ] && {
ip -6 route replace ${routeset} 2>&1 >/dev/null
}
}
remove() {
@ -482,7 +495,7 @@ start_service() {
config_foreach interface_multipath_settings interface $intf
set_multipath
config_foreach add_route route
config_foreach add_route route6
config_foreach add_route6 route6
# If no master is defined, one interface is defined as master
if [ "$master" = "" ] && [ "$intf" = "" ]; then
intfmaster="$mptcpmintf"

View file

@ -134,7 +134,7 @@ else
ID=$(ip mptcp endpoint show | grep "dev $DEVICE" | awk '{print $3}')
IFF=$(ip mptcp endpoint show | grep "dev $DEVICE" | awk '{print $4}')
IP=$(ip a show $DEVICE | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p')
[ -z "$ID" ] && ID=$(ip mptcp endpoint show | grep "$IP" | awk '{print $3}')
[ -z "$ID" ] && [ -n "$IP" ] && ID=$(ip mptcp endpoint show | grep "$IP" | awk '{print $3}')
RMID=$(ip mptcp endpoint show | grep '::ffff' | awk '{ print $3 }')
[ -n "$RMID" ] && ip mptcp endpoint delete id $RMID 2>&1 >/dev/null
case $TYPE in

View file

@ -1218,7 +1218,8 @@ if [ -n "$OMR_TRACKER_INTERFACE" ] && ([ "$multipath_config" = "on" ] || [ "$mul
serverip=$1
#gtudpst="up"
#[ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.multipathvpn)" != "1" ] && [ "$multipath_config" = "backup" ] && [ "$(pgrep glorytun-udp)" != "" ] && gtudpst="backup"
if [ "$OMR_TRACKER_DEVICE_IP" != "" ] && [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" != "1" ] && [ "$(pgrep glorytun-udp)" != "" ] && [ "$(glorytun-udp path | grep $OMR_TRACKER_DEVICE_IP | grep running)" = "" ] && [ -n "$(resolveip -4 $serverip)" ]; then
if [ "$OMR_TRACKER_DEVICE_IP" != "" ] && [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" != "1" ] && [ "$(pgrep glorytun-udp)" != "" ] && [ "$(glorytun-udp path | grep $OMR_TRACKER_DEVICE_IP | grep running)" = "" ] && [ -n "$(resolveip -4 -t 5 $serverip)" ]; then
serverip="$(resolveip -4 -t 5 $serverip | head -n 1 | tr -d '\n')"
if [ "$download" != "0" ] && [ "$download" != "" ] && [ "$upload" != "0" ] && [ "$upload" != "" ]; then
if [ "$(uci -q get glorytun-udp.vpn.rateauto)" = "1" ]; then
glorytun-udp path addr $OMR_TRACKER_DEVICE_IP to addr $serverip port ${gtudp_port} dev ${gtudp_dev} set up rate auto tx $((upload*1000/8)) rx $((download*1000/8)) pref 1 > /dev/null 2>&1
@ -1233,7 +1234,8 @@ if [ -n "$OMR_TRACKER_INTERFACE" ] && ([ "$multipath_config" = "on" ] || [ "$mul
fi
fi
fi
if [ "$OMR_TRACKER_DEVICE_IP6" != "" ] && [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" != "1" ] && [ "$(pgrep glorytun-udp)" != "" ] && [ "$(glorytun-udp path | grep $OMR_TRACKER_DEVICE_IP6 | grep running)" = "" ] && [ -n "$(resolveip -6 $serverip)" ]; then
if [ "$OMR_TRACKER_DEVICE_IP6" != "" ] && [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" != "1" ] && [ "$(pgrep glorytun-udp)" != "" ] && [ "$(glorytun-udp path | grep $OMR_TRACKER_DEVICE_IP6 | grep running)" = "" ] && [ -n "$(resolveip -6 -t 5 $serverip)" ]; then
serverip="$(resolveip -6 -t 5 $serverip | head -n 1 | tr -d '\n')"
if [ "$download" != "0" ] && [ "$download" != "" ] && [ "$upload" != "0" ] && [ "$upload" != "" ]; then
if [ "$(uci -q get glorytun-udp.vpn.rateauto)" = "1" ]; then
glorytun-udp path addr $OMR_TRACKER_DEVICE_IP6 to addr $serverip port ${gtudp_port} dev ${gtudp_dev} set up rate auto tx $((upload*1000/8)) rx $((download*1000/8)) pref 1 > /dev/null 2>&1
@ -1252,8 +1254,8 @@ if [ -n "$OMR_TRACKER_INTERFACE" ] && ([ "$multipath_config" = "on" ] || [ "$mul
# glorytun-udp set dev tun0 kxtimeout 7d > /dev/null 2>&1
# fi
[ "$multipath_config" = "backup" ] && [ "$(pgrep glorytun-udp)" != "" ] && {
[ -n "$OMR_TRACKER_DEVICE_IP" ] && [ -n "$(resolveip -4 $serverip)" ] && glorytun-udp path addr $OMR_TRACKER_DEVICE_IP to addr $serverip port ${gtudp_port} dev ${gtudp_dev} set pref 125 > /dev/null 2>&1
[ -n "$OMR_TRACKER_DEVICE_IP6" ] && [ -n "$(resolveip -6 $serverip)" ] && glorytun-udp path addr $OMR_TRACKER_DEVICE_IP6 to addr $serverip port ${gtudp_port} dev ${gtudp_dev} set pref 125 > /dev/null 2>&1
[ -n "$OMR_TRACKER_DEVICE_IP" ] && [ -n "$(resolveip -4 -t 5 $serverip)" ] && glorytun-udp path addr $OMR_TRACKER_DEVICE_IP to addr $serverip port ${gtudp_port} dev ${gtudp_dev} set pref 125 > /dev/null 2>&1
[ -n "$OMR_TRACKER_DEVICE_IP6" ] && [ -n "$(resolveip -6 -t 5 $serverip)" ] && glorytun-udp path addr $OMR_TRACKER_DEVICE_IP6 to addr $serverip port ${gtudp_port} dev ${gtudp_dev} set pref 125 > /dev/null 2>&1
}
}
config_list_foreach $1 ip addpath
@ -1372,11 +1374,13 @@ if [ -n "$OMR_TRACKER_INTERFACE" ] && ([ "$(uci -q get openmptcprouter.$OMR_TRAC
traceboxmtutest() {
omr_tracebox_mtu() {
local serverip=$1
[ "$serverip" != "${1#*[0-9].[0-9]}" ] && serverip=""
[ -n "$serverip" ] && [ "$serverip" != "127.0.0.1" ] && [ "$(pgrep tracebox)" = "" ] && [ "$(uci -q get openmptcprouter.settings.tracebox)" != "0" ] && {
omrtracebox="$(omr-tracebox-mptcp $serverip $OMR_TRACKER_DEVICE)"
[ -n "$omrtracebox" ] && [ -z "$(echo $omrtracebox | grep error)" ] && uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.mptcp_status="$omrtracebox"
}
if [ "$OMR_TRACKER_INTERFACE" != "omrvpn" ] && [ "$(uci -q get glorytun.vpn.enable)" != "1" ] && [ "$(uci -q get glorytun-udp.vpn.enable)" != "1" ] && [ -n "$OMR_TRACKER_DEVICE" ]; then
#if [ "$OMR_TRACKER_INTERFACE" != "omrvpn" ] && [ "$(uci -q get glorytun.vpn.enable)" != "1" ] && [ "$(uci -q get glorytun-udp.vpn.enable)" != "1" ] && [ -n "$OMR_TRACKER_DEVICE" ]; then
if [ "$OMR_TRACKER_INTERFACE" != "omrvpn" ] && [ -n "$OMR_TRACKER_DEVICE" ]; then
if [ -n "$(uci -q get network.$(find_network_device ${OMR_TRACKER_INTERFACE}).mtu)" ]; then
network_device=$(find_network_device ${OMR_TRACKER_INTERFACE})
mtu=""
@ -1445,11 +1449,13 @@ if [ -n "$OMR_TRACKER_INTERFACE" ] && ([ "$(uci -q get openmptcprouter.$OMR_TRAC
traceboxmtutest() {
omr_tracebox_mtu() {
local serverip=$1
[ "$serverip" != "${1#*:[0-9a-fA-F]}" ] && serverip=""
[ -n "$serverip" ] && [ "$serverip" != "127.0.0.1" ] && [ "$(pgrep tracebox)" = "" ] && [ "$(uci -q get openmptcprouter.settings.tracebox)" != "0" ] && {
omrtracebox="$(omr-tracebox-mptcp $serverip $OMR_TRACKER_DEVICE)"
[ -n "$omrtracebox" ] && [ -z "$(echo $omrtracebox | grep error)" ] && uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.mptcp_status="$omrtracebox"
}
if [ "$OMR_TRACKER_INTERFACE" != "omrvpn" ] && [ "$(uci -q get glorytun.vpn.enable)" != "1" ] && [ "$(uci -q get glorytun-udp.vpn.enable)" != "1" ] && [ -n "$OMR_TRACKER_DEVICE" ]; then
#if [ "$OMR_TRACKER_INTERFACE" != "omrvpn" ] && [ "$(uci -q get glorytun.vpn.enable)" != "1" ] && [ "$(uci -q get glorytun-udp.vpn.enable)" != "1" ] && [ -n "$OMR_TRACKER_DEVICE" ]; then
if [ "$OMR_TRACKER_INTERFACE" != "omrvpn" ] && [ -n "$OMR_TRACKER_DEVICE" ]; then
network_device=$(find_network_device ${OMR_TRACKER_INTERFACE})
if [ -n "$network_device" ] && [ -n "$(uci -q get network.${network_device}.mtu)" ]; then
mtu=$(uci -q get network.$(find_network_device ${OMR_TRACKER_INTERFACE}).mtu)
@ -1459,13 +1465,13 @@ if [ -n "$OMR_TRACKER_INTERFACE" ] && ([ "$(uci -q get openmptcprouter.$OMR_TRAC
}
elif [ -n "$OMR_TRACKER_DEVICE_IP" ]; then
[ -n "$serverip" ] && [ "$serverip" != "127.0.0.1" ] && {
local mtu=$(omr-mtu $OMR_TRACKER_DEVICE_IP $serverip)
local mtu=$(omr-mtu6 $OMR_TRACKER_DEVICE_IP6 $serverip)
[ -n "$mtu" ] && {
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.mtu=$mtu
ip link set dev $OMR_TRACKER_DEVICE mtu $mtu > /dev/null 2>&1
}
} || {
local mtu=$(omr-mtu $OMR_TRACKER_DEVICE_IP 1.1.1.1)
local mtu=$(omr-mtu6 $OMR_TRACKER_DEVICE_IP6 2606:4700:4700::1111)
[ -n "$mtu" ] && {
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.mtu=$mtu
ip link set dev $OMR_TRACKER_DEVICE mtu $mtu > /dev/null 2>&1
@ -1556,6 +1562,21 @@ fi
fi
}
if [ -n "$OMR_TRACKER_INTERFACE" ] && [ -n "$OMR_TRACKER_DEVICE" ]; then
addlatency=$(uci -q get network.${OMR_TRACKER_INTERFACE}.addlatency)
[ -z "$addlatency" ] && addlatency="0"
if [ "$addlatency" = "0" ] && [ "$(tc qdisc show dev $OMR_TRACKER_DEVICE | grep delay)" != "" ]; then
tc qdisc del dev ${OMR_TRACKER_DEVICE} root netem 2>&1 >/dev/null
fi
if [ "$addlatency" != "0" ]; then
if [ "$(tc qdisc show dev $OMR_TRACKER_DEVICE | grep delay)" = "" ]; then
tc qdisc add dev ${OMR_TRACKER_DEVICE} root netem delay ${addlatency}ms 2>&1 >/dev/null
elif [ "$(tc qdisc show dev $OMR_TRACKER_DEVICE | awk '/delay/ { print $10 }' | sed 's/ms//')" != "$addlatency" ]; then
tc qdisc replace dev ${OMR_TRACKER_DEVICE} root netem delay ${addlatency}ms 2>&1 >/dev/null
fi
fi
fi
# If a service is down, force restart it
if [ -f /etc/init.d/shadowsocks-libev ] && [ "$(pgrep -f omr-tracker-ss)" = "" ] && [ "$(pgrep ss-redir)" = "" ] && [ "$(pgrep ss-local)" = "" ] && [ "$(uci -q get shadowsocks-libev.sss0.disabled)" != "1" ] && [ "$(uci -q get shadowsocks-libev.sss0.server)" != "" ] && [ "$(uci -q get shadowsocks-libev.sss0.server)" != "192.18.1.3" ] && [ "$(uci -q get shadowsocks-libev.sss0.key)" != "" ]; then
_log "Can't find Shadowsocks, restart it..."
@ -1602,7 +1623,7 @@ if [ "$(pgrep dsvpn)" = "" ] && [ "$(uci -q get dsvpn.vpn.enable)" = "1" ] && [
/etc/init.d/dsvpn restart 2>&1 >/dev/null
sleep 5
fi
if [ "$(pgrep v2ray)" = "" ] && [ "$(uci -q get v2ray.main.enabled)" = "1" ] && [ -f /etc/init.d/v2ray ]; then
if [ "$(pgrep -f v2ray)" = "" ] && [ "$(uci -q get v2ray.main.enabled)" = "1" ] && [ -f /etc/init.d/v2ray ]; then
_log "Can't find V2Ray, restart it..."
/etc/init.d/v2ray restart 2>&1 >/dev/null
sleep 5
@ -1671,9 +1692,10 @@ if [ -n "$(logread | tail -n 2 | grep 'Ring expansion failed')" ]; then
echo 1 > /sys/bus/pci/rescan
fi
if [ -f /etc/init.d/omr-bypass ] && [ "$(iptables-save | grep omr-bypass)" = "" ] && [ "$(pgrep omr-bypass)" = "" ]; then
if [ -f /etc/init.d/omr-bypass ] && [ "$(iptables-save | grep omr-bypass)" = "" ] && [ "$(pgrep -f omr-bypass)" = "" ]; then
_log "Can't find omr-bypass rules, restart omr-bypass..."
/etc/init.d/omr-bypass 2>&1 >/dev/null
sleep 5
fi
if [ -f /etc/backup/installed_packages.txt ] && [ -n "$(grep overlay /etc/backup/installed_packages.txt)" ]; then
@ -1686,6 +1708,11 @@ if [ "$(pgrep openmptcprouter-vps)" = "" ] && ([ "$(uci -q show openmptcprouter
sleep 5
fi
if [ "$(uci -q get sqm.${OMR_TRACKER_INTERFACE}.enabled)" = "1" ] && [ "$(uci -q get sqm.${OMR_TRACKER_INTERFACE}.autorate)" = "1" ] && [ -z $(pgrep -f "autorate.sh ${OMR_TRACKER_INTERFACE}") ]; then
/etc/init.d/sqm-autorate restart >/dev/null 2>&1
sleep 5
fi
#if [ "$(uci -q show openmptcprouter | grep server)" != "" ] && [ "$(uci -q show openmptcprouter | grep password)" != "" ] && [ "$(pgrep openmptcprouter-vps)" = "" ] && [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" = "" ] && ([ "$(uci -q show openmptcprouter | grep set_firewall=\'1\')" != "" ] || [ -z "$(iptables-save | grep omr_dst_bypass_${OMR_TRACKER_DEVICE})" ]); then
if [ "$(pgrep -f set_vps_firewall)" = "" ] && [ "$(uci -q show openmptcprouter | grep server)" != "" ] && [ "$(uci -q show openmptcprouter | grep password)" != "" ] && [ "$(pgrep openmptcprouter-vps)" = "" ] && [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" = "" ] && [ "$(uci -q show openmptcprouter | grep set_firewall=\'1\')" != "" ]; then
check_server_fw() {

View file

@ -1,5 +1,5 @@
#
# Copyright (C) 2020 Ycarus (Yannick Chabanois) <ycarus@zugaina.org> for OpenMPTCProuter project
# Copyright (C) 2020-2022 Ycarus (Yannick Chabanois) <ycarus@zugaina.org> for OpenMPTCProuter project
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=mptcpd
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/intel/mptcpd.git
PKG_SOURCE_VERSION:=df4ea048cd3821f749bf06e0d01bb7d79faac812
PKG_SOURCE_VERSION:=88bea6802379ee1cdbcba4817351b63fd1489537
PKG_VERSION:=0.9-$(PKG_SOURCE_VERSION)
PKG_RELEASE:=1
PKG_MAINTAINER:=Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
@ -36,7 +36,8 @@ endef
CONFIGURE_ARGS += \
--disable-doxygen-doc \
--disable-logging
--disable-logging \
--with-kernel=upstream
TARGET_CFLAGS += -Wno-unused-result -Wno-format-nonliteral

View file

@ -0,0 +1,19 @@
--- a/include/mptcpd/private/sockaddr.h 2022-07-24 18:29:37.995613204 +0200
+++ b/include/mptcpd/private/sockaddr.h 2022-07-24 18:30:53.802312010 +0200
@@ -24,6 +24,16 @@
* These macros may be used in place of @c htons() or @c htonl() when
* initializing an IPv4 address or IP port constant at compile-time.
*/
+#ifndef __bswap_constant_16
+#define __bswap_constant_16(x) \
+ ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
+#endif
+#ifndef __bswap_constant_32
+#define __bswap_constant_32(x) \
+ ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) \
+ | (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24))
+#endif
+
///@{
#if __BYTE_ORDER == __LITTLE_ENDIAN
# define MPTCPD_CONSTANT_HTONS(hs) __bswap_constant_16(hs)

View file

@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ndpi-netfilter2
PKG_RELEASE:=3
PKG_REV:=59f295ba86110f2642f76eb967b041c4108fedd5
PKG_REV:=b19e6392cf0c7d51c44e076a91fc4db0cbbd6403
PKG_VERSION:=4-$(PKG_REV)
PKG_SOURCE_PROTO:=git
@ -39,33 +39,24 @@ define Package/iptables-mod-ndpi/description
nDPI is a ntop-maintained superset of the popular OpenDPI library
endef
#CONFIGURE_CMD = ./autogen.sh
#CONFIGURE_ARGS += --with-pic
CONFIGURE_CMD=./autogen.sh
CONFIGURE_ARGS += --with-pic
MAKE_PATH:=ndpi-netfilter
MAKE_FLAGS += \
KERNEL_DIR="$(LINUX_DIR)" \
MODULES_DIR="$(TARGET_MODULES_DIR)" \
ARCH="$(LINUX_KARCH)" \
KERNEL_RELEASE="$(KERNEL_PATCHVER)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
CC="$(TARGET_CC)" \
NDPI_PATH=$(PKG_BUILD_DIR)/ndpi-netfilter
define Build/Configure
cd $(PKG_BUILD_DIR) && \
CC="" ./autogen.sh \
--host="$(GNU_TARGET_NAME)"
# --with-pic \
# CFLAGS="$(TARGET_CFLAGS)" \
# HOST_CFLAGS="$(BUILD_CFLAGS)" \
# BUILD_CPPFLAGS="$(TARGET_CPPLAGS)" \
# BUILD_CFLAGS="$(TARGET_CFLAGS)" \
# BUILD_LDFLAGS="$(TARGET_LDFLAGS)"
endef
define Build/Compile
(cd $(PKG_BUILD_DIR)/src/lib &&\
gcc -g -O2 -fPIC -DPIC -DNDPI_LIB_COMPILATION -I../../src/include/ -I../../src/lib/third_party/include/ ndpi_network_list_compile.c -o ndpi_network_list_compile &&\
./ndpi_network_list_compile -o ndpi_network_list.c.inc ndpi_network_list_std.yaml ndpi_network_list_tor.yaml)
./ndpi_network_list_compile -o ndpi_network_list.c.inc ndpi_network_list_*.yaml)
$(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR)/ndpi-netfilter
endef

View file

@ -0,0 +1,14 @@
--- a/ndpi-netfilter/src/Makefile 2022-08-03 21:27:52.321058402 +0200
+++ b/ndpi-netfilter/src/Makefile 2022-08-03 21:28:27.572452447 +0200
@@ -5,6 +5,11 @@
ccflags-y += -I${src}/${NDPI_SRC}/include -I${src}/${NDPI_SRC}/lib -I${src}/../libre -I${src}/${NDPI_SRC}/lib/third_party/include
ccflags-y += -DHAVE_CONFIG_H -DNDPI_LIB_COMPILATION -DOPENDPI_NETFILTER_MODULE -DNDPI_DETECTION_SUPPORT_IPV6 -g
ccflags-y += -Wno-declaration-after-statement
+ifeq ($(KERNEL_RELEASE),5.15)
+ifeq ($(ARCH),arm64)
+ ccflags-y += -mno-outline-atomics
+endif
+endif
#ccflags-y += -Wshadow-local
# Needed for pahole
#ccflags-y += -femit-struct-debug-detailed=any

View file

@ -0,0 +1,11 @@
--- a/ndpi-netfilter/src/Makefile 2022-08-03 19:15:39.849630013 +0200
+++ b/ndpi-netfilter/src/Makefile 2022-08-03 19:15:57.481336123 +0200
@@ -13,7 +13,7 @@
KERNEL_DIR := /lib/modules/$(shell uname -r)/build
endif
-ifeq ($(shell grep -qc userid $(KERNEL_DIR)/source/include/linux/skbuff.h),1)
+ifeq ($(shell grep -qc userid $(KERNEL_DIR)/include/linux/skbuff.h),1)
ccflags-y += -DUSE_HACK_USERID=1
endif

View file

@ -1,5 +1,5 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2018 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
# Copyright (C) 2018-2022 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
# shellcheck disable=SC2039
# vim: set noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 :
@ -29,18 +29,10 @@ set_ipv6_state() {
commit firewall
EOF
if [ "$disable_ipv6" == "1" ]; then
if [ "$disable_ipv6" = "1" ]; then
logger -t "omr-6in4" "Disable IPv6"
uci -q batch <<-EOF >/dev/null
set dhcp.lan.ra_default="0"
set network.lan.ipv6="0"
delete network.lan.ipv6
delete dhcp.lan.dhcpv6
delete dhcp.lan.ra
delete dhcp.lan.ra_default
delete dhcp.lan.ra_management
delete dhcp.lan.ra_preference
unbound.ub_main.protocol='ip4_only'
set unbound.@unbound[-1].protocol='ip4_only'
commit unbound
del_list v2ray.main.inbounds="omr6"
commit v2ray
@ -48,34 +40,19 @@ set_ipv6_state() {
config_load shadowsocks-libev
config_foreach set_shadowsocks_address ss_redir "0.0.0.0"
uci -q batch <<-EOF >/dev/null
commit network
commit dhcp
commit shadowsocks-libev
EOF
[ ! -f /etc/wgetrc ] && cp /etc/wgetrc4 /etc/wgetrc
else
logger -t "omr-6in4" "Enable IPv6"
uci -q batch <<-EOF >/dev/null
set dhcp.lan.dhcpv6="server"
set dhcp.lan.ra="server"
set dhcp.lan.ra_default="1"
set dhcp.lan.ra_preference="high"
set dhcp.lan.ra_management="1"
delete dhcp.lan.ra_flags
add_list dhcp.lan.ra_flags='managed-config'
set dhcp.lan.ra_slaac='1'
add_list dhcp.lan.ra_flags='other-config'
set network.lan.ipv6="1"
set network.lan.delegate="0"
set network.omr6in4.force_link=1
set network.omr6in4.metric=1
delete network.omr6in4.auto
unbound.ub_main.protocol='mixed'
set unbound.@unbound[-1].protocol='mixed'
commit unbound
EOF
if [ "$(uci -q get network.lan.ip6assign)" = "" ]; then
uci -q set network.lan.ip6assign='60'
fi
if [ "$(uci -q get network.globals.ula_prefix)" = "" ]; then
r1=$(dd if=/dev/urandom bs=1 count=1 |hexdump -e '1/1 "%02x"')
r2=$(dd if=/dev/urandom bs=2 count=1 |hexdump -e '2/1 "%02x"')
@ -106,12 +83,62 @@ set_ipv6_state() {
fi
}
set_ipv6_state_intf() {
local disable_ipv6="$(uci -q get openmptcprouter.settings.disable_ipv6)"
local intf="$1"
config_get ip4table $intf ip4table
config_get ipv6 $intf ipv6 "0"
if [ "$ip4table" = "lan" ]; then
if [ "$disable_ipv6" = "1" ] && [ "$ipv6" != "0" ]; then
logger -t "omr-6in4" "Disable IPv6 on ${intf}"
uci -q batch <<-EOF >/dev/null
set dhcp.${intf}.ra_default="0"
delete network.${intf}.ipv6
delete dhcp.${intf}.dhcpv6
delete dhcp.${intf}.ra
delete dhcp.${intf}.ra_default
delete dhcp.${intf}.ra_management
delete dhcp.${intf}.ra_preference
commit network
commit dhcp
EOF
elif [ "$disable_ipv6" != "1" ] && [ "$ipv6" != "1" ]; then
logger -t "omr-6in4" "Enable IPv6 on ${intf}"
uci -q batch <<-EOF >/dev/null
set dhcp.${intf}.dhcpv6="server"
set dhcp.${intf}.ra="server"
set dhcp.${intf}.ra_default="1"
set dhcp.${intf}.ra_preference="high"
set dhcp.${intf}.ra_management="1"
delete dhcp.${intf}.ra_flags
add_list dhcp.${intf}.ra_flags='managed-config'
set dhcp.${intf}.ra_slaac='1'
add_list dhcp.${intf}.ra_flags='other-config'
set network.${intf}.ipv6="1"
set network.${intf}.delegate="0"
EOF
if [ "$(uci -q get network.${intf}.ip6assign)" = "" ]; then
uci -q set network.${intf}.ip6assign='60'
fi
uci -q batch <<-EOF >/dev/null
commit network
commit dhcp
EOF
fi
fi
}
start_service() {
[ "$(uci -q get openmptcprouter.settings.disable_ipv6)" != "1" ] && [ "$(uci -q get network.lan.ipv6)" != "1" ] && set_ipv6_state
[ "$(uci -q get openmptcprouter.settings.disable_ipv6)" != "1" ] && {
config_load network
config_foreach set_ipv6_state_intf interface
set_ipv6_state
}
[ "$(uci -q get openmptcprouter.settings.disable_ipv6)" != "0" ] && {
config_load network
config_foreach set_ipv6_state_intf interface
ifdown omr6in4
/etc/init.d/odhcpd stop
[ -z "$(/etc/init.d/odhcpd status | grep inactive)" ] && /etc/init.d/odhcpd stop
return
}
[ "$(ifstatus omr6in4 | jsonfilter -e '@.up' | tr -d '\n')" != "true" ] && ifup omr6in4

View file

@ -91,6 +91,8 @@ _check_master() {
del openvpn.omr.remote
add_list openvpn.omr.remote=$ip
commit openvpn
set openmptcprouter.vps.current='1'
commit openmptcprouter
EOF
/etc/init.d/openmptcprouter-vps get_openvpn_key $name >/dev/null 2>/dev/null
/etc/init.d/v2ray restart >/dev/null 2>/dev/null
@ -99,6 +101,7 @@ _check_master() {
/etc/init.d/mlvpn restart >/dev/null 2>/dev/null
/etc/init.d/openvpn restart >/dev/null 2>/dev/null
/etc/init.d/dsvpn restart >/dev/null 2>/dev/null
/etc/init.d/mptcpovervpn restart >/dev/null 2>/dev/null
fi
fi
config_load shadowsocks-libev
@ -106,6 +109,10 @@ _check_master() {
count=$((count+1))
else
logger -t "OMR-Tracker-Server" "Master server ${name} down ($ip)"
uci -q batch <<-EOF >/dev/null
set openmptcprouter.vps.current='0'
commit openmptcprouter
EOF
config_load shadowsocks-libev
config_foreach _disable_redir ss_redir
fi
@ -162,6 +169,8 @@ _check_backup() {
del openvpn.omr.remote
add_list openvpn.omr.remote=$ip
commit openvpn
set openmptcprouter.vps.current='1'
commit openmptcprouter
EOF
/etc/init.d/openmptcprouter-vps get_openvpn_key $name >/dev/null 2>/dev/null
/etc/init.d/v2ray restart >/dev/null 2>/dev/null
@ -170,6 +179,7 @@ _check_backup() {
/etc/init.d/mlvpn restart >/dev/null 2>/dev/null
/etc/init.d/openvpn restart >/dev/null 2>/dev/null
/etc/init.d/dsvpn restart >/dev/null 2>/dev/null
/etc/init.d/mptcpovervpn restart >/dev/null 2>/dev/null
fi
sleep $waittest
fi
@ -177,6 +187,10 @@ _check_backup() {
config_foreach _enable_redir ss_redir
count=$((count+1))
else
uci -q batch <<-EOF >/dev/null
set openmptcprouter.vps.current='0'
commit openmptcprouter
EOF
config_load shadowsocks-libev
config_foreach _disable_redir ss_redir
fi

View file

@ -0,0 +1,21 @@
#!/bin/sh
PKT_SIZE=1472
INTERFACE="$1"
HOSTNAME="$2"
#count=$(ping -q -w 1 -M do -c 1 -s $PKT_SIZE -I $INTERFACE $HOSTNAME | grep -cE 'Message too long|100% packet loss')
#count=$(ping -B -w 1 -M do -c 1 -s $PKT_SIZE -I $INTERFACE $HOSTNAME 2>&1 | grep -c 'Message too long')
count=$(ping -6 -B -w 2 -M do -c 3 -s $PKT_SIZE -I $INTERFACE $HOSTNAME 2>&1 | grep -cE 'Message too long|100% packet loss')
while [ $count -ge 1 ]; do
PKT_SIZE=$((PKT_SIZE - 1))
if [ "$PKT_SIZE" -lt "1252" ]; then
exit 0
fi
#count=$(ping -q -w 1 -M do -c 1 -s $PKT_SIZE -I $INTERFACE $HOSTNAME | grep -cE 'Message too long|100% packet loss')
#count=$(ping -B -w 1 -M do -c 1 -s $PKT_SIZE -I $INTERFACE $HOSTNAME 2>&1 | grep -c 'Message too long')
count=$(ping -6 -B -w 2 -M do -c 3 -s $PKT_SIZE -I $INTERFACE $HOSTNAME 2>&1 | grep -cE 'Message too long|100% packet loss')
done
printf "$((PKT_SIZE + 28))"

View file

@ -17,7 +17,7 @@ wireguard_restart() {
}
_getremoteip() {
[ "$(uci -q get openmptcprouter.$1.master)" = "1" ] && {
[ "$(uci -q get openmptcprouter.$1.current)" = "1" ] && {
remoteip=$(uci -q get openmptcprouter.$1.ip | awk '{print $1}')
wg_server_key=$(uci -q get openmptcprouter.$1.wgkey)
}
@ -27,6 +27,10 @@ mptcp_over_vpn() {
local interface=$1
[ -n "$(uci show firewall.zone_wan.network | grep $interface)" ] && nbintf=$(($nbintf+1))
if [ "$(uci -q get openmptcprouter.${interface}.multipathvpn)" = "1" ]; then
remoteip=""
config_load openmptcprouter
config_foreach _getremoteip server
if [ "$(uci -q get network.${interface})" = "" ]; then
uci -q batch <<-EOF >/dev/null
delete openmptcprouter.${interface}
@ -47,12 +51,9 @@ mptcp_over_vpn() {
return
fi
nbintfvpn=$(($nbintfvpn+1))
if [ "$(uci -q get network.ovpn${interface})" = "" ] && [ "$vpn" = "openvpn" ]; then
if ([ "$(uci -q get network.ovpn${interface})" = "" ] || [ "$(uci -q get openvpn.${interface}.remote)" != "${remoteip}" ]) && [ "$vpn" = "openvpn" ]; then
logger -t "MPTCPoverVPN" "Enable MPTCP over VPN for ${interface}"
id=$(uci -q get network.${interface}.metric)
remoteip=""
config_load openmptcprouter
config_foreach _getremoteip server
localip=$(ubus call network.interface.$interface status | jsonfilter -e '@["ipv4-address"][0].address' | tr -d "\n")
[ -z "$(uci -q get openmptcprouter.ovpn${interface}.multipath)" ] && multipath=$(uci -q get network.${interface}.multipath)
[ -n "$(uci -q get openmptcprouter.ovpn${interface}.multipath)" ] && multipath=$(uci -q get openmptcprouter.ovpn${interface}.multipath)
@ -103,7 +104,7 @@ mptcp_over_vpn() {
add_list firewall.zone_vpn.network="ovpn${interface}"
commit firewall
EOF
elif [ "$(uci -q get network.wg${interface})" = "" ] && [ "$vpn" = "wireguard" ]; then
elif ([ "$(uci -q get network.wg${interface})" = "" ] || [ "$(uci -q get network.@wireguard_wg${interface}[0].endpoint_host)" != "$remoteip" ]) && [ "$vpn" = "wireguard" ]; then
logger -t "MPTCPoverVPN" "Enable MPTCP over VPN for ${interface}"
id=$(uci -q get network.${interface}.metric)
remoteip=""
@ -247,9 +248,14 @@ start_service()
commit glorytun-udp
EOF
fi
elif ([ "$(uci -q get glorytun.vpn.host)" = "10.255.250.1" ] || [ "$(uci -q get glorytun.vpn.host)" = "10.255.247.1" ]) && [ "$nbintf" != "$nbintfvpn" ]; then
uci -q batch <<-EOF >/dev/null
delete shadowsocks-libev.sss0.disabled
set shadowsocks-libev.ss_rules.server='mptcpovervpn'
set shadowsocks-libev.ss_rules.redir_tcp='all'
EOF
elif ([ "$(uci -q get glorytun.vpn.host)" = "10.255.250.1" ] || [ "$(uci -q get glorytun.vpn.host)" = "10.255.247.1" ] || [ "$(uci -q get shadowsocks-libev.ss_rules.server)" != "sss0" ]) && [ "$nbintf" != "$nbintfvpn" ]; then
uci -q batch <<-EOF >/dev/null
set shadowsocks-libev.sss0.disabled='0'
set shadowsocks-libev.ss_rules.server='sss0'
set glorytun.vpn.host="$(uci -q get openmptcprouter.vps.ip | awk '{print $1}')"
set glorytun-udp.vpn.host="$(uci -q get openmptcprouter.vps.ip | awk '{print $1}')"
commit glorytun
@ -265,7 +271,7 @@ start_service()
set shadowsocks-libev.mptcpovervpn.key="$(uci -q get shadowsocks-libev.sss0.key)"
set shadowsocks-libev.mptcpovervpn.method="$(uci -q get shadowsocks-libev.sss0.method)"
set shadowsocks-libev.mptcpovervpn.server="10.255.250.1"
delete shadowsocks-libev.mptcpovervpn.disabled
set shadowsocks-libev.mptcpovervpn.disabled='0'
EOF
else
uci -q batch <<-EOF >/dev/null
@ -274,7 +280,7 @@ start_service()
set shadowsocks-libev.mptcpovervpn.key="$(uci -q get shadowsocks-libev.sss0.key)"
set shadowsocks-libev.mptcpovervpn.method="$(uci -q get shadowsocks-libev.sss0.method)"
set shadowsocks-libev.mptcpovervpn.server="10.255.247.1"
delete shadowsocks-libev.mptcpovervpn.disabled
set shadowsocks-libev.mptcpovervpn.disabled='0'
EOF
fi
for c in $(seq 1 $NBCPU); do
@ -297,7 +303,7 @@ start_service()
uci -q batch <<-EOF >/dev/null
commit shadowsocks-libev
EOF
/etc/init.d/shadowsocks restart
/etc/init.d/shadowsocks-libev restart
/etc/init.d/openvpn restart
elif [ "$(uci -q get shadowsocks-libev.hivpn1)" != "" ]; then
for c in $(seq 1 $NBCPU); do
@ -306,9 +312,10 @@ start_service()
EOF
done
uci -q batch <<-EOF >/dev/null
delete shadowsocks-libev.sss0.disabled
set shadowsocks-libev.sss0.disabled='0'
EOF
uci -q batch <<-EOF >/dev/null
set shadowsocks-libev.ss_rules.server='sss0'
delete shadowsocks-libev.mptcpovervpn
commit shadowsocks-libev
EOF

View file

@ -271,7 +271,7 @@ _set_ss_server_vps() {
if [ "$current_mptcp" != "$mptcp" ] || [ "$current_obfs_plugin" != "$obfs_plugin" ] || [ "$current_obfs_type" != "$obfs_type" ] || [ "$current_port" != "$port" ] || [ "$current_method" != "$method" ] || [ "$current_key" != "$key" ] || [ "$current_ebpf" != "$ebpf" ] || [ "$current_obfs" != "$obfs" ] || [ "$current_fast_open" != "$fast_open" ] || [ "$current_no_delay" != "$no_delay" ]; then
local settings
settings='{"port": '$port',"method":"'$method'","fast_open":'$fast_open',"reuse_port":true,"no_delay":'$no_delay',"mptcp":'$mptcp',"key":"'$key'","ebpf":'$ebpf',"obfs":'$obfs',"obfs_plugin":"'$obfs_plugin'","obfs_type":"'$obfs_type'"}'
_set_json "shadowsocks" "$settings"
result=$(_set_json "shadowsocks" "$settings")
fi
}
@ -728,6 +728,7 @@ _set_mptcp_vps() {
scheduler_current="$(echo "$vps_config" | jsonfilter -q -e '@.mptcp.scheduler')"
syn_retries_current="$(echo "$vps_config" | jsonfilter -q -e '@.mptcp.syn_retries')"
congestion_control_current="$(echo "$vps_config" | jsonfilter -q -e '@.network.congestion_control')"
mptcp_version_current="$(echo "$vps_config" | jsonfilter -q -e '@.mptcp.version')"
mptcp_enabled="$(uci -q get network.globals.multipath)"
if [ "$mptcp_enabled" = "disable" ]; then
mptcp_enabled="0"
@ -739,9 +740,11 @@ _set_mptcp_vps() {
scheduler="$(uci -q get network.globals.mptcp_scheduler)"
syn_retries="$(uci -q get network.globals.mptcp_syn_retries)"
congestion="$(uci -q get network.globals.congestion)"
mptcp_version="0"
[ ! -f /proc/sys/net/mptcp/mptcp_enabled ] && mptcp_version="1"
[ -z "$congestion" ] && congestion="bbr"
if [ "$mptcp_enabled_current" != "$mptcp_enabled" ] || [ "$checksum_current" != "$checksum" ] || ([ "$path_manager_current" != "" ] && [ "$path_manager_current" != "$path_manager" ]) || ([ "$scheduler_current" != "" ] && [ "$scheduler_current" != "$scheduler" ]) || ([ "$syn_retries_current" != "" ] && [ "$syn_retries_current" != "$syn_retries" ]) || [ "$congestion_control_current" != "$congestion" ]; then
settings='{"enabled" : "'$mptcp_enabled'", "checksum": "'$checksum'","path_manager": "'$path_manager'","scheduler": "'$scheduler'","syn_retries": "'$syn_retries'","congestion_control": "'$congestion'"}'
if [ "$mptcp_enabled_current" != "$mptcp_enabled" ] || [ "$checksum_current" != "$checksum" ] || ([ "$path_manager_current" != "" ] && [ "$path_manager_current" != "$path_manager" ]) || ([ "$scheduler_current" != "" ] && [ "$scheduler_current" != "$scheduler" ]) || ([ "$syn_retries_current" != "" ] && [ "$syn_retries_current" != "$syn_retries" ]) || [ "$congestion_control_current" != "$congestion" ] || [ "$mptcp_version_current" != "$mptcp_version" ]; then
settings='{"enabled" : "'$mptcp_enabled'", "checksum": "'$checksum'","path_manager": "'$path_manager'","scheduler": "'$scheduler'","syn_retries": "'$syn_retries'","congestion_control": "'$congestion'","version": "'$mptcp_version'"}'
echo $(_set_json "mptcp" "$settings")
else
echo 1
@ -835,6 +838,7 @@ _set_vpn_ip() {
[ -z "$vpnip_remote" ] && [ -n "$vpnifname" ] && vpnip_remote=$(ip -4 r list dev ${vpnifname} | grep kernel | awk '{print $1}' | tr -d "\n")
[ -z "$vpnip_remote" ] && [ -n "$vpnifname" ] && vpnip_remote=$(ip -4 r list dev ${vpnifname} | grep "proto static src" | awk '{print $3}' | tr -d "\n")
[ -z "$vpnip_remote" ] && vpnip_remote=$(ifstatus omrvpn | jsonfilter -e '@.route[0].nexthop')
[ -z "$vpnip_remote" ] && [ "$vpnifname" = "bonding-omrvpn" ] && vpnip_remote="10.255.248.1"
ula="$(uci -q get network.globals.ula_prefix)"
ula_current="$(echo "$vps_config" | jsonfilter -q -e '@.ip6in4.ula')"
if [ "$vpnip_remote" != "" ] && [ "$vpnip_local" != "" ] && ([ "$vpnip_remote" != "$vpnip_remote_current" ] || [ "$vpnip_local" != "$vpnip_local_current" ] || [ "$ula" != "$ula_current" ]); then
@ -962,7 +966,7 @@ _vps_firewall_redirect_port() {
fi
if [ "$checkfw" = "" ]; then
settings='{"name" : "router '$src_dport'","port" : "'$src_dport'","source_dip" : "'$src_dip'","source_ip" : "'$src_ip'","proto" : "'$protoi'","fwtype" : "'$target'","ipproto" : "'$family'"}'
_set_json "shorewallopen" "$settings"
result=$(_set_json "shorewallopen" "$settings")
fi
if [ "$family" = "ipv4" ]; then
if [ "$src_dip" = "" ] && [ "$src_ip" = "" ]; then
@ -1032,10 +1036,10 @@ _vps_firewall_redirect_port() {
fi
if [ "$checkfw" = "" ]; then
settings='{"name" : "router '$src_dport'","port" : "'$src_dport'","source_dip" : "'$src_dip'","source_ip" : "'$src_ip'","proto" : "'${protoi}'","fwtype" : "ACCEPT","ipproto" : "'$family'","comment" : "V2Ray to '${dest_ip}':'${dest_port}'"}'
_set_json "shorewallopen" "$settings"
result=$(_set_json "shorewallopen" "$settings")
[ -z "$dest_port" ] && dest_port="$src_dport"
settings='{"name" : "router '$src_dport'","port" : "'$src_dport'","destip" : "'$dest_ip'","destport" : "'$dest_port'","proto" : "'${protoi}'"}'
_set_json "v2rayredirect" "$settings"
result=$(_set_json "v2rayredirect" "$settings")
fi
if [ "$family" = "ipv4" ]; then
if [ "$src_dip" = "" ] && [ "$src_ip" = "" ]; then
@ -1083,12 +1087,12 @@ _vps_firewall_close_port() {
else
settings='{"name" : "router '$src_dport'","port" : "'$src_dport'","proto" : "'$proto'","fwtype" : "DNAT","comment" : "'$comment'"}'
fi
_set_json "shorewallclose" "$settings"
result=$(_set_json "shorewallclose" "$settings")
[ "$type" = "ACCEPT" ] && {
destip=$(echo $comment | awk '{print $3}' | awk -F: '{print $1}')
destport=$(echo $comment | awk '{print $3}' | awk -F: '{print $2}')
settings='{"name" : "router '$src_dport'","port" : "'$src_dport'","proto" : "'$proto'","destip" : "'$destip'","destport": "'$destport'"}'
_set_json "v2rayunredirect" "$settings"
result=$(_set_json "v2rayunredirect" "$settings")
}
}
done
@ -1111,10 +1115,10 @@ _vps_firewall_close_port() {
else
settings='{"name" : "router '$src_dport'","port" : "'$src_dport'","proto" : "'$proto'","fwtype" : "DNAT","ipproto" : "ipv6","comment" : "'$comment'"}'
fi
_set_json "shorewallclose" "$settings"
result=$(_set_json "shorewallclose" "$settings")
[ "$type" = "ACCEPT" ] && {
settings='{"name" : "router '$src_dport'","port" : "'$src_dport'","proto" : "'$proto'","comment" : "'$comment'"}'
_set_json "v2rayunredirect" "$settings"
result=$(_set_json "v2rayunredirect" "$settings")
}
}
done
@ -1690,7 +1694,7 @@ _backup_send() {
logger -t "OMR-VPS" "Send backup file to server $servername"
local backupjson
backupjson='{"data": "'$backup_data'","sha256sum": "'$backup_sha256sum'"}'
_set_json "backuppost" "$backupjson"
result=$(_set_json "backuppost" "$backupjson")
uci -q set openmptcprouter.$servername.lastbackup=$(date +%s)
}
}

View file

@ -55,7 +55,24 @@ _disable_openvpnbonding()
{
name=$1
if [ "$(echo $name | grep omr_bonding)" != "" ]; then
uci -q set openvpn.${name}.enabled='0'
uci -q del openvpn.${name}.enabled
uci -q batch <<-EOF >/dev/null
del network.omrvpn.bonding_policy
del network.omrvpn.packets_per_slave
del network.omrvpn.xmit_hash_policy
del network.omrvpn.all_slaves_active
del network.omrvpn.netmask
del network.omrvpn.ipaddr
del network.omrvpn.link_monitoring
del network.omrvpn.miimon
del network.omrvpn.downdelay
del network.omrvpn.updelay
del network.omrvpn.use_carrier
del network.omrvpn.force_link
del network.omrvpn.slaves
commit network
EOF
fi
}

View file

@ -38,9 +38,7 @@ backup_database() {
}
restore_database() {
if [ ! -f $BACKUP_FILE ]; then
logger -t $LOGGER_TAG -p err "cannot restore, backup file does not exist (yet)"
else
if [ -f $BACKUP_FILE ]; then
logger -t $LOGGER_TAG -p info 'restoring database'
[ ! -d $VNSTAT_DIR ] && mkdir $VNSTAT_DIR
/bin/tar -xzf $BACKUP_FILE -C $VNSTAT_DIR

View file

@ -1,6 +1,6 @@
#!/bin/sh
if [ "$(uci -q get openmptcprouter.latest_versions)" = "" ]; then
if [ "$(uci -q get unbound.@unbound[0].listen_port | grep 5353)" = "" ]; then
if [ "$(uci -q get openmptcprouter.settings.version)" = "" ]; then
if [ "$(uci -q get unbound.@unbound[-1].listen_port | grep 5353)" = "" ]; then
uci -q batch <<-EOF >/dev/null
set unbound.@unbound[-1].listen_port=5353
set unbound.@unbound[-1].protocol="ip4_only"
@ -8,6 +8,11 @@ if [ "$(uci -q get openmptcprouter.latest_versions)" = "" ]; then
set unbound.@unbound[-1].recursion="aggressive"
set unbound.@unbound[-1].validator='1'
set unbound.@unbound[-1].validator_ntp='1'
del unbound.@unbound[-1].dns64_prefix
del unbound.@unbound[-1].iface_wan
del unbound.@unbound[-1].dhcp4_slaac6
del unbound.@unbound[-1].query_minimize
del unbound.@unbound[-1].query_min_strict
commit unbound
EOF
fi
@ -19,6 +24,13 @@ if [ "$(uci -q get openmptcprouter.latest_versions)" = "" ]; then
EOF
fi
fi
if [ -z "$(uci -q get unbound.ub_main)" ]; then
uci -q batch <<-EOF >/dev/null
rename unbound.@unbound[-1]=ub_main
commit unbound
EOF
fi
if [ "$(uci -q show dhcp | grep 'use-application-dns.net')" = "" ]; then
uci -q batch <<-EOF >/dev/null
add_list dhcp.@dnsmasq[-1].server="/use-application-dns.net/"
@ -61,6 +73,7 @@ fi
if [ -z "$(uci -q show unbound.auth_icann)" ]; then
uci -q batch <<-EOF >/dev/null
del unbound.auth_icann
set unbound.auth_icann=zone
set unbound.auth_icann.fallback='1'
set unbound.auth_icann.url_dir='https://www.internic.net/domain/'
@ -72,6 +85,7 @@ if [ -z "$(uci -q show unbound.auth_icann)" ]; then
add_list unbound.auth_icann.zone_name='in-addr.arpa.'
add_list unbound.auth_icann.zone_name='ip6.arpa.'
set unbound.auth_icann.enabled='1'
del unbound.fwd_isp
set unbound.fwd_isp=zone
set unbound.fwd_isp.enabled='0'
set unbound.fwd_isp.fallback='1'
@ -79,6 +93,7 @@ if [ -z "$(uci -q show unbound.auth_icann)" ]; then
set unbound.fwd_isp.zone_type='forward_zone'
add_list unbound.fwd_isp.zone_name='isp-bill.example.com.'
add_list unbound.fwd_isp.zone_name='isp-mail.example.net.'
del unbound.fwd_google
set unbound.fwd_google=zone
set unbound.fwd_google.enabled='0'
set unbound.fwd_google.fallback='1'
@ -90,6 +105,7 @@ if [ -z "$(uci -q show unbound.auth_icann)" ]; then
add_list unbound.fwd_google.server='2001:4860:4860::8844'
add_list unbound.fwd_google.server='2001:4860:4860::8888'
set unbound.fwd_google.zone_name='.'
del unbound.fwd_cloudflare
set unbound.fwd_cloudflare=zone
set unbound.fwd_cloudflare.enabled='0'
set unbound.fwd_cloudflare.fallback='1'

View file

@ -0,0 +1,58 @@
#!/bin/sh
if [ -z "$(uci -q get qos.omrvpn)" ]; then
uci -q batch <<-EOF >/dev/null
delete qos.wan
set qos.wan1=interface
set qos.wan1.classgroup="Default"
set qos.wan1.enabled="0"
set qos.wan1.upload="4000"
set qos.wan1.download="100000"
set qos.wan2=interface
set qos.wan2.classgroup="Default"
set qos.wan2.enabled="0"
set qos.wan2.upload="4000"
set qos.wan2.download="100000"
set qos.omrvpn=interface
set qos.omrvpn.classgroup="Default"
set qos.omrvpn.enabled="0"
set qos.omrvpn.interface="tun0"
set qos.omrvpn.upload="0"
set qos.omrvpn.download="0"
set qos.omrvpn.qdisc="cake"
set qos.omrvpn.script="layer_cake.qos"
delete qos.@classify[-1]
add qos classify
set qos.@classify[-1].target='Express'
set qos.@classify[-1].ports='5600'
set qos.@classify[-1].comments='SIP'
add qos classify
set qos.@classify[-1].target='Express'
set qos.@classify[-1].portrange='27000-27050'
set qos.@classify[-1].proto='udp'
set qos.@classify[-1].comments='Steam'
commit qos
EOF
if [ "$(uci -q get network.wan3)" != "" ]; then
uci -q batch <<-EOF >/dev/null
set qos.wan3=interface
set qos.wan3.classgroup="Default"
set qos.wan3.enabled="0"
set qos.wan3.upload="4000"
set qos.wan3.download="100000"
commit qos
EOF
fi
if [ "$(uci -q get network.wan4)" != "" ]; then
uci -q batch <<-EOF >/dev/null
set qos.wan4=interface
set qos.wan4.classgroup="Default"
set qos.wan4.enabled="0"
set qos.wan4.upload="4000"
set qos.wan4.download="100000"
commit qos
EOF
fi
fi
rm -f /tmp/luci-indexcache
exit 0

View file

@ -77,6 +77,7 @@ if [ "$(uci -q show firewall | grep Allow-All-Ping)" = "" ]; then
set firewall.@rule[-1].dest='*'
set firewall.@rule[-1].src='*'
set firewall.@rule[-1].icmp_type='echo-request'
set firewall.@rule[-1].limit='1000/sec'
commit firewall
EOF
fi
@ -187,6 +188,42 @@ if [ "$(uci -q get firewall.blockquicproxy)" = "" ]; then
EOF
fi
if [ "$(uci -q get firewall.allowicmpipv6)" = "" ]; then
uci -q batch <<-EOF >/dev/null
set firewall.allowicmpipv6=rule
set firewall.allowicmpipv6.proto='icmp'
set firewall.allowicmpipv6.target='ACCEPT'
set firewall.allowicmpipv6.src='wan'
set firewall.allowicmpipv6.name='Allow IPv6 ICMP'
set firewall.allowicmpipv6.family='ipv6'
set firewall.@rule[-1].limit='1000/sec'
set firewall.allowicmpipv6.icmp_type='neighbour-advertisement neighbour-solicitation router-advertisement router-solicitation'
commit firewall
EOF
fi
if [ "$(uci -q get firewall.allowdhcpv6546)" = "" ]; then
uci -q batch <<-EOF >/dev/null
set firewall.allowdhcpv6546=rule
set firewall.allowdhcpv6546.target='ACCEPT'
set firewall.allowdhcpv6546.src='wan'
set firewall.allowdhcpv6546.proto='udp'
set firewall.allowdhcpv6546.dest_port='547'
set firewall.allowdhcpv6546.name='Allow DHCPv6 (546-to-547)'
set firewall.allowdhcpv6546.family='ipv6'
set firewall.allowdhcpv6546.src_port='546'
set firewall.allowdhcpv6547=rule
set firewall.allowdhcpv6547.target='ACCEPT'
set firewall.allowdhcpv6547.src='wan'
set firewall.allowdhcpv6547.proto='udp'
set firewall.allowdhcpv6547.dest_port='546'
set firewall.allowdhcpv6547.name='Allow DHCPv6 (547-to-546)'
set firewall.allowdhcpv6547.family='ipv6'
set firewall.allowdhcpv6547.src_port='547'
commit firewall
EOF
fi
# Fix firewall config from some old config
allintf=$(uci -q get firewall.zone_wan.network)
uci -q del firewall.zone_wan.network
@ -209,6 +246,7 @@ if [ "$(uci -q get openmptcprouter.settings.sipalg)" != "1" ]; then
uci -q batch <<-EOF >/dev/null
set firewall.zone_lan.auto_helper='0'
set firewall.zone_wan.auto_helper='0'
set firewall.zone_vpn.auto_helper='0'
commit firewall
EOF
rmmod nf_nat_sip 2>&1 >/dev/null

View file

@ -38,7 +38,6 @@ if [ "$(uci -q get openvpn.omr.proto)" != "tcp-client" ]; then
set openvpn.omr.port=65301
set openvpn.omr.cipher=AES-256-CBC
set openvpn.omr.proto=tcp-client
set openvpn.omr.enabled=0
set openvpn.omr.ncp_disable=1
set openvpn.omr.auth_nocache=1
set openvpn.omr.client=1

View file

@ -0,0 +1,100 @@
#!/bin/sh
if [ "$(uci -q get openmptcprouter.settings.version)" = "" ]; then
if [ "$(uci -q get sqm.wan1)" = "" ]; then
wan1="$(uci -q get network.wan1.device)"
wan2="$(uci -q get network.wan2.device)"
uci -q batch <<-EOF >/dev/null
delete sqm.eth1
set sqm.wan1=queue
set sqm.wan1.qdisc="fq_codel"
set sqm.wan1.script="simple.qos"
set sqm.wan1.qdisc_advanced='0'
set sqm.wan1.linklayer='none'
set sqm.wan1.enabled='1'
set sqm.wan1.interface="${wan1}"
set sqm.wan1.download='0'
set sqm.wan1.upload='0'
set sqm.wan1.debug_logging='0'
set sqm.wan1.verbosity='5'
set sqm.wan1.iqdisc_opts='autorate-ingress dual-dsthost'
set sqm.wan1.eqdisc_opts='dual-srchost'
set sqm.wan2=queue
set sqm.wan2.qdisc="fq_codel"
set sqm.wan2.script="simple.qos"
set sqm.wan2.qdisc_advanced='0'
set sqm.wan2.linklayer='none'
set sqm.wan2.enabled='1'
set sqm.wan2.interface="${wan2}"
set sqm.wan2.download='0'
set sqm.wan2.upload='0'
set sqm.wan2.debug_logging='0'
set sqm.wan2.verbosity='5'
set sqm.wan2.iqdisc_opts='autorate-ingress dual-dsthost'
set sqm.wan2.eqdisc_opts='dual-srchost'
commit sqm
EOF
if [ "$(uci -q get network.wan3)" != "" ]; then
wan3="$(uci -q get network.wan3.device)"
uci -q batch <<-EOF >/dev/null
set sqm.wan3=queue
set sqm.wan3.qdisc="fq_codel"
set sqm.wan3.script="simple.qos"
set sqm.wan3.qdisc_advanced='0'
set sqm.wan3.linklayer='none'
set sqm.wan3.enabled='1'
set sqm.wan3.interface="${wan3}"
set sqm.wan3.download='0'
set sqm.wan3.upload='0'
set sqm.wan3.debug_logging='0'
set sqm.wan3.verbosity='5'
set sqm.wan3.iqdisc_opts='autorate-ingress dual-dsthost'
set sqm.wan3.eqdisc_opts='dual-srchost'
commit sqm
EOF
fi
if [ "$(uci -q get network.wan4)" != "" ]; then
wan4="$(uci -q get network.wan4.device)"
uci -q batch <<-EOF >/dev/null
set sqm.wan4=queue
set sqm.wan4.qdisc="fq_codel"
set sqm.wan4.script="simple.qos"
set sqm.wan4.qdisc_advanced='0'
set sqm.wan4.linklayer='none'
set sqm.wan4.enabled='1'
set sqm.wan4.interface="${wan4}"
set sqm.wan4.download='0'
set sqm.wan4.upload='0'
set sqm.wan4.debug_logging='0'
set sqm.wan4.verbosity='5'
set sqm.wan4.iqdisc_opts='autorate-ingress dual-dsthost'
set sqm.wan4.eqdisc_opts='dual-srchost'
commit sqm
EOF
fi
fi
fi
if [ "$(uci -q get sqm.omrvpn)" = "" ]; then
uci -q batch <<-EOF >/dev/null
set sqm.omrvpn=queue
set sqm.omrvpn.qdisc="cake"
set sqm.omrvpn.script="piece_of_cake.qos"
set sqm.omrvpn.qdisc_advanced='0'
set sqm.omrvpn.linklayer='none'
set sqm.omrvpn.enabled='1'
set sqm.omrvpn.interface=tun0
set sqm.omrvpn.download='0'
set sqm.omrvpn.upload='0'
set sqm.omrvpn.debug_logging='0'
set sqm.omrvpn.verbosity='5'
set sqm.omrvpn.overhead='40'
set sqm.omrvpn.iqdisc_opts='autorate-ingress'
commit sqm
EOF
fi
sed -i 's/SQM_SYSLOG=1/SQM_SYSLOG=0/g' /etc/sqm/sqm.conf
rm -f /tmp/luci-indexcache
exit 0

View file

@ -6,6 +6,7 @@ uci -q batch <<-EOF >/dev/null
set system.ntp.enable_server='1'
set system.ntp.enabled='1'
del system.ntp.server
set system.@system[-1].cronloglevel=9
add_list system.ntp.server='ntp.aliyun.com'
add_list system.ntp.server='time1.cloud.tencent.com'
add_list system.ntp.server='time.ustc.edu.cn'
@ -38,7 +39,7 @@ fi
EOF
}
if [ -n "$(ubus call system board | jsonfilter -e '@.board_name' | grep rutx)" ]; then
if [ -n "$(ubus call system board | jsonfilter -e '@.board_name' | grep rutx)" ] && [ -z "$(uci show system | grep WAN_ETH)" ]; then
uci -q batch <<-EOF >/dev/null
add system led
set system.@led[-1].sysfs='wan_wifi_4'

View file

@ -0,0 +1,19 @@
#!/bin/sh
source /etc/os-release
if [ "$ID" = "openmptcprouter" ]; then
cat > "/etc/opkg/customfeeds.conf" <<-EOF
src/gz openwrt_luci https://packages.openmptcprouter.com/${VERSION_ID}/${OPENWRT_ARCH}/luci
src/gz openwrt_packages https://packages.openmptcprouter.com/${VERSION_ID}/${OPENWRT_ARCH}/packages
src/gz openwrt_base https://packages.openmptcprouter.com/${VERSION_ID}/${OPENWRT_ARCH}/base
src/gz openwrt_routing https://packages.openmptcprouter.com/${VERSION_ID}/${OPENWRT_ARCH}/routing
src/gz openwrt_telephony https://packages.openmptcprouter.com/${VERSION_ID}/${OPENWRT_ARCH}/telephony
EOF
TARGET="$(cat /etc/banner | awk '/TARGET/ {print $2}')"
cat > "/etc/opkg/distfeeds.conf" <<-EOF
src/gz openmptcprouter_core https://download.openmptcprouter.com/release/${VERSION_ID}/${TARGET}/targets/${OPENWRT_BOARD}/packages
src/gz openmptcprouter_base https://download.openmptcprouter.com/release/${VERSION_ID}/${TARGET}/packages/${OPENWRT_ARCH}/base
src/gz openmptcprouter_luci https://download.openmptcprouter.com/release/${VERSION_ID}/${TARGET}/packages/${OPENWRT_ARCH}/luci
src/gz openmptcprouter_openmptcprouter https://download.openmptcprouter.com/release/${VERSION_ID}/${TARGET}/packages/${OPENWRT_ARCH}/openmptcprouter
src/gz openmptcprouter_packages https://download.openmptcprouter.com/release/${VERSION_ID}/${TARGET}/packages/${OPENWRT_ARCH}/packages
EOF
fi

View file

@ -1,6 +1,7 @@
#!/bin/sh /etc/rc.common
#
# Copyright (C) 2017-2019 Yousong Zhou <yszhou4tech@gmail.com>
# Copyright (C) 2019-2021 Ycarus (Yannick Chabanois) <ycarus@zugaina.org> for OpenMPTCProuter
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
@ -146,7 +147,8 @@ ss_rules_cb() {
ss_redir_ports() {
port=$(uci -q get shadowsocks-libev.$1.local_port)
server=$(uci -q get shadowsocks-libev.$1.server)
if [ "$server" = "$2" ] || [ "$2" = "" ]; then
disabled=$(uci -q get shadowsocks-libev.$1.disabled)
if [ "$disabled" != "1" ] && ([ "$server" = "$2" ] || [ "$2" = "" ]); then
if [ "$port" -lt "$min_ss_redir_ports" ]; then
min_ss_redir_ports=$port
fi
@ -184,7 +186,8 @@ ss_rules() {
eval "$(validate_ss_rules_section "$cfg" ss_validate_mklocal)"
validate_ss_rules_section "$cfg" || return 1
[ "$disabled" = 0 ] || return 0
[ "$disabled" != "1" ] || return 0
[ "$(uci -q get shadowsocks-libev.${cfgrulesserver}.disabled)" != "1" ] || return 0
if [ "$ss_rules_redir_tcp_$redir_tcp" = "all" ]; then
min_ss_redir_ports="65535"
max_ss_redir_ports="0"
@ -229,6 +232,26 @@ ss_rules() {
src_ips_bypass6="$(echo "$src_ips_bypass" | grep -o '\([0-9a-fA-F]\{0,4\}:\)\{1,7\}[0-9a-fA-F]\{0,4\}' | sort -u)"
src_ips_forward6="$(echo "$src_ips_forward" | grep -o '\([0-9a-fA-F]\{0,4\}:\)\{1,7\}[0-9a-fA-F]\{0,4\}' | sort -u)"
src_ips_checkdst6="$(echo "$src_ips_checkdst" | grep -o '\([0-9a-fA-F]\{0,4\}:\)\{1,7\}[0-9a-fA-F]\{0,4\}' | sort -u)"
[ -z "$dst_ips_bypass4" ] && [ -z "$dst_ips_bypass6" ] && {
dst_ips_bypass4="$dst_ips_bypass"
dst_ips_bypass6="$dst_ips_bypass"
}
[ -z "$dst_ips_forward4" ] && [ -z "$dst_ips_forward6" ] && {
dst_ips_forward4="$dst_ips_forward"
dst_ips_forward6="$dst_ips_forward"
}
[ -z "$src_ips_bypass4" ] && [ -z "$src_ips_bypass6" ] && {
src_ips_bypass4="$src_ips_bypass"
src_ips_bypass6="$src_ips_bypass"
}
[ -z "$src_ips_forward4" ] && [ -z "$src_ips_forward6" ] && {
src_ips_forward4="$src_ips_forward"
src_ips_forward6="$src_ips_forward"
}
[ -z "$src_ips_checkdst4" ] && [ -z "$src_ips_checkdst6" ] && {
src_ips_checkdst4="$src_ips_checkdst"
src_ips_checkdst6="$src_ips_checkdst"
}
[ "$dst_forward_recentrst" = 0 ] || args="$args --dst-forward-recentrst"
ss_rules_call
@ -290,6 +313,7 @@ start_service() {
# Add rule to match traffic marked by firewall for bypass
ip rule add prio 1 fwmark 0x539 lookup 991337 > /dev/null 2>&1
rules_up
[ -f /etc/firewall.gre-tunnel ] && sh /etc/firewall.gre-tunnel > /dev/null 2>&1
}
stop_service() {
@ -297,8 +321,12 @@ stop_service() {
rm -rf "$ss_confdir"
}
reload_service() {
restart "$@"
}
rules_exist() {
[ -n "$(iptables -t nat -L -n | grep ssr)" ] && return 0
[ -n "$(iptables-save | grep 'A ssr')" ] && return 0
return 1
}
@ -328,7 +356,8 @@ rules_up() {
config_foreach ss_rules_restart "$cfgtype" "$cfgtype"
done
config_foreach ss_rules ss_rules
[ -f /etc/init.d/omr-bypass ] && {
[ -z "$(iptables-save | grep :ssr)" ] && logger -t "Shadowsocks" "Rules not applied"
[ -f /etc/init.d/omr-bypass ] && [ -z "$(pgrep -f omr-bypass)" ] && {
logger -t "Shadowsocks" "Reload omr-bypass rules"
/etc/init.d/omr-bypass reload_rules
}

View file

@ -414,12 +414,17 @@ add_v2ray_redirect_rules() {
# This part need a rewrite
v2ray-rules -f
v2ray-rules -l ${port} -L ${port} -s $OUTBOUND_SERVERS_V4 --rule-name def --src-default forward --dst-default forward --local-default forward
logger -t "v2ray" "v2ray-rules -l ${port} -L ${port} -s $OUTBOUND_SERVERS_V4 --rule-name def --src-default forward --dst-default forward --local-default forward"
commandline="-l ${port} -s $OUTBOUND_SERVERS_V4 --rule-name def --src-default forward --dst-default forward --local-default forward"
[ "$(uci -q get v2ray.main_transparent_proxy.redirect_udp)" = "1" ] && commandline="$commandline -L ${port}"
v2ray-rules $commandline
[ "$(uci -q get v2ray.main.inbounds | grep omr6)" != "" ] && {
v2ray-rules6 -f
v2ray-rules6 -l $((port+1)) -L $((port+1)) -s $OUTBOUND_SERVERS_V6 --rule-name def --src-default forward --dst-default forward --local-default forward
commandline="-l $((port+1)) -L $((port+1)) -s $OUTBOUND_SERVERS_V6 --rule-name def --src-default forward --dst-default forward --local-default forward"
[ "$(uci -q get v2ray.main_transparent_proxy.redirect_udp)" = "1" ] && commandline="$commandline -L ${port+1}"
v2ray-rules6 $commandline
}
[ -f /etc/init.d/omr-bypass ] && {
[ -f /etc/init.d/omr-bypass ] && [ -z "$(pgrep -f omr-bypass)" ] && {
logger -t "v2ray" "Reload omr-bypass rules"
/etc/init.d/omr-bypass reload_rules
}
@ -2101,7 +2106,7 @@ rules_up() {
logger -t "v2ray" "Rules UP"
add_v2ray_redirect_rules
}
[ -f /etc/init.d/omr-bypass ] && {
[ -f /etc/init.d/omr-bypass ] && [ -z "$(pgrep -f omr-bypass)" ] && {
logger -t "v2ray" "Reload omr-bypass rules"
/etc/init.d/omr-bypass reload_rules
}