修订代码, 默认loglevel 改为 Log_info.

对一般用户而言,还是需要使用Info等级 来了解一下 一般的 日志情况,等到使用熟练之后,且确认运行没有错误后, 可以自行调为 warning 来提升性能

发现 bubble包 还自己引入了 命令行参数,这十分不可取,所以我们还是直接使用其代码。

将其它包中 的 命令行参数 统一 移动 到 cmd/verysimple 中;tls lazy 特性因为还在 调试阶段,所以 命令行参数 仍然放到 v2ray_simple 包中。
This commit is contained in:
e1732a364fed
2022-04-26 13:22:18 +08:00
parent 9d5b553e01
commit f28f0d0bee
27 changed files with 460 additions and 415 deletions

View File

@@ -14,19 +14,19 @@ import (
)
func TestTCP_vless(t *testing.T) {
testTCP("vless", 0, "tcp", false, t)
testTCP(t, "vless", 0, "tcp", false)
}
func TestTCP_trojan(t *testing.T) {
testTCP("trojan", 0, "tcp", false, t)
testTCP(t, "trojan", 0, "tcp", false)
}
func TestTCP_trojan_mux(t *testing.T) {
testTCP("trojan", 0, "tcp", true, t)
testTCP(t, "trojan", 0, "tcp", true)
}
//tcp测试我们直接使用http请求来测试
func testTCP(protocol string, version int, network string, innermux bool, t *testing.T) {
func testTCP(t *testing.T, protocol string, version int, network string, innermux bool) {
utils.LogLevel = utils.Log_debug
utils.InitLog()
@@ -133,14 +133,14 @@ protocol = "direct"
},
}
tryGetHttp(client, "http://captive.apple.com", t)
tryGetHttp(client, "http://www.msftconnecttest.com/connecttest.txt", t)
tryGetHttp(t, client, "http://captive.apple.com")
tryGetHttp(t, client, "http://www.msftconnecttest.com/connecttest.txt")
//联通性测试 可参考 https://imldy.cn/posts/99d42f85/
// 用这种 captive 测试 不容易遇到 网站无法在 某些地区 如 github action 所在的地区 访问 或者卡顿等情况.
}
func tryGetHttp(client *http.Client, path string, t *testing.T) {
func tryGetHttp(t *testing.T, client *http.Client, path string) {
t.Log("start dial", path)
resp, err := client.Get(path)
if err != nil {