mirror of
https://github.com/XTLS/Xray-docs-next.git
synced 2026-09-27 17:38:05 +03:00
Make JSON examples more user-friendly with parent context and focused snippets
This commit is contained in:
@@ -23,14 +23,22 @@ HTTP 协议。
|
||||
|
||||
```json
|
||||
{
|
||||
"users": [
|
||||
"inbounds": [
|
||||
{
|
||||
"user": "my-username",
|
||||
"pass": "my-password"
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:8]
|
||||
"users": [
|
||||
{
|
||||
"user": "my-username",
|
||||
"pass": "my-password"
|
||||
}
|
||||
],
|
||||
"allowTransparent": false,
|
||||
"userLevel": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"allowTransparent": false,
|
||||
"userLevel": 0
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -8,12 +8,20 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"version": 2,
|
||||
"users": [
|
||||
"inbounds": [
|
||||
{
|
||||
"auth": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"level": 0,
|
||||
"email": "love@xray.com"
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:8]
|
||||
"version": 2,
|
||||
"users": [
|
||||
{
|
||||
"auth": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"level": 0,
|
||||
"email": "love@xray.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -31,19 +31,25 @@ Shadowsocks 2022 新协议格式提升了性能并带有完整的重放保护,
|
||||
|
||||
```json
|
||||
{
|
||||
"settings": {
|
||||
"network": "tcp,udp",
|
||||
"method": "aes-256-gcm",
|
||||
"password": "114514",
|
||||
"level": 0,
|
||||
"email": "love@xray.com",
|
||||
"users": [
|
||||
{
|
||||
"password": "1919810",
|
||||
"method": "aes-128-gcm"
|
||||
"inbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:11]
|
||||
"network": "tcp,udp",
|
||||
"method": "aes-256-gcm",
|
||||
"password": "114514",
|
||||
"level": 0,
|
||||
"email": "love@xray.com",
|
||||
"users": [
|
||||
{
|
||||
"password": "1919810",
|
||||
"method": "aes-128-gcm"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -12,16 +12,24 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"auth": "noauth",
|
||||
"users": [
|
||||
"inbounds": [
|
||||
{
|
||||
"user": "my-username",
|
||||
"pass": "my-password"
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:10]
|
||||
"auth": "noauth",
|
||||
"users": [
|
||||
{
|
||||
"user": "my-username",
|
||||
"pass": "my-password"
|
||||
}
|
||||
],
|
||||
"udp": false,
|
||||
"ip": "127.0.0.1",
|
||||
"userLevel": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"udp": false,
|
||||
"ip": "127.0.0.1",
|
||||
"userLevel": 0
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,16 +10,24 @@ Trojan 被设计工作在正确配置的加密 TLS 隧道
|
||||
|
||||
```json
|
||||
{
|
||||
"users": [
|
||||
"inbounds": [
|
||||
{
|
||||
"password": "password",
|
||||
"email": "love@xray.com",
|
||||
"level": 0
|
||||
}
|
||||
],
|
||||
"fallbacks": [
|
||||
{
|
||||
"dest": 80
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:12]
|
||||
"users": [
|
||||
{
|
||||
"password": "password",
|
||||
"email": "love@xray.com",
|
||||
"level": 0
|
||||
}
|
||||
],
|
||||
"fallbacks": [
|
||||
{
|
||||
"dest": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -6,13 +6,21 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "xray0",
|
||||
"mtu": 1500,
|
||||
"gateway": ["10.0.0.1/16", "fc00::1/64"],
|
||||
"dns": ["1.1.1.1", "8.8.8.8"],
|
||||
"userLevel": 0,
|
||||
"autoSystemRoutingTable": ["0.0.0.0/0", "::/0"],
|
||||
"autoOutboundsInterface": "auto"
|
||||
"inbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:7]
|
||||
"name": "xray0",
|
||||
"mtu": 1500,
|
||||
"gateway": ["10.0.0.1/16", "fc00::1/64"],
|
||||
"dns": ["1.1.1.1", "8.8.8.8"],
|
||||
"userLevel": 0,
|
||||
"autoSystemRoutingTable": ["0.0.0.0/0", "::/0"],
|
||||
"autoOutboundsInterface": "auto"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -6,16 +6,24 @@ Tunnel(隧道),旧称 dokodemo-door(任意门),可以监听数个本
|
||||
|
||||
```json
|
||||
{
|
||||
"allowedNetwork": "tcp",
|
||||
"rewriteAddress": "8.8.8.8",
|
||||
"rewritePort": 53,
|
||||
"portMap": {
|
||||
"5555": "1.1.1.1:7777",
|
||||
"5556": ":8888", // overrides port only
|
||||
"5557": "example.com:" // overrides address only
|
||||
},
|
||||
"followRedirect": false,
|
||||
"userLevel": 0
|
||||
"inbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:10]
|
||||
"allowedNetwork": "tcp",
|
||||
"rewriteAddress": "8.8.8.8",
|
||||
"rewritePort": 53,
|
||||
"portMap": {
|
||||
"5555": "1.1.1.1:7777",
|
||||
"5556": ":8888", // overrides port only
|
||||
"5557": "example.com:" // overrides address only
|
||||
},
|
||||
"followRedirect": false,
|
||||
"userLevel": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -8,19 +8,27 @@ VLESS 是一个无状态的轻量传输协议,它分为入站和出站两部
|
||||
|
||||
```json
|
||||
{
|
||||
"users": [
|
||||
"inbounds": [
|
||||
{
|
||||
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"level": 0,
|
||||
"email": "love@xray.com",
|
||||
"flow": "xtls-rprx-vision",
|
||||
"reverse": {}
|
||||
}
|
||||
],
|
||||
"decryption": "none",
|
||||
"fallbacks": [
|
||||
{
|
||||
"dest": 80
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:15]
|
||||
"users": [
|
||||
{
|
||||
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"level": 0,
|
||||
"email": "love@xray.com",
|
||||
"flow": "xtls-rprx-vision",
|
||||
"reverse": {}
|
||||
}
|
||||
],
|
||||
"decryption": "none",
|
||||
"fallbacks": [
|
||||
{
|
||||
"dest": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -10,16 +10,24 @@ VMess 依赖于系统时间,请确保使用 Xray 的系统 UTC 时间误差在
|
||||
|
||||
```json
|
||||
{
|
||||
"users": [
|
||||
"inbounds": [
|
||||
{
|
||||
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"level": 0,
|
||||
"email": "love@xray.com"
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:10]
|
||||
"users": [
|
||||
{
|
||||
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"level": 0,
|
||||
"email": "love@xray.com"
|
||||
}
|
||||
],
|
||||
"default": {
|
||||
"level": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"default": {
|
||||
"level": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,14 +10,22 @@ User-space Wireguard 协议实现。
|
||||
|
||||
```json
|
||||
{
|
||||
"secretKey": "PRIVATE_KEY",
|
||||
"peers": [
|
||||
"inbounds": [
|
||||
{
|
||||
"publicKey": "PUBLIC_KEY",
|
||||
"allowedIPs": [""]
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:8]
|
||||
"secretKey": "PRIVATE_KEY",
|
||||
"peers": [
|
||||
{
|
||||
"publicKey": "PUBLIC_KEY",
|
||||
"allowedIPs": [""]
|
||||
}
|
||||
],
|
||||
"mtu": 1420 // optional, default 1420
|
||||
}
|
||||
}
|
||||
],
|
||||
"mtu": 1420 // optional, default 1420
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -6,9 +6,17 @@ Blackhole(黑洞)是一个出站数据协议,它会阻碍所有数据的
|
||||
|
||||
```json
|
||||
{
|
||||
"response": {
|
||||
"type": "none"
|
||||
}
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:3]
|
||||
"response": {
|
||||
"type": "none"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,19 +10,27 @@ DNS 是一个出站协议,用于接收由 routing 送入的 DNS 查询,并
|
||||
|
||||
```json
|
||||
{
|
||||
"rewriteNetwork": "udp",
|
||||
"rewriteAddress": "1.1.1.1",
|
||||
"rewritePort": 53,
|
||||
"userLevel": 0,
|
||||
"rules": [
|
||||
"outbounds": [
|
||||
{
|
||||
"action": "reject",
|
||||
"domain": ["domain:example.com"]
|
||||
},
|
||||
{
|
||||
"action": "direct",
|
||||
"qtype": 65,
|
||||
"domain": ["geosite:geolocation-!cn"]
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:15]
|
||||
"rewriteNetwork": "udp",
|
||||
"rewriteAddress": "1.1.1.1",
|
||||
"rewritePort": 53,
|
||||
"userLevel": 0,
|
||||
"rules": [
|
||||
{
|
||||
"action": "reject",
|
||||
"domain": ["domain:example.com"]
|
||||
},
|
||||
{
|
||||
"action": "direct",
|
||||
"qtype": 65,
|
||||
"domain": ["geosite:geolocation-!cn"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -10,31 +10,39 @@ Freedom 是一个出站协议,可以用来向任意网络发送(正常的)
|
||||
|
||||
```json
|
||||
{
|
||||
"domainStrategy": "AsIs",
|
||||
"redirect": "127.0.0.1:3366",
|
||||
"userLevel": 0,
|
||||
"fragment": {
|
||||
"packets": "tlshello",
|
||||
"length": "100-200",
|
||||
"interval": "10-20" // 单位ms
|
||||
},
|
||||
"noises": [
|
||||
"outbounds": [
|
||||
{
|
||||
"type": "base64",
|
||||
"packet": "7nQBAAABAAAAAAAABnQtcmluZwZtc2VkZ2UDbmV0AAABAAE=",
|
||||
"delay": "10-16"
|
||||
}
|
||||
],
|
||||
"proxyProtocol": 0,
|
||||
"finalRules": [
|
||||
{
|
||||
"action": "block",
|
||||
"network": "tcp",
|
||||
"port": "22,25,465,587"
|
||||
},
|
||||
{
|
||||
"action": "block",
|
||||
"ip": ["geoip:cn"]
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:27]
|
||||
"domainStrategy": "AsIs",
|
||||
"redirect": "127.0.0.1:3366",
|
||||
"userLevel": 0,
|
||||
"fragment": {
|
||||
"packets": "tlshello",
|
||||
"length": "100-200",
|
||||
"interval": "10-20" // 单位ms
|
||||
},
|
||||
"noises": [
|
||||
{
|
||||
"type": "base64",
|
||||
"packet": "7nQBAAABAAAAAAAABnQtcmluZwZtc2VkZ2UDbmV0AAABAAE=",
|
||||
"delay": "10-16"
|
||||
}
|
||||
],
|
||||
"proxyProtocol": 0,
|
||||
"finalRules": [
|
||||
{
|
||||
"action": "block",
|
||||
"network": "tcp",
|
||||
"port": "22,25,465,587"
|
||||
},
|
||||
{
|
||||
"action": "block",
|
||||
"ip": ["geoip:cn"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -14,16 +14,24 @@ HTTP 协议。
|
||||
|
||||
```json
|
||||
{
|
||||
"address": "192.168.108.1",
|
||||
"port": 3128,
|
||||
"user": "my-username",
|
||||
"pass": "my-password",
|
||||
"level": 0,
|
||||
"email": "love@xray.com",
|
||||
"headers": {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36",
|
||||
"Accept-Language": "zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2"
|
||||
}
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:10]
|
||||
"address": "192.168.108.1",
|
||||
"port": 3128,
|
||||
"user": "my-username",
|
||||
"pass": "my-password",
|
||||
"level": 0,
|
||||
"email": "love@xray.com",
|
||||
"headers": {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36",
|
||||
"Accept-Language": "zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -12,9 +12,17 @@ Hysteria 协议的客户端实现。
|
||||
|
||||
```json
|
||||
{
|
||||
"version": 2,
|
||||
"address": "192.168.108.1",
|
||||
"port": 3128
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:3]
|
||||
"version": 2,
|
||||
"address": "192.168.108.1",
|
||||
"port": 3128
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -6,7 +6,15 @@ Loopback 是个出站数据协议,其作用为将经该出站传出的数据
|
||||
|
||||
```json
|
||||
{
|
||||
"inboundTag": "TagUseAsInbound"
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:1]
|
||||
"inboundTag": "TagUseAsInbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -31,14 +31,22 @@ Shadowsocks 2022 新协议格式提升了性能并带有完整的重放保护,
|
||||
|
||||
```json
|
||||
{
|
||||
"email": "love@xray.com",
|
||||
"address": "127.0.0.1",
|
||||
"port": 1234,
|
||||
"method": "加密方式",
|
||||
"password": "密码",
|
||||
"uot": true,
|
||||
"UoTVersion": 2,
|
||||
"level": 0
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:8]
|
||||
"email": "love@xray.com",
|
||||
"address": "127.0.0.1",
|
||||
"port": 1234,
|
||||
"method": "加密方式",
|
||||
"password": "密码",
|
||||
"uot": true,
|
||||
"UoTVersion": 2,
|
||||
"level": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,12 +10,20 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"port": 1234,
|
||||
"user": "test user",
|
||||
"pass": "test pass",
|
||||
"level": 0,
|
||||
"email": "love@xray.com"
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:6]
|
||||
"address": "127.0.0.1",
|
||||
"port": 1234,
|
||||
"user": "test user",
|
||||
"pass": "test pass",
|
||||
"level": 0,
|
||||
"email": "love@xray.com"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,11 +10,19 @@ Trojan 被设计工作在正确配置的加密 TLS 隧道
|
||||
|
||||
```json
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"port": 1234,
|
||||
"password": "password",
|
||||
"email": "love@xray.com",
|
||||
"level": 0
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:5]
|
||||
"address": "127.0.0.1",
|
||||
"port": 1234,
|
||||
"password": "password",
|
||||
"email": "love@xray.com",
|
||||
"level": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -8,13 +8,21 @@ VLESS 是一个无状态的轻量传输协议,它分为入站和出站两部
|
||||
|
||||
```json
|
||||
{
|
||||
"address": "example.com",
|
||||
"port": 443,
|
||||
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"encryption": "none",
|
||||
"flow": "xtls-rprx-vision",
|
||||
"level": 0,
|
||||
"reverse": {}
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:7]
|
||||
"address": "example.com",
|
||||
"port": 443,
|
||||
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"encryption": "none",
|
||||
"flow": "xtls-rprx-vision",
|
||||
"level": 0,
|
||||
"reverse": {}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,12 +10,20 @@ VMess 依赖于系统时间,请确保使用 Xray 的系统 UTC 时间误差在
|
||||
|
||||
```json
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"port": 37192,
|
||||
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"security": "auto",
|
||||
"level": 0,
|
||||
"experiments": ""
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:6]
|
||||
"address": "127.0.0.1",
|
||||
"port": 37192,
|
||||
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"security": "auto",
|
||||
"level": 0,
|
||||
"experiments": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,24 +10,32 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"secretKey": "PRIVATE_KEY",
|
||||
"address": [
|
||||
// optional, default ["10.0.0.1", "fd59:7153:2388:b5fd:0000:0000:0000:0001"]
|
||||
"IPv4_CIDR",
|
||||
"IPv6_CIDR",
|
||||
"and more..."
|
||||
],
|
||||
"peers": [
|
||||
"outbounds": [
|
||||
{
|
||||
"endpoint": "ENDPOINT_ADDR",
|
||||
"publicKey": "PUBLIC_KEY"
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:18]
|
||||
"secretKey": "PRIVATE_KEY",
|
||||
"address": [
|
||||
// optional, default ["10.0.0.1", "fd59:7153:2388:b5fd:0000:0000:0000:0001"]
|
||||
"IPv4_CIDR",
|
||||
"IPv6_CIDR",
|
||||
"and more..."
|
||||
],
|
||||
"peers": [
|
||||
{
|
||||
"endpoint": "ENDPOINT_ADDR",
|
||||
"publicKey": "PUBLIC_KEY"
|
||||
}
|
||||
],
|
||||
"noKernelTun": false,
|
||||
"mtu": 1420, // optional, default 1420
|
||||
"reserved": [1, 2, 3],
|
||||
"workers": 2, // optional, default runtime.NumCPU()
|
||||
"domainStrategy": "ForceIP"
|
||||
}
|
||||
}
|
||||
],
|
||||
"noKernelTun": false,
|
||||
"mtu": 1420, // optional, default 1420
|
||||
"reserved": [1, 2, 3],
|
||||
"workers": 2, // optional, default runtime.NumCPU()
|
||||
"domainStrategy": "ForceIP"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
+43
-34
@@ -10,40 +10,49 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"network": "raw",
|
||||
"security": "none",
|
||||
"tlsSettings": {},
|
||||
"realitySettings": {},
|
||||
"rawSettings": {},
|
||||
"xhttpSettings": {},
|
||||
"kcpSettings": {},
|
||||
"grpcSettings": {},
|
||||
"wsSettings": {},
|
||||
"httpupgradeSettings": {},
|
||||
"hysteriaSettings": {},
|
||||
"finalmask": {
|
||||
"tcp": [],
|
||||
"udp": [],
|
||||
"quicParams": {}
|
||||
},
|
||||
"sockopt": {
|
||||
"mark": 0,
|
||||
"tcpMaxSeg": 1440,
|
||||
"tcpFastOpen": false,
|
||||
"tproxy": "off",
|
||||
"domainStrategy": "AsIs",
|
||||
"happyEyeballs": {},
|
||||
"dialerProxy": "",
|
||||
"acceptProxyProtocol": false,
|
||||
"tcpKeepAliveInterval": 0,
|
||||
"tcpKeepAliveIdle": 300,
|
||||
"tcpUserTimeout": 10000,
|
||||
"tcpCongestion": "bbr",
|
||||
"interface": "wg0",
|
||||
"v6only": false,
|
||||
"tcpWindowClamp": 600,
|
||||
"tcpMptcp": false
|
||||
}
|
||||
// outbound 示例,同样可用于 inbound
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"streamSettings": {
|
||||
// [!code focus:34]
|
||||
"network": "raw",
|
||||
"security": "none",
|
||||
"tlsSettings": {},
|
||||
"realitySettings": {},
|
||||
"rawSettings": {},
|
||||
"xhttpSettings": {},
|
||||
"kcpSettings": {},
|
||||
"grpcSettings": {},
|
||||
"wsSettings": {},
|
||||
"httpupgradeSettings": {},
|
||||
"hysteriaSettings": {},
|
||||
"finalmask": {
|
||||
"tcp": [],
|
||||
"udp": [],
|
||||
"quicParams": {}
|
||||
},
|
||||
"sockopt": {
|
||||
"mark": 0,
|
||||
"tcpMaxSeg": 1440,
|
||||
"tcpFastOpen": false,
|
||||
"tproxy": "off",
|
||||
"domainStrategy": "AsIs",
|
||||
"happyEyeballs": {},
|
||||
"dialerProxy": "",
|
||||
"acceptProxyProtocol": false,
|
||||
"tcpKeepAliveInterval": 0,
|
||||
"tcpKeepAliveIdle": 300,
|
||||
"tcpUserTimeout": 10000,
|
||||
"tcpCongestion": "bbr",
|
||||
"interface": "wg0",
|
||||
"v6only": false,
|
||||
"tcpWindowClamp": 600,
|
||||
"tcpMptcp": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -39,14 +39,26 @@ gRPC(HTTP/2)内置多路复用,不建议使用 gRPC 与 HTTP/2 时启用 m
|
||||
|
||||
```json
|
||||
{
|
||||
"authority": "grpc.example.com",
|
||||
"serviceName": "name",
|
||||
"multiMode": false,
|
||||
"user_agent": "custom user agent",
|
||||
"idle_timeout": 60,
|
||||
"health_check_timeout": 20,
|
||||
"permit_without_stream": false,
|
||||
"initial_windows_size": 0
|
||||
// outbound 示例,同样可用于 inbound
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"streamSettings": {
|
||||
"network": "grpc",
|
||||
"grpcSettings": {
|
||||
// [!code focus:8]
|
||||
"authority": "grpc.example.com",
|
||||
"serviceName": "name",
|
||||
"multiMode": false,
|
||||
"user_agent": "custom user agent",
|
||||
"idle_timeout": 60,
|
||||
"health_check_timeout": 20,
|
||||
"permit_without_stream": false,
|
||||
"initial_windows_size": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -13,12 +13,24 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"acceptProxyProtocol": false,
|
||||
"path": "/",
|
||||
"host": "xray.com",
|
||||
"headers": {
|
||||
"key": "value"
|
||||
}
|
||||
// outbound 示例,同样可用于 inbound
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"streamSettings": {
|
||||
"network": "httpupgrade",
|
||||
"httpupgradeSettings": {
|
||||
// [!code focus:6]
|
||||
"acceptProxyProtocol": false,
|
||||
"path": "/",
|
||||
"host": "xray.com",
|
||||
"headers": {
|
||||
"key": "value"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -8,24 +8,33 @@ Hysteria2 的底层 QUIC 传输的 Xray 实现,通常搭配 hysteria[出站](.
|
||||
|
||||
```json
|
||||
{
|
||||
"version": 2,
|
||||
"auth": "password",
|
||||
"udpIdleTimeout": 60,
|
||||
"masquerade": {
|
||||
"type": "",
|
||||
|
||||
"dir": "",
|
||||
|
||||
"url": "",
|
||||
"rewriteHost": false,
|
||||
"insecure": false,
|
||||
|
||||
"content": "",
|
||||
"headers": {
|
||||
"key": "value"
|
||||
},
|
||||
"statusCode": 0
|
||||
}
|
||||
// outbound 示例,同样可用于 inbound
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"streamSettings": {
|
||||
"network": "hysteria",
|
||||
"hysteriaSettings": {
|
||||
// [!code focus:14]
|
||||
"version": 2,
|
||||
"auth": "password",
|
||||
"udpIdleTimeout": 60,
|
||||
"masquerade": {
|
||||
"type": "",
|
||||
"dir": "",
|
||||
"url": "",
|
||||
"rewriteHost": false,
|
||||
"insecure": false,
|
||||
"content": "",
|
||||
"headers": {
|
||||
"key": "value"
|
||||
},
|
||||
"statusCode": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -14,13 +14,25 @@ mKCP 牺牲带宽来降低延迟。传输同样的内容,mKCP 一般比 TCP
|
||||
|
||||
```json
|
||||
{
|
||||
"mtu": 1350,
|
||||
"tti": 20,
|
||||
"uplinkCapacity": 5,
|
||||
"downlinkCapacity": 20,
|
||||
"congestion": false,
|
||||
"readBufferSize": 1,
|
||||
"writeBufferSize": 1
|
||||
// outbound 示例,同样可用于 inbound
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"streamSettings": {
|
||||
"network": "mkcp",
|
||||
"kcpSettings": {
|
||||
// [!code focus:7]
|
||||
"mtu": 1350,
|
||||
"tti": 20,
|
||||
"uplinkCapacity": 5,
|
||||
"downlinkCapacity": 20,
|
||||
"congestion": false,
|
||||
"readBufferSize": 1,
|
||||
"writeBufferSize": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,10 +10,22 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"acceptProxyProtocol": false,
|
||||
"header": {
|
||||
"type": "none"
|
||||
}
|
||||
// outbound 示例,同样可用于 inbound
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"streamSettings": {
|
||||
"network": "raw",
|
||||
"rawSettings": {
|
||||
// [!code focus:4]
|
||||
"acceptProxyProtocol": false,
|
||||
"header": {
|
||||
"type": "none"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -18,13 +18,25 @@ Websocket 会识别 HTTP 请求的 X-Forwarded-For 头来覆写流量的源地
|
||||
|
||||
```json
|
||||
{
|
||||
"acceptProxyProtocol": false,
|
||||
"path": "/",
|
||||
"host": "xray.com",
|
||||
"headers": {
|
||||
"key": "value"
|
||||
},
|
||||
"heartbeatPeriod": 10
|
||||
// outbound 示例,同样可用于 inbound
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"streamSettings": {
|
||||
"network": "websocket",
|
||||
"wsSettings": {
|
||||
// [!code focus:7]
|
||||
"acceptProxyProtocol": false,
|
||||
"path": "/",
|
||||
"host": "xray.com",
|
||||
"headers": {
|
||||
"key": "value"
|
||||
},
|
||||
"heartbeatPeriod": 10
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -23,14 +23,22 @@ Use the following environment variables in Linux to enable a global HTTP proxy f
|
||||
|
||||
```json
|
||||
{
|
||||
"users": [
|
||||
"inbounds": [
|
||||
{
|
||||
"user": "my-username",
|
||||
"pass": "my-password"
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:8]
|
||||
"users": [
|
||||
{
|
||||
"user": "my-username",
|
||||
"pass": "my-password"
|
||||
}
|
||||
],
|
||||
"allowTransparent": false,
|
||||
"userLevel": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"allowTransparent": false,
|
||||
"userLevel": 0
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -8,12 +8,20 @@ The `hysteria protocol` itself has no authentication; `users` only take effect w
|
||||
|
||||
```json
|
||||
{
|
||||
"version": 2,
|
||||
"users": [
|
||||
"inbounds": [
|
||||
{
|
||||
"auth": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"level": 0,
|
||||
"email": "love@xray.com"
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:8]
|
||||
"version": 2,
|
||||
"users": [
|
||||
{
|
||||
"auth": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"level": 0,
|
||||
"email": "love@xray.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -31,19 +31,25 @@ Under the "none" encryption method, traffic will be transmitted in plain text. T
|
||||
|
||||
```json
|
||||
{
|
||||
"settings": {
|
||||
"network": "tcp,udp",
|
||||
"method": "aes-256-gcm",
|
||||
"password": "114514",
|
||||
"level": 0,
|
||||
"email": "love@xray.com",
|
||||
"users": [
|
||||
{
|
||||
"password": "1919810",
|
||||
"method": "aes-128-gcm"
|
||||
"inbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:11]
|
||||
"network": "tcp,udp",
|
||||
"method": "aes-256-gcm",
|
||||
"password": "114514",
|
||||
"level": 0,
|
||||
"email": "love@xray.com",
|
||||
"users": [
|
||||
{
|
||||
"password": "1919810",
|
||||
"method": "aes-128-gcm"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -12,16 +12,24 @@ A more meaningful usage of `Socks` inbound is to listen within a LAN or on the l
|
||||
|
||||
```json
|
||||
{
|
||||
"auth": "noauth",
|
||||
"users": [
|
||||
"inbounds": [
|
||||
{
|
||||
"user": "my-username",
|
||||
"pass": "my-password"
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:10]
|
||||
"auth": "noauth",
|
||||
"users": [
|
||||
{
|
||||
"user": "my-username",
|
||||
"pass": "my-password"
|
||||
}
|
||||
],
|
||||
"udp": false,
|
||||
"ip": "127.0.0.1",
|
||||
"userLevel": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"udp": false,
|
||||
"ip": "127.0.0.1",
|
||||
"userLevel": 0
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,16 +10,24 @@ Trojan is designed to work over correctly configured encrypted TLS tunnels.
|
||||
|
||||
```json
|
||||
{
|
||||
"users": [
|
||||
"inbounds": [
|
||||
{
|
||||
"password": "password",
|
||||
"email": "love@xray.com",
|
||||
"level": 0
|
||||
}
|
||||
],
|
||||
"fallbacks": [
|
||||
{
|
||||
"dest": 80
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:12]
|
||||
"users": [
|
||||
{
|
||||
"password": "password",
|
||||
"email": "love@xray.com",
|
||||
"level": 0
|
||||
}
|
||||
],
|
||||
"fallbacks": [
|
||||
{
|
||||
"dest": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -6,13 +6,21 @@ Creates a TUN interface; traffic sent to this interface will be processed by Xra
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "xray0",
|
||||
"mtu": 1500,
|
||||
"gateway": ["10.0.0.1/16", "fc00::1/64"],
|
||||
"dns": ["1.1.1.1", "8.8.8.8"],
|
||||
"userLevel": 0,
|
||||
"autoSystemRoutingTable": ["0.0.0.0/0", "::/0"],
|
||||
"autoOutboundsInterface": "auto"
|
||||
"inbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:7]
|
||||
"name": "xray0",
|
||||
"mtu": 1500,
|
||||
"gateway": ["10.0.0.1/16", "fc00::1/64"],
|
||||
"dns": ["1.1.1.1", "8.8.8.8"],
|
||||
"userLevel": 0,
|
||||
"autoSystemRoutingTable": ["0.0.0.0/0", "::/0"],
|
||||
"autoOutboundsInterface": "auto"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -6,16 +6,24 @@ Tunnel, formerly known as dokodemo-door (Arbitrary Door), can listen on multiple
|
||||
|
||||
```json
|
||||
{
|
||||
"allowedNetwork": "tcp",
|
||||
"rewriteAddress": "8.8.8.8",
|
||||
"rewritePort": 53,
|
||||
"portMap": {
|
||||
"5555": "1.1.1.1:7777",
|
||||
"5556": ":8888", // overrides port only
|
||||
"5557": "example.com:" // overrides address only
|
||||
},
|
||||
"followRedirect": false,
|
||||
"userLevel": 0
|
||||
"inbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:10]
|
||||
"allowedNetwork": "tcp",
|
||||
"rewriteAddress": "8.8.8.8",
|
||||
"rewritePort": 53,
|
||||
"portMap": {
|
||||
"5555": "1.1.1.1:7777",
|
||||
"5556": ":8888", // overrides port only
|
||||
"5557": "example.com:" // overrides address only
|
||||
},
|
||||
"followRedirect": false,
|
||||
"userLevel": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -8,19 +8,27 @@ Unlike [VMess](./vmess.md), VLESS does not depend on system time. The authentica
|
||||
|
||||
```json
|
||||
{
|
||||
"users": [
|
||||
"inbounds": [
|
||||
{
|
||||
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"level": 0,
|
||||
"email": "love@xray.com",
|
||||
"flow": "xtls-rprx-vision",
|
||||
"reverse": {}
|
||||
}
|
||||
],
|
||||
"decryption": "none",
|
||||
"fallbacks": [
|
||||
{
|
||||
"dest": 80
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:15]
|
||||
"users": [
|
||||
{
|
||||
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"level": 0,
|
||||
"email": "love@xray.com",
|
||||
"flow": "xtls-rprx-vision",
|
||||
"reverse": {}
|
||||
}
|
||||
],
|
||||
"decryption": "none",
|
||||
"fallbacks": [
|
||||
{
|
||||
"dest": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -10,16 +10,24 @@ VMess depends on system time. Please ensure that the system UTC time of the devi
|
||||
|
||||
```json
|
||||
{
|
||||
"users": [
|
||||
"inbounds": [
|
||||
{
|
||||
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"level": 0,
|
||||
"email": "love@xray.com"
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:10]
|
||||
"users": [
|
||||
{
|
||||
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"level": 0,
|
||||
"email": "love@xray.com"
|
||||
}
|
||||
],
|
||||
"default": {
|
||||
"level": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"default": {
|
||||
"level": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,14 +10,22 @@ User-space WireGuard protocol implementation.
|
||||
|
||||
```json
|
||||
{
|
||||
"secretKey": "PRIVATE_KEY",
|
||||
"peers": [
|
||||
"inbounds": [
|
||||
{
|
||||
"publicKey": "PUBLIC_KEY",
|
||||
"allowedIPs": [""]
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:8]
|
||||
"secretKey": "PRIVATE_KEY",
|
||||
"peers": [
|
||||
{
|
||||
"publicKey": "PUBLIC_KEY",
|
||||
"allowedIPs": [""]
|
||||
}
|
||||
],
|
||||
"mtu": 1420 // optional, default 1420
|
||||
}
|
||||
}
|
||||
],
|
||||
"mtu": 1420 // optional, default 1420
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -6,9 +6,17 @@ Blackhole is an outbound data protocol that blocks all outbound data. When used
|
||||
|
||||
```json
|
||||
{
|
||||
"response": {
|
||||
"type": "none"
|
||||
}
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:3]
|
||||
"response": {
|
||||
"type": "none"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,19 +10,27 @@ It can allow queries to the target DNS server, `hijack` them to the built-in [DN
|
||||
|
||||
```json
|
||||
{
|
||||
"rewriteNetwork": "udp",
|
||||
"rewriteAddress": "1.1.1.1",
|
||||
"rewritePort": 53,
|
||||
"userLevel": 0,
|
||||
"rules": [
|
||||
"outbounds": [
|
||||
{
|
||||
"action": "reject",
|
||||
"domain": ["domain:example.com"]
|
||||
},
|
||||
{
|
||||
"action": "direct",
|
||||
"qtype": 65,
|
||||
"domain": ["geosite:geolocation-!cn"]
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:15]
|
||||
"rewriteNetwork": "udp",
|
||||
"rewriteAddress": "1.1.1.1",
|
||||
"rewritePort": 53,
|
||||
"userLevel": 0,
|
||||
"rules": [
|
||||
{
|
||||
"action": "reject",
|
||||
"domain": ["domain:example.com"]
|
||||
},
|
||||
{
|
||||
"action": "direct",
|
||||
"qtype": 65,
|
||||
"domain": ["geosite:geolocation-!cn"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Freedom (fragment, noises)
|
||||
# Freedom (fragment, noises)
|
||||
|
||||
Freedom is an outbound protocol used to send (normal) TCP or UDP data to any network.
|
||||
|
||||
@@ -10,31 +10,39 @@ This outbound has a default safety policy in server-side and reverse-proxy scena
|
||||
|
||||
```json
|
||||
{
|
||||
"domainStrategy": "AsIs",
|
||||
"redirect": "127.0.0.1:3366",
|
||||
"userLevel": 0,
|
||||
"fragment": {
|
||||
"packets": "tlshello",
|
||||
"length": "100-200",
|
||||
"interval": "10-20" // Unit: ms
|
||||
},
|
||||
"noises": [
|
||||
"outbounds": [
|
||||
{
|
||||
"type": "base64",
|
||||
"packet": "7nQBAAABAAAAAAAABnQtcmluZwZtc2VkZ2UDbmV0AAABAAE=",
|
||||
"delay": "10-16"
|
||||
}
|
||||
],
|
||||
"proxyProtocol": 0,
|
||||
"finalRules": [
|
||||
{
|
||||
"action": "block",
|
||||
"network": "tcp",
|
||||
"port": "22,25,465,587"
|
||||
},
|
||||
{
|
||||
"action": "block",
|
||||
"ip": ["geoip:cn"]
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:27]
|
||||
"domainStrategy": "AsIs",
|
||||
"redirect": "127.0.0.1:3366",
|
||||
"userLevel": 0,
|
||||
"fragment": {
|
||||
"packets": "tlshello",
|
||||
"length": "100-200",
|
||||
"interval": "10-20" // Unit: ms
|
||||
},
|
||||
"noises": [
|
||||
{
|
||||
"type": "base64",
|
||||
"packet": "7nQBAAABAAAAAAAABnQtcmluZwZtc2VkZ2UDbmV0AAABAAE=",
|
||||
"delay": "10-16"
|
||||
}
|
||||
],
|
||||
"proxyProtocol": 0,
|
||||
"finalRules": [
|
||||
{
|
||||
"action": "block",
|
||||
"network": "tcp",
|
||||
"port": "22,25,465,587"
|
||||
},
|
||||
{
|
||||
"action": "block",
|
||||
"ip": ["geoip:cn"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -14,16 +14,24 @@ HTTP protocol.
|
||||
|
||||
```json
|
||||
{
|
||||
"address": "192.168.108.1",
|
||||
"port": 3128,
|
||||
"user": "my-username",
|
||||
"pass": "my-password",
|
||||
"level": 0,
|
||||
"email": "love@xray.com",
|
||||
"headers": {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36",
|
||||
"Accept-Language": "zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2"
|
||||
}
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:10]
|
||||
"address": "192.168.108.1",
|
||||
"port": 3128,
|
||||
"user": "my-username",
|
||||
"pass": "my-password",
|
||||
"level": 0,
|
||||
"email": "love@xray.com",
|
||||
"headers": {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36",
|
||||
"Accept-Language": "zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -12,9 +12,17 @@ The `hysteria protocol` itself has no authentication. When using with a non `hys
|
||||
|
||||
```json
|
||||
{
|
||||
"version": 2,
|
||||
"address": "192.168.108.1",
|
||||
"port": 3128
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:3]
|
||||
"version": 2,
|
||||
"address": "192.168.108.1",
|
||||
"port": 3128
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -6,7 +6,15 @@ Loopback is an outbound data protocol. Its function is to re-inject data sent th
|
||||
|
||||
```json
|
||||
{
|
||||
"inboundTag": "TagUseAsInbound"
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:1]
|
||||
"inboundTag": "TagUseAsInbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -31,14 +31,22 @@ Under the "none" encryption method, traffic will be transmitted in plain text. T
|
||||
|
||||
```json
|
||||
{
|
||||
"email": "love@xray.com",
|
||||
"address": "127.0.0.1",
|
||||
"port": 1234,
|
||||
"method": "Encryption Method",
|
||||
"password": "Password",
|
||||
"uot": true,
|
||||
"UoTVersion": 2,
|
||||
"level": 0
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:8]
|
||||
"email": "love@xray.com",
|
||||
"address": "127.0.0.1",
|
||||
"port": 1234,
|
||||
"method": "Encryption Method",
|
||||
"password": "Password",
|
||||
"uot": true,
|
||||
"UoTVersion": 2,
|
||||
"level": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,12 +10,20 @@ Standard Socks protocol implementation, compatible with Socks 5.
|
||||
|
||||
```json
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"port": 1234,
|
||||
"user": "test user",
|
||||
"pass": "test pass",
|
||||
"level": 0,
|
||||
"email": "love@xray.com"
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:6]
|
||||
"address": "127.0.0.1",
|
||||
"port": 1234,
|
||||
"user": "test user",
|
||||
"pass": "test pass",
|
||||
"level": 0,
|
||||
"email": "love@xray.com"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,11 +10,19 @@ Trojan is designed to work over a correctly configured encrypted TLS tunnel.
|
||||
|
||||
```json
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"port": 1234,
|
||||
"password": "password",
|
||||
"email": "love@xray.com",
|
||||
"level": 0
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:5]
|
||||
"address": "127.0.0.1",
|
||||
"port": 1234,
|
||||
"password": "password",
|
||||
"email": "love@xray.com",
|
||||
"level": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -8,13 +8,21 @@ Unlike [VMess](./vmess.md), VLESS does not depend on system time. The authentica
|
||||
|
||||
```json
|
||||
{
|
||||
"address": "example.com",
|
||||
"port": 443,
|
||||
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"encryption": "none",
|
||||
"flow": "xtls-rprx-vision",
|
||||
"level": 0,
|
||||
"reverse": {}
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:7]
|
||||
"address": "example.com",
|
||||
"port": 443,
|
||||
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"encryption": "none",
|
||||
"flow": "xtls-rprx-vision",
|
||||
"level": 0,
|
||||
"reverse": {}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,12 +10,20 @@ VMess depends on system time. Please ensure that the UTC time of the system runn
|
||||
|
||||
```json
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"port": 37192,
|
||||
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"security": "auto",
|
||||
"level": 0,
|
||||
"experiments": ""
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:6]
|
||||
"address": "127.0.0.1",
|
||||
"port": 37192,
|
||||
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"security": "auto",
|
||||
"level": 0,
|
||||
"experiments": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,24 +10,32 @@ Standard Wireguard protocol implementation.
|
||||
|
||||
```json
|
||||
{
|
||||
"secretKey": "PRIVATE_KEY",
|
||||
"address": [
|
||||
// optional, default ["10.0.0.1", "fd59:7153:2388:b5fd:0000:0000:0000:0001"]
|
||||
"IPv4_CIDR",
|
||||
"IPv6_CIDR",
|
||||
"and more..."
|
||||
],
|
||||
"peers": [
|
||||
"outbounds": [
|
||||
{
|
||||
"endpoint": "ENDPOINT_ADDR",
|
||||
"publicKey": "PUBLIC_KEY"
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:18]
|
||||
"secretKey": "PRIVATE_KEY",
|
||||
"address": [
|
||||
// optional, default ["10.0.0.1", "fd59:7153:2388:b5fd:0000:0000:0000:0001"]
|
||||
"IPv4_CIDR",
|
||||
"IPv6_CIDR",
|
||||
"and more..."
|
||||
],
|
||||
"peers": [
|
||||
{
|
||||
"endpoint": "ENDPOINT_ADDR",
|
||||
"publicKey": "PUBLIC_KEY"
|
||||
}
|
||||
],
|
||||
"noKernelTun": false,
|
||||
"mtu": 1420, // optional, default 1420
|
||||
"reserved": [1, 2, 3],
|
||||
"workers": 2, // optional, default runtime.NumCPU()
|
||||
"domainStrategy": "ForceIP"
|
||||
}
|
||||
}
|
||||
],
|
||||
"noKernelTun": false,
|
||||
"mtu": 1420, // optional, default 1420
|
||||
"reserved": [1, 2, 3],
|
||||
"workers": 2, // optional, default runtime.NumCPU()
|
||||
"domainStrategy": "ForceIP"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
+43
-34
@@ -10,40 +10,49 @@ Transport specifies a stable method for data transmission. Generally, both ends
|
||||
|
||||
```json
|
||||
{
|
||||
"network": "raw",
|
||||
"security": "none",
|
||||
"tlsSettings": {},
|
||||
"realitySettings": {},
|
||||
"rawSettings": {},
|
||||
"xhttpSettings": {},
|
||||
"kcpSettings": {},
|
||||
"grpcSettings": {},
|
||||
"wsSettings": {},
|
||||
"httpupgradeSettings": {},
|
||||
"hysteriaSettings": {},
|
||||
"finalmask": {
|
||||
"tcp": [],
|
||||
"udp": [],
|
||||
"quicParams": {}
|
||||
},
|
||||
"sockopt": {
|
||||
"mark": 0,
|
||||
"tcpMaxSeg": 1440,
|
||||
"tcpFastOpen": false,
|
||||
"tproxy": "off",
|
||||
"domainStrategy": "AsIs",
|
||||
"happyEyeballs": {},
|
||||
"dialerProxy": "",
|
||||
"acceptProxyProtocol": false,
|
||||
"tcpKeepAliveInterval": 0,
|
||||
"tcpKeepAliveIdle": 300,
|
||||
"tcpUserTimeout": 10000,
|
||||
"tcpCongestion": "bbr",
|
||||
"interface": "wg0",
|
||||
"v6only": false,
|
||||
"tcpWindowClamp": 600,
|
||||
"tcpMptcp": false
|
||||
}
|
||||
// outbound example; also applies to inbound
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"streamSettings": {
|
||||
// [!code focus:34]
|
||||
"network": "raw",
|
||||
"security": "none",
|
||||
"tlsSettings": {},
|
||||
"realitySettings": {},
|
||||
"rawSettings": {},
|
||||
"xhttpSettings": {},
|
||||
"kcpSettings": {},
|
||||
"grpcSettings": {},
|
||||
"wsSettings": {},
|
||||
"httpupgradeSettings": {},
|
||||
"hysteriaSettings": {},
|
||||
"finalmask": {
|
||||
"tcp": [],
|
||||
"udp": [],
|
||||
"quicParams": {}
|
||||
},
|
||||
"sockopt": {
|
||||
"mark": 0,
|
||||
"tcpMaxSeg": 1440,
|
||||
"tcpFastOpen": false,
|
||||
"tproxy": "off",
|
||||
"domainStrategy": "AsIs",
|
||||
"happyEyeballs": {},
|
||||
"dialerProxy": "",
|
||||
"acceptProxyProtocol": false,
|
||||
"tcpKeepAliveInterval": 0,
|
||||
"tcpKeepAliveIdle": 300,
|
||||
"tcpUserTimeout": 10000,
|
||||
"tcpCongestion": "bbr",
|
||||
"interface": "wg0",
|
||||
"v6only": false,
|
||||
"tcpWindowClamp": 600,
|
||||
"tcpMptcp": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -39,14 +39,26 @@ If you are using fallback, please note the following:
|
||||
|
||||
```json
|
||||
{
|
||||
"authority": "grpc.example.com",
|
||||
"serviceName": "name",
|
||||
"multiMode": false,
|
||||
"user_agent": "custom user agent",
|
||||
"idle_timeout": 60,
|
||||
"health_check_timeout": 20,
|
||||
"permit_without_stream": false,
|
||||
"initial_windows_size": 0
|
||||
// outbound example; also applies to inbound
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"streamSettings": {
|
||||
"network": "grpc",
|
||||
"grpcSettings": {
|
||||
// [!code focus:8]
|
||||
"authority": "grpc.example.com",
|
||||
"serviceName": "name",
|
||||
"multiMode": false,
|
||||
"user_agent": "custom user agent",
|
||||
"idle_timeout": 60,
|
||||
"health_check_timeout": 20,
|
||||
"permit_without_stream": false,
|
||||
"initial_windows_size": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -13,12 +13,24 @@ Its design is not recommended for standalone use; instead, it is intended to wor
|
||||
|
||||
```json
|
||||
{
|
||||
"acceptProxyProtocol": false,
|
||||
"path": "/",
|
||||
"host": "xray.com",
|
||||
"headers": {
|
||||
"key": "value"
|
||||
}
|
||||
// outbound example; also applies to inbound
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"streamSettings": {
|
||||
"network": "httpupgrade",
|
||||
"httpupgradeSettings": {
|
||||
// [!code focus:6]
|
||||
"acceptProxyProtocol": false,
|
||||
"path": "/",
|
||||
"host": "xray.com",
|
||||
"headers": {
|
||||
"key": "value"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -8,24 +8,33 @@ Xray implementation of the underlying QUIC transport for Hysteria2, typically us
|
||||
|
||||
```json
|
||||
{
|
||||
"version": 2,
|
||||
"auth": "password",
|
||||
"udpIdleTimeout": 60,
|
||||
"masquerade": {
|
||||
"type": "",
|
||||
|
||||
"dir": "",
|
||||
|
||||
"url": "",
|
||||
"rewriteHost": false,
|
||||
"insecure": false,
|
||||
|
||||
"content": "",
|
||||
"headers": {
|
||||
"key": "value"
|
||||
},
|
||||
"statusCode": 0
|
||||
}
|
||||
// outbound example; also applies to inbound
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"streamSettings": {
|
||||
"network": "hysteria",
|
||||
"hysteriaSettings": {
|
||||
// [!code focus:15]
|
||||
"version": 2,
|
||||
"auth": "password",
|
||||
"udpIdleTimeout": 60,
|
||||
"masquerade": {
|
||||
"type": "",
|
||||
"dir": "",
|
||||
"url": "",
|
||||
"rewriteHost": false,
|
||||
"insecure": false,
|
||||
"content": "",
|
||||
"headers": {
|
||||
"key": "value"
|
||||
},
|
||||
"statusCode": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -14,13 +14,25 @@ Please ensure that the firewall configuration on the host is correct.
|
||||
|
||||
```json
|
||||
{
|
||||
"mtu": 1350,
|
||||
"tti": 20,
|
||||
"uplinkCapacity": 5,
|
||||
"downlinkCapacity": 20,
|
||||
"congestion": false,
|
||||
"readBufferSize": 1,
|
||||
"writeBufferSize": 1
|
||||
// outbound example; also applies to inbound
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"streamSettings": {
|
||||
"network": "mkcp",
|
||||
"kcpSettings": {
|
||||
// [!code focus:7]
|
||||
"mtu": 1350,
|
||||
"tti": 20,
|
||||
"uplinkCapacity": 5,
|
||||
"downlinkCapacity": 20,
|
||||
"congestion": false,
|
||||
"readBufferSize": 1,
|
||||
"writeBufferSize": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,10 +10,22 @@ It can be combined with various protocols in multiple modes.
|
||||
|
||||
```json
|
||||
{
|
||||
"acceptProxyProtocol": false,
|
||||
"header": {
|
||||
"type": "none"
|
||||
}
|
||||
// outbound example; also applies to inbound
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"streamSettings": {
|
||||
"network": "raw",
|
||||
"rawSettings": {
|
||||
// [!code focus:4]
|
||||
"acceptProxyProtocol": false,
|
||||
"header": {
|
||||
"type": "none"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -18,13 +18,25 @@ WebSocket will recognize the `X-Forwarded-For` header in HTTP requests to overwr
|
||||
|
||||
```json
|
||||
{
|
||||
"acceptProxyProtocol": false,
|
||||
"path": "/",
|
||||
"host": "xray.com",
|
||||
"headers": {
|
||||
"key": "value"
|
||||
},
|
||||
"heartbeatPeriod": 10
|
||||
// outbound example; also applies to inbound
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"streamSettings": {
|
||||
"network": "websocket",
|
||||
"wsSettings": {
|
||||
// [!code focus:7]
|
||||
"acceptProxyProtocol": false,
|
||||
"path": "/",
|
||||
"host": "xray.com",
|
||||
"headers": {
|
||||
"key": "value"
|
||||
},
|
||||
"heartbeatPeriod": 10
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -23,14 +23,22 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"users": [
|
||||
"inbounds": [
|
||||
{
|
||||
"user": "my-username",
|
||||
"pass": "my-password"
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:8]
|
||||
"users": [
|
||||
{
|
||||
"user": "my-username",
|
||||
"pass": "my-password"
|
||||
}
|
||||
],
|
||||
"allowTransparent": false,
|
||||
"userLevel": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"allowTransparent": false,
|
||||
"userLevel": 0
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -8,12 +8,20 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"version": 2,
|
||||
"users": [
|
||||
"inbounds": [
|
||||
{
|
||||
"auth": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"level": 0,
|
||||
"email": "love@xray.com"
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:8]
|
||||
"version": 2,
|
||||
"users": [
|
||||
{
|
||||
"auth": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"level": 0,
|
||||
"email": "love@xray.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -31,19 +31,25 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"settings": {
|
||||
"network": "tcp,udp",
|
||||
"method": "aes-256-gcm",
|
||||
"password": "114514",
|
||||
"level": 0,
|
||||
"email": "love@xray.com",
|
||||
"users": [
|
||||
{
|
||||
"password": "1919810",
|
||||
"method": "aes-128-gcm"
|
||||
"inbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:11]
|
||||
"network": "tcp,udp",
|
||||
"method": "aes-256-gcm",
|
||||
"password": "114514",
|
||||
"level": 0,
|
||||
"email": "love@xray.com",
|
||||
"users": [
|
||||
{
|
||||
"password": "1919810",
|
||||
"method": "aes-128-gcm"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -12,16 +12,24 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"auth": "noauth",
|
||||
"users": [
|
||||
"inbounds": [
|
||||
{
|
||||
"user": "my-username",
|
||||
"pass": "my-password"
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:10]
|
||||
"auth": "noauth",
|
||||
"users": [
|
||||
{
|
||||
"user": "my-username",
|
||||
"pass": "my-password"
|
||||
}
|
||||
],
|
||||
"udp": false,
|
||||
"ip": "127.0.0.1",
|
||||
"userLevel": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"udp": false,
|
||||
"ip": "127.0.0.1",
|
||||
"userLevel": 0
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,16 +10,24 @@ Trojan предназначен для работы в правильно нас
|
||||
|
||||
```json
|
||||
{
|
||||
"users": [
|
||||
"inbounds": [
|
||||
{
|
||||
"password": "password",
|
||||
"email": "love@xray.com",
|
||||
"level": 0
|
||||
}
|
||||
],
|
||||
"fallbacks": [
|
||||
{
|
||||
"dest": 80
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:12]
|
||||
"users": [
|
||||
{
|
||||
"password": "password",
|
||||
"email": "love@xray.com",
|
||||
"level": 0
|
||||
}
|
||||
],
|
||||
"fallbacks": [
|
||||
{
|
||||
"dest": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -6,13 +6,21 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "xray0",
|
||||
"mtu": 1500,
|
||||
"gateway": ["10.0.0.1/16", "fc00::1/64"],
|
||||
"dns": ["1.1.1.1", "8.8.8.8"],
|
||||
"userLevel": 0,
|
||||
"autoSystemRoutingTable": ["0.0.0.0/0", "::/0"],
|
||||
"autoOutboundsInterface": "auto"
|
||||
"inbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:7]
|
||||
"name": "xray0",
|
||||
"mtu": 1500,
|
||||
"gateway": ["10.0.0.1/16", "fc00::1/64"],
|
||||
"dns": ["1.1.1.1", "8.8.8.8"],
|
||||
"userLevel": 0,
|
||||
"autoSystemRoutingTable": ["0.0.0.0/0", "::/0"],
|
||||
"autoOutboundsInterface": "auto"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -6,16 +6,24 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"allowedNetwork": "tcp",
|
||||
"rewriteAddress": "8.8.8.8",
|
||||
"rewritePort": 53,
|
||||
"portMap": {
|
||||
"5555": "1.1.1.1:7777",
|
||||
"5556": ":8888", // overrides port only
|
||||
"5557": "example.com:" // overrides address only
|
||||
},
|
||||
"followRedirect": false,
|
||||
"userLevel": 0
|
||||
"inbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:10]
|
||||
"allowedNetwork": "tcp",
|
||||
"rewriteAddress": "8.8.8.8",
|
||||
"rewritePort": 53,
|
||||
"portMap": {
|
||||
"5555": "1.1.1.1:7777",
|
||||
"5556": ":8888", // overrides port only
|
||||
"5557": "example.com:" // overrides address only
|
||||
},
|
||||
"followRedirect": false,
|
||||
"userLevel": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -8,20 +8,28 @@ VLESS - это легкий транспортный протокол без с
|
||||
|
||||
```json
|
||||
{
|
||||
"flow": "xtls-rprx-vision",
|
||||
"users": [
|
||||
"inbounds": [
|
||||
{
|
||||
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"level": 0,
|
||||
"email": "love@xray.com",
|
||||
"flow": "xtls-rprx-vision",
|
||||
"reverse": {}
|
||||
}
|
||||
],
|
||||
"decryption": "none",
|
||||
"fallbacks": [
|
||||
{
|
||||
"dest": 80
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:15]
|
||||
"flow": "xtls-rprx-vision",
|
||||
"users": [
|
||||
{
|
||||
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"level": 0,
|
||||
"email": "love@xray.com",
|
||||
"flow": "xtls-rprx-vision",
|
||||
"reverse": {}
|
||||
}
|
||||
],
|
||||
"decryption": "none",
|
||||
"fallbacks": [
|
||||
{
|
||||
"dest": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -10,16 +10,24 @@ VMess полагается на системное время. Убедитес
|
||||
|
||||
```json
|
||||
{
|
||||
"users": [
|
||||
"inbounds": [
|
||||
{
|
||||
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"level": 0,
|
||||
"email": "love@xray.com"
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:10]
|
||||
"users": [
|
||||
{
|
||||
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"level": 0,
|
||||
"email": "love@xray.com"
|
||||
}
|
||||
],
|
||||
"default": {
|
||||
"level": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"default": {
|
||||
"level": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,14 +10,22 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"secretKey": "PRIVATE_KEY",
|
||||
"peers": [
|
||||
"inbounds": [
|
||||
{
|
||||
"publicKey": "PUBLIC_KEY",
|
||||
"allowedIPs": [""]
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:8]
|
||||
"secretKey": "PRIVATE_KEY",
|
||||
"peers": [
|
||||
{
|
||||
"publicKey": "PUBLIC_KEY",
|
||||
"allowedIPs": [""]
|
||||
}
|
||||
],
|
||||
"mtu": 1420 // необязательно, по умолчанию 1420
|
||||
}
|
||||
}
|
||||
],
|
||||
"mtu": 1420 // необязательно, по умолчанию 1420
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -6,9 +6,17 @@ Blackhole - это протокол исходящих данных, котор
|
||||
|
||||
```json
|
||||
{
|
||||
"response": {
|
||||
"type": "none"
|
||||
}
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:3]
|
||||
"response": {
|
||||
"type": "none"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,19 +10,27 @@ DNS — это исходящий протокол, который приним
|
||||
|
||||
```json
|
||||
{
|
||||
"rewriteNetwork": "udp",
|
||||
"rewriteAddress": "1.1.1.1",
|
||||
"rewritePort": 53,
|
||||
"userLevel": 0,
|
||||
"rules": [
|
||||
"outbounds": [
|
||||
{
|
||||
"action": "reject",
|
||||
"domain": ["domain:example.com"]
|
||||
},
|
||||
{
|
||||
"action": "direct",
|
||||
"qtype": 65,
|
||||
"domain": ["geosite:geolocation-!cn"]
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:15]
|
||||
"rewriteNetwork": "udp",
|
||||
"rewriteAddress": "1.1.1.1",
|
||||
"rewritePort": 53,
|
||||
"userLevel": 0,
|
||||
"rules": [
|
||||
{
|
||||
"action": "reject",
|
||||
"domain": ["domain:example.com"]
|
||||
},
|
||||
{
|
||||
"action": "direct",
|
||||
"qtype": 65,
|
||||
"domain": ["geosite:geolocation-!cn"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Freedom (fragment, noises)
|
||||
# Freedom (fragment, noises)
|
||||
|
||||
Freedom — это исходящий протокол, который можно использовать для отправки (обычных) данных TCP или UDP в любую сеть.
|
||||
|
||||
@@ -10,31 +10,39 @@ Freedom — это исходящий протокол, который можн
|
||||
|
||||
```json
|
||||
{
|
||||
"domainStrategy": "AsIs",
|
||||
"redirect": "127.0.0.1:3366",
|
||||
"userLevel": 0,
|
||||
"fragment": {
|
||||
"packets": "tlshello",
|
||||
"length": "100-200",
|
||||
"interval": "10-20" // единица измерения: мс
|
||||
},
|
||||
"noises": [
|
||||
"outbounds": [
|
||||
{
|
||||
"type": "base64",
|
||||
"packet": "7nQBAAABAAAAAAAABnQtcmluZwZtc2VkZ2UDbmV0AAABAAE=",
|
||||
"delay": "10-16"
|
||||
}
|
||||
],
|
||||
"proxyProtocol": 0,
|
||||
"finalRules": [
|
||||
{
|
||||
"action": "block",
|
||||
"network": "tcp",
|
||||
"port": "22,25,465,587"
|
||||
},
|
||||
{
|
||||
"action": "block",
|
||||
"ip": ["geoip:cn"]
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:27]
|
||||
"domainStrategy": "AsIs",
|
||||
"redirect": "127.0.0.1:3366",
|
||||
"userLevel": 0,
|
||||
"fragment": {
|
||||
"packets": "tlshello",
|
||||
"length": "100-200",
|
||||
"interval": "10-20" // единица измерения: мс
|
||||
},
|
||||
"noises": [
|
||||
{
|
||||
"type": "base64",
|
||||
"packet": "7nQBAAABAAAAAAAABnQtcmluZwZtc2VkZ2UDbmV0AAABAAE=",
|
||||
"delay": "10-16"
|
||||
}
|
||||
],
|
||||
"proxyProtocol": 0,
|
||||
"finalRules": [
|
||||
{
|
||||
"action": "block",
|
||||
"network": "tcp",
|
||||
"port": "22,25,465,587"
|
||||
},
|
||||
{
|
||||
"action": "block",
|
||||
"ip": ["geoip:cn"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -14,16 +14,24 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"address": "192.168.108.1",
|
||||
"port": 3128,
|
||||
"user": "my-username",
|
||||
"pass": "my-password",
|
||||
"level": 0,
|
||||
"email": "love@xray.com",
|
||||
"headers": {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36",
|
||||
"Accept-Language": "zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2"
|
||||
}
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:10]
|
||||
"address": "192.168.108.1",
|
||||
"port": 3128,
|
||||
"user": "my-username",
|
||||
"pass": "my-password",
|
||||
"level": 0,
|
||||
"email": "love@xray.com",
|
||||
"headers": {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36",
|
||||
"Accept-Language": "zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -12,9 +12,17 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"version": 2,
|
||||
"address": "192.168.108.1",
|
||||
"port": 3128
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:3]
|
||||
"version": 2,
|
||||
"address": "192.168.108.1",
|
||||
"port": 3128
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -6,7 +6,15 @@ Loopback - это исходящий протокол данных, которы
|
||||
|
||||
```json
|
||||
{
|
||||
"inboundTag": "TagUseAsInbound"
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:1]
|
||||
"inboundTag": "TagUseAsInbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -31,14 +31,22 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"email": "love@xray.com",
|
||||
"address": "127.0.0.1",
|
||||
"port": 1234,
|
||||
"method": "метод_шифрования",
|
||||
"password": "пароль",
|
||||
"uot": true,
|
||||
"UoTVersion": 2,
|
||||
"level": 0
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:8]
|
||||
"email": "love@xray.com",
|
||||
"address": "127.0.0.1",
|
||||
"port": 1234,
|
||||
"method": "метод_шифрования",
|
||||
"password": "пароль",
|
||||
"uot": true,
|
||||
"UoTVersion": 2,
|
||||
"level": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,12 +10,20 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"port": 1234,
|
||||
"user": "test user",
|
||||
"pass": "test pass",
|
||||
"level": 0,
|
||||
"email": "love@xray.com"
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:6]
|
||||
"address": "127.0.0.1",
|
||||
"port": 1234,
|
||||
"user": "test user",
|
||||
"pass": "test pass",
|
||||
"level": 0,
|
||||
"email": "love@xray.com"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,11 +10,19 @@ Trojan предназначен для работы в правильно нас
|
||||
|
||||
```json
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"port": 1234,
|
||||
"password": "password",
|
||||
"email": "love@xray.com",
|
||||
"level": 0
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:5]
|
||||
"address": "127.0.0.1",
|
||||
"port": 1234,
|
||||
"password": "password",
|
||||
"email": "love@xray.com",
|
||||
"level": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -8,13 +8,21 @@ VLESS - это легкий транспортный протокол без с
|
||||
|
||||
```json
|
||||
{
|
||||
"address": "example.com",
|
||||
"port": 443,
|
||||
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"encryption": "none",
|
||||
"flow": "xtls-rprx-vision",
|
||||
"level": 0,
|
||||
"reverse": {}
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:7]
|
||||
"address": "example.com",
|
||||
"port": 443,
|
||||
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"encryption": "none",
|
||||
"flow": "xtls-rprx-vision",
|
||||
"level": 0,
|
||||
"reverse": {}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,10 +10,18 @@ VMess полагается на системное время. Убедитес
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"security": "auto",
|
||||
"level": 0,
|
||||
"experiments": ""
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:6]
|
||||
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
|
||||
"security": "auto",
|
||||
"level": 0,
|
||||
"experiments": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,24 +10,32 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"secretKey": "PRIVATE_KEY",
|
||||
"address": [
|
||||
// необязательно, по умолчанию ["10.0.0.1", "fd59:7153:2388:b5fd:0000:0000:0000:0001"]
|
||||
"IPv4_CIDR",
|
||||
"IPv6_CIDR",
|
||||
"and more..."
|
||||
],
|
||||
"peers": [
|
||||
"outbounds": [
|
||||
{
|
||||
"endpoint": "ENDPOINT_ADDR",
|
||||
"publicKey": "PUBLIC_KEY"
|
||||
// ...
|
||||
"settings": {
|
||||
// [!code focus:18]
|
||||
"secretKey": "PRIVATE_KEY",
|
||||
"address": [
|
||||
// необязательно, по умолчанию ["10.0.0.1", "fd59:7153:2388:b5fd:0000:0000:0000:0001"]
|
||||
"IPv4_CIDR",
|
||||
"IPv6_CIDR",
|
||||
"and more..."
|
||||
],
|
||||
"peers": [
|
||||
{
|
||||
"endpoint": "ENDPOINT_ADDR",
|
||||
"publicKey": "PUBLIC_KEY"
|
||||
}
|
||||
],
|
||||
"noKernelTun": false,
|
||||
"mtu": 1420, // необязательно, по умолчанию 1420
|
||||
"reserved": [1, 2, 3],
|
||||
"workers": 2, // необязательно, по умолчанию runtime.NumCPU()
|
||||
"domainStrategy": "ForceIP"
|
||||
}
|
||||
}
|
||||
],
|
||||
"noKernelTun": false,
|
||||
"mtu": 1420, // необязательно, по умолчанию 1420
|
||||
"reserved": [1, 2, 3],
|
||||
"workers": 2, // необязательно, по умолчанию runtime.NumCPU()
|
||||
"domainStrategy": "ForceIP"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
+43
-34
@@ -11,40 +11,49 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"network": "raw",
|
||||
"security": "none",
|
||||
"tlsSettings": {},
|
||||
"realitySettings": {},
|
||||
"rawSettings": {},
|
||||
"xhttpSettings": {},
|
||||
"kcpSettings": {},
|
||||
"grpcSettings": {},
|
||||
"wsSettings": {},
|
||||
"httpupgradeSettings": {},
|
||||
"hysteriaSettings": {},
|
||||
"finalmask": {
|
||||
"tcp": [],
|
||||
"udp": [],
|
||||
"quicParams": {}
|
||||
},
|
||||
"sockopt": {
|
||||
"mark": 0,
|
||||
"tcpMaxSeg": 1440,
|
||||
"tcpFastOpen": false,
|
||||
"tproxy": "off",
|
||||
"domainStrategy": "AsIs",
|
||||
"happyEyeballs": {},
|
||||
"dialerProxy": "",
|
||||
"acceptProxyProtocol": false,
|
||||
"tcpKeepAliveInterval": 0,
|
||||
"tcpKeepAliveIdle": 300,
|
||||
"tcpUserTimeout": 10000,
|
||||
"tcpCongestion": "bbr",
|
||||
"interface": "wg0",
|
||||
"v6only": false,
|
||||
"tcpWindowClamp": 600,
|
||||
"tcpMptcp": false
|
||||
}
|
||||
// outbound example; also applies to inbound
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"streamSettings": {
|
||||
// [!code focus:34]
|
||||
"network": "raw",
|
||||
"security": "none",
|
||||
"tlsSettings": {},
|
||||
"realitySettings": {},
|
||||
"rawSettings": {},
|
||||
"xhttpSettings": {},
|
||||
"kcpSettings": {},
|
||||
"grpcSettings": {},
|
||||
"wsSettings": {},
|
||||
"httpupgradeSettings": {},
|
||||
"hysteriaSettings": {},
|
||||
"finalmask": {
|
||||
"tcp": [],
|
||||
"udp": [],
|
||||
"quicParams": {}
|
||||
},
|
||||
"sockopt": {
|
||||
"mark": 0,
|
||||
"tcpMaxSeg": 1440,
|
||||
"tcpFastOpen": false,
|
||||
"tproxy": "off",
|
||||
"domainStrategy": "AsIs",
|
||||
"happyEyeballs": {},
|
||||
"dialerProxy": "",
|
||||
"acceptProxyProtocol": false,
|
||||
"tcpKeepAliveInterval": 0,
|
||||
"tcpKeepAliveIdle": 300,
|
||||
"tcpUserTimeout": 10000,
|
||||
"tcpCongestion": "bbr",
|
||||
"interface": "wg0",
|
||||
"v6only": false,
|
||||
"tcpWindowClamp": 600,
|
||||
"tcpMptcp": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -38,14 +38,26 @@ gRPC (HTTP/2) имеет встроенное мультиплексирован
|
||||
|
||||
```json
|
||||
{
|
||||
"authority": "grpc.example.com",
|
||||
"serviceName": "name",
|
||||
"multiMode": false,
|
||||
"user_agent": "custom user agent",
|
||||
"idle_timeout": 60,
|
||||
"health_check_timeout": 20,
|
||||
"permit_without_stream": false,
|
||||
"initial_windows_size": 0
|
||||
// outbound example; also applies to inbound
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"streamSettings": {
|
||||
"network": "grpc",
|
||||
"grpcSettings": {
|
||||
// [!code focus:8]
|
||||
"authority": "grpc.example.com",
|
||||
"serviceName": "name",
|
||||
"multiMode": false,
|
||||
"user_agent": "custom user agent",
|
||||
"idle_timeout": 60,
|
||||
"health_check_timeout": 20,
|
||||
"permit_without_stream": false,
|
||||
"initial_windows_size": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -14,12 +14,24 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"acceptProxyProtocol": false,
|
||||
"path": "/",
|
||||
"host": "xray.com",
|
||||
"headers": {
|
||||
"key": "value"
|
||||
}
|
||||
// outbound example; also applies to inbound
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"streamSettings": {
|
||||
"network": "httpupgrade",
|
||||
"httpupgradeSettings": {
|
||||
// [!code focus:6]
|
||||
"acceptProxyProtocol": false,
|
||||
"path": "/",
|
||||
"host": "xray.com",
|
||||
"headers": {
|
||||
"key": "value"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -8,24 +8,33 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"version": 2,
|
||||
"auth": "password",
|
||||
"udpIdleTimeout": 60,
|
||||
"masquerade": {
|
||||
"type": "",
|
||||
|
||||
"dir": "",
|
||||
|
||||
"url": "",
|
||||
"rewriteHost": false,
|
||||
"insecure": false,
|
||||
|
||||
"content": "",
|
||||
"headers": {
|
||||
"key": "value"
|
||||
},
|
||||
"statusCode": 0
|
||||
}
|
||||
// outbound example; also applies to inbound
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"streamSettings": {
|
||||
"network": "hysteria",
|
||||
"hysteriaSettings": {
|
||||
// [!code focus:15]
|
||||
"version": 2,
|
||||
"auth": "password",
|
||||
"udpIdleTimeout": 60,
|
||||
"masquerade": {
|
||||
"type": "",
|
||||
"dir": "",
|
||||
"url": "",
|
||||
"rewriteHost": false,
|
||||
"insecure": false,
|
||||
"content": "",
|
||||
"headers": {
|
||||
"key": "value"
|
||||
},
|
||||
"statusCode": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -14,13 +14,25 @@ mKCP жертвует пропускной способностью ради у
|
||||
|
||||
```json
|
||||
{
|
||||
"mtu": 1350,
|
||||
"tti": 20,
|
||||
"uplinkCapacity": 5,
|
||||
"downlinkCapacity": 20,
|
||||
"congestion": false,
|
||||
"readBufferSize": 1,
|
||||
"writeBufferSize": 1
|
||||
// outbound example; also applies to inbound
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"streamSettings": {
|
||||
"network": "mkcp",
|
||||
"kcpSettings": {
|
||||
// [!code focus:7]
|
||||
"mtu": 1350,
|
||||
"tti": 20,
|
||||
"uplinkCapacity": 5,
|
||||
"downlinkCapacity": 20,
|
||||
"congestion": false,
|
||||
"readBufferSize": 1,
|
||||
"writeBufferSize": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,10 +10,22 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"acceptProxyProtocol": false,
|
||||
"header": {
|
||||
"type": "none"
|
||||
}
|
||||
// outbound example; also applies to inbound
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"streamSettings": {
|
||||
"network": "raw",
|
||||
"rawSettings": {
|
||||
// [!code focus:4]
|
||||
"acceptProxyProtocol": false,
|
||||
"header": {
|
||||
"type": "none"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -18,13 +18,25 @@ WebSocket распознает заголовок X-Forwarded-For в HTTP-зап
|
||||
|
||||
```json
|
||||
{
|
||||
"acceptProxyProtocol": false,
|
||||
"path": "/",
|
||||
"host": "xray.com",
|
||||
"headers": {
|
||||
"key": "value"
|
||||
},
|
||||
"heartbeatPeriod": 10
|
||||
// outbound example; also applies to inbound
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"streamSettings": {
|
||||
"network": "websocket",
|
||||
"wsSettings": {
|
||||
// [!code focus:7]
|
||||
"acceptProxyProtocol": false,
|
||||
"path": "/",
|
||||
"host": "xray.com",
|
||||
"headers": {
|
||||
"key": "value"
|
||||
},
|
||||
"heartbeatPeriod": 10
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user