Files
v2ray_simple/examples/httpheader.server.toml
2022-12-27 19:47:14 +08:00

60 lines
2.2 KiB
TOML
Raw Permalink 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 = "vlesss"
uuid = "a684455c-b14f-11ea-bf0d-42010aaa0003"
host = "0.0.0.0"
port = 4434
insecure = true
fallback = ":80"
cert = "cert.pem"
key = "cert.key"
adv = "ws"
path = "/very"
# 用于读取 回落到 真实http服务器的情况此时我们就不用自定义的响应或默认响应而是用 真实服务器的响应。
# no_resp_h_c 意思是 no response header conditional.
# 一般与fallback配合。一种最简单的例子可以参考 reject.server.toml, 把其中内容复制到本配置中, 就可以在自定义http头的情况下进行回落了。
# header.no_resp_h_c = true
# 我们vs的header验证比v2ray严格必须所有的header 均匹配才能通过。而v2ray默认只验证path等不验证header。
# 不过该严格检查默认是关闭状态
# header.strict = true
# 下面是 http伪装头的 配置
# 完全兼容v2ray, 可参考 https://www.v2fly.org/config/transport/tcp.html#httprequestobject
# 默认值 完全等同于 v2ray 文档中所描述的默认值
# 不过,一旦 某一项 header给出之后所有其它header项将 不在 使用默认值而是等待你赋值不赋值就不传递该header。
[listen.header.request]
version = "1.1"
method = "GET"
path = ["/very", "/simple"] # 每次请求随机选择一个值。
# 每个header所配置的 数组, 每次请求随机选择一个值。
#headers.Connection = [ "keep-alive" ]
# 如果使用 ws, 则 listen的 Connection头 不用给出因为必须是Upgrade; 你给出也是可以的,但是会被无视。
# 如果你给出的Header的首字母小写的则首字母在实际传输中会自动被转换成大写.
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"]
# 还可以配置 response, 道理一样。这里直接省略了,就是使用默认值, 参考 v2ray文档。
[listen.header.response]
# 如果使用 ws, 则 listen.header.response 的 Connection头必须指明为 Upgrade
headers.Connection = ["Upgrade"]
headers.mycustom2 = ["i_agree"]
[[dial]]
protocol = "direct"