vps 作为 http 客户端
访问某些网页(例如 google, qq, 1.1.1.1 )会出现 Connection reset
访问某些网页(例如 baidu )却正常
访问 https 网页,全都正常
求原因
具体:
http 访问 baidu,成功率 100%
curl -v http://www.baidu.com/
* About to connect() to www.baidu.com port 80 (#0)
* Trying 103.235.46.39...
* Connected to www.baidu.com (103.235.46.39) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: www.baidu.com
> Accept: */*
>
< HTTP/1.1 200 OK
http 访问 google/qq/ 1.1.1.1,10 次大约有 1 次正常,其余 9 次 Connection reset by peer
curl -v http://1.1.1.1/
* About to connect() to 1.1.1.1 port 80 (#0)
* Trying 1.1.1.1...
* Connected to 1.1.1.1 (1.1.1.1) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 1.1.1.1
> Accept: */*
>
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer
https 访问,全都正常
curl -v https://1.1.1.1/
* About to connect() to 1.1.1.1 port 443 (#0)
* Trying 1.1.1.1...
* Connected to 1.1.1.1 (1.1.1.1) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* SSL connection using TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
* Server certificate:
* subject: CN=cloudflare-dns.com,O="Cloudflare, Inc.",L=San Francisco,ST=California,C=US
* start date: Jan 28 00:00:00 2019 GMT
* expire date: Feb 01 12:00:00 2021 GMT
* common name: cloudflare-dns.com
* issuer: CN=DigiCert ECC Secure Server CA,O=DigiCert Inc,C=US
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 1.1.1.1
> Accept: */*
>
< HTTP/1.1 200 OK