Files
v2ray_simple/examples/multi.server.toml
2023-02-12 12:53:43 +08:00

100 lines
3.0 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.
[app]
loglevel = 1
default_uuid = "a684455c-b14f-11ea-bf0d-42010aaa0003" # 这个除了作为默认用户以外, 还可用作 "管理员账户"这种用途。
# 每个listen 可以只配置users来配置用户列表然后 这个default_uuid 会作为 每个listen 的uuid 的值。
# 这样作为管理员每个listen自己都能用自己的 账户连上不必再额外对每一个listen 添加一遍 自己的账户。
# [apiServer] # v1.2.5开始, apiServer配置单独在一项中配置
# enable = true # 默认为false
# plain = false # 是否使用明文http, 默认false
# admin_pass = "i_love_verysimple"
# addr = "127.0.0.1:8080"
# key = "/home/vs/key" # 若不用明文http, 可配置tls证书, 若不给出, vs会自动生成随机证书
# cert = "/home/vs/cert"
# prefix = "/myapi"
[[listen]]
tag = "my_vlesss1"
protocol = "vlesss"
ip = "0.0.0.0"
version = -1 # 支持所有vless版本
port = 4433
insecure = true
fallback = ":80" #默认回落。当[[fallback]]给出的回落都无法匹配后,使用该值进行回落。
cert = "cert.pem"
key = "cert.key"
users = [ {user = "a684455c-b14f-11ea-bf0d-42010aaa0004"} , {user = "a684455c-b14f-11ea-bf0d-42010aaa0005"} ]
# extra.tls_rejectUnknownSni = true # 这个开启了的话,防御效果更佳, 不过, 这要求你有真实证书
#sockopt.bbr = true #用户空间的bbr拥塞控制, 仅限linux, see issue #237
[[listen]]
tag = "my_ws1"
protocol = "vlesss"
host = "0.0.0.0"
port = 4434
insecure = true
cert = "cert.pem"
key = "cert.key"
adv = "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"
adv = "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
[[dial]]
tag = "mydirect"
protocol = "direct"
[[dial]]
tag = "my_special_tag_for_this_guy"
protocol = "reject"
[[route]]
toTag = "my_special_tag_for_this_guy"
user = ["a684455c-b14f-11ea-bf0d-42010aaa0004"] #通过 listen 所得到 的 user的不同 来分流
[[dial]]
tag = "my_special_direct"
protocol = "direct"
network = "dual"
sendThrough = "tcp:127.0.0.1:80\nudp:127.0.0.1:12345"
# 这里展示了一种特殊用法direct设置sendThrough, 就能限制它发送数据的端口, 而且tcp和udp可以设为不同的地址
# 注意这个写法 "tcp:ip:port\nudp:ip:port"