Add protocol field to inbound and outbound JSON examples

This commit is contained in:
Meow
2026-05-08 00:26:19 +08:00
parent e9e62ade55
commit 5b1ca2d827
66 changed files with 66 additions and 0 deletions
+1
View File
@@ -28,6 +28,7 @@ HTTP 协议。
"inbounds": [
{
// ...
"protocol": "http",
"settings": {
// [!code focus:8]
"users": [
+1
View File
@@ -13,6 +13,7 @@
"inbounds": [
{
// ...
"protocol": "hysteria",
"settings": {
// [!code focus:8]
"version": 2,
+1
View File
@@ -36,6 +36,7 @@ Shadowsocks 2022 新协议格式提升了性能并带有完整的重放保护,
"inbounds": [
{
// ...
"protocol": "shadowsocks",
"settings": {
// [!code focus:11]
"network": "tcp,udp",
+1
View File
@@ -17,6 +17,7 @@
"inbounds": [
{
// ...
"protocol": "socks",
"settings": {
// [!code focus:10]
"auth": "noauth",
+1
View File
@@ -15,6 +15,7 @@ Trojan 被设计工作在正确配置的加密 TLS 隧道
"inbounds": [
{
// ...
"protocol": "trojan",
"settings": {
// [!code focus:12]
"users": [
+1
View File
@@ -11,6 +11,7 @@
"inbounds": [
{
// ...
"protocol": "tun",
"settings": {
// [!code focus:7]
"name": "xray0",
+1
View File
@@ -11,6 +11,7 @@ Tunnel(隧道),旧称 dokodemo-door(任意门),可以监听数个本
"inbounds": [
{
// ...
"protocol": "tunnel",
"settings": {
// [!code focus:10]
"allowedNetwork": "tcp",
+1
View File
@@ -13,6 +13,7 @@ VLESS 是一个无状态的轻量传输协议,它分为入站和出站两部
"inbounds": [
{
// ...
"protocol": "vless",
"settings": {
// [!code focus:15]
"users": [
+1
View File
@@ -15,6 +15,7 @@ VMess 依赖于系统时间,请确保使用 Xray 的系统 UTC 时间误差在
"inbounds": [
{
// ...
"protocol": "vmess",
"settings": {
// [!code focus:10]
"users": [
+1
View File
@@ -15,6 +15,7 @@ User-space Wireguard 协议实现。
"inbounds": [
{
// ...
"protocol": "wireguard",
"settings": {
// [!code focus:8]
"secretKey": "PRIVATE_KEY",
+1
View File
@@ -11,6 +11,7 @@ Blackhole(黑洞)是一个出站数据协议,它会阻碍所有数据的
"outbounds": [
{
// ...
"protocol": "blackhole",
"settings": {
// [!code focus:3]
"response": {
+1
View File
@@ -15,6 +15,7 @@ DNS 是一个出站协议,用于接收由 routing 送入的 DNS 查询,并
"outbounds": [
{
// ...
"protocol": "dns",
"settings": {
// [!code focus:15]
"rewriteNetwork": "udp",
+1
View File
@@ -15,6 +15,7 @@ Freedom 是一个出站协议,可以用来向任意网络发送(正常的)
"outbounds": [
{
// ...
"protocol": "freedom",
"settings": {
// [!code focus:27]
"domainStrategy": "AsIs",
+1
View File
@@ -19,6 +19,7 @@ HTTP 协议。
"outbounds": [
{
// ...
"protocol": "http",
"settings": {
// [!code focus:10]
"address": "192.168.108.1",
+1
View File
@@ -17,6 +17,7 @@ Hysteria 协议的客户端实现。
"outbounds": [
{
// ...
"protocol": "hysteria",
"settings": {
// [!code focus:3]
"version": 2,
+1
View File
@@ -11,6 +11,7 @@ Loopback 是个出站数据协议,其作用为将经该出站传出的数据
"outbounds": [
{
// ...
"protocol": "loopback",
"settings": {
// [!code focus:1]
"inboundTag": "TagUseAsInbound"
+1
View File
@@ -36,6 +36,7 @@ Shadowsocks 2022 新协议格式提升了性能并带有完整的重放保护,
"outbounds": [
{
// ...
"protocol": "shadowsocks",
"settings": {
// [!code focus:8]
"email": "love@xray.com",
+1
View File
@@ -15,6 +15,7 @@
"outbounds": [
{
// ...
"protocol": "socks",
"settings": {
// [!code focus:6]
"address": "127.0.0.1",
+1
View File
@@ -15,6 +15,7 @@ Trojan 被设计工作在正确配置的加密 TLS 隧道
"outbounds": [
{
// ...
"protocol": "trojan",
"settings": {
// [!code focus:5]
"address": "127.0.0.1",
+1
View File
@@ -13,6 +13,7 @@ VLESS 是一个无状态的轻量传输协议,它分为入站和出站两部
"outbounds": [
{
// ...
"protocol": "vless",
"settings": {
// [!code focus:7]
"address": "example.com",
+1
View File
@@ -15,6 +15,7 @@ VMess 依赖于系统时间,请确保使用 Xray 的系统 UTC 时间误差在
"outbounds": [
{
// ...
"protocol": "vmess",
"settings": {
// [!code focus:6]
"address": "127.0.0.1",
+1
View File
@@ -15,6 +15,7 @@
"outbounds": [
{
// ...
"protocol": "wireguard",
"settings": {
// [!code focus:18]
"secretKey": "PRIVATE_KEY",
+1
View File
@@ -28,6 +28,7 @@ Use the following environment variables in Linux to enable a global HTTP proxy f
"inbounds": [
{
// ...
"protocol": "http",
"settings": {
// [!code focus:8]
"users": [
+1
View File
@@ -13,6 +13,7 @@ The `hysteria protocol` itself has no authentication; `users` only take effect w
"inbounds": [
{
// ...
"protocol": "hysteria",
"settings": {
// [!code focus:8]
"version": 2,
+1
View File
@@ -36,6 +36,7 @@ Under the "none" encryption method, traffic will be transmitted in plain text. T
"inbounds": [
{
// ...
"protocol": "shadowsocks",
"settings": {
// [!code focus:11]
"network": "tcp,udp",
+1
View File
@@ -17,6 +17,7 @@ A more meaningful usage of `Socks` inbound is to listen within a LAN or on the l
"inbounds": [
{
// ...
"protocol": "socks",
"settings": {
// [!code focus:10]
"auth": "noauth",
+1
View File
@@ -15,6 +15,7 @@ Trojan is designed to work over correctly configured encrypted TLS tunnels.
"inbounds": [
{
// ...
"protocol": "trojan",
"settings": {
// [!code focus:12]
"users": [
+1
View File
@@ -11,6 +11,7 @@ Creates a TUN interface; traffic sent to this interface will be processed by Xra
"inbounds": [
{
// ...
"protocol": "tun",
"settings": {
// [!code focus:7]
"name": "xray0",
+1
View File
@@ -11,6 +11,7 @@ Tunnel, formerly known as dokodemo-door (Arbitrary Door), can listen on multiple
"inbounds": [
{
// ...
"protocol": "tunnel",
"settings": {
// [!code focus:10]
"allowedNetwork": "tcp",
+1
View File
@@ -13,6 +13,7 @@ Unlike [VMess](./vmess.md), VLESS does not depend on system time. The authentica
"inbounds": [
{
// ...
"protocol": "vless",
"settings": {
// [!code focus:15]
"users": [
+1
View File
@@ -15,6 +15,7 @@ VMess depends on system time. Please ensure that the system UTC time of the devi
"inbounds": [
{
// ...
"protocol": "vmess",
"settings": {
// [!code focus:10]
"users": [
+1
View File
@@ -15,6 +15,7 @@ User-space WireGuard protocol implementation.
"inbounds": [
{
// ...
"protocol": "wireguard",
"settings": {
// [!code focus:8]
"secretKey": "PRIVATE_KEY",
+1
View File
@@ -11,6 +11,7 @@ Blackhole is an outbound data protocol that blocks all outbound data. When used
"outbounds": [
{
// ...
"protocol": "blackhole",
"settings": {
// [!code focus:3]
"response": {
+1
View File
@@ -15,6 +15,7 @@ It can allow queries to the target DNS server, `hijack` them to the built-in [DN
"outbounds": [
{
// ...
"protocol": "dns",
"settings": {
// [!code focus:15]
"rewriteNetwork": "udp",
+1
View File
@@ -15,6 +15,7 @@ This outbound has a default safety policy in server-side and reverse-proxy scena
"outbounds": [
{
// ...
"protocol": "freedom",
"settings": {
// [!code focus:27]
"domainStrategy": "AsIs",
+1
View File
@@ -19,6 +19,7 @@ HTTP protocol.
"outbounds": [
{
// ...
"protocol": "http",
"settings": {
// [!code focus:10]
"address": "192.168.108.1",
+1
View File
@@ -17,6 +17,7 @@ The `hysteria protocol` itself has no authentication. When using with a non `hys
"outbounds": [
{
// ...
"protocol": "hysteria",
"settings": {
// [!code focus:3]
"version": 2,
+1
View File
@@ -11,6 +11,7 @@ Loopback is an outbound data protocol. Its function is to re-inject data sent th
"outbounds": [
{
// ...
"protocol": "loopback",
"settings": {
// [!code focus:1]
"inboundTag": "TagUseAsInbound"
+1
View File
@@ -36,6 +36,7 @@ Under the "none" encryption method, traffic will be transmitted in plain text. T
"outbounds": [
{
// ...
"protocol": "shadowsocks",
"settings": {
// [!code focus:8]
"email": "love@xray.com",
+1
View File
@@ -15,6 +15,7 @@ Standard Socks protocol implementation, compatible with Socks 5.
"outbounds": [
{
// ...
"protocol": "socks",
"settings": {
// [!code focus:6]
"address": "127.0.0.1",
+1
View File
@@ -15,6 +15,7 @@ Trojan is designed to work over a correctly configured encrypted TLS tunnel.
"outbounds": [
{
// ...
"protocol": "trojan",
"settings": {
// [!code focus:5]
"address": "127.0.0.1",
+1
View File
@@ -13,6 +13,7 @@ Unlike [VMess](./vmess.md), VLESS does not depend on system time. The authentica
"outbounds": [
{
// ...
"protocol": "vless",
"settings": {
// [!code focus:7]
"address": "example.com",
+1
View File
@@ -15,6 +15,7 @@ VMess depends on system time. Please ensure that the UTC time of the system runn
"outbounds": [
{
// ...
"protocol": "vmess",
"settings": {
// [!code focus:6]
"address": "127.0.0.1",
+1
View File
@@ -15,6 +15,7 @@ Standard Wireguard protocol implementation.
"outbounds": [
{
// ...
"protocol": "wireguard",
"settings": {
// [!code focus:18]
"secretKey": "PRIVATE_KEY",
+1
View File
@@ -28,6 +28,7 @@
"inbounds": [
{
// ...
"protocol": "http",
"settings": {
// [!code focus:8]
"users": [
+1
View File
@@ -13,6 +13,7 @@
"inbounds": [
{
// ...
"protocol": "hysteria",
"settings": {
// [!code focus:8]
"version": 2,
+1
View File
@@ -36,6 +36,7 @@
"inbounds": [
{
// ...
"protocol": "shadowsocks",
"settings": {
// [!code focus:11]
"network": "tcp,udp",
+1
View File
@@ -17,6 +17,7 @@
"inbounds": [
{
// ...
"protocol": "socks",
"settings": {
// [!code focus:10]
"auth": "noauth",
+1
View File
@@ -15,6 +15,7 @@ Trojan предназначен для работы в правильно нас
"inbounds": [
{
// ...
"protocol": "trojan",
"settings": {
// [!code focus:12]
"users": [
+1
View File
@@ -11,6 +11,7 @@
"inbounds": [
{
// ...
"protocol": "tun",
"settings": {
// [!code focus:7]
"name": "xray0",
+1
View File
@@ -11,6 +11,7 @@
"inbounds": [
{
// ...
"protocol": "tunnel",
"settings": {
// [!code focus:10]
"allowedNetwork": "tcp",
+1
View File
@@ -13,6 +13,7 @@ VLESS - это легкий транспортный протокол без с
"inbounds": [
{
// ...
"protocol": "vless",
"settings": {
// [!code focus:15]
"flow": "xtls-rprx-vision",
+1
View File
@@ -15,6 +15,7 @@ VMess полагается на системное время. Убедитес
"inbounds": [
{
// ...
"protocol": "vmess",
"settings": {
// [!code focus:10]
"users": [
+1
View File
@@ -15,6 +15,7 @@
"inbounds": [
{
// ...
"protocol": "wireguard",
"settings": {
// [!code focus:8]
"secretKey": "PRIVATE_KEY",
+1
View File
@@ -11,6 +11,7 @@ Blackhole - это протокол исходящих данных, котор
"outbounds": [
{
// ...
"protocol": "blackhole",
"settings": {
// [!code focus:3]
"response": {
+1
View File
@@ -15,6 +15,7 @@ DNS — это исходящий протокол, который приним
"outbounds": [
{
// ...
"protocol": "dns",
"settings": {
// [!code focus:15]
"rewriteNetwork": "udp",
+1
View File
@@ -15,6 +15,7 @@ Freedom — это исходящий протокол, который можн
"outbounds": [
{
// ...
"protocol": "freedom",
"settings": {
// [!code focus:27]
"domainStrategy": "AsIs",
+1
View File
@@ -19,6 +19,7 @@
"outbounds": [
{
// ...
"protocol": "http",
"settings": {
// [!code focus:10]
"address": "192.168.108.1",
+1
View File
@@ -17,6 +17,7 @@
"outbounds": [
{
// ...
"protocol": "hysteria",
"settings": {
// [!code focus:3]
"version": 2,
+1
View File
@@ -11,6 +11,7 @@ Loopback - это исходящий протокол данных, которы
"outbounds": [
{
// ...
"protocol": "loopback",
"settings": {
// [!code focus:1]
"inboundTag": "TagUseAsInbound"
+1
View File
@@ -36,6 +36,7 @@
"outbounds": [
{
// ...
"protocol": "shadowsocks",
"settings": {
// [!code focus:8]
"email": "love@xray.com",
+1
View File
@@ -15,6 +15,7 @@
"outbounds": [
{
// ...
"protocol": "socks",
"settings": {
// [!code focus:6]
"address": "127.0.0.1",
+1
View File
@@ -15,6 +15,7 @@ Trojan предназначен для работы в правильно нас
"outbounds": [
{
// ...
"protocol": "trojan",
"settings": {
// [!code focus:5]
"address": "127.0.0.1",
+1
View File
@@ -13,6 +13,7 @@ VLESS - это легкий транспортный протокол без с
"outbounds": [
{
// ...
"protocol": "vless",
"settings": {
// [!code focus:7]
"address": "example.com",
+1
View File
@@ -15,6 +15,7 @@ VMess полагается на системное время. Убедитес
"outbounds": [
{
// ...
"protocol": "vmess",
"settings": {
// [!code focus:6]
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
+1
View File
@@ -15,6 +15,7 @@
"outbounds": [
{
// ...
"protocol": "wireguard",
"settings": {
// [!code focus:18]
"secretKey": "PRIVATE_KEY",