mirror of
https://github.com/XTLS/Xray-docs-next.git
synced 2026-10-11 08:48:14 +03:00
Add protocol field to inbound and outbound JSON examples
This commit is contained in:
@@ -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": [
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -15,6 +15,7 @@ Trojan is designed to work over correctly configured encrypted TLS tunnels.
|
||||
"inbounds": [
|
||||
{
|
||||
// ...
|
||||
"protocol": "trojan",
|
||||
"settings": {
|
||||
// [!code focus:12]
|
||||
"users": [
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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": [
|
||||
|
||||
@@ -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": [
|
||||
|
||||
@@ -15,6 +15,7 @@ User-space WireGuard protocol implementation.
|
||||
"inbounds": [
|
||||
{
|
||||
// ...
|
||||
"protocol": "wireguard",
|
||||
"settings": {
|
||||
// [!code focus:8]
|
||||
"secretKey": "PRIVATE_KEY",
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -19,6 +19,7 @@ HTTP protocol.
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"protocol": "http",
|
||||
"settings": {
|
||||
// [!code focus:10]
|
||||
"address": "192.168.108.1",
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -15,6 +15,7 @@ Standard Socks protocol implementation, compatible with Socks 5.
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"protocol": "socks",
|
||||
"settings": {
|
||||
// [!code focus:6]
|
||||
"address": "127.0.0.1",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -15,6 +15,7 @@ Standard Wireguard protocol implementation.
|
||||
"outbounds": [
|
||||
{
|
||||
// ...
|
||||
"protocol": "wireguard",
|
||||
"settings": {
|
||||
// [!code focus:18]
|
||||
"secretKey": "PRIVATE_KEY",
|
||||
|
||||
Reference in New Issue
Block a user