Files
v2ray_simple/examples/socks5.toml

62 lines
1.7 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.
# 本文件可测试socks 的 listen/dial, 以及密码认证 等功能 是否可用;
# 本文件所定义的传导链是: ->socks5->socks5->direct
# 运行该配置后浏览器设置好socks5代理指向 my_socks5_1应可正常上网
# 另外你可以看到listen、dial和 route的顺序是可以打乱的
# 这样 自己可以方便地把相关联的配置放在一起。
# vs未给出http代理的示例配置因为完全和socks5类似只需要把 protocol 改为 http即可
#无用户密码的情况
[[listen]]
tag = "my_socks5_1"
protocol = "socks5"
host = "127.0.0.1"
port = 10800
# 下面的dial 以及listen来测试 用户密码功能
[[dial]]
protocol = "socks5"
tag = "dial1"
host = "127.0.0.1"
port = 10801
#uuid = "user:very\npass:simple" #vs 的逻辑是uuid相当于一个登陆token, 能完整确认一个用户的身份以及登陆权限, 用户名和密码加起来提供了足够的信息足以用做token, 所以都填到uuid里.
uuid = "user:admin\npass:nimda"
[[route]]
fromTag = ["my_socks5_1"]
toTag = "dial1"
[[listen]]
tag = "my_socks5_2"
protocol = "socks5"
host = "127.0.0.1"
port = 10801
#下面给出 toml的 多行字符串 格式 的 本作 的 uuid 的user和pass 格式 的 示范:
uuid = """
user:admin
pass:nimda
"""
# 上面这个格式 根据toml的规范头部是没有 \n 的,但是尾部多了一个 \n, 不过不用担心,我们程序会修剪掉末尾的换行符.
# 或者这种,但是看起来不太美观
#uuid = "user:very\npass:simple"
users = [
{ user = "very", pass = "simple" },
{ user = "v2ray", pass = "hard" },
] #也可以用users 来存储多个用户
[[dial]]
tag = "direct"
protocol = "direct"
[[route]]
fromTag = ["my_socks5_2"]
toTag = "direct"