Move code focus

This commit is contained in:
Fangliding
2026-05-25 18:39:42 +08:00
parent 6e044d091c
commit 525969079b
99 changed files with 99 additions and 99 deletions
+1 -1
View File
@@ -29,8 +29,8 @@ HTTP 协议。
{
// ...
"protocol": "http",
// [!code focus:10]
"settings": {
// [!code focus:8]
"users": [
{
"user": "my-username",
+1 -1
View File
@@ -14,8 +14,8 @@
{
// ...
"protocol": "hysteria",
// [!code focus:10]
"settings": {
// [!code focus:8]
"version": 2,
"users": [
{
+1 -1
View File
@@ -37,8 +37,8 @@ Shadowsocks 2022 新协议格式提升了性能并带有完整的重放保护,
{
// ...
"protocol": "shadowsocks",
// [!code focus:13]
"settings": {
// [!code focus:11]
"network": "tcp,udp",
"method": "aes-256-gcm",
"password": "114514",
+1 -1
View File
@@ -18,8 +18,8 @@
{
// ...
"protocol": "socks",
// [!code focus:12]
"settings": {
// [!code focus:10]
"auth": "noauth",
"users": [
{
+1 -1
View File
@@ -16,8 +16,8 @@ Trojan 被设计工作在正确配置的加密 TLS 隧道
{
// ...
"protocol": "trojan",
// [!code focus:14]
"settings": {
// [!code focus:12]
"users": [
{
"password": "password",
+1 -1
View File
@@ -14,8 +14,8 @@ Android 需要外部 APP 传入 TUN FD,使用 VPN Service 重定向流量。
{
// ...
"protocol": "tun",
// [!code focus:9]
"settings": {
// [!code focus:7]
"name": "xray0",
"mtu": 1500,
"gateway": ["10.0.0.1/16", "fc00::1/64"],
+1 -1
View File
@@ -12,8 +12,8 @@ Tunnel(隧道),旧称 dokodemo-door(任意门),可以监听数个本
{
// ...
"protocol": "tunnel",
// [!code focus:12]
"settings": {
// [!code focus:10]
"allowedNetwork": "tcp",
"rewriteAddress": "8.8.8.8",
"rewritePort": 53,
+1 -1
View File
@@ -14,8 +14,8 @@ VLESS 是一个无状态的轻量传输协议,它分为入站和出站两部
{
// ...
"protocol": "vless",
// [!code focus:17]
"settings": {
// [!code focus:15]
"users": [
{
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
+1 -1
View File
@@ -16,8 +16,8 @@ VMess 依赖于系统时间,请确保使用 Xray 的系统 UTC 时间误差在
{
// ...
"protocol": "vmess",
// [!code focus:12]
"settings": {
// [!code focus:10]
"users": [
{
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
+1 -1
View File
@@ -16,8 +16,8 @@ User-space Wireguard 协议实现。
{
// ...
"protocol": "wireguard",
// [!code focus:10]
"settings": {
// [!code focus:8]
"secretKey": "PRIVATE_KEY",
"peers": [
{
+1 -1
View File
@@ -12,8 +12,8 @@ Blackhole(黑洞)是一个出站数据协议,它会阻碍所有数据的
{
// ...
"protocol": "blackhole",
// [!code focus:5]
"settings": {
// [!code focus:3]
"response": {
"type": "none"
}
+1 -1
View File
@@ -16,8 +16,8 @@ DNS 是一个出站协议,用于接收由 routing 送入的 DNS 查询,并
{
// ...
"protocol": "dns",
// [!code focus:17]
"settings": {
// [!code focus:15]
"rewriteNetwork": "udp",
"rewriteAddress": "1.1.1.1",
"rewritePort": 53,
+1 -1
View File
@@ -16,8 +16,8 @@ Freedom 是一个出站协议,可以用来向任意网络发送(正常的)
{
// ...
"protocol": "freedom",
// [!code focus:29]
"settings": {
// [!code focus:27]
"domainStrategy": "AsIs",
"redirect": "127.0.0.1:3366",
"userLevel": 0,
+1 -1
View File
@@ -20,8 +20,8 @@ HTTP 协议。
{
// ...
"protocol": "http",
// [!code focus:12]
"settings": {
// [!code focus:10]
"address": "192.168.108.1",
"port": 3128,
"user": "my-username",
+1 -1
View File
@@ -18,8 +18,8 @@ Hysteria 协议的客户端实现。
{
// ...
"protocol": "hysteria",
// [!code focus:5]
"settings": {
// [!code focus:3]
"version": 2,
"address": "192.168.108.1",
"port": 3128
+1 -1
View File
@@ -12,8 +12,8 @@ Loopback 是个出站数据协议,其作用为将经该出站传出的数据
{
// ...
"protocol": "loopback",
// [!code focus:3]
"settings": {
// [!code focus:1]
"inboundTag": "TagUseAsInbound"
}
}
+1 -1
View File
@@ -37,8 +37,8 @@ Shadowsocks 2022 新协议格式提升了性能并带有完整的重放保护,
{
// ...
"protocol": "shadowsocks",
// [!code focus:10]
"settings": {
// [!code focus:8]
"email": "love@xray.com",
"address": "127.0.0.1",
"port": 1234,
+1 -1
View File
@@ -16,8 +16,8 @@
{
// ...
"protocol": "socks",
// [!code focus:8]
"settings": {
// [!code focus:6]
"address": "127.0.0.1",
"port": 1234,
"user": "test user",
+1 -1
View File
@@ -16,8 +16,8 @@ Trojan 被设计工作在正确配置的加密 TLS 隧道
{
// ...
"protocol": "trojan",
// [!code focus:7]
"settings": {
// [!code focus:5]
"address": "127.0.0.1",
"port": 1234,
"password": "password",
+1 -1
View File
@@ -14,8 +14,8 @@ VLESS 是一个无状态的轻量传输协议,它分为入站和出站两部
{
// ...
"protocol": "vless",
// [!code focus:9]
"settings": {
// [!code focus:7]
"address": "example.com",
"port": 443,
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
+1 -1
View File
@@ -16,8 +16,8 @@ VMess 依赖于系统时间,请确保使用 Xray 的系统 UTC 时间误差在
{
// ...
"protocol": "vmess",
// [!code focus:8]
"settings": {
// [!code focus:6]
"address": "127.0.0.1",
"port": 37192,
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
+1 -1
View File
@@ -16,8 +16,8 @@
{
// ...
"protocol": "wireguard",
// [!code focus:20]
"settings": {
// [!code focus:18]
"secretKey": "PRIVATE_KEY",
"address": [
// optional, default ["10.0.0.1", "fd59:7153:2388:b5fd:0000:0000:0000:0001"]
+1 -1
View File
@@ -24,8 +24,8 @@
"outbounds": [
{
// ...
// [!code focus:18]
"streamSettings": {
// [!code focus:16]
// 传输方式
"network": "raw",
"rawSettings": {},
+1 -1
View File
@@ -15,8 +15,8 @@ FinalMask 在核心处理完包括 TLS/REALITY 在内的传输层加密后,对
{
// ...
"streamSettings": {
// [!code focus:33]
"finalmask": {
// [!code focus:31]
"tcp": [
{
"type": "",
+1 -1
View File
@@ -45,8 +45,8 @@ gRPC(HTTP/2)内置多路复用,不建议使用 gRPC 与 HTTP/2 时启用 m
// ...
"streamSettings": {
"network": "grpc",
// [!code focus:10]
"grpcSettings": {
// [!code focus:8]
"authority": "grpc.example.com",
"serviceName": "name",
"multiMode": false,
+1 -1
View File
@@ -19,8 +19,8 @@
// ...
"streamSettings": {
"network": "httpupgrade",
// [!code focus:8]
"httpupgradeSettings": {
// [!code focus:6]
"acceptProxyProtocol": false,
"path": "/",
"host": "xray.com",
+1 -1
View File
@@ -14,8 +14,8 @@ Hysteria2 的底层 QUIC 传输的 Xray 实现,通常搭配 hysteria[出站](.
// ...
"streamSettings": {
"network": "hysteria",
// [!code focus:17]
"hysteriaSettings": {
// [!code focus:14]
"version": 2,
"auth": "password",
"udpIdleTimeout": 60,
+1 -1
View File
@@ -20,8 +20,8 @@ mKCP 牺牲带宽来降低延迟。传输同样的内容,mKCP 一般比 TCP
// ...
"streamSettings": {
"network": "mkcp",
// [!code focus:9]
"kcpSettings": {
// [!code focus:7]
"mtu": 1350,
"tti": 20,
"uplinkCapacity": 5,
+1 -1
View File
@@ -16,8 +16,8 @@
// ...
"streamSettings": {
"network": "raw",
// [!code focus:6]
"rawSettings": {
// [!code focus:4]
"acceptProxyProtocol": false,
"header": {
"type": "none"
+1 -1
View File
@@ -26,8 +26,8 @@ REALITY 只是修改了 TLS,客户端的实现只需要轻度修改完全随
// ...
"streamSettings": {
"security": "reality",
// [!code focus:30]
"realitySettings": {
// [!code focus:28]
// 入站(服务端)配置
"show": false,
"target": "example.com:443",
+1 -1
View File
@@ -15,8 +15,8 @@ Sockopt 用于配置底层网络行为。
{
// ...
"streamSettings": {
// [!code focus:21]
"sockopt": {
// [!code focus:19]
"mark": 0,
"tcpMaxSeg": 1440,
"tcpFastOpen": false,
+1 -1
View File
@@ -18,8 +18,8 @@ TLS 是常见的传输层加密方式。
// ...
"streamSettings": {
"security": "tls",
// [!code focus:20]
"tlsSettings": {
// [!code focus:18]
"serverName": "xray.com",
"verifyPeerCertByName": "",
"rejectUnknownSni": false,
+1 -1
View File
@@ -24,8 +24,8 @@ Websocket 会识别 HTTP 请求的 X-Forwarded-For 头来覆写流量的源地
// ...
"streamSettings": {
"network": "websocket",
// [!code focus:9]
"wsSettings": {
// [!code focus:7]
"acceptProxyProtocol": false,
"path": "/",
"host": "xray.com",