mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
sync (#540)
This commit is contained in:
commit
ff8f1a0cc9
9 changed files with 107 additions and 20 deletions
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
|
@ -9,7 +9,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
OMR_TARGET: [bpi-r1, bpi-r2, bpi-r64, rpi2, rpi4, wrt32x, espressobin, r2s, rpi3, wrt3200acm, x86, x86_64, ubnt-erx, r4s, r7800, rutx12, rutx50, r5s, qnap-301w, rpi5, z8102ax_128m, z8102ax_64m]
|
OMR_TARGET: [bpi-r1, bpi-r2, bpi-r64, rpi2, rpi4, wrt32x, espressobin, r2s, rpi3, wrt3200acm, x86, x86_64, ubnt-erx, r4s, r7800, rutx12, rutx50, r5s, qnap-301w, rpi5, z8102ax_128m, z8102ax_64m]
|
||||||
OMR_KERNEL: [5.4, 6.1, 6.6]
|
OMR_KERNEL: [5.4, 6.6]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=bcm27xx-eeprom
|
PKG_NAME:=bcm27xx-eeprom
|
||||||
PKG_VERSION:=v2024.04.20-2712
|
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL:=https://codeload.github.com/raspberrypi/rpi-eeprom/tar.gz/$(PKG_VERSION)?
|
PKG_SOURCE_URL:=https://github.com/raspberrypi/rpi-eeprom
|
||||||
PKG_HASH:=83ea92e64d9a620376ef081d69f3cdde5a8b376b4a56aeb685f8a56dd10e7b14
|
PKG_SOURCE_DATE:=2024-06-05
|
||||||
|
PKG_SOURCE_VERSION:=e430a41e7323a1e28fb42b53cf79e5ba9b5ee975
|
||||||
|
PKG_MIRROR_HASH:=6c9a45d4ea0f33a9dc18f11b6cdeb425f0682dc41099df3a1f350939aecce353
|
||||||
|
|
||||||
PKG_LICENSE:=BSD-3-Clause Custom
|
PKG_LICENSE:=BSD-3-Clause Custom
|
||||||
PKG_LICENSE_FILES:=LICENSE
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
|
@ -676,7 +676,7 @@ function wizard_add()
|
||||||
ucic:commit("unbound")
|
ucic:commit("unbound")
|
||||||
|
|
||||||
-- Get Proxy set by default
|
-- Get Proxy set by default
|
||||||
local default_proxy = luci.http.formvalue("default_proxy") or "shadowsocks"
|
local default_proxy = luci.http.formvalue("default_proxy") or "shadowsocks-rust"
|
||||||
if default_proxy == "shadowsocks" and serversnb > 0 and serversnb > disablednb then
|
if default_proxy == "shadowsocks" and serversnb > 0 and serversnb > disablednb then
|
||||||
--ucic:set("shadowsocks-libev","sss0","disabled","0")
|
--ucic:set("shadowsocks-libev","sss0","disabled","0")
|
||||||
ucic:set("v2ray","main","enabled","0")
|
ucic:set("v2ray","main","enabled","0")
|
||||||
|
|
|
@ -86,9 +86,9 @@ interface_macaddr_count() {
|
||||||
|
|
||||||
interface_max_metric() {
|
interface_max_metric() {
|
||||||
local config="$1"
|
local config="$1"
|
||||||
if [ "$1" != "omrvpn" ] && [ "$1" != "omr6in4" ] && [ "$1" != "lan" ]; then
|
if [ "$1" != "omrvpn" ] && [ "$1" != "omr6in4" ] && [ "$1" != "lan" ] && [ "$1" != "loopback" ]; then
|
||||||
config_get metric "$config" metric
|
config_get metric "$config" metric
|
||||||
if [ "$metric" -gt "$count" ]; then
|
if [ "$metric" -gt "$count" ] && [ "$metric" -lt "1000" ]; then
|
||||||
count=$metric
|
count=$metric
|
||||||
fi
|
fi
|
||||||
elif [ "$1" = "omrvpn" ]; then
|
elif [ "$1" = "omrvpn" ]; then
|
||||||
|
@ -114,11 +114,13 @@ interface_multipath_settings() {
|
||||||
local intf="$2"
|
local intf="$2"
|
||||||
local enabled
|
local enabled
|
||||||
|
|
||||||
config_get enabled "$config" auto "1"
|
|
||||||
network_get_device iface $config
|
network_get_device iface $config
|
||||||
[ -z "$iface" ] && network_get_physdev iface $config
|
[ -z "$iface" ] && network_get_physdev iface $config
|
||||||
[ -z "$iface" ] && iface=$(ifstatus "$config" | jsonfilter -q -e '@["l3_device"]')
|
[ -z "$iface" ] && iface=$(ifstatus "$config" | jsonfilter -q -e '@["l3_device"]')
|
||||||
[ -z "$iface" ] && config_get iface "$config" ifname
|
[ -z "$iface" ] && config_get iface "$config" ifname
|
||||||
|
[ -n "$intf" ] && [ "$iface" != "$intf" ] && return 0
|
||||||
|
|
||||||
|
config_get enabled "$config" auto "1"
|
||||||
config_get txqueuelen "$config" txqueuelen
|
config_get txqueuelen "$config" txqueuelen
|
||||||
[ -n "$(echo $iface | grep '@')" ] && iface=$(ifstatus "$config" | jsonfilter -q -e '@["device"]')
|
[ -n "$(echo $iface | grep '@')" ] && iface=$(ifstatus "$config" | jsonfilter -q -e '@["device"]')
|
||||||
if [ "$(uci -q get openmptcprouter.${config}.metric)" = "" ] || [ "$(uci -q get openmptcprouter.${config}.metric)" = "1" ]; then
|
if [ "$(uci -q get openmptcprouter.${config}.metric)" = "" ] || [ "$(uci -q get openmptcprouter.${config}.metric)" = "1" ]; then
|
||||||
|
@ -127,7 +129,7 @@ interface_multipath_settings() {
|
||||||
else
|
else
|
||||||
metric="$(uci -q get openmptcprouter.${config}.metric)"
|
metric="$(uci -q get openmptcprouter.${config}.metric)"
|
||||||
fi
|
fi
|
||||||
[ "$metric" -gt 1000 ] && [ "${config}" != "omrvpn" ] && [ "${config}" != "omr6in4" ] && metric=$((metric-1000))
|
[ "$metric" -gt 1000 ] && [ "${config}" != "omrvpn" ] && [ "${config}" != "omr6in4" ] && [ "${config}" != "loopback" ] && metric=$((metric-1000))
|
||||||
if [ "${config}" = "lan" ] || [ "$(uci -q get network.${config}.ip4table)" = "lan" ]; then
|
if [ "${config}" = "lan" ] || [ "$(uci -q get network.${config}.ip4table)" = "lan" ]; then
|
||||||
metric="9999"
|
metric="9999"
|
||||||
elif [ "${config}" = "omrvpn" ]; then
|
elif [ "${config}" = "omrvpn" ]; then
|
||||||
|
|
|
@ -476,5 +476,12 @@ service_triggers() {
|
||||||
|
|
||||||
reload_service() {
|
reload_service() {
|
||||||
stop
|
stop
|
||||||
|
sleep 5
|
||||||
|
start
|
||||||
|
}
|
||||||
|
|
||||||
|
restart_service() {
|
||||||
|
stop
|
||||||
|
sleep 5
|
||||||
start
|
start
|
||||||
}
|
}
|
||||||
|
|
|
@ -232,16 +232,32 @@ start_service()
|
||||||
fi
|
fi
|
||||||
if [ "$nbintf" = "$nbintfvpn" ] && [ "$nbintf" != "0" ]; then
|
if [ "$nbintf" = "$nbintfvpn" ] && [ "$nbintf" != "0" ]; then
|
||||||
if [ "$vpn" = "openvpn" ]; then
|
if [ "$vpn" = "openvpn" ]; then
|
||||||
|
if [ "$(uci -q get openmptcprouter.settings.proxy)" = "shadowsocks" ]; then
|
||||||
|
uci -q batch <<-EOF >/dev/null
|
||||||
|
set shadowsocks-libev.sss0.disabled='1'
|
||||||
|
EOF
|
||||||
|
elif [ "$(uci -q get openmptcprouter.settings.proxy)" = "shadowsocks-rust" ]; then
|
||||||
|
uci -q batch <<-EOF >/dev/null
|
||||||
|
set shadowsocks-rust.sss0.disabled='1'
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
uci -q batch <<-EOF >/dev/null
|
uci -q batch <<-EOF >/dev/null
|
||||||
set shadowsocks-libev.sss0.disabled='1'
|
|
||||||
set glorytun.vpn.host='10.255.250.1'
|
set glorytun.vpn.host='10.255.250.1'
|
||||||
set glorytun-udp.vpn.host='10.255.250.1'
|
set glorytun-udp.vpn.host='10.255.250.1'
|
||||||
commit glorytun
|
commit glorytun
|
||||||
commit glorytun-udp
|
commit glorytun-udp
|
||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
|
if [ "$(uci -q get openmptcprouter.settings.proxy)" = "shadowsocks" ]; then
|
||||||
|
uci -q batch <<-EOF >/dev/null
|
||||||
|
set shadowsocks-libev.sss0.disabled='1'
|
||||||
|
EOF
|
||||||
|
elif [ "$(uci -q get openmptcprouter.settings.proxy)" = "shadowsocks-rust" ]; then
|
||||||
|
uci -q batch <<-EOF >/dev/null
|
||||||
|
set shadowsocks-rust.sss0.disabled='1'
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
uci -q batch <<-EOF >/dev/null
|
uci -q batch <<-EOF >/dev/null
|
||||||
set shadowsocks-libev.sss0.disabled='1'
|
|
||||||
set glorytun.vpn.host='10.255.247.1'
|
set glorytun.vpn.host='10.255.247.1'
|
||||||
set glorytun-udp.vpn.host='10.255.247.1'
|
set glorytun-udp.vpn.host='10.255.247.1'
|
||||||
commit glorytun
|
commit glorytun
|
||||||
|
@ -251,11 +267,22 @@ start_service()
|
||||||
uci -q batch <<-EOF >/dev/null
|
uci -q batch <<-EOF >/dev/null
|
||||||
set shadowsocks-libev.ss_rules.server='mptcpovervpn'
|
set shadowsocks-libev.ss_rules.server='mptcpovervpn'
|
||||||
set shadowsocks-libev.ss_rules.redir_tcp='all'
|
set shadowsocks-libev.ss_rules.redir_tcp='all'
|
||||||
|
set shadowsocks-rust.ss_rules.server='mptcpovervpn'
|
||||||
|
set shadowsocks-rust.ss_rules.redir_tcp='all'
|
||||||
EOF
|
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
|
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" ] || [ "$(uci -q get shadowsocks-rust.ss_rules.server)" != "sss0" ]) && [ "$nbintf" != "$nbintfvpn" ]; then
|
||||||
|
if [ "$(uci -q get openmptcprouter.settings.proxy)" = "shadowsocks" ]; then
|
||||||
|
uci -q batch <<-EOF >/dev/null
|
||||||
|
set shadowsocks-libev.sss0.disabled='0'
|
||||||
|
EOF
|
||||||
|
elif [ "$(uci -q get openmptcprouter.settings.proxy)" = "shadowsocks-rust" ]; then
|
||||||
|
uci -q batch <<-EOF >/dev/null
|
||||||
|
set shadowsocks-rust.sss0.disabled='0'
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
uci -q batch <<-EOF >/dev/null
|
uci -q batch <<-EOF >/dev/null
|
||||||
set shadowsocks-libev.sss0.disabled='0'
|
|
||||||
set shadowsocks-libev.ss_rules.server='sss0'
|
set shadowsocks-libev.ss_rules.server='sss0'
|
||||||
|
set shadowsocks-rust.ss_rules.server='sss0'
|
||||||
set glorytun.vpn.host="$(uci -q get openmptcprouter.vps.ip | awk '{print $1}')"
|
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}')"
|
set glorytun-udp.vpn.host="$(uci -q get openmptcprouter.vps.ip | awk '{print $1}')"
|
||||||
commit glorytun
|
commit glorytun
|
||||||
|
@ -263,7 +290,7 @@ start_service()
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
NBCPU=$(grep -c '^processor' /proc/cpuinfo | tr -d "\n")
|
NBCPU=$(grep -c '^processor' /proc/cpuinfo | tr -d "\n")
|
||||||
if [ "$nbintfvpn" != 0 ]; then
|
if [ "$nbintfvpn" != 0 ] && [ "$(uci -q get openmptcprouter.settings.proxy)" = "shadowsocks" ]; then
|
||||||
if [ "$vpn" = "openvpn" ]; then
|
if [ "$vpn" = "openvpn" ]; then
|
||||||
uci -q batch <<-EOF >/dev/null
|
uci -q batch <<-EOF >/dev/null
|
||||||
set shadowsocks-libev.mptcpovervpn=server
|
set shadowsocks-libev.mptcpovervpn=server
|
||||||
|
@ -305,6 +332,46 @@ start_service()
|
||||||
EOF
|
EOF
|
||||||
/etc/init.d/shadowsocks-libev restart
|
/etc/init.d/shadowsocks-libev restart
|
||||||
/etc/init.d/openvpn restart
|
/etc/init.d/openvpn restart
|
||||||
|
elif [ "$nbintfvpn" != 0 ] && [ "$(uci -q get openmptcprouter.settings.proxy)" = "shadowsocks-rust" ]; then
|
||||||
|
if [ "$vpn" = "openvpn" ]; then
|
||||||
|
uci -q batch <<-EOF >/dev/null
|
||||||
|
set shadowsocks-rust.mptcpovervpn=server
|
||||||
|
set shadowsocks-rust.mptcpovervpn.server_port="$(uci -q get shadowsocks-rust.sss0.server_port)"
|
||||||
|
set shadowsocks-rust.mptcpovervpn.password="$(uci -q get shadowsocks-rust.sss0.password)"
|
||||||
|
set shadowsocks-rust.mptcpovervpn.method="$(uci -q get shadowsocks-rust.sss0.method)"
|
||||||
|
set shadowsocks-rust.mptcpovervpn.server="10.255.250.1"
|
||||||
|
set shadowsocks-rust.mptcpovervpn.disabled='0'
|
||||||
|
EOF
|
||||||
|
else
|
||||||
|
uci -q batch <<-EOF >/dev/null
|
||||||
|
set shadowsocks-rust.mptcpovervpn=server
|
||||||
|
set shadowsocks-rust.mptcpovervpn.server_port="$(uci -q get shadowsocks-rust.sss0.server_port)"
|
||||||
|
set shadowsocks-rust.mptcpovervpn.password="$(uci -q get shadowsocks-rust.sss0.password)"
|
||||||
|
set shadowsocks-rust.mptcpovervpn.method="$(uci -q get shadowsocks-rust.sss0.method)"
|
||||||
|
set shadowsocks-rust.mptcpovervpn.server="10.255.247.1"
|
||||||
|
set shadowsocks-rust.mptcpovervpn.disabled='0'
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
uci -q batch <<-EOF >/dev/null
|
||||||
|
set shadowsocks-rust.hivpn=ss_redir
|
||||||
|
set shadowsocks-rust.hivpn.server="mptcpovervpn"
|
||||||
|
set shadowsocks-rust.hivpn.local_address='0.0.0.0'
|
||||||
|
set shadowsocks-rust.hivpn.local_port='1101'
|
||||||
|
set shadowsocks-rust.hivpn.mode='tcp_and_udp'
|
||||||
|
set shadowsocks-rust.hivpn.timeout='1000'
|
||||||
|
set shadowsocks-rust.hivpn.fast_open='1'
|
||||||
|
set shadowsocks-rust.hivpn.verbose='0'
|
||||||
|
set shadowsocks-rust.hivpn.syslog='1'
|
||||||
|
set shadowsocks-rust.hivpn.reuse_port='1'
|
||||||
|
set shadowsocks-rust.hivpn.mptcp='1'
|
||||||
|
set shadowsocks-rust.hivpn.ipv6_first='1'
|
||||||
|
set shadowsocks-rust.hivpn.no_delay='1'
|
||||||
|
EOF
|
||||||
|
uci -q batch <<-EOF >/dev/null
|
||||||
|
commit shadowsocks-rust
|
||||||
|
EOF
|
||||||
|
/etc/init.d/shadowsocks-rust restart
|
||||||
|
/etc/init.d/openvpn restart
|
||||||
elif [ "$(uci -q get shadowsocks-libev.hivpn1)" != "" ]; then
|
elif [ "$(uci -q get shadowsocks-libev.hivpn1)" != "" ]; then
|
||||||
for c in $(seq 1 $NBCPU); do
|
for c in $(seq 1 $NBCPU); do
|
||||||
uci -q batch <<-EOF >/dev/null
|
uci -q batch <<-EOF >/dev/null
|
||||||
|
@ -312,12 +379,24 @@ start_service()
|
||||||
EOF
|
EOF
|
||||||
done
|
done
|
||||||
uci -q batch <<-EOF >/dev/null
|
uci -q batch <<-EOF >/dev/null
|
||||||
set shadowsocks-libev.sss0.disabled='0'
|
delete shadowsocks-rust.hivpn
|
||||||
EOF
|
EOF
|
||||||
|
if [ "$(uci -q get openmptcprouter.settings.proxy)" = "shadowsocks" ]; then
|
||||||
|
uci -q batch <<-EOF >/dev/null
|
||||||
|
set shadowsocks-libev.sss0.disabled='0'
|
||||||
|
EOF
|
||||||
|
elif [ "$(uci -q get openmptcprouter.settings.proxy)" = "shadowsocks-rust" ]; then
|
||||||
|
uci -q batch <<-EOF >/dev/null
|
||||||
|
set shadowsocks-rust.sss0.disabled='0'
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
uci -q batch <<-EOF >/dev/null
|
uci -q batch <<-EOF >/dev/null
|
||||||
set shadowsocks-libev.ss_rules.server='sss0'
|
set shadowsocks-libev.ss_rules.server='sss0'
|
||||||
|
set shadowsocks-rust.ss_rules.server='sss0'
|
||||||
delete shadowsocks-libev.mptcpovervpn
|
delete shadowsocks-libev.mptcpovervpn
|
||||||
commit shadowsocks-libev
|
commit shadowsocks-libev
|
||||||
|
delete shadowsocks-rust.mptcpovervpn
|
||||||
|
commit shadowsocks-rust
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
if [ "$BOOT" = "1" ]; then
|
if [ "$BOOT" = "1" ]; then
|
||||||
|
|
|
@ -2192,13 +2192,13 @@ _get_token() {
|
||||||
resolve="$(resolveip -t 5 $server)"
|
resolve="$(resolveip -t 5 $server)"
|
||||||
valid_ip6=$(valid_subnet6 $server)
|
valid_ip6=$(valid_subnet6 $server)
|
||||||
if [ "$resolve" != "$server" ] || [ "$valid_ip6" != "ok" ]; then
|
if [ "$resolve" != "$server" ] || [ "$valid_ip6" != "ok" ]; then
|
||||||
if [ "$(curl -k -m 3 https://${server}:${port}/)" = "" ]; then
|
if [ "$(curl -s -k -m 3 https://${server}:${port}/)" = "" ]; then
|
||||||
reason="$reason, no server API answer on $1"
|
reason="$reason, no server API answer on $1"
|
||||||
else
|
else
|
||||||
reason="$reason, server API answer on $1"
|
reason="$reason, server API answer on $1"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ "$(curl -k -m 3 https://[${server}]:${port}/)" = "" ]; then
|
if [ "$(curl -s -k -m 3 https://[${server}]:${port}/)" = "" ]; then
|
||||||
reason="$reason, no server API answer on $1"
|
reason="$reason, no server API answer on $1"
|
||||||
else
|
else
|
||||||
reason="$reason, server API answer on $1"
|
reason="$reason, server API answer on $1"
|
||||||
|
|
|
@ -328,7 +328,6 @@ reload_service() {
|
||||||
}
|
}
|
||||||
|
|
||||||
service_triggers() {
|
service_triggers() {
|
||||||
procd_add_reload_interface_trigger wan
|
|
||||||
procd_add_reload_trigger shadowsocks-libev
|
procd_add_reload_trigger shadowsocks-libev
|
||||||
procd_open_validate
|
procd_open_validate
|
||||||
validate_server_section
|
validate_server_section
|
||||||
|
|
|
@ -302,7 +302,6 @@ reload_service() {
|
||||||
}
|
}
|
||||||
|
|
||||||
service_triggers() {
|
service_triggers() {
|
||||||
procd_add_reload_interface_trigger wan
|
|
||||||
procd_add_reload_trigger shadowsocks-rust
|
procd_add_reload_trigger shadowsocks-rust
|
||||||
procd_open_validate
|
procd_open_validate
|
||||||
validate_server_section
|
validate_server_section
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue