1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00
This commit is contained in:
suyuan 2023-11-23 11:41:40 +08:00
commit eb129b76f3
23 changed files with 602 additions and 2516 deletions

58
cryptodev-linux/Makefile Normal file
View file

@ -0,0 +1,58 @@
#
# Copyright (C) 2014 OpenWrt.org
# Copyright (C) 2023 Yannick Chabanois (Ycarus) for OpenMPTCProuter
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id$
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=cryptodev-linux
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/$(PKG_NAME)/$(PKG_NAME).git
PKG_SOURCE_VERSION:=bb8bc7cf60d2c0b097c8b3b0e807f805b577a53f
PKG_VERSION:=1.13-$(PKG_SOURCE_VERSION)
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=Yannick Chabanois <contact@openmptcprouter.com>
include $(INCLUDE_DIR)/package.mk
define KernelPackage/cryptodev
SUBMENU:=Cryptographic API modules
TITLE:=Driver for cryptographic acceleration
URL:=http://cryptodev-linux.org/
VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
DEPENDS:=+kmod-crypto-authenc +kmod-crypto-hash
FILES:=$(PKG_BUILD_DIR)/cryptodev.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,50,cryptodev)
MODPARAMS.cryptodev:=cryptodev_verbosity=-1
endef
define KernelPackage/cryptodev/description
This is a driver for that allows to use the Linux kernel supported
hardware ciphers by user-space applications.
endef
define Build/Configure
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
$(KERNEL_MAKE_FLAGS) \
KERNEL_DIR="$(LINUX_DIR)"
endef
define Build/InstallDev
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/crypto
$(CP) $(PKG_BUILD_DIR)/crypto/cryptodev.h $(STAGING_DIR)/usr/include/crypto/
endef
$(eval $(call KernelPackage,cryptodev))

View file

@ -15,6 +15,8 @@ PKG_SOURCE_VERSION:=4333aa705efd9c86c76809614d20dc5ebf43da7f
PKG_NAME:=dsvpn
PKG_VERSION:=0.1.5-$(PKG_SOURCE_VERSION)
PKG_RELEASE:=1
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk

View file

@ -14,6 +14,8 @@ PKG_SOURCE_VERSION:=32267e86a6da05b285bb3bf2b136c105dc0af4bb
PKG_NAME:=glorytun-udp
PKG_VERSION:=0.3.4-$(PKG_SOURCE_VERSION)
PKG_RELEASE:=23
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_FIXUP:=autoreconf

View file

@ -15,7 +15,8 @@ PKG_SOURCE_VERSION:=0c3b03cf0215e0896fd8e7e91be92efa77f6a2d1
PKG_SOURCE:=glorytun-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/Ysurac/glorytun.git
PKG_VERSION:=0.0.35-$(PKG_SOURCE_VERSION)
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk

View file

@ -1,5 +1,5 @@
#
# Copyright (C) 2018-2019 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
# Copyright (C) 2018-2023 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@ -10,11 +10,12 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ipcalc
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://github.com/nmav/ipcalc.git
PKG_SOURCE_URL:=https://gitlab.com/ipcalc/ipcalc.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=e9f88461f2585575d12fc95f5eeb9996b863f5af
PKG_SOURCE_VERSION:=d8a2fe29a89f0f9f0d44a7b15e260c74f0e8388b
PKG_MAINTAINER:=Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILE:=COPYING
include $(INCLUDE_DIR)/package.mk

View file

@ -378,6 +378,7 @@ function wizard_add()
end
ucic:set("network",intf,"defaultroute",0)
ucic:set("network",intf,"peerdns",0)
ucic:set("network",intf,"delegate",0)
if ipaddr ~= "" then
ucic:set("network",intf,"ipaddr",ipaddr:gsub("%s+", ""))
ucic:set("network",intf,"netmask",netmask:gsub("%s+", ""))

View file

@ -478,6 +478,7 @@
<label class="cbi-value-title"><%:Label%></label>
<div class="cbi-value-field">
<input type="hidden" id="cbid.network.<%=ifname%>.lan" name="cbid.network.<%=ifname%>.lan" value="1">
<input type="hidden" id="cbid.network.<%=ifname%>.gateway" name="cbid.network.<%=ifname%>.gateway" value="<%=uci:get("network",ifname,"gateway")%>">
<input type="text" id="cbid.network.<%=ifname%>.label" name="cbid.network.<%=ifname%>.label" class="cbi-input-text" value="<%=uci:get("network",ifname,"label")%>">
<br />
<div class="cbi-value-description">

View file

@ -121,13 +121,26 @@ if ([ -f /etc/init.d/shadowsocks-libev ] && [ "$(uci -q get shadowsocks-libev.ss
[ -n "$(uci -q changes openmptcprouter)" ] && uci -q commit openmptcprouter
fi
restart_omrtracker() {
[ -n "$(pgrep -f $1)" ] && return
config_get multipath "$1" multipath
config_get ifenabled "$1" auto
[ -z "$multipath" ] || [ "$multipath" = "off" ] && return
[ "$ifenabled" = "0" ] && return
/etc/init.d/omr-tracker start_interface "$1"
sleep 10
}
config_load network
config_foreach restart_omrtracker interface
if [ -f /etc/init.d/shadowsocks-libev ] && [ "$(uci -q get shadowsocks-libev.sss0.disabled)" != "1" ] && [ "$(uci -q get shadowsocks-libev.sss0.key)" != "" ] && [ "$(uci -q get shadowsocks-libev.sss0.server)" != "" ] && [ "$(uci -q get shadowsocks-libev.sss0.server)" != "192.18.1.3" ] && [ "$(pgrep -f omr-tracker-ss)" = "" ] && [ "$(pgrep -f '/etc/init.d/omr-tracker')" = "" ]; then
_log "Can't find omr-tracker-ss, restart omr-tracker..."
_log "Can't find omr-tracker-ss for Shadowsocks libev, restart omr-tracker..."
/etc/init.d/omr-tracker restart 2>&1 >/dev/null
fi
if [ -f /etc/init.d/shadowsocks-rust ] && [ "$(uci -q get shadowsocks-rust.sss0.disabled)" != "1" ] && [ "$(uci -q get shadowsocks-rust.sss0.key)" != "" ] && [ "$(uci -q get shadowsocks-rust.sss0.server)" != "" ] && [ "$(uci -q get shadowsocks-libev.rust.server)" != "192.18.1.3" ] && [ "$(pgrep -f omr-tracker-ss)" = "" ] && [ "$(pgrep -f '/etc/init.d/omr-tracker')" = "" ]; then
_log "Can't find omr-tracker-ss, restart omr-tracker..."
_log "Can't find omr-tracker-ss for Shadowsocks Rust, restart omr-tracker..."
/etc/init.d/omr-tracker restart 2>&1 >/dev/null
fi

View file

@ -15,6 +15,9 @@ PKG_VERSION:=0.12-$(PKG_SOURCE_VERSION)
PKG_RELEASE:=1
PKG_MAINTAINER:=Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=COPYING
PKG_FORTIFY_SOURCE:=2
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
@ -25,7 +28,7 @@ include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libell @(LINUX_5_15||LINUX_6_1)
DEPENDS:=+libell @(LINUX_5_15||LINUX_6_1||LINUX_6_6)
TITLE:=mptcpd
URL:=https://github.com/intel/mptcpd
endef

View file

@ -20,6 +20,9 @@ PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_URL:=https://github.com/vel21ripn/nDPI.git
PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_BUILD_PARALLEL:=0
PKG_FORTIFY_SOURCE:=0

View file

@ -43,7 +43,7 @@ trap : HUP INT TERM
if [ -z "$INTERFACE" ]; then
curl -4 -o /dev/null $HOST || echo
else
/etc/init.d/sqm stop $INTERFACE
[ -n "$(tc qdisc show dev $INTERFACE | grep ingress)" ] && /etc/init.d/sqm stop $INTERFACE
domain=$(echo $HOST | awk -F/ '{print $3}')
hostip=$(dig +nocmd +noall +answer A $domain | grep -v CNAME | awk '{print $5}' | tr '\n' ' ')
if [ -n "$(ipset list 2>/dev/null | grep ss_rules)" ]; then

View file

@ -35,7 +35,7 @@ if [ -n "$HOST" ] && [ -n "$PORT" ] && [ -n "$USERNAME" ] && [ -n "$PASSWORD" ];
[ -z "$FASTTEST" ] && echo "Disable SQM bandwidth limit on $INTERFACE"
[ -z "$FASTTEST" ] && echo "Download test via server ${SERVER}:"
if [ -n "$INTERFACE" ]; then
[ -n "$(tc qdisc | grep $INTERFACE | grep bandwidth)" ] && {
[ -n "$(tc qdisc show dev $INTERFACE | grep bandwidth)" ] && {
export SQM_VERBOSITY_MIN=10
export SQM_VERBOSITY_MAX=0
export SQM_SYSLOG=1

View file

@ -0,0 +1,472 @@
#!/bin/sh
. /lib/functions.sh
_setup_macaddr() {
uci -q get "network.$1.macaddr" >/dev/null && return
uci -q set "network.$1.macaddr=$2"
}
_setup_macvlan() {
uci -q get "network.$1_dev.ifname" >/dev/null && return
# do not create macvlan for vlan
local _ifname
_ifname=$(uci -q get "network.$1.device")
case "$_ifname" in
eth*.*) return ;;
esac
uci -q batch <<-EOF
set network.$1_dev=device
set network.$1_dev.name=$1
set network.$1_dev.type=macvlan
set network.$1_dev.ifname=$_ifname
set network.$1_dev.mode='vepa'
set network.$1_dev.txqueuelen=1000
set network.$1.device=$1
set network.$1.type=macvlan
set network.$1.masterintf=$_ifname
EOF
_macaddr=$(uci -q get "network.$1.macaddr")
_setup_macaddr "$1_dev" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}"
}
#_setup_macvlan_update() {
# uci -q get "network.$1_dev.device" >/dev/null || return
#
# uci -q batch <<-EOF
# set macvlan.$1=macvlan
# set macvlan.$1.device=$_ifname
# commit macvlan
# EOF
#}
_setup_mptcp_handover_to_on() {
if [ "$(uci -q get network.$1.multipath)" = "handover" ]; then
uci -q set network.$1.multipath=on
fi
if [ "$(uci -q get openmptcprouter.$1.multipath)" = "handover" ]; then
uci -q set openmptcprouter.$1.multipath=on
fi
}
_setup_multipath_off() {
uci -q get "network.$1.multipath" >/dev/null && return
uci -q set "network.$1.multipath=off"
}
_setup_wan_interface() {
uci -q batch <<-EOF
set network.$1=interface
set network.$1.device=$2
set network.$1.proto=static
set network.$1.ip4table=wan
set network.$1.multipath=$3
set network.$1.defaultroute=0
set network.$1.delegate=0
set network.$1.addlatency=0
set network.${1}_dev=device
set network.${1}_dev.name=$2
set network.${1}_dev.txqueuelen=1000
commit network
add_list firewall.@zone[1].network=$1
commit firewall
EOF
[ -n "$4" ] && uci -q set network.$1.type=$4
}
config_load network
#config_foreach _setup_macvlan_update interface
config_foreach _setup_mptcp_handover_to_on interface
if [ "$(uci -q show network.lan | grep multipath)" != "" ]; then
exit 0
fi
lanif="eth0"
if [ "$(grep rockchip /etc/os-release)" != "" ]; then
lanif="eth1"
elif [ "$(grep filogic /etc/os-release)" != "" ]; then
lanif="eth1"
elif [ -d /sys/class/net/lan0 -o -n "$(ip link | grep ' lan0')" ] && [ -d /sys/class/net/wan -o -n "$(ip link | grep ' wan@')" -o -n "$(ip link | grep ' wan:')" ]; then
lanif="wan"
elif [ -d /sys/class/net/lan1 -o -n "$(ip link | grep ' lan1')" ] && [ -d /sys/class/net/wan -o -n "$(ip link | grep ' wan@')" -o -n "$(ip link | grep ' wan:')" ]; then
lanif="wan"
elif [ -d /sys/class/net/lan ] || [ -n "$(ip link | grep ' lan')" ]; then
lanif="lan"
elif [ "$(swconfig list 2>&1 | grep switch0)" != "" ] && [ "$(cat /etc/board.json | jsonfilter -q -e '@.model.platform' | tr -d '\n')" = "RUTX" ]; then
lanif="eth1"
uci -q batch <<-EOF
set network.@switch_vlan[0]=switch_vlan
set network.@switch_vlan[0].device='switch0'
set network.@switch_vlan[0].vlan=1
set network.@switch_vlan[0].ports='1t 2t 3t 4t 0t'
set network.@switch_vlan[1]=switch_vlan
set network.@switch_vlan[1].device='switch0'
set network.@switch_vlan[1].vlan=2
set network.@switch_vlan[1].ports='0 5'
add network switch_vlan
set network.@switch_vlan[2].device='switch0'
set network.@switch_vlan[2].vlan=3
set network.@switch_vlan[2].ports='0t 1'
add network switch_vlan
set network.@switch_vlan[3].device='switch0'
set network.@switch_vlan[3].vlan=4
set network.@switch_vlan[3].ports='0t 2'
add network switch_vlan
set network.@switch_vlan[4].device='switch0'
set network.@switch_vlan[4].vlan=5
set network.@switch_vlan[4].ports='0t 3'
add network switch_vlan
set network.@switch_vlan[5].device='switch0'
set network.@switch_vlan[5].vlan=6
set network.@switch_vlan[5].ports='0t 4'
EOF
elif [ "$(swconfig list 2>&1 | grep switch0)" != "" ] && [ -d '/sys/class/net/eth1.5' ]; then
lanif="eth1.5"
uci -q batch <<-EOF
set network.@switch_vlan[0]=switch_vlan
set network.@switch_vlan[0].device='switch0'
set network.@switch_vlan[0].vlan=1
set network.@switch_vlan[0].vid=1
set network.@switch_vlan[0].ports='3 5t'
add network switch_vlan
set network.@switch_vlan[1].device='switch0'
set network.@switch_vlan[1].vlan=2
set network.@switch_vlan[1].vid=2
set network.@switch_vlan[1].ports='2 5t'
add network switch_vlan
set network.@switch_vlan[2].device='switch0'
set network.@switch_vlan[2].vlan=3
set network.@switch_vlan[2].vid=3
set network.@switch_vlan[2].ports='1 5t'
add network switch_vlan
set network.@switch_vlan[3].device='switch0'
set network.@switch_vlan[3].vlan=4
set network.@switch_vlan[3].vid=4
set network.@switch_vlan[3].ports='0 5t'
add network switch_vlan
set network.@switch_vlan[4].device='switch0'
set network.@switch_vlan[4].vlan=5
set network.@switch_vlan[4].vid=5
set network.@switch_vlan[4].ports='4 6t'
EOF
elif [ "$(swconfig list 2>&1 | grep switch0)" != "" ] && [ -d /sys/class/net/eth1 ] && [ "$(grep ipq806x /etc/os-release)" != "" ]; then
lanif="eth0.2"
elif [ "$(swconfig list 2>&1 | grep switch0)" != "" ] && [ -d /sys/class/net/eth1 ]; then
lanif="eth1"
elif [ ! -d /sys/class/net/eth1 ] && [ -d /sys/class/net/eth0 ]; then
lanif="eth0"
fi
uci -q batch <<-EOF
delete network.lan.type
set network.lan=interface
set network.lan.proto=static
set network.lan.ipaddr=192.168.100.1
set network.lan.netmask=255.255.255.0
set network.lan.device=${lanif}
set network.lan.ifname=${lanif}
set network.lan.metric=2048
set network.lan.ipv6=0
set network.lan.delegate=0
set network.lan.addlatency=0
set network.lan.txqueuelen=2000
set dhcp.lan.dhcpv4='server'
EOF
uci -q batch <<-EOF
delete network.none
delete network.wan
delete network.if6rd
reorder network.loopback=0
reorder network.globals=1
reorder network.lan=2
set network.globals.multipath=enable
EOF
# Set the ip rule for the lan with a pref of 100
uci -q show network.lan_rule >/dev/null || \
uci -q batch <<-EOF
set network.lan_rule=rule
set network.lan_rule.lookup=lan
set network.lan_rule.priority=100
EOF
if [ "$(uci -q get network.vpn0.proto)" = "none" ]; then
uci -q delete network.vpn0
fi
if [ "$(uci -q get network.wan6.proto)" = "dhcpv6" ]; then
uci -q delete network.wan6
fi
config_load network
config_foreach _setup_multipath_off interface
# Add the lan as a named routing table
if ! grep -s -q "lan" /etc/iproute2/rt_tables; then
echo "50 lan" >> /etc/iproute2/rt_tables
fi
uci -q set network.lan.ip4table='lan'
#uci -q set "network.lan.ip6assign=64"
# Create WAN interfaces
if [ "$(uci -q show network.wan1 | grep multipath)" = "" ] && [ -z "$(uci -q get network.wan1.multipath)" ]; then
if [ "$(grep ipq806x /etc/os-release)" != "" ]; then
_setup_wan_interface wan1 eth1.1 master
_setup_wan_interface wan2 eth1.2 on
_setup_wan_interface wan3 eth1.3 on
_setup_wan_interface wan4 eth1.4 on
elif [ "$(grep rockchip /etc/os-release)" != "" ]; then
_setup_wan_interface wan1 eth0 master macvlan
_setup_wan_interface wan2 eth0 on macvlan
_setup_macvlan wan1
_setup_macvlan wan2
elif [ "$(cat /etc/board.json | jsonfilter -q -e '@.model.platform' | tr -d '\n')" = "RUTX" ]; then
_setup_wan_interface wan1 eth0.3 master
_setup_wan_interface wan2 eth0.4 on
_setup_wan_interface wan3 eth0.5 on
_setup_wan_interface wan4 eth0.6 on
elif [ "$(swconfig list 2>&1 | grep switch0)" != "" ]; then
_setup_wan_interface wan1 eth0.1 master
_setup_wan_interface wan2 eth0.2 on
_setup_wan_interface wan3 eth0.3 on
_setup_wan_interface wan4 eth0.4 on
elif [ -d /sys/class/net/wan ] || [ -n "$(ip link | grep ' wan:')" ] || [ -n "$(ip link | grep ' wan@')" ]; then
if [ -d /sys/class/net/lan0 -o -n "$(ip link | grep ' lan0')" ] && [ -d /sys/class/net/lan1 -o -n "$(ip link | grep ' lan1')" ]; then
_setup_wan_interface wan1 lan0 master
_setup_wan_interface wan2 lan1 on
_macaddr=$(uci -q get "network.lan0.macaddr")
_setup_macaddr "wan1" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}"
_macaddr=$(uci -q get "network.lan1.macaddr")
_setup_macaddr "wan2" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}"
if [ -d /sys/class/net/lan2 ] || [ -n "$(ip link | grep ' lan2')" ]; then
_setup_wan_interface wan3 lan2 on
_macaddr=$(uci -q get "network.lan2.macaddr")
_setup_macaddr "wan3" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}"
if [ -d /sys/class/net/lan3 ] || [ -n "$(ip link | grep ' lan3')" ]; then
_setup_wan_interface wan4 lan3 on
_macaddr=$(uci -q get "network.lan3.macaddr")
_setup_macaddr "wan4" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}"
fi
fi
elif [ -d /sys/class/net/lan1 -o -n "$(ip link | grep ' lan1')" ] && [ -d /sys/class/net/lan2 -o -n "$(ip link | grep ' lan2')" ]; then
_setup_wan_interface wan1 lan1 master
_setup_wan_interface wan2 lan2 on
_macaddr=$(uci -q get "network.lan1.macaddr")
_setup_macaddr "wan1" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}"
_macaddr=$(uci -q get "network.lan2.macaddr")
_setup_macaddr "wan2" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}"
if [ -d /sys/class/net/lan3 ] || [ -n "$(ip link | grep ' lan3')" ]; then
_setup_wan_interface wan3 lan3 on
_macaddr=$(uci -q get "network.lan3.macaddr")
_setup_macaddr "wan3" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}"
if [ -d /sys/class/net/lan4 ] || [ -n "$(ip link | grep ' lan4')" ]; then
_setup_wan_interface wan4 lan4 on
_macaddr=$(uci -q get "network.lan4.macaddr")
_setup_macaddr "wan4" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}"
fi
fi
else
_setup_wan_interface wan1 wan master macvlan
_setup_wan_interface wan2 wan on macvlan
_setup_macvlan wan1
_setup_macvlan wan2
fi
elif [ -d /sys/class/net/lan1 -o -n "$(ip link | grep ' lan1')" ] && [ -d /sys/class/net/lan2 -o -n "$(ip link | grep ' lan2')" ] && [ -d /sys/class/net/lan3 -o -n "$(ip link | grep ' lan3')" ] && [ -d /sys/class/net/lan4 -o -n "$(ip link | grep ' lan4')" ]; then
_setup_wan_interface wan1 lan1 master
_setup_wan_interface wan2 lan2 on
_macaddr=$(uci -q get "network.lan1.macaddr")
_setup_macaddr "wan1" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}"
_macaddr=$(uci -q get "network.lan2.macaddr")
_setup_macaddr "wan2" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}"
_setup_wan_interface wan3 lan3 on
_macaddr=$(uci -q get "network.lan3.macaddr")
_setup_macaddr "wan3" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}"
_setup_wan_interface wan4 lan4 on
_macaddr=$(uci -q get "network.lan4.macaddr")
_setup_macaddr "wan4" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}"
elif [ -d /sys/class/net/wan1 ] || [ -n "$(ip link | grep ' wan1')" ]; then
if [ -d /sys/class/net/wan2 ] || [ -n "$(ip link | grep ' wan2')" ]; then
_setup_wan_interface wan1 wan1 master
_setup_wan_interface wan2 wan2 on
_macaddr=$(uci -q get "network.wan1.macaddr")
_setup_macaddr "wan1" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}"
_macaddr=$(uci -q get "network.wan2.macaddr")
_setup_macaddr "wan2" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}"
if [ -d /sys/class/net/wan3 ] || [ -n "$(ip link | grep ' wan3')" ]; then
_setup_wan_interface wan3 wan3 on
_macaddr=$(uci -q get "network.wan3.macaddr")
_setup_macaddr "wan3" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}"
if [ -d /sys/class/net/wan4 ] || [ -n "$(ip link | grep ' wan4')" ]; then
_setup_wan_interface wan4 wan4 on
_macaddr=$(uci -q get "network.wan4.macaddr")
_setup_macaddr "wan4" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}"
fi
fi
else
_setup_wan_interface wan1 wan1 master macvlan
_setup_wan_interface wan2 wan1 on macvlan
_setup_macvlan wan1
_setup_macvlan wan2
fi
elif [ -d /sys/class/net/eth1 ] || [ -n "$(ip link | grep ' eth1:')" ]; then
if [ -d /sys/class/net/eth2 ] || [ -n "$(ip link | grep ' eth2:')" ]; then
_setup_wan_interface wan1 eth1 master
_setup_wan_interface wan2 eth2 on
if [ -d /sys/class/net/eth3 ] || [ -n "$(ip link | grep ' eth3:')" ]; then
_setup_wan_interface wan3 eth3 on
fi
if [ -d /sys/class/net/eth4 ] || [ -n "$(ip link | grep ' eth4:')" ]; then
_setup_wan_interface wan4 eth4 on
fi
if [ -d /sys/class/net/eth5 ] || [ -n "$(ip link | grep ' eth5:')" ]; then
_setup_wan_interface wan5 eth5 on
fi
if [ -d /sys/class/net/eth6 ] || [ -n "$(ip link | grep ' eth6:')" ]; then
_setup_wan_interface wan6 eth6 on
fi
if [ -d /sys/class/net/eth7 ] || [ -n "$(ip link | grep ' eth7:')" ]; then
_setup_wan_interface wan7 eth7 on
fi
if [ -d /sys/class/net/eth8 ] || [ -n "$(ip link | grep ' eth8:')" ]; then
_setup_wan_interface wan8 eth8 on
fi
else
_setup_wan_interface wan1 eth1 master macvlan
_setup_wan_interface wan2 eth1 on macvlan
_setup_macvlan wan1
_setup_macvlan wan2
fi
elif [ -d /sys/class/net/eth0.1 ] && [ -d /sys/class/net/eth0.2 ]; then
_setup_wan_interface wan1 eth0.1 master
_setup_wan_interface wan2 eth0.2 on
else
_setup_wan_interface wan1 eth0 master macvlan
_setup_wan_interface wan2 eth0 on macvlan
_setup_macvlan wan1
_setup_macvlan wan2
fi
#uci -q batch <<-EOF
#add network route6
#set network.@route6[-1].interface='lan'
#set network.@route6[-1].target='::/0'
#EOF
fi
# Replace omrip to oip in config for old config
sed -i 's/omrip/oip/g' /etc/config/*
# Fix config from ifname to device for loopback
uci -q delete network.loopback.ifname
uci -q set network.loopback.device='lo'
local board=$(board_name)
if ([ "$board" = "teltonika,rutx" ] || [ "$board" = "teltonika,rutx12" ] || [ "$board" = "teltonika,rutx50" ]) && [ -f /sbin/mnf_info ]; then
# Same part for RUTX12 and RUTX11, maybe other RUTX ?
uci -q batch <<-EOF
set network.modem1=interface
set network.modem1.proto='modemmanager'
set network.modem1.apn=''
set network.modem1.auth='none'
set network.modem1.iptype='ipv4v6'
set network.modem1.addlatency='0'
set network.modem1.force_link='1'
set network.modem1.device='/sys/devices/platform/soc/60f8800.usb2/6000000.dwc3/xhci-hcd.1.auto/usb3/3-1'
set network.modem1.peerdns='0'
set network.modem1.multipath='on'
set network.modem1.defaultroute='0'
set network.modem1.delegate='0'
commit network
add_list firewall.@zone[1].network='modem1'
commit firewall
EOF
if [ "$(mnf_info -n)" = "RUTX1200XXXX" ]; then
uci -q batch <<-EOF
set network.modem2=interface
set network.modem2.proto='modemmanager'
set network.modem2.apn=''
set network.modem2.auth='none'
set network.modem2.iptype='ipv4v6'
set network.modem2.addlatency='0'
set network.modem2.force_link='1'
set network.modem2.device='/sys/devices/platform/soc/8af8800.usb3/8a00000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.2'
set network.modem2.peerdns='0'
set network.modem2.delegate='0'
set network.modem2.multipath='on'
set network.modem2.defaultroute='0'
set network.modem2.ip4table=wan
commit network
add_list firewall.@zone[1].network='modem2'
commit firewall
EOF
fi
if [ "$(mnf_info -n)" = "RUTX5000XXXX" ]; then
uci -q batch <<-EOF
set network.modem1.device='/sys/devices/platform/soc/8af8800.usb3/8a00000.dwc3/xhci-hcd.0.auto/usb2/2-1'
EOF
fi
uci -q batch <<-EOF
set network.wifi24=interface
set network.wifi24.proto='none'
set network.wifi5=interface
set network.wifi5.proto='none'
commit network
set wireless.radio0.cell_density='0'
set wireless.default_radio0.network='wifi24'
set wireless.radio1.cell_density='0'
set wireless.default_radio1.network='wifi5'
commit wireless
add ucitrack led
set ucitrack.@led[-1].init=led
del_list ucitrack.@firewall[0].affects=led
add_list ucitrack.@firewall[0].affects=led
commit ucitrack
EOF
fi
if [ "$board" = "z8102ax" ]; then
uci -q batch <<-EOF
set network.modem1=interface
set network.modem1.proto='modemmanager'
set network.modem1.apn=''
set network.modem1.auth='none'
set network.modem1.iptype='ipv4v6'
set network.modem1.addlatency='0'
set network.modem1.force_link='1'
set network.modem1.device='/sys/devices/platform/11200000.usb/usb1/1-1/1-1.1'
set network.modem1.peerdns='0'
set network.modem1.delegate='0'
set network.modem1.multipath='on'
set network.modem1.defaultroute='0'
set network.modem2=interface
set network.modem2.proto='modemmanager'
set network.modem2.apn=''
set network.modem2.auth='none'
set network.modem2.iptype='ipv4v6'
set network.modem2.addlatency='0'
set network.modem2.force_link='1'
set network.modem2.device='/sys/devices/platform/11200000.usb/usb1/1-1/1-1.2'
set network.modem2.peerdns='0'
set network.modem2.delegate='0'
set network.modem2.multipath='on'
set network.modem2.defaultroute='0'
commit network
add_list firewall.@zone[1].network='modem1'
add_list firewall.@zone[1].network='modem2'
commit firewall
EOF
fi
# set network.lan.ipaddr='192.168.5.10'
# set network.lan.gateway='192.168.5.1'
uci -q commit macvlan
uci -q commit network
uci -q commit dhcp
rm -f /tmp/luci-indexcache
exit 0

View file

@ -7,14 +7,16 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=r8125
PKG_VERSION:=9.010.01-1
PKG_VERSION:=9.012.03-1
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/awesometic/realtek-r8125-dkms/tar.gz/$(PKG_VERSION)?
PKG_HASH:=81fb9a100e6cefb421557639b476fd03af61a99c55bc8fb03c6e396532bd0944
PKG_HASH:=7964aacf4a2873cbe4133aeca830bd0725f819ea286bab162026ff283510144f
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/realtek-$(PKG_NAME)-dkms-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk

View file

@ -1,14 +0,0 @@
--- a/src/r8125.h
+++ b/src/r8125.h
@@ -633,7 +633,11 @@
typedef struct napi_struct *napi_ptr;
typedef int napi_budget;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
+#define RTL_NAPI_CONFIG(ndev, priv, function, weight) netif_napi_add_weight(ndev, &priv->napi, function, weight)
+#else
#define RTL_NAPI_CONFIG(ndev, priv, function, weight) netif_napi_add(ndev, &priv->napi, function, weight)
+#endif
#define RTL_NAPI_QUOTA(budget, ndev) min(budget, budget)
#define RTL_GET_PRIV(stuct_ptr, priv_struct) container_of(stuct_ptr, priv_struct, stuct_ptr)
#define RTL_GET_NETDEV(priv_ptr) struct net_device *dev = priv_ptr->dev;

View file

@ -7,12 +7,14 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=r8152
PKG_VERSION:=2.16.3.20220914
PKG_VERSION:=2.17.1.20230903
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/wget/realtek-r8152-linux/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=61ed7af34c8882c6028ddd1a27bb78fb5bfba41211f84dd7a06e4dc84dbe9a9a
PKG_HASH:=be19d9a984459762283f1ddc77f58746133a79051c01bb73f0b35fa843d47622
PKG_LICENSE:=GPL-2.0-only
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/realtek-$(PKG_NAME)-linux-$(PKG_VERSION)

View file

@ -7,13 +7,14 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=r8168
PKG_VERSION:=8.051.02
PKG_VERSION:=8.052.01
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/BROBIRD/openwrt-r8168.git
PKG_SOURCE_VERSION:=4f6cfe1ca12fb772deed57f1d2d1062af041ad07
PKG_MIRROR_HASH:=6b149f5eb3b9e1dc50867a694984d253aa58d97dd5fbab30eb405d2d7b2be587
PKG_SOURCE_VERSION:=a1d4d30ce44c6d1d5de559d8dfdda7a65b1918a3
PKG_LICENSE:=GPPL-2.0-only
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)

View file

@ -0,0 +1,13 @@
--- a/src/r8168_n.c 2023-10-20 17:46:41.593467802 +0200
+++ b/src/r8168_n.c 2023-10-20 17:47:59.460123974 +0200
@@ -82,6 +82,10 @@
#include <linux/mdio.h>
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,5,0)
+#include <net/gso.h>
+#endif
+
#include <asm/io.h>
#include <asm/irq.h>

File diff suppressed because it is too large Load diff

View file

@ -1,212 +0,0 @@
#!/bin/bash
# cake-autorate automatically adjusts bandwidth for CAKE in dependence on detected load and RTT
# cake-autorate_config.sh is a script that sets up defaults for cake-autorate
# Author: @Lynx (OpenWrt forum)
# Inspiration taken from: @moeller0 (OpenWrt forum)
INTERFACE=""
# *** OUTPUT AND LOGGING OPTIONS ***
output_processing_stats=1 # enable (1) or disable (0) output monitoring lines showing processing stats
output_load_stats=1 # enable (1) or disable (0) output monitoring lines showing achieved loads
output_reflector_stats=1 # enable (1) or disable (0) output monitoring lines showing reflector stats
output_cake_changes=0 # enable (1) or disable (0) output monitoring lines showing cake bandwidth changes
debug=1 # enable (1) or disable (0) out of debug lines
# This can generate a LOT of records so be careful:
log_DEBUG_messages_to_syslog=0 # enable (1) or disable (0) logging of all DEBUG records into the system log.
# ** Take care with these settings to ensure you won't run into OOM issues on your router ***
# every write the cumulative write time and bytes associated with each log line are checked
# and if either exceeds the configured values below, the log log file is rotated
log_to_file=1 # enable (1) or disable (0) output logging to file (/tmp/cake-autorate.log)
log_file_max_time_mins=10 # maximum time between log file rotations
log_file_max_size_KB=2000 # maximum KB (i.e. bytes/1024) worth of log lines between log file rotations
# log file path defaults to /var/log/
# or, if set below, then ${log_file_path_override}
log_file_path_override=""
# *** STANDARD CONFIGURATION OPTIONS ***
### For multihomed setups, it is the responsibility of the user to ensure that the probes
### sent by this instance of cake-autorate actually travel through these interfaces.
### See ping_extra_args and ping_prefix_string
dl_if=ifb-wan # download interface
ul_if=wan # upload interface
# pinger selection can be any of:
# fping - round robin pinging (rtts)
# ping - (iputils-ping) individual pinging (rtts)
# hping3 - individidual pinging (owds)
pinger_binary=fping
# list of reflectors to use and number of pingers to initiate
# pingers will be initiated with reflectors in the order specified in the list
# additional reflectors will be used to replace any reflectors that go stale
# so e.g. if 6 reflectors are specified and the number of pingers is set to 4, the first 4 reflectors will be used initially
# and the remaining 2 reflectors in the list will be used in the event any of the first 4 go bad
# a bad reflector will go to the back of the queue on reflector rotation
reflectors=(
"114.114.114.114" "114.114.115.115" # 114dns
"119.29.29.29" "182.254.116.116" # DNSPod DNS+
"1.2.4.8" "210.2.4.8" # cnnicDNS
"223.5.5.5" "2223.6.6.6" # aliyundns
"183.60.83.19" "183.60.82.98" # tencent
"180.76.76.76" "122.112.208.1" # baiduyun
"94.140.14.15" "94.140.14.140" "94.140.14.141" "94.140.15.15" "94.140.15.16" # AdGuard
"64.6.65.6" "156.154.70.1" "156.154.70.2" "156.154.70.3" "156.154.70.4" "156.154.70.5" "156.154.71.1" "156.154.71.2" "156.154.71.3" "156.154.71.4" "156.154.71.5" # Neustar
"208.67.220.2" "208.67.220.123" "208.67.220.220" "208.67.222.2" "208.67.222.123" # OpenDNS
"185.228.168.9" "185.228.168.10" # CleanBrowsing
)
randomize_reflectors=1 # enable (1) or disable (0) randomization of reflectors on startup
# Think carefully about the following settings
# to avoid excessive CPU use (proportional with ping interval / number of pingers)
# and to avoid abusive network activity (excessive ICMP frequency to one reflector)
# The author has found an ICMP rate of 1/(0.2/4) = 20 Hz to give satisfactory performance on 4G
no_pingers=6 # number of pingers to maintain
reflector_ping_interval_s=0.3 # (seconds, e.g. 0.2s or 2s)
# delay threshold in ms is the extent of OWD increase to classify as a delay
# these are automatically adjusted based on maximum on the wire packet size
# (adjustment significant at sub 12Mbit/s rates, else negligible)
dl_delay_thr_ms=30 # (milliseconds)
ul_delay_thr_ms=30 # (milliseconds)
# Set either of the below to 0 to adjust one direction only
# or alternatively set both to 0 to simply use cake-autorate to monitor a connection
adjust_dl_shaper_rate=1 # enable (1) or disable (0) actually changing the dl shaper rate
adjust_ul_shaper_rate=1 # enable (1) or disable (0) actually changing the ul shaper rate
min_dl_shaper_rate_kbps=5000 # minimum bandwidth for download (Kbit/s)
base_dl_shaper_rate_kbps=20000 # steady state bandwidth for download (Kbit/s)
max_dl_shaper_rate_kbps=80000 # maximum bandwidth for download (Kbit/s)
min_ul_shaper_rate_kbps=5000 # minimum bandwidth for upload (Kbit/s)
base_ul_shaper_rate_kbps=20000 # steady state bandwidth for upload (KBit/s)
max_ul_shaper_rate_kbps=35000 # maximum bandwidth for upload (Kbit/s)
# sleep functionality saves unecessary pings and CPU cycles by
# pausing all active pingers when connection is not in active use
enable_sleep_function=1 # enable (1) or disable (0) sleep functonality
connection_active_thr_kbps=1000 # threshold in Kbit/s below which dl/ul is considered idle
sustained_idle_sleep_thr_s=60.0 # time threshold to put pingers to sleep on sustained dl/ul achieved rate < idle_thr (seconds)
min_shaper_rates_enforcement=0 # enable (1) or disable (0) dropping down to minimum shaper rates on connection idle or stall
startup_wait_s=0.0 # number of seconds to wait on startup (e.g. to wait for things to settle on router reboot)
# *** ADVANCED CONFIGURATION OPTIONS ***
log_file_export_compress=1 # compress log file exports using gzip and append .gz to export filename
### In multi-homed setups, it is mandatory to use either ping_extra_args
### or ping_prefix_string to direct the pings through $dl_if and $ul_if.
### No universal recommendation exists, because there are multiple
### policy-routing packages available (e.g. vpn-policy-routing and mwan3).
### Typically they either react to a firewall mark set on the pings, or
### provide a convenient wrapper.
###
### In a traditional single-homed setup, there is usually no need for these parameters.
###
### These arguments can also be used for any other purpose - e.g. for setting a
### particular QoS mark.
# extra arguments for ping or fping
# e.g., here is how you can set the correct outgoing interface and
# the firewall mark for ping:
# ping_extra_args="-I wwan0 -m $((0x300))"
# Unfortunately, fping does not offer a command line switch to set
# the firewall mark.
# WARNING: no error checking so use at own risk!
ping_extra_args=""
# a wrapper for ping binary - used as a prefix for the real command
# e.g., when using mwan3, it is recommended to set it like this:
# ping_prefix_string="mwan3 use gpon exec"
# WARNING: the wrapper must exec ping as the final step, not run it as a subprocess.
# Running ping or fping as a subprocess will lead to problems stopping it.
# WARNING: no error checking - so use at own risk!
ping_prefix_string=""
# interval in ms for monitoring achieved rx/tx rates
# this is automatically adjusted based on maximum on the wire packet size
# (adjustment significant at sub 12Mbit/s rates, else negligible)
monitor_achieved_rates_interval_ms=200 # (milliseconds)
# bufferbloat is detected when (bufferbloat_detection_thr) samples
# out of the last (bufferbloat detection window) samples are delayed
bufferbloat_detection_window=6 # number of samples to retain in detection window
bufferbloat_detection_thr=3 # number of delayed samples for bufferbloat detection
# OWD baseline against which to measure delays
# the idea is that the baseline is allowed to increase slowly to allow for path changes
# and slowly enough such that bufferbloat will be corrected well before the baseline increases,
# but it will decrease very rapidly to ensure delays are measured against the shortest path
alpha_baseline_increase=0.001 # how rapidly baseline RTT is allowed to increase
alpha_baseline_decrease=0.9 # how rapidly baseline RTT is allowed to decrease
# OWD delta from baseline is tracked using ewma with alpha set below
alpha_delta_ewma=0.095
# rate adjustment parameters
# bufferbloat adjustment works with the lower of the adjusted achieved rate and adjusted shaper rate
# to exploit that transfer rates during bufferbloat provide an indication of line capacity
# otherwise shaper rate is adjusted up on load high, and down on load idle or low
achieved_rate_adjust_down_bufferbloat=0.9 # how rapidly to reduce achieved rate upon detection of bufferbloat
shaper_rate_adjust_down_bufferbloat=0.9 # how rapidly to reduce shaper rate upon detection of bufferbloat
shaper_rate_adjust_up_load_high=1.01 # how rapidly to increase shaper rate upon high load detected
shaper_rate_adjust_down_load_low=0.99 # how rapidly to return down to base shaper rate upon idle or low load detected
shaper_rate_adjust_up_load_low=1.01 # how rapidly to return up to base shaper rate upon idle or low load detected
# the load is categoried as low if < high_load_thr and high if > high_load_thr relative to the current shaper rate
high_load_thr=0.75 # % of currently set bandwidth for detecting high load
# refractory periods between successive bufferbloat/decay rate changes
# the bufferbloat refractory period should be greater than the
# average time it would take to replace the bufferbloat
# detection window with new samples upon a bufferbloat event
bufferbloat_refractory_period_ms=300 # (milliseconds)
decay_refractory_period_ms=1000 # (milliseconds)
# interval for checking reflector health
reflector_health_check_interval_s=1.0 # (seconds)
# deadline for reflector response not to be classified as an offence against reflector
reflector_response_deadline_s=1.0 # (seconds)
# reflector misbehaving is detected when $reflector_misbehaving_detection_thr samples
# out of the last (reflector misbehaving detection window) samples are offences
# thus with a 1s interval, window 60 and detection_thr 3, this is tantamount to
# 3 offences within the last 60s
reflector_misbehaving_detection_window=60
reflector_misbehaving_detection_thr=3
reflector_replacement_interval_mins=60 # how often to replace a random reflector from the present list
reflector_comparison_interval_mins=1 # how often to compare reflectors
reflector_sum_owd_baselines_delta_thr_ms=20 # max increase from min sum owd baselines before reflector rotated
reflector_owd_delta_ewma_delta_thr_ms=10 # max increase from min delta ewma before reflector rotated
# stall is detected when the following two conditions are met:
# 1) no reflector responses within $stall_detection_thr*$ping_response_interval_us; and
# 2) either $rx_achieved_rate or $tx_achieved_rate < $connection_stall_thr
stall_detection_thr=5
connection_stall_thr_kbps=10
global_ping_response_timeout_s=10 # timeout to set shaper rates to min on no ping response whatsoever (seconds)
if_up_check_interval_s=10.0 # time to wait before re-checking if rx/tx bytes files exist (e.g. from boot state or sleep recovery)
# Starlink satellite switch (sss) compensation options
sss_compensation=0 # enable (1) or disable (0) Starlink handling
# satellite switch compensation start times in seconds of each minute
sss_times_s=("12.0" "27.0" "42.0" "57.0")
sss_compensation_pre_duration_ms=300
sss_compensation_post_duration_ms=200

View file

@ -10,16 +10,18 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=systemtap
PKG_RELEASE:=1
PKG_VERSION:=4.9
PKG_VERSION:=5.0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://sourceware.org/systemtap/ftp/releases/
PKG_HASH:=d01033baea9d0af52a65e70167816931f4b856427a53ff2ab30e4b45f6ad3a98
PKG_HASH:=a8b43408895fee2b0023483b02f861700b0139629050666dfe4dfa1e49d59939
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=systemtap/host
PKG_INSTALL:=1
PKG_LICENSE:=GPL-2.0-or-later
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk

View file

@ -22,6 +22,9 @@ PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=4ad40ea43354038a04ad90aedae5874801c223e8
#v0.4.4
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
@ -43,7 +46,7 @@ CONFIGURE_VARS += \
ac_cv_header_lua_h=no \
ax_header_version_match=yes
CONFIGURE_ARGS += --enable-sniffer --enable-curl --with-libpcap="$(STAGING_DIR)/usr/include/"
CONFIGURE_ARGS += --enable-sniffer --enable-curl --with-libpcap="$(STAGING_DIR)/usr/include/" --disable-tests
EXTRA_CPPFLAGS += -fpermissive -Wno-variadic-macros -std=c++14

View file

@ -59,6 +59,7 @@ if [ -z "$(uci -q get v2ray.main)" ]; then
set v2ray.omrout.s_socks_user_encryption='none'
set v2ray.omrout.s_socks_user_alter_id='0'
set v2ray.omrout.ss_network='tcp'
set v2ray.omrout.ss_sockopt_mptcp='1'
set v2ray.omrout.ss_security='tls'
set v2ray.omrout.ss_tls_allow_insecure='1'
set v2ray.omrout.ss_tls_disable_system_root='1'
@ -199,7 +200,8 @@ if [ "$(uci -q get v2ray.omrout.s_socks_port)" = "" ]; then
fi
if [ "$(uci -q get v2ray.omrout.ss_sockopt_mptcp)" = "" ]; then
uci -q batch <<-EOF >/dev/null
set v2ray.omr.ss_sockopt_mptcp='1'
set v2ray.omrout.ss_sockopt_mptcp='1'
commit v2ray
EOF
fi