|
发表于 2022-12-21 09:33:46
|
显示全部楼层
- {
- "inbounds": [
- {
- "tag": "user1",//标签名字
- "port": 6666,//监听端口
- "listen":"127.0.0.1",//监听IP,可以改成0.0.0.0监听所有IP
- "protocol": "vmess",//vmess协议
- "settings": {
- "clients": [
- {
- "id": "xxxx",//用户ID
- "level": 1,//用户等级,可以不写,默认为0
- "alterId": 0//固定写0即可
- }
- ]
- },
- "streamSettings": {
- "network":"ws",//使用websocks传输
- "security": "tls",//启用tls加密,如果用nginx前置的情况下删除此项
- "tlsSettings": {//tls加密配置,如果用nginx前置的情况下删除此项
- "serverName": "xxx.com",//域名
- "certificates": [
- {
- "certificateFile": "/xxxx",//证书路径
- "keyFile": "/xxxxx"//私钥路径
- }
- ]
- },
- "wsSettings": {
- "path":"/nl"//路径,可自定义
- }
- }
- }
- ],
- "routing":
- {
- "domainStrategy": "IPIfNonMatch",
- "rules": [
- {
- "type": "field",
- "protocol": [
- "bittorrent"
- ],
- "outboundTag": "blocked" //禁用bt的路由,blocked(黑洞)就是禁止访问
- },
- {
- "type": "field", //固定写法
- "outboundTag": "zf", //指定出站的配置名字,和outbounds下的tag对应
- "inboundTag": ["user1"]
- }]
- },
- "outbounds": [
- {
- "protocol": "freedom",
- "settings": {}
- },
- {
- "tag": "blocked",
- "protocol": "blackhole",
- "settings": {}
- },
- {
- "tag": "zf", //转发分流,使用vmess节点范例
- "protocol": "vmess",
- "settings":
- {
- "vnext":[
- {
- "address": "0.0.0.0", //你转发的节点ip或域名
- "port": 11010, //端口
- "users": [
- {
- "id": "xxxxx",
- "alterId": 0,
- "security": "auto",
- }]
- }]
- },
- "streamSettings":
- {
- "network": "ws",
- //"security": "tls", //对面没用tls加密就注释掉,用了tls加密就去掉注释
- //"tlsSettings": //没tls这一段都注释掉
- //{
- //"allowInsecure": false //是否允许不安全的连接
- //}
- "wsSettings":
- {
- "path": "/ray" //设置的访问路径
- }
- }
- }]
- }
复制代码 |
|