Files
v2ray_simple/examples/multi.server.toml
e1732a364fed dfebe3f707 修订代码;将fallback的from从string改为[]string
这样可以支持从多个listen fallback到相同的目标,又不至于使用默认回落, 更灵活.
2022-05-06 22:48:15 +08:00

60 lines
1.3 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.
[app]
loglevel = 1
default_uuid = "a684455c-b14f-11ea-bf0d-42010aaa0003"
[[listen]]
tag = "my_vlesss1"
protocol = "vlesss"
host = "0.0.0.0"
port = 4433
insecure = true
fallback = ":80" #默认回落。当[[fallback]]给出的回落都无法匹配后,使用该值进行回落。
cert = "cert.pem"
key = "cert.key"
[[listen]]
tag = "my_ws1"
protocol = "vlesss"
host = "0.0.0.0"
port = 4434
insecure = true
cert = "cert.pem"
key = "cert.key"
advancedLayer = "ws"
path = "/ohmygod_verysimple_is_very_simple"
fallback = 80
[[listen]]
tag = "my_grpc1"
protocol = "vlesss"
host = "0.0.0.0"
port = 4435
insecure = true
cert = "cert.pem"
key = "cert.key"
advancedLayer = "grpc"
path = "ohmygod_verysimple_is_very_simple"
#最简单情况下,服务端 不需要给出任何dial不给出的话实际上程序就会自动加一个 direct。
#[[dial]]
#protocol = "direct"
[[fallback]]
from = ["my_ws1"] # 可选, 标明该fallback用于 哪个tag的 listen。 如果未给出则所有listen都会用到该fallback。
dest = 6060 # 必填,回落到本机端口 6060
path = "/asf" # 可选按path 匹配此 回落
alpn = ["http/1.1"] # 可选,按 alpn 匹配此 回落
# 比如下面这个 fallback 就是所有 listen 共用的一个 fallback
[[fallback]]
path = "/ohmygod_i_love_verysimple"
dest = 8080
alpn = ["http/1.1"]
#xver = 1