mirror of
https://github.com/kejilion/sh.git
synced 2025-10-03 23:34:20 +08:00
Modify network preference handling in kejilion.sh
This commit is contained in:
parent
b2835c2f8e
commit
bfc15210d3
1 changed files with 2 additions and 2 deletions
|
@ -12559,12 +12559,12 @@ EOF
|
|||
|
||||
case $choice in
|
||||
1)
|
||||
sysctl -w net.ipv6.conf.all.disable_ipv6=1 > /dev/null 2>&1
|
||||
grep -q '^precedence ::ffff:0:0/96 100' /etc/gai.conf 2>/dev/null \ || echo 'precedence ::ffff:0:0/96 100' >> /etc/gai.conf
|
||||
echo "已切换为 IPv4 优先"
|
||||
send_stats "已切换为 IPv4 优先"
|
||||
;;
|
||||
2)
|
||||
sysctl -w net.ipv6.conf.all.disable_ipv6=0 > /dev/null 2>&1
|
||||
rm -f /etc/gai.conf
|
||||
echo "已切换为 IPv6 优先"
|
||||
send_stats "已切换为 IPv6 优先"
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue