mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
commit
bbab0c7cf9
7 changed files with 88 additions and 43 deletions
|
@ -21,5 +21,6 @@ uci show | \
|
||||||
-e "/vpn\.key=/s/......$/xxxxxx'/" \
|
-e "/vpn\.key=/s/......$/xxxxxx'/" \
|
||||||
-e "/vps\.key=/s/......$/xxxxxx'/" \
|
-e "/vps\.key=/s/......$/xxxxxx'/" \
|
||||||
-e "/wgkey=/s/......$/xxxxxx'/" \
|
-e "/wgkey=/s/......$/xxxxxx'/" \
|
||||||
|
-e "/key=/s/......$/xxxxxx'/" \
|
||||||
-e "/ula_prefix=2/s/=.........../='xxxxxxxxxxx/" \
|
-e "/ula_prefix=2/s/=.........../='xxxxxxxxxxx/" \
|
||||||
-e "/token=/s/............$/xxxxxx'/"
|
-e "/token=/s/............$/xxxxxx'/"
|
|
@ -931,6 +931,11 @@ function interfaces_status()
|
||||||
else
|
else
|
||||||
mArray.openmptcprouter["vps_admin"] = false
|
mArray.openmptcprouter["vps_admin"] = false
|
||||||
mArray.openmptcprouter["vps_admin_error_msg"] = "No result"
|
mArray.openmptcprouter["vps_admin_error_msg"] = "No result"
|
||||||
|
uci:set("openmptcprouter",s[".name"],"admin_error","1")
|
||||||
|
mArray.openmptcprouter["vps_admin_error"] = true
|
||||||
|
uci:delete("openmptcprouter",s[".name"],"token")
|
||||||
|
uci:save("openmptcprouter",s[".name"])
|
||||||
|
uci:commit("openmptcprouter",s[".name"])
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
mArray.openmptcprouter["vps_admin"] = false
|
mArray.openmptcprouter["vps_admin"] = false
|
||||||
|
|
|
@ -10,7 +10,7 @@ USE_PROCD=1
|
||||||
. /lib/functions/network.sh
|
. /lib/functions/network.sh
|
||||||
|
|
||||||
global_multipath_settings() {
|
global_multipath_settings() {
|
||||||
local multipath mptcp_path_manager mptcp_schdeduler mptcp_debug congestion mptcp_checksum mptcp_syn_retries mptcp_fullmesh_num_subflows mptcp_fullmesh_create_on_err mptcp_ndiffports_num_subflows mptcp_rr_cwnd_limited mptcp_rr_num_segments
|
local multipath mptcp_path_manager mptcp_scheduler mptcp_subflows mptcp_debug mptcp_add_addr_accepted congestion mptcp_checksum mptcp_syn_retries mptcp_fullmesh_num_subflows mptcp_fullmesh_create_on_err mptcp_ndiffports_num_subflows mptcp_rr_cwnd_limited mptcp_rr_num_segments
|
||||||
local multipath_status=0
|
local multipath_status=0
|
||||||
config_load network
|
config_load network
|
||||||
config_get multipath globals multipath
|
config_get multipath globals multipath
|
||||||
|
|
|
@ -46,7 +46,7 @@ MY_DEPENDS := \
|
||||||
luci-app-openvpn \
|
luci-app-openvpn \
|
||||||
shadowsocks-libev-ss-server shadowsocks-libev-ss-tunnel \
|
shadowsocks-libev-ss-server shadowsocks-libev-ss-tunnel \
|
||||||
omr-6in4 ip6tables-mod-nat luci-proto-ipv6 6to4 6in4 6rd ip6tables \
|
omr-6in4 ip6tables-mod-nat luci-proto-ipv6 6to4 6in4 6rd ip6tables \
|
||||||
speedtestc \
|
speedtestcpp \
|
||||||
iftop \
|
iftop \
|
||||||
htop \
|
htop \
|
||||||
nano \
|
nano \
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# vim: set noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 :
|
# vim: set noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 :
|
||||||
HETZNER=false
|
FORCEVPS=false
|
||||||
if [ "$1" = "hetzner" ]; then
|
if [ "$1" = "forcevps" ]; then
|
||||||
HETZNER=true
|
|
||||||
INTERFACE="$2"
|
INTERFACE="$2"
|
||||||
|
FORCEVPS=true
|
||||||
else
|
else
|
||||||
INTERFACE="$1"
|
INTERFACE="$1"
|
||||||
fi
|
fi
|
||||||
|
@ -13,24 +13,22 @@ fi
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$HETZNER" = false ]; then
|
echo "Select best test server..."
|
||||||
echo "Select best test server..."
|
HOSTLST="http://scaleway.testdebit.info/10G.iso http://bordeaux.testdebit.info/10G.iso http://aix-marseille.testdebit.info/10G.iso http://lyon.testdebit.info/10G.iso http://lille.testdebit.info/10G.iso http://paris.testdebit.info/10G.iso http://appliwave.testdebit.info/10G/10G.iso http://speedtest.frankfurt.linode.com/garbage.php?ckSize=10000 http://speedtest.tokyo2.linode.com/garbage.php?ckSize=10000 http://speedtest.singapore.linode.com/garbage.php?ckSize=10000 http://speedtest.newark.linode.com/garbage.php?ckSize=10000 http://speedtest.atlanta.linode.com/garbage.php?ckSize=10000 http://speedtest.dallas.linode.com/garbage.php?ckSize=10000 http://speedtest.fremont.linode.com/garbage.php?ckSize=10000 https://speed.hetzner.de/10GB.bin http://ipv4.bouygues.testdebit.info/10G.iso http://par.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin http://ams.download.datapacket.com/10000mb.bin http://fra.download.datapacket.com/10000mb.bin http://lon.download.datapacket.com/10000mb.bin http://mad.download.datapacket.com/10000mb.bin http://prg.download.datapacket.com/10000mb.bin http://sto.download.datapacket.com/10000mb.bin http://vie.download.datapacket.com/10000mb.bin http://war.download.datapacket.com/10000mb.bin http://atl.download.datapacket.com/10000mb.bin http://chi.download.datapacket.com/10000mb.bin http://lax.download.datapacket.com/10000mb.bin http://mia.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin"
|
||||||
HOSTLST="http://speedtest.frankfurt.linode.com/garbage.php?ckSize=10000 http://speedtest.tokyo2.linode.com/garbage.php?ckSize=10000 http://speedtest.singapore.linode.com/garbage.php?ckSize=10000 http://speedtest.newark.linode.com/garbage.php?ckSize=10000 http://speedtest.atlanta.linode.com/garbage.php?ckSize=10000 http://speedtest.dallas.linode.com/garbage.php?ckSize=10000 http://speedtest.fremont.linode.com/garbage.php?ckSize=10000 http://speedtest.tele2.net/1000GB.zip https://speed.hetzner.de/10GB.bin http://ipv4.bouygues.testdebit.info/10G.iso http://par.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin http://ams.download.datapacket.com/10000mb.bin http://fra.download.datapacket.com/10000mb.bin http://lon.download.datapacket.com/10000mb.bin http://mad.download.datapacket.com/10000mb.bin http://prg.download.datapacket.com/10000mb.bin http://sto.download.datapacket.com/10000mb.bin http://vie.download.datapacket.com/10000mb.bin http://war.download.datapacket.com/10000mb.bin http://atl.download.datapacket.com/10000mb.bin http://chi.download.datapacket.com/10000mb.bin http://lax.download.datapacket.com/10000mb.bin http://mia.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin"
|
bestping="9999"
|
||||||
bestping="9999"
|
for pinghost in $HOSTLST; do
|
||||||
for pinghost in $HOSTLST; do
|
domain=$(echo $pinghost | awk -F/ '{print $3}')
|
||||||
domain=$(echo $pinghost | awk -F/ '{print $3}')
|
if [ -z "$INTERFACE" ] || [ "$FORCEVPS" = true ]; then
|
||||||
if [ -z "$INTERFACE" ]; then
|
ping=$(ping -c1 -w2 $domain | cut -d "/" -s -f5 | cut -d "." -f1 | tr -d '\n')
|
||||||
ping=$(ping -c1 -w2 $domain | cut -d "/" -s -f5 | cut -d "." -f1)
|
else
|
||||||
else
|
ping=$(ping -c1 -w2 -I $INTERFACE -B $domain | cut -d "/" -s -f5 | cut -d "." -f1 | tr -d '\n')
|
||||||
ping=$(ping -c1 -w2 -I $INTERFACE -B $domain | cut -d "/" -s -f5 | cut -d "." -f1)
|
fi
|
||||||
fi
|
echo "host: $domain - ping: $ping"
|
||||||
echo "host: $domain - ping: $ping"
|
if [ -n "$ping" ] && [ "$ping" -lt "$bestping" ]; then
|
||||||
if [ -n "$ping" ] && [ "$ping" -lt "$bestping" ]; then
|
bestping=$ping
|
||||||
bestping=$ping
|
HOST=$pinghost
|
||||||
HOST=$pinghost
|
fi
|
||||||
fi
|
done
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ -z "$HOST" ] && HOST="https://speed.hetzner.de/10GB.bin"
|
[ -z "$HOST" ] && HOST="https://speed.hetzner.de/10GB.bin"
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# vim: set noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 :
|
# vim: set noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 :
|
||||||
HETZNER=false
|
FORCEVPS=false
|
||||||
if [ "$1" = "hetzner" ]; then
|
if [ "$1" = "forcevps" ]; then
|
||||||
HETZNER=true
|
FORCEVPS=true
|
||||||
INTERFACE="$2"
|
INTERFACE="$2"
|
||||||
else
|
else
|
||||||
INTERFACE="$1"
|
INTERFACE="$1"
|
||||||
|
@ -14,23 +14,22 @@ fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if [ "$HETZNER" = false ]; then
|
echo "Select best test server..."
|
||||||
echo "Select best test server..."
|
HOSTLST="http://scaleway.testdebit.info/10G.iso http://bordeaux.testdebit.info/10G.iso http://aix-marseille.testdebit.info/10G.iso http://lyon.testdebit.info/10G.iso http://lille.testdebit.info/10G.iso http://paris.testdebit.info/10G.iso http://appliwave.testdebit.info/10G/10G.iso http://speedtest.frankfurt.linode.com/garbage.php?ckSize=10000 http://speedtest.tokyo2.linode.com/garbage.php?ckSize=10000 http://speedtest.singapore.linode.com/garbage.php?ckSize=10000 http://speedtest.newark.linode.com/garbage.php?ckSize=10000 http://speedtest.atlanta.linode.com/garbage.php?ckSize=10000 http://speedtest.dallas.linode.com/garbage.php?ckSize=10000 http://speedtest.fremont.linode.com/garbage.php?ckSize=10000 https://speed.hetzner.de/10GB.bin http://ipv6.bouygues.testdebit.info/10G.iso http://par.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin http://ams.download.datapacket.com/10000mb.bin http://fra.download.datapacket.com/10000mb.bin http://lon.download.datapacket.com/10000mb.bin http://mad.download.datapacket.com/10000mb.bin http://prg.download.datapacket.com/10000mb.bin http://sto.download.datapacket.com/10000mb.bin http://vie.download.datapacket.com/10000mb.bin http://war.download.datapacket.com/10000mb.bin http://atl.download.datapacket.com/10000mb.bin http://chi.download.datapacket.com/10000mb.bin http://lax.download.datapacket.com/10000mb.bin http://mia.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin"
|
||||||
HOSTLST="http://speedtest.frankfurt.linode.com/garbage.php?ckSize=10000 http://speedtest.tokyo2.linode.com/garbage.php?ckSize=10000 http://speedtest.singapore.linode.com/garbage.php?ckSize=10000 http://speedtest.newark.linode.com/garbage.php?ckSize=10000 http://speedtest.atlanta.linode.com/garbage.php?ckSize=10000 http://speedtest.dallas.linode.com/garbage.php?ckSize=10000 http://speedtest.fremont.linode.com/garbage.php?ckSize=10000 http://speedtest.tele2.net/1000GB.zip https://speed.hetzner.de/10GB.bin http://ipv6.bouygues.testdebit.info/10G.iso http://par.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin http://ams.download.datapacket.com/10000mb.bin http://fra.download.datapacket.com/10000mb.bin http://lon.download.datapacket.com/10000mb.bin http://mad.download.datapacket.com/10000mb.bin http://prg.download.datapacket.com/10000mb.bin http://sto.download.datapacket.com/10000mb.bin http://vie.download.datapacket.com/10000mb.bin http://war.download.datapacket.com/10000mb.bin http://atl.download.datapacket.com/10000mb.bin http://chi.download.datapacket.com/10000mb.bin http://lax.download.datapacket.com/10000mb.bin http://mia.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin"
|
bestping="9999"
|
||||||
bestping="9999"
|
for pinghost in $HOSTLST; do
|
||||||
for pinghost in $HOSTLST; do
|
domain=$(echo $pinghost | awk -F/ '{print $3}')
|
||||||
domain=$(echo $pinghost | awk -F/ '{print $3}')
|
if [ -z "$INTERFACE" ] || [ "$FORCEVPS" = true ]; then
|
||||||
if [ -z "$INTERFACE" ]; then
|
ping=$(ping -6 -c1 -w2 $domain | cut -d "/" -s -f5 | cut -d "." -f1)
|
||||||
ping=$(ping -6 -c1 -w2 $domain | cut -d "/" -s -f5 | cut -d "." -f1)
|
else
|
||||||
else
|
ping=$(ping -6 -c1 -w2 -I $INTERFACE -B $domain | cut -d "/" -s -f5 | cut -d "." -f1)
|
||||||
ping=$(ping -6 -c1 -w2 -I $INTERFACE -B $domain | cut -d "/" -s -f5 | cut -d "." -f1)
|
fi
|
||||||
fi
|
echo "host: $domain - ping: $ping"
|
||||||
echo "host: $domain - ping: $ping"
|
if [ -n "$ping" ] && [ "$ping" -lt "$bestping" ]; then
|
||||||
if [ -n "$ping" ] && [ "$ping" -lt "$bestping" ]; then
|
bestping=$ping
|
||||||
bestping=$ping
|
HOST=$pinghost
|
||||||
HOST=$pinghost
|
fi
|
||||||
fi
|
done
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -z "$HOST" ] && HOST="https://speed.hetzner.de/10GB.bin"
|
[ -z "$HOST" ] && HOST="https://speed.hetzner.de/10GB.bin"
|
||||||
|
|
42
speedtestcpp/Makefile
Normal file
42
speedtestcpp/Makefile
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 2021 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=speedtestcpp
|
||||||
|
PKG_VERSION:=1.12
|
||||||
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
|
PKG_SOURCE_PROTO:=git
|
||||||
|
PKG_SOURCE_VERSION:=a01ae6eb04c5d3f4847aef73bf77849275ccc6eb
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=https://github.com/fmantz/SpeedTest.git
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Ycarus <ycarus@zugaina.org>
|
||||||
|
PKG_LICENSE:=MIT
|
||||||
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
|
CMAKE_INSTALL:=1
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
include $(INCLUDE_DIR)/cmake.mk
|
||||||
|
|
||||||
|
define Package/speedtestcpp
|
||||||
|
SECTION:=net
|
||||||
|
CATEGORY:=Network
|
||||||
|
TITLE:=Yet another unofficial speedtest.net client cli interface
|
||||||
|
URL:=https://github.com/fmantz/SpeedTest
|
||||||
|
DEPENDS:=+curl +libstdcpp +libopenssl +libxml2
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/speedtestcpp/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/SpeedTest $(1)/usr/bin/
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/speedtestJson $(1)/usr/bin/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,speedtestcpp))
|
Loading…
Add table
Add a link
Reference in a new issue