mirror of
https://github.com/Ysurac/openmptcprouter-vps.git
synced 2025-02-12 11:21:56 +00:00
Update omr-admin, don't add TCP congestion control on kernel 6.1, remove 9000 MTU
This commit is contained in:
parent
0ad22072a7
commit
e9fd4192dc
3 changed files with 55 additions and 50 deletions
|
@ -61,8 +61,8 @@ MLVPN_BINARY_VERSION="3.0.0+20211028.git.ddafba3"
|
||||||
UBOND_VERSION="31af0f69ebb6d07ed9348dca2fced33b956cedee"
|
UBOND_VERSION="31af0f69ebb6d07ed9348dca2fced33b956cedee"
|
||||||
OBFS_VERSION="486bebd9208539058e57e23a12f23103016e09b4"
|
OBFS_VERSION="486bebd9208539058e57e23a12f23103016e09b4"
|
||||||
OBFS_BINARY_VERSION="0.0.5-1"
|
OBFS_BINARY_VERSION="0.0.5-1"
|
||||||
OMR_ADMIN_VERSION="d77ffb62084271a388a09d1b0d17e42aae0514ab"
|
OMR_ADMIN_VERSION="80ff9621748ec198b3a81660539a144ef443a531"
|
||||||
OMR_ADMIN_BINARY_VERSION="0.3+20230828"
|
OMR_ADMIN_BINARY_VERSION="0.3+20230901"
|
||||||
#OMR_ADMIN_BINARY_VERSION="0.3+20220827"
|
#OMR_ADMIN_BINARY_VERSION="0.3+20220827"
|
||||||
DSVPN_VERSION="3b99d2ef6c02b2ef68b5784bec8adfdd55b29b1a"
|
DSVPN_VERSION="3b99d2ef6c02b2ef68b5784bec8adfdd55b29b1a"
|
||||||
DSVPN_BINARY_VERSION="0.1.4-2"
|
DSVPN_BINARY_VERSION="0.1.4-2"
|
||||||
|
@ -420,6 +420,7 @@ if [ "$ARCH" = "amd64" ]; then
|
||||||
apt-get -y -o Dpkg::Options::="--force-overwrite" install tracebox
|
apt-get -y -o Dpkg::Options::="--force-overwrite" install tracebox
|
||||||
echo "Install iperf3 OpenMPTCProuter edition"
|
echo "Install iperf3 OpenMPTCProuter edition"
|
||||||
apt-get -y -o Dpkg::Options::="--force-overwrite" install omr-iperf3
|
apt-get -y -o Dpkg::Options::="--force-overwrite" install omr-iperf3
|
||||||
|
chmod 644 /lib/systemd/system/iperf3.service
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$UPSTREAM" = "yes" ] || [ "$UPSTREAM6" = "yes" ]; then
|
if [ "$UPSTREAM" = "yes" ] || [ "$UPSTREAM6" = "yes" ]; then
|
||||||
|
@ -547,51 +548,53 @@ else
|
||||||
apt-get -y -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-overwrite" install omr-shadowsocks-libev=${SHADOWSOCKS_BINARY_VERSION}
|
apt-get -y -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-overwrite" install omr-shadowsocks-libev=${SHADOWSOCKS_BINARY_VERSION}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Load OLIA Congestion module at boot time
|
|
||||||
if ! grep -q olia /etc/modules ; then
|
|
||||||
echo mptcp_olia >> /etc/modules
|
|
||||||
fi
|
|
||||||
# Load WVEGAS Congestion module at boot time
|
|
||||||
if ! grep -q wvegas /etc/modules ; then
|
|
||||||
echo mptcp_wvegas >> /etc/modules
|
|
||||||
fi
|
|
||||||
# Load BALIA Congestion module at boot time
|
|
||||||
if ! grep -q balia /etc/modules ; then
|
|
||||||
echo mptcp_balia >> /etc/modules
|
|
||||||
fi
|
|
||||||
# Load BBR Congestion module at boot time
|
# Load BBR Congestion module at boot time
|
||||||
if ! grep -q bbr /etc/modules ; then
|
if ! grep -q bbr /etc/modules ; then
|
||||||
echo tcp_bbr >> /etc/modules
|
echo tcp_bbr >> /etc/modules
|
||||||
fi
|
fi
|
||||||
# Load BBRv2 Congestion module at boot time
|
|
||||||
if ! grep -q bbr2 /etc/modules ; then
|
|
||||||
echo tcp_bbr2 >> /etc/modules
|
|
||||||
fi
|
|
||||||
# Load mctcpdesync Congestion module at boot time
|
|
||||||
if ! grep -q mctcp_desync /etc/modules ; then
|
|
||||||
echo mctcp_desync >> /etc/modules
|
|
||||||
fi
|
|
||||||
# Load ndiffports module at boot time
|
|
||||||
if ! grep -q mptcp_ndiffports /etc/modules ; then
|
|
||||||
echo mptcp_ndiffports >> /etc/modules
|
|
||||||
fi
|
|
||||||
# Load redundant module at boot time
|
|
||||||
if ! grep -q mptcp_redundant /etc/modules ; then
|
|
||||||
echo mptcp_redundant >> /etc/modules
|
|
||||||
fi
|
|
||||||
# Load rr module at boot time
|
|
||||||
if ! grep -q mptcp_rr /etc/modules ; then
|
|
||||||
echo mptcp_rr >> /etc/modules
|
|
||||||
fi
|
|
||||||
# Load mctcp ECF scheduler at boot time
|
|
||||||
if ! grep -q mptcp_ecf /etc/modules ; then
|
|
||||||
echo mptcp_ecf >> /etc/modules
|
|
||||||
fi
|
|
||||||
# Load mctcp BLEST scheduler at boot time
|
|
||||||
if ! grep -q mptcp_blest /etc/modules ; then
|
|
||||||
echo mptcp_blest >> /etc/modules
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
if [ "$UPSTREAM" = "yes" ] || [ "$UPSTREAM6" = "yes" ]; then
|
||||||
|
# Load OLIA Congestion module at boot time
|
||||||
|
if ! grep -q olia /etc/modules ; then
|
||||||
|
echo mptcp_olia >> /etc/modules
|
||||||
|
fi
|
||||||
|
# Load WVEGAS Congestion module at boot time
|
||||||
|
if ! grep -q wvegas /etc/modules ; then
|
||||||
|
echo mptcp_wvegas >> /etc/modules
|
||||||
|
fi
|
||||||
|
# Load BALIA Congestion module at boot time
|
||||||
|
if ! grep -q balia /etc/modules ; then
|
||||||
|
echo mptcp_balia >> /etc/modules
|
||||||
|
fi
|
||||||
|
# Load BBRv2 Congestion module at boot time
|
||||||
|
if ! grep -q bbr2 /etc/modules ; then
|
||||||
|
echo tcp_bbr2 >> /etc/modules
|
||||||
|
fi
|
||||||
|
# Load mctcpdesync Congestion module at boot time
|
||||||
|
if ! grep -q mctcp_desync /etc/modules ; then
|
||||||
|
echo mctcp_desync >> /etc/modules
|
||||||
|
fi
|
||||||
|
# Load ndiffports module at boot time
|
||||||
|
if ! grep -q mptcp_ndiffports /etc/modules ; then
|
||||||
|
echo mptcp_ndiffports >> /etc/modules
|
||||||
|
fi
|
||||||
|
# Load redundant module at boot time
|
||||||
|
if ! grep -q mptcp_redundant /etc/modules ; then
|
||||||
|
echo mptcp_redundant >> /etc/modules
|
||||||
|
fi
|
||||||
|
# Load rr module at boot time
|
||||||
|
if ! grep -q mptcp_rr /etc/modules ; then
|
||||||
|
echo mptcp_rr >> /etc/modules
|
||||||
|
fi
|
||||||
|
# Load mctcp ECF scheduler at boot time
|
||||||
|
if ! grep -q mptcp_ecf /etc/modules ; then
|
||||||
|
echo mptcp_ecf >> /etc/modules
|
||||||
|
fi
|
||||||
|
# Load mctcp BLEST scheduler at boot time
|
||||||
|
if ! grep -q mptcp_blest /etc/modules ; then
|
||||||
|
echo mptcp_blest >> /etc/modules
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if systemctl -q is-active omr-admin.service; then
|
if systemctl -q is-active omr-admin.service; then
|
||||||
systemctl -q stop omr-admin > /dev/null 2>&1
|
systemctl -q stop omr-admin > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
@ -721,6 +724,8 @@ if [ "$OMR_ADMIN" = "yes" ]; then
|
||||||
[ "$NOINTERNET" = "yes" ] && {
|
[ "$NOINTERNET" = "yes" ] && {
|
||||||
sed -i 's/"port": 65500,/"port": 65500,\n "internet": false,/' /etc/openmptcprouter-vps-admin/omr-admin-config.json
|
sed -i 's/"port": 65500,/"port": 65500,\n "internet": false,/' /etc/openmptcprouter-vps-admin/omr-admin-config.json
|
||||||
}
|
}
|
||||||
|
chmod 644 /lib/systemd/system/omr-admin.service
|
||||||
|
chmod 644 /lib/systemd/system/omr-admin-ipv6.service
|
||||||
#[ "$(ip -6 a)" != "" ] && sed -i 's/0.0.0.0/::/g' /usr/local/bin/omr-admin.py
|
#[ "$(ip -6 a)" != "" ] && sed -i 's/0.0.0.0/::/g' /usr/local/bin/omr-admin.py
|
||||||
[ "$(ip -6 a)" != "" ] && {
|
[ "$(ip -6 a)" != "" ] && {
|
||||||
systemctl enable omr-admin-ipv6.service
|
systemctl enable omr-admin-ipv6.service
|
||||||
|
@ -1203,7 +1208,7 @@ if [ "$OPENVPN" = "yes" ]; then
|
||||||
cp ${DIR}/openvpn-bonding8.conf /etc/openvpn/bonding8.conf
|
cp ${DIR}/openvpn-bonding8.conf /etc/openvpn/bonding8.conf
|
||||||
fi
|
fi
|
||||||
mkdir -p /etc/openvpn/ccd
|
mkdir -p /etc/openvpn/ccd
|
||||||
|
chmod 644 /lib/systemd/system/openvpn*.service
|
||||||
systemctl enable openvpn@tun0.service
|
systemctl enable openvpn@tun0.service
|
||||||
systemctl enable openvpn@tun1.service
|
systemctl enable openvpn@tun1.service
|
||||||
if [ "$UPSTREAM" = "yes" ] || [ "$UPSTREAM6" = "yes" ]; then
|
if [ "$UPSTREAM" = "yes" ] || [ "$UPSTREAM6" = "yes" ]; then
|
||||||
|
|
12
omr-service
12
omr-service
|
@ -7,13 +7,13 @@ _multipath() {
|
||||||
for intf in `ls -1 /sys/class/net`; do
|
for intf in `ls -1 /sys/class/net`; do
|
||||||
if [ "$intf" != "bonding_masters" ]; then
|
if [ "$intf" != "bonding_masters" ]; then
|
||||||
if ([ "$(ip a show dev lo | grep -v inet6 | grep global)" != "" ] && [ "$intf" = "lo" ]) || ([ "$intf" = "$NET_IFACE" ] && [ "$(ip a show dev lo | grep -v inet6 | grep global)" = "" ]); then
|
if ([ "$(ip a show dev lo | grep -v inet6 | grep global)" != "" ] && [ "$intf" = "lo" ]) || ([ "$intf" = "$NET_IFACE" ] && [ "$(ip a show dev lo | grep -v inet6 | grep global)" = "" ]); then
|
||||||
[ -f /proc/sys/net/mptcp/mptcp_enabled ] && [ "$(multipath $intf | tr -d '\n')" != "$intf is in default mode" ] && multipath $intf on
|
[ -f /proc/sys/net/mptcp/mptcp_enabled ] && [ "$(multipath $intf | tr -d '\n')" != "$intf is in default mode" ] && multipath $intf on 2>&1 >/dev/null
|
||||||
[ -f /proc/sys/net/mptcp/enabled ] && [ "$(multipath $intf | tr -d '\n')" != "$intf is in signal mode" ] && {
|
[ -f /proc/sys/net/mptcp/enabled ] && [ "$(multipath $intf | tr -d '\n')" != "$intf is in signal mode" ] && {
|
||||||
multipath $intf signal
|
multipath $intf signal 2>&1 >/dev/null
|
||||||
ip mptcp limits set subflows 8 add_addr_accepted 8 2>&1 >/dev/null
|
ip mptcp limits set subflows 8 add_addr_accepted 8 2>&1 >/dev/null
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
[ "$(multipath $intf | tr -d '\n')" != "$intf is deactivated" ] && multipath $intf off
|
[ "$(multipath $intf | tr -d '\n')" != "$intf is deactivated" ] && multipath $intf off 2>&1 >/dev/null
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -29,7 +29,7 @@ _glorytun_udp() {
|
||||||
for intf in /etc/glorytun-udp/tun*; do
|
for intf in /etc/glorytun-udp/tun*; do
|
||||||
[ "$(echo $intf | grep key)" = "" ] && /etc/glorytun-udp/post.sh ${intf}
|
[ "$(echo $intf | grep key)" = "" ] && /etc/glorytun-udp/post.sh ${intf}
|
||||||
done
|
done
|
||||||
ip link set mtu 9000 dev gt-udp-tun0 2>&1 >/dev/null
|
#ip link set mtu 9000 dev gt-udp-tun0 2>&1 >/dev/null
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ _glorytun_tcp() {
|
||||||
sleep 10
|
sleep 10
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
ip link set mtu 9000 dev gt-tun0 2>&1 >/dev/null
|
#ip link set mtu 9000 dev gt-tun0 2>&1 >/dev/null
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ _dsvpn() {
|
||||||
logger -t "OMR-Service" "No answer from VPN client end, restart DSVPN"
|
logger -t "OMR-Service" "No answer from VPN client end, restart DSVPN"
|
||||||
systemctl restart dsvpn@dsvpn0
|
systemctl restart dsvpn@dsvpn0
|
||||||
fi
|
fi
|
||||||
ip link set mtu 9000 dev dsvpn0 2>&1 >/dev/null
|
#ip link set mtu 9000 dev dsvpn0 2>&1 >/dev/null
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ net.ipv4.tcp_wmem = 4096 65536 33554432
|
||||||
net.ipv4.tcp_mtu_probing = 0
|
net.ipv4.tcp_mtu_probing = 0
|
||||||
|
|
||||||
# for low-latency network, use cubic instead
|
# for low-latency network, use cubic instead
|
||||||
net.ipv4.tcp_congestion_control = cubic
|
net.ipv4.tcp_congestion_control = bbr
|
||||||
net.core.default_qdisc = fq
|
net.core.default_qdisc = fq
|
||||||
# Default conntrack is too small
|
# Default conntrack is too small
|
||||||
net.netfilter.nf_conntrack_max = 524288
|
net.netfilter.nf_conntrack_max = 524288
|
||||||
|
|
Loading…
Reference in a new issue