Corrected: Some problems of json format

Fix the json format from line 204 to line 295 which contains
1, Objects are supposed to be enclosed in curly braces
2. No comma at the end
pull/83/head
Johnshall 2021-07-14 20:31:22 +08:00 committed by GitHub
parent a6020aa494
commit 1f63070113
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 90 additions and 97 deletions

View File

@ -213,93 +213,86 @@
// └─ 5_outbounds 出站设置 - 流出 Xray 的流量往哪里去 // └─ 5_outbounds 出站设置 - 流出 Xray 的流量往哪里去
{ {
// 1\_日志设置 // 1\_日志设置
log: { "log": {
loglevel: "warning", // 内容从少到多: "none", "error", "warning", "info", "debug" "loglevel": "warning", // 内容从少到多: "none", "error", "warning", "info", "debug"
access: "/home/vpsadmin/xray_log/access.log", // 访问记录 "access": "/home/vpsadmin/xray_log/access.log", // 访问记录
error: "/home/vpsadmin/xray_log/error.log", // 错误记录 "error": "/home/vpsadmin/xray_log/error.log" // 错误记录
}, },
// 2_DNS 设置 // 2_DNS 设置
dns: { "dns": {
servers: [ "servers": [
"https+local://1.1.1.1/dns-query", // 首选 1.1.1.1 的 DoH 查询,牺牲速度但可防止 ISP 偷窥 "https+local://1.1.1.1/dns-query", // 首选 1.1.1.1 的 DoH 查询,牺牲速度但可防止 ISP 偷窥
"localhost", "localhost"
], ]
}, },
// 3*分流设置 // 3*分流设置
routing: { "routing": {
domainStrategy: "AsIs", "domainStrategy": "AsIs",
rules: [ "rules": [
// 3.1 防止服务器本地流转问题:如内网被攻击或滥用、错误的本地回环等 // 3.1 防止服务器本地流转问题:如内网被攻击或滥用、错误的本地回环等
{ {
type: "field", "type": "field",
ip: [ "ip": [
"geoip:private", // 分流条件geoip 文件内,名为"private"的规则(本地) "geoip:private" // 分流条件geoip 文件内,名为"private"的规则(本地)
], ],
outboundTag: "block", // 分流策略:交给出站"block"处理(黑洞屏蔽) "outboundTag": "block" // 分流策略:交给出站"block"处理(黑洞屏蔽)
}, },
// 3.2 屏蔽广告 // 3.2 屏蔽广告
{ {
type: "field", "type": "field",
domain: [ "domain": [
"geosite:category-ads-all", // 分流条件geosite 文件内,名为"category-ads-all"的规则(各种广告域名) "geosite:category-ads-all" // 分流条件geosite 文件内,名为"category-ads-all"的规则(各种广告域名)
],
outboundTag: "block", // 分流策略:交给出站"block"处理(黑洞屏蔽)
},
], ],
"outboundTag": "block" // 分流策略:交给出站"block"处理(黑洞屏蔽)
}
]
}, },
// 4*入站设置 // 4*入站设置
// 4.1 这里只写了一个最简单的 vless+xtls 的入站,因为这是 Xray 最强大的模式。如有其他需要,请根据模版自行添加。 // 4.1 这里只写了一个最简单的 vless+xtls 的入站,因为这是 Xray 最强大的模式。如有其他需要,请根据模版自行添加。
inbounds: [ "inbounds": [{
{ "port": 443,
port: 443, "protocol": "vless",
protocol: "vless", "settings": {
settings: { "clients": [{
clients: [ "id": "", // 填写你的 UUID
{ "flow": "vpsadmin@yourdomain.com",
id: "", // 填写你的 UUID "level": 0,
flow: "xtls-rprx-direct", "email": "vless_xtls"
level: 0, }],
email: "vpsadmin@yourdomain.com", "decryption": "none",
"fallbacks": [{
"dest": 80 // 默认回落到防探测的代理
}]
}, },
], "streamSettings": {
decryption: "none", "network": "tcp",
fallbacks: [ "security": "xtls",
{ "xtlsSettings": {
dest: 80, // 默认回落到防探测的代理 "allowInsecure": false, // 正常使用应确保关闭
}, "minVersion": "1.2", // TLS 最低版本设置
], "alpn": ["http/1.1"],
}, "certificates": [{
streamSettings: { "certificateFile": "/home/vpsadmin/xray_cert/xray.crt",
network: "tcp", "keyFile": "/home/vpsadmin/xray_cert/xray.key"
security: "xtls", }]
xtlsSettings: { }
allowInsecure: false, // 正常使用应确保关闭 }
minVersion: "1.2", // TLS 最低版本设置 }],
alpn: ["http/1.1"],
certificates: [
{
certificateFile: "/home/vpsadmin/xray_cert/xray.crt",
keyFile: "/home/vpsadmin/xray_cert/xray.key",
},
],
},
},
},
],
// 5*出站设置 // 5*出站设置
outbounds: [ "outbounds": [
// 5.1 第一个出站是默认规则freedom 就是对外直连vps 已经是外网,所以直连) // 5.1 第一个出站是默认规则freedom 就是对外直连vps 已经是外网,所以直连)
{ {
tag: "direct", "tag": "direct",
protocol: "freedom", "protocol": "freedom"
}, },
// 5.2 屏蔽规则blackhole 协议就是把流量导入到黑洞里(屏蔽) // 5.2 屏蔽规则blackhole 协议就是把流量导入到黑洞里(屏蔽)
{ {
tag: "block", "tag": "block",
protocol: "blackhole", "protocol": "blackhole"
},
],
} }
]
}
``` ```
5) 完整流程演示如下: 5) 完整流程演示如下: