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 @@ 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",