Chore: lint

This commit is contained in:
JimhHan
2021-04-06 19:05:35 +08:00
parent f44afc3110
commit effaa0e7ed
19 changed files with 132 additions and 134 deletions
+13 -13
View File
@@ -7,17 +7,17 @@
- 支持 TCP 和 UDP 数据包转发,其中 UDP 可选择性关闭;
- 推荐的加密方式:
- AES-256-GCM
- AES-128-GCM
- ChaCha20-Poly1305 或称 ChaCha20-IETF-Poly1305
- none 或 plain
- AES-256-GCM
- AES-128-GCM
- ChaCha20-Poly1305 或称 ChaCha20-IETF-Poly1305
- none 或 plain
不推荐的加密方式:
- AES-256-CFB
- AES-128-CFB
- ChaCha20
- ChaCha20-IETF
- AES-256-CFB
- AES-128-CFB
- ChaCha20
- ChaCha20-IETF
::: danger
"none" 不加密方式下,服务器端不会验证 "password" 中的密码。为确保安全性, 一般需要加上 TLS 并在传输层使用安全配置,例如 WebSocket 配置较长的 path
@@ -65,10 +65,10 @@
必填。
- 推荐的加密方式:
- AES-256-GCM
- AES-128-GCM
- ChaCha20-Poly1305 或称 ChaCha20-IETF-Poly1305
- none 或 plain
- AES-256-GCM
- AES-128-GCM
- ChaCha20-Poly1305 或称 ChaCha20-IETF-Poly1305
- none 或 plain
> `password`: string
@@ -84,4 +84,4 @@ Shadowsocks 协议不限制密码长度,但短密码会更可能被破解,
> `email`: string
用户邮箱,用于区分不同用户的流量(日志、统计)。
用户邮箱,用于区分不同用户的流量(日志、统计)。
+2 -3
View File
@@ -75,9 +75,8 @@ Trojan 被设计工作在正确配置的加密 TLS 隧道
此外,目前 XTLS 仅支持 TCP、mKCP、DomainSocket 这三种传输方式。
<!-- prettier-ignore-start -->
::: tip 关于 xtls-rprx-\*-udp443 流控模式
<!-- prettier-ignore-end -->
<!-- prettier-ignore -->
::: tip 关于 xtls-rprx-\*-udp443 流控模式
启用了 Xray-core 的 XTLS 时,通往 UDP 443 端口的流量默认会被拦截(一般情况下为 QUIC),这样应用就不会使用 QUIC 而会使用 TLS,XTLS 才会真正生效。实际上,QUIC 本身也不适合被代理,因为 QUIC 自带了 TCP 的功能, 它作为 UDP 流量在通过 Trojan 协议传输时,底层协议为 TCP,就相当于两层 TCP 了。
+1 -2
View File
@@ -113,9 +113,8 @@ VLESS 的用户 ID,可以是任意小于 30 字节的字符串, 也可以是
此外,目前 XTLS 仅支持 TCP、mKCP、DomainSocket 这三种传输方式。
:::
<!-- prettier-ignore-start -->
<!-- prettier-ignore -->
::: tip 关于 xtls-rprx-*-udp443 流控模式
<!-- prettier-ignore-end -->
启用了 Xray-core 的 XTLS 时,通往 UDP 443 端口的流量默认会被拦截(一般情况下为 QUIC),这样应用就不会使用 QUIC 而会使用 TLS,XTLS 才会真正生效。实际上,QUIC 本身也不适合被代理,因为 QUIC 自带了 TCP 的功能,它作为 UDP 流量在通过 VLESS 协议传输时,底层协议为 TCP,就相当于两层 TCP 了。
+41 -45
View File
@@ -114,13 +114,16 @@
outbound:
```json
({
{
"tag": "out",
"protocol": "freedom",
"settings": {
"redirect": "127.0.0.1:80" // 将所有流量转发到网页服务器
}
},
}
```
```json
{
"protocol": "vmess",
"settings": {
@@ -137,32 +140,26 @@ outbound:
]
},
"tag": "interconn"
})
}
```
路由配置:
```json
"routing": {
"rules": [
{
"type": "field",
"inboundTag": [
"bridge"
],
"domain": [
"full:test.xray.com"
],
"outboundTag": "interconn"
},
{
"type": "field",
"inboundTag": [
"bridge"
],
"outboundTag": "out"
}
]
{
"rules": [
{
"type": "field",
"inboundTag": ["bridge"],
"domain": ["full:test.xray.com"],
"outboundTag": "interconn"
},
{
"type": "field",
"inboundTag": ["bridge"],
"outboundTag": "out"
}
]
}
```
@@ -186,18 +183,21 @@ outbound:
inbound:
```json
({
{
"tag": "external",
"port": 80, // 开放 80 端口,用于接收外部的 HTTP 访问
"port": 80,
"protocol": "dokodemo-door",
"settings": {
"address": "127.0.0.1",
"port": 80,
"network": "tcp"
}
},
}
```
```json
{
"port": 1024, // 用于接收 bridge 的连接
"port": 1024,
"tag": "interconn",
"protocol": "vmess",
"settings": {
@@ -207,28 +207,24 @@ inbound:
}
]
}
})
}
```
路由配置:
```json
"routing": {
"rules": [
{
"type": "field",
"inboundTag": [
"external"
],
"outboundTag": "portal"
},
{
"type": "field",
"inboundTag": [
"interconn"
],
"outboundTag": "portal"
}
]
{
"rules": [
{
"type": "field",
"inboundTag": ["external"],
"outboundTag": "portal"
},
{
"type": "field",
"inboundTag": ["interconn"],
"outboundTag": "portal"
}
]
}
```
-2
View File
@@ -83,5 +83,3 @@ WebSocket 所使用的 HTTP 协议路径,默认值为 `"/"`。
- 设置环境变量指定要监听的地址端口,比如 `XRAY_BROWSER_DIALER = 127.0.0.1:8080`。
- 先运行 Xray-core,再用任一浏览器访问上面指定的地址端口,还可以 `F12` 看 `Console` 和 `Network`。
- 浏览器会限制 WebSocket 连接数,所以建议开启 `Mux.Cool`。