Files
v2ray_simple/examples/httpheader.client.toml
2022-11-30 19:32:46 +08:00

49 lines
1.8 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[[listen]]
protocol = "socks5"
host = "127.0.0.1"
port = 10800
[[dial]]
protocol = "vlesss"
uuid = "a684455c-b14f-11ea-bf0d-42010aaa0003"
host = "127.0.0.1"
port = 4434
version = 0
insecure = true
utls = true
advancedLayer = "ws" # ws也可应用我们的http header
path = "/very"
[dial.header.request]
version = "1.1" #如果你用ws, 则这一项不会被用到
method = "GET" #如果你用ws, 则这一项不会被用到
path = ["/very", "/simple"] # 每次请求随机选择一个值。如果你用ws, 则这一项不会被用到
# 如果使用 ws, 且request没有任何 其他的header给出, 则 dial.header.request 的 Connection头必须指明为 Upgrade, 这是因为, headers配置的默认行为是如果你不给出任何header, 就会配置一个默认的header给你而默认的header的 Connection 是 keep-alive, 这个对于ws的握手是无效的。
headers.Connection = ["Upgrade"]
headers.mycustom1 = ["verysimple_is_so_good"]
headers.Host = ["www.baidu.com", "www.bing.com"]
headers.User-Agent = ["Mozilla/5.0 (my fake system)"]
headers.Accept-Encoding = ["gzip, deflate"]
headers.Pragma = ["no-cache"]
# 如果 User-Agent没给出则golang会主动添加一个 User-Agent: Go-http-client/1.1
# 所以最好明示给出 User-Agent; 若 服务端没配置 User-Agent, 我们的vs 服务端 会发现 客户端 多了一项 User-Agent项 而认为非法,而关闭连接。
[dial.header.response]
# 如果使用 ws, 则 Connection头不用给出因为必须是Upgrade; 你给出也是可以的,但是会被无视。
#headers.Connection = [ "Upgrade" ]
headers.mycustom2 = ["i_agree"]
# dial.header.strict = true # 只有在strict开关打开时才会严格地检查header默认是关闭的。