Update Mbit.sh

This commit is contained in:
NewName
2024-04-09 02:14:41 +08:00
parent a08b4d54c4
commit b58204d17e

View File

@@ -30,7 +30,7 @@ do
tc class add dev "$INTERFACE" parent 1: classid 1:1 htb rate "${LIMIT}"mbit
tc class add dev "$INTERFACE" parent 1:1 classid 1:12 htb rate "${LIMIT}"mbit
tc filter add dev "$INTERFACE" protocol ip parent 1:0 prio 1 u32 match ip dport "$PORT" 0xffff flowid 1:12
echo -e "${GREEN}网络接口 eth0 的端口 $PORT 带宽限制已设置为 ${LIMIT}Mbit。${NC}"
echo -e "${GREEN}网络接口 $INTERFACE 的端口 $PORT 带宽限制已设置为 ${LIMIT}Mbit。${NC}"
done
echo -e "${YELLOW}如果要更改配置请先清除限速规则sudo tc qdisc del dev $INTERFACE root${NC}"