core: 修复国内机器误判为 IPv6 不通

原因是用了 ping dnspod 公共 IPv6 DNS 作为连通性检测
但是这个 DNS 禁 ping
This commit is contained in:
bin456789 2024-08-24 17:28:17 +08:00
parent 49420773dd
commit 665f976a87
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B
4 changed files with 8 additions and 8 deletions

View File

@ -151,7 +151,7 @@ bash reinstall.sh centos 9
### Feature 2: DD
- Supports `raw` `vhd` `gzip` and `xz` formatted images
- Supports `raw`, `vhd`, `gzip` and `xz` formatted images
- When using DD with a Windows image, the script will automatically expand the system partition. For static IP machines, the IP will be configured automatically, and it may take a few minutes to take effect on first boot
```bash

View File

@ -151,7 +151,7 @@ bash reinstall.sh centos 9
### 功能 2: DD
- 支持 `raw` `vhd` `gzip``xz` 格式的镜像
- 支持 `raw``vhd``gzip``xz` 格式的镜像
- DD Windows 镜像时,会自动扩展系统盘。静态的机器会自动配置好 IP可能首次开机几分钟后才生效
```bash

View File

@ -10,10 +10,10 @@ ipv6_gateway=$5
is_in_china=$6
if $is_in_china; then
ipv4_dns1='119.29.29.29'
ipv4_dns2='223.5.5.5'
ipv6_dns1='2402:4e00::'
ipv6_dns2='2400:3200::1'
ipv4_dns1='223.5.5.5'
ipv4_dns2='119.29.29.29'
ipv6_dns1='2400:3200::1'
ipv6_dns2='2402:4e00::'
else
ipv4_dns1='1.1.1.1'
ipv4_dns2='8.8.8.8'

View File

@ -247,8 +247,8 @@ test_url_real() {
echo $url
for i in $(seq 5 -1 0); do
if command curl --insecure --connect-timeout 10 -Lfr 0-1048575 "$url" \
1> >(dd bs=1M count=1 of=$tmp_file iflag=fullblock 2>/dev/null) \
2> >(grep -v 'curl: (23)' >&2); then
1> >(exec dd bs=1M count=1 of=$tmp_file iflag=fullblock 2>/dev/null) \
2> >(exec grep -v 'curl: (23)' >&2); then
break
else
ret=$?