mirror of
https://gitee.com/callmer/pve_toss_notes.git
synced 2026-08-31 14:02:53 +08:00
优化文案描述 & 新增 TS UDP 优化
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
ETHTOOL_PATH=$(command -v ethtool)
|
||||
|
||||
if [ -z "$ETHTOOL_PATH" ]; then
|
||||
echo "Error: ethtool command not found. Please install ethtool."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
NETDEV=$(ip route show default | awk '{for (i=1; i<=NF; i++) {if ($i == "dev") {print $(i+1); exit;}}}')
|
||||
|
||||
if [ -z "$NETDEV" ]; then
|
||||
echo "Error: Could not determine default network device using 'ip route show default'."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Configuring network device $NETDEV using $ETHTOOL_PATH for Tailscale optimizations..."
|
||||
|
||||
"$ETHTOOL_PATH" -K "$NETDEV" rx-udp-gro-forwarding on rx-gro-list off
|
||||
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "Configuration successful for $NETDEV."
|
||||
exit 0
|
||||
else
|
||||
echo "Error: ethtool configuration failed. Check permissions or device status."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# This configuration file is customized by fox,
|
||||
# Optimize for TS UDP performance.
|
||||
|
||||
[Unit]
|
||||
Description=Tailscale Network Optimization for Subnet/Exit Nodes
|
||||
ConditionVirtualization=!container
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
Before=tailscaled.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/local/bin/tailscale-nic-optim.sh
|
||||
RemainAfterExit=yes
|
||||
StandardOutput=journal
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
# This configuration file is customized by fox,
|
||||
# Optimize netfilter related modules at system boot.
|
||||
|
||||
nf_conntrack
|
||||
|
||||
Reference in New Issue
Block a user