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

60 lines
1.6 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.
# 本文件先监听 vlesss然后 各种回落
[app]
default_uuid = "a684455c-b14f-11ea-bf0d-42010aaa0003"
[[listen]]
tag = "vlesstls"
protocol = "vlesss"
ip = "0.0.0.0"
host = "your-domain-name.com"
port = 8443
cert = "cert.pem"
key = "cert.key"
[[fallback]]
from = ["vlesstls"]
alpn = ["http/1.1"] # 注意, 你的回落的协议要明确指出 alpn, 比如你要回落到vless+ws, 那么你对应的客户端的ws的dial部分 要配置好 这个 http/1.1 作为 alpn, 你不指出那么显然就没alpn, 当然就连不上这不怨vs。
dest = "@vlessws" # dest 也可以写成 这种形式, 直接匹配tag, 可防止笔误。另外要注意,我们回落 一定是要 回落到 listen的所以 你不要 设成 某个 dial的 tag一定要设成 listen 的 tag。
[[fallback]]
from = ["vlesstls"]
alpn = ["h2"]
dest = "@vlessgrpc"
[[listen]]
tag = "vlessws"
protocol = "vless"
network = "unix"
host = "/dev/shm/ws.sock" # 别忘了加双引号
adv = "ws"
path = "/simple"
[[fallback]]
from = ["vlessws"]
dest = "/dev/shm/h1.sock" # 回落到 nginx的 h1 服务你要配置nginx监听这个文件
[[listen]]
tag = "vlessgrpc"
protocol = "vless"
network = "unix" # 监听unix domain socket 必须要 给出 network 为 unix
host = "/dev/shm/grpc.sock" # 你必须要保证 /dev/shm路径存在且你具有写权限才行。
adv = "grpc"
path = "very"
[[fallback]]
from = ["vlessgrpc"]
dest = "/dev/shm/h2c.sock" # 回落到 nginx的 h2c 服务你要配置nginx监听这个文件
[[fallback]] #啥也没匹配时 的默认 回落 本机端口号
dest = 80