Extreme Thinking
CDN 回源测试

2019-03-19


例如要检查 http://abc.def.ge.com/aaa/ppp.js

源站是 http://111.222.111.222/

用 curl

curl -voppp.js http://abc.def.ge.com/aaa/ppp.js  -x 111.222.111.222:80

* About to connect() to proxy 111.222.111.222 port 80 (#0)
*   Trying 111.222.111.222 ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to 43.254.16.177 (43.254.16.177) port 80 (#0)
> GET http://abc.def.ge.com/aaa/ppp.js HTTP/1.1
> User-Agent: curl/7.29.0
> Host: abc.def.ge.com
> Accept: */*
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 200 OK
< Date: Tue, 19 Mar 2019 02:46:34 GMT
< Server: Apache/2.4.6 (CentOS)
< Last-Modified: Mon, 18 Mar 2019 09:53:27 GMT
< ETag: "14a4-5845b5c30e968"
< Accept-Ranges: bytes
< Content-Length: 5284
< Content-Type: application/javascript
<
{ [data not shown]
100  5284  100  5284    0     0  3951k      0 --:--:-- --:--:-- --:--:-- 5160k
* Connection #0 to host 111.222.111.222 left intact

curl CDN

 curl  -voppp.js http://abc.def.ge.com/aaa/ppp.js
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* About to connect() to www.game277.com port 80 (#0)
*   Trying 130.211.250.75...
* Connected to abc.def.ge.com (130.211.250.75) port 80 (#0)
> GET /scripts/kf.js HTTP/1.1
> User-Agent: curl/7.29.0
> Host: abc.def.ge.com
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: GreyCDN-Tengine
< Date: Tue, 19 Mar 2019 02:45:29 GMT
< Content-Type: application/javascript; charset=utf-8
< Content-Length: 5296
< Connection: keep-alive
< Vary: Accept-Encoding
< Last-Modified: Mon, 18 Mar 2019 09:23:35 GMT
< ETag: "14b0-5845af1666928"
< Expires: Wed, 20 Mar 2019 02:45:29 GMT
< Cache-Control: max-age=86400
< GP-Cache-Status: HIT
< Accept-Ranges: bytes
<
{ [data not shown]
100  5296  100  5296    0     0  72746      0 --:--:-- --:--:-- --:--:-- 73555