优化文案描述 & 新增 TS UDP 优化

This commit is contained in:
CallMeR
2025-12-04 18:22:56 +08:00
parent 9f6a2fe42d
commit 96a23ad48f
7 changed files with 176 additions and 35 deletions
+28
View File
@@ -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