mirror of
https://github.com/e1732a364fed/v2ray_simple.git
synced 2025-10-04 16:32:56 +08:00
修订代码;为 quic的 0-rtt功能做铺垫.
This commit is contained in:
@@ -133,12 +133,11 @@ protocol = "direct"
|
||||
},
|
||||
}
|
||||
|
||||
//tryGetHttp(client, "http://www.baidu.com", t)
|
||||
//tryGetHttp(client, "https://www.qq.com", t)
|
||||
tryGetHttp(client, "http://captive.apple.com", t)
|
||||
tryGetHttp(client, "http://www.msftconnecttest.com/connecttest.txt", t)
|
||||
|
||||
//联通性测试 可参考 https://imldy.cn/posts/99d42f85/
|
||||
// 用这种 captive 测试 不容易遇到 网站无法在 某些地区 如 github action 所在的地区 访问 或者卡顿等情况.
|
||||
}
|
||||
|
||||
func tryGetHttp(client *http.Client, path string, t *testing.T) {
|
||||
@@ -149,7 +148,7 @@ func tryGetHttp(client *http.Client, path string, t *testing.T) {
|
||||
t.FailNow()
|
||||
}
|
||||
|
||||
t.Log("Got,start read")
|
||||
t.Log("Got response, start read")
|
||||
|
||||
bs, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
@@ -162,6 +161,9 @@ func tryGetHttp(client *http.Client, path string, t *testing.T) {
|
||||
if len(bs) > 5 {
|
||||
t.Log("first 5:", string(bs[:5]))
|
||||
|
||||
} else {
|
||||
t.Log("all:", bs)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user