Skip to main content

Single-Node Configuration

Single nodes are defined in the [Proxy] section of the main configuration, one node per line:

[Proxy]
Node name = protocol,server,port,required protocol arguments,optional arguments

Arguments are separated by ASCII commas. Enclose a password, path, or argument value in double quotes if it contains an ASCII comma.

note

Loon does not provide proxy nodes. Server addresses, ports, passwords, keys, and other connection details must be provided by your service provider.

Common Arguments​

The following arguments are available to node protocols that support them. Each protocol's full example includes its applicable arguments.

ArgumentDescription
server-dnsDNS servers used to resolve the node server's domain name. Separate multiple servers with ASCII commas and enclose the entire value in double quotes. Requires Loon 3.5.2 (Build 996) or later
ip-modeIP stack policy used when resolving the node server's domain name: v4-only, dual, prefer-v4, prefer-v6, or v6-only
fast-openWhether to enable TCP Fast Open
udpWhether the node can forward UDP
block-quicWhether to block QUIC; set this to false when the node needs to forward QUIC
skip-cert-verifyWhether to skip TLS certificate verification
sniServer name used in the TLS handshake
tls-profileTLS ClientHello fingerprint: global, default, safari-ios18, safari-ios-26, chrome, or chrome147
tls-cert-sha256SHA-256 fingerprint of the server certificate
tls-pubkey-sha256SHA-256 fingerprint of the server certificate's public key; takes priority when both fingerprint types are configured

Node DNS​

server-dns requires Loon 3.5.2 (Build 996) or later.

server-dns is used only to resolve the node server's domain name. It does not replace the global DNS used for ordinary domain requests. The following server formats are supported:

  • Plain DNS (DoU): system, 223.5.5.5, 223.5.5.5:53, 2001:4860:4860::8888, or [2001:4860:4860::8888]:53
  • DNS over HTTPS (DoH): https://dns.example.com/dns-query
  • DNS over QUIC (DoQ): quic://dns.example.com
  • DNS over HTTP/3 (DoH3): h3://dns.example.com/dns-query

When multiple servers are configured, Loon queries them concurrently and uses the first valid result returned:

server-dns="223.5.5.5,https://dns.example.com/dns-query,quic://dns.example.com,h3://dns.example.com/dns-query"

Double quotes are recommended even when only one server is configured. An unquoted single-server value can still be parsed; Loon adds double quotes when saving the configuration.

The resolution order for a node server domain is: matching Host Map, the node's server-dns, SSID DNS, and global DNS. After the node's server-dns is selected, a failed query does not fall back to SSID DNS or global DNS. Subsequent CNAME lookups continue to use the same node DNS servers.

Shadowsocks​

Format:

Node name = Shadowsocks,server,port,encryption method,"password",optional arguments

Full argument example (Simple Obfs):

SS = Shadowsocks,ss.example.com,443,aes-128-gcm,"password",obfs-name=http,obfs-host=www.example.com,obfs-uri=/?ed=2048,fast-open=true,udp=true,udp-over-tcp=true,block-quic=false,ip-mode=prefer-v4,server-dns="223.5.5.5,https://dns.example.com/dns-query"

ShadowTLS and Simple Obfs are different transport methods. For ShadowTLS, use:

SS-ShadowTLS = Shadowsocks,ss.example.com,443,2022-blake3-aes-128-gcm,"base64-password",shadow-tls-password="shadow-password",shadow-tls-sni=www.example.com,shadow-tls-version=3,udp-port=8443,fast-open=true,udp=true,udp-over-tcp=true,block-quic=false,ip-mode=prefer-v4,server-dns="223.5.5.5,quic://dns.example.com"

Protocol arguments:

ArgumentDescription
obfs-nameSimple Obfs type: none, http, or tls
obfs-hostHost used by Simple Obfs
obfs-uriRequest path used by Simple Obfs
udp-over-tcpCarry UDP over TCP
shadow-tls-passwordShadowTLS password
shadow-tls-sniShadowTLS SNI
shadow-tls-versionShadowTLS version: 2 or 3
udp-portShadowTLS UDP port

Supported encryption methods:

2022-blake3-aes-128-gcm, 2022-blake3-aes-256-gcm,
aes-128-gcm, aes-192-gcm, aes-256-gcm,
chacha20-ietf-poly1305, xchacha20-ietf-poly1305,
rc4, rc4-md5, aes-128-cfb, aes-192-cfb, aes-256-cfb,
aes-128-ctr, aes-192-ctr, aes-256-ctr, bf-cfb,
camellia-128-cfb, camellia-192-cfb, camellia-256-cfb,
cast5-cfb, des-cfb, idea-cfb, rc2-cfb, seed-cfb,
salsa20, chacha20, chacha20-ietf

ShadowsocksR​

Format:

Node name = ShadowsocksR,server,port,encryption method,"password",protocol=protocol,protocol-param=protocol arguments,obfs=obfuscation,obfs-param=obfuscation arguments,optional arguments

Full argument example:

SSR = ShadowsocksR,ssr.example.com,443,aes-256-cfb,"password",protocol=auth_aes128_md5,protocol-param=9555:loon,obfs=tls1.2_ticket_auth,obfs-param=download.example.com,fast-open=true,udp=true,block-quic=false,ip-mode=prefer-v4,server-dns="223.5.5.5,https://dns.example.com/dns-query"

The following arguments are also available when using ShadowTLS:

SSR-ShadowTLS = ShadowsocksR,ssr.example.com,443,aes-256-cfb,"password",protocol=origin,protocol-param=,obfs=plain,obfs-param=,shadow-tls-password=shadow-password,shadow-tls-sni=www.example.com,shadow-tls-version=3,udp-port=8443,fast-open=true,udp=true,block-quic=false,ip-mode=prefer-v4,server-dns="223.5.5.5,quic://dns.example.com"

Supported protocols: origin, auth_chain_a, auth_chain_b, auth_aes128_md5, auth_aes128_sha1, auth_sha1_v4, auth_sha1_v2, and auth_sha1.

Supported obfuscation methods: plain, tls1.2_ticket_auth, http_simple, and http_post.

Supported encryption methods: none, rc4, rc4-md5-6, rc4-md5, aes-128-cfb, aes-192-cfb, aes-256-cfb, aes-128-ctr, aes-192-ctr, aes-256-ctr, bf-cfb, camellia-128-cfb, camellia-192-cfb, camellia-256-cfb, salsa20, chacha20, and chacha20-ietf.

HTTP and HTTPS​

Format:

Node name = http,server,port,username,"password",optional arguments
Node name = https,server,port,username,"password",optional arguments

The username and password can be omitted. A username or password containing an ASCII comma must be enclosed in double quotes.

Full HTTPS argument example:

HTTPS = https,proxy.example.com,443,"user,name","password",sni=proxy.example.com,skip-cert-verify=false,tls-profile=safari-ios18,tls-cert-sha256=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef,tls-pubkey-sha256=abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789,always-use-connect=true,block-quic=false,ip-mode=prefer-v4,server-dns="223.5.5.5,https://dns.example.com/dns-query"

HTTP supports ShadowTLS:

HTTP-ShadowTLS = http,proxy.example.com,80,username,"password",shadow-tls-password=shadow-password,shadow-tls-sni=www.example.com,shadow-tls-version=3,always-use-connect=true,block-quic=false,ip-mode=prefer-v4,server-dns="223.5.5.5,quic://dns.example.com"

always-use-connect=true makes Loon always forward connections through HTTP CONNECT.

SOCKS5​

Format:

Node name = socks5,server,port,username,"password",optional arguments

The username and password can be omitted. Full TLS argument example:

SOCKS5-TLS = socks5,socks.example.com,443,"user,name","password",over-tls=true,sni=socks.example.com,skip-cert-verify=false,tls-profile=chrome,tls-cert-sha256=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef,tls-pubkey-sha256=abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789,udp=true,block-quic=false,ip-mode=prefer-v4,server-dns="223.5.5.5,https://dns.example.com/dns-query"

Do not use ShadowTLS and over-tls=true together:

SOCKS5-ShadowTLS = socks5,socks.example.com,443,username,"password",over-tls=false,shadow-tls-password=shadow-password,shadow-tls-sni=www.example.com,shadow-tls-version=3,udp-port=8443,udp=true,block-quic=false,ip-mode=prefer-v4,server-dns="223.5.5.5,quic://dns.example.com"

VMess​

Format:

Node name = VMess,server,port,encryption method,"UUID",transport=transport type,optional arguments

Full WebSocket + TLS argument example:

VMess = VMess,vmess.example.com,443,aes-128-gcm,"52396e06-041a-4cc2-be5c-8525eb457809",transport=ws,alterId=0,path=/websocket,host=cdn.example.com,over-tls=true,sni=vmess.example.com,skip-cert-verify=false,tls-profile=chrome,tls-cert-sha256=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef,tls-pubkey-sha256=abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789,udp=true,block-quic=false,ip-mode=prefer-v4,server-dns="223.5.5.5,https://dns.example.com/dns-query"

ShadowTLS example:

VMess-ShadowTLS = VMess,vmess.example.com,443,auto,"52396e06-041a-4cc2-be5c-8525eb457809",transport=tcp,alterId=0,over-tls=false,shadow-tls-password=shadow-password,shadow-tls-sni=www.example.com,shadow-tls-version=3,udp=true,block-quic=false,ip-mode=prefer-v4,server-dns="223.5.5.5,quic://dns.example.com"

With Reality arguments:

VMess-Reality = VMess,vmess.example.com,443,auto,"52396e06-041a-4cc2-be5c-8525eb457809",transport=tcp,alterId=0,public-key="LgJ9bNTyUqBLFkDA12-QgEL7c1yQ1ztk-V1Q-3OLXSk",short-id=164168844958a16d,over-tls=true,sni=www.example.com,tls-profile=chrome,udp=true,block-quic=false,ip-mode=prefer-v4,server-dns="223.5.5.5,h3://dns.example.com/dns-query"

transport supports tcp, ws, http, grpc, and xhttp. host and path apply to WebSocket, HTTP, and XHTTP transports. Supported encryption methods are none, auto, aes-128-cfb, aes-128-gcm, and chacha20-ietf-poly1305. See gRPC and XHTTP for their transport-specific arguments.

VLESS​

Format:

Node name = VLESS,server,port,"UUID",transport=transport type,optional arguments

Full WebSocket + TLS argument example:

VLESS = VLESS,vless.example.com,443,"52396e06-041a-4cc2-be5c-8525eb457809",transport=ws,path=/websocket,host=cdn.example.com,over-tls=true,sni=vless.example.com,skip-cert-verify=false,tls-profile=safari-ios18,tls-cert-sha256=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef,tls-pubkey-sha256=abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789,udp=true,block-quic=false,ip-mode=prefer-v4,server-dns="223.5.5.5,https://dns.example.com/dns-query"

XTLS Vision + Reality example:

VLESS-Reality = VLESS,vless.example.com,443,"ae521383-9375-2e0d-c347-48cf3d98eb6e",transport=tcp,flow=xtls-rprx-vision,public-key="LgJ9bNTyUqBLFkDA12-QgEL7c1yQ1ztk-V1Q-3OLXSk",short-id=164168844958a16d,over-tls=true,sni=www.example.com,tls-profile=chrome,udp=true,block-quic=false,ip-mode=prefer-v4,server-dns="223.5.5.5,h3://dns.example.com/dns-query"

ShadowTLS example:

VLESS-ShadowTLS = VLESS,vless.example.com,443,"52396e06-041a-4cc2-be5c-8525eb457809",transport=tcp,over-tls=false,shadow-tls-password=shadow-password,shadow-tls-sni=www.example.com,shadow-tls-version=3,udp=true,block-quic=false,ip-mode=prefer-v4,server-dns="223.5.5.5,quic://dns.example.com"

transport supports tcp, ws, http, grpc, and xhttp. The host and path for WebSocket and HTTP obfuscation must match the server settings. See gRPC and XHTTP for their transport-specific arguments.

VLESS Encryption​

VLESS Encryption applies to VLESS over TCP, WebSocket, HTTP obfuscation, gRPC, and XHTTP. It can run on its own or inside standard TLS or REALITY. The server must also enable VLESS Encryption. Use the mode and public keys supplied by the server.

ArgumentDefaultDescription
encryption-modenonenone disables Encryption. native uses the base encryption mode. xorpub also masks public-key material in the handshake. random additionally masks the encrypted record length field. The node editor selects native when you enable Encryption
encryption-rtt0rtt0rtt resumes a session when a valid ticket is available. The first connection and connections with expired tickets perform a full handshake. 1rtt performs a full handshake for every new Encryption session
encryption-public-keysUnsetRequired when Encryption is enabled. Enter server-provided Base64URL public keys. Supports X25519 and ML-KEM-768 keys. Separate multiple keys with periods (.) and preserve the server-provided order. The REALITY public key goes in public-key
encryption-padding100-111-1111.75-0-111.50-0-3333Custom padding for a full handshake. Separate probability-minimum-maximum triplets with periods. Starting with the first triplet, alternate padding lengths in bytes and gaps between segments in milliseconds. Set the first probability to 100 and both lengths to at least 35. For example, 100-128-128 adds 128 bytes with no gap. Omit this argument to keep the default

XTLS Vision​

Set flow to xtls-rprx-vision or xtls-rprx-vision-udp443. Omit flow to leave Vision off.

CombinationScope
Vision with Encryption disabledTCP with TLS or REALITY
Vision with Encryption enabledTCP, WebSocket, HTTP obfuscation, gRPC, and XHTTP. For REALITY with XHTTP, omit alpn or specify a single h2 value

With Encryption enabled, xtls-rprx-vision rejects datagrams for UDP port 443 and xtls-rprx-vision-udp443 permits them. Set udp=true to forward UDP. To forward QUIC traffic, also set block-quic=false.

This example combines VLESS, XHTTP, REALITY, Encryption, and Vision. Replace the addresses, UUID, path, and both public keys with values supplied by the server.

VLESS-Encrypted-XHTTP = VLESS,vless.example.com,443,"52396e06-041a-4cc2-be5c-8525eb457809",transport=xhttp,path=/xhttp,host=vless.example.com,alpn=h2,xhttp-mode=stream-one,xhttp-xmux-max-connections=1,over-tls=true,sni=www.example.com,public-key="LgJ9bNTyUqBLFkDA12-QgEL7c1yQ1ztk-V1Q-3OLXSk",short-id=164168844958a16d,encryption-mode=native,encryption-rtt=0rtt,encryption-public-keys="MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY",flow=xtls-rprx-vision,udp=true

Trojan​

Format:

Node name = Trojan,server,port,"password",transport=transport type,optional arguments

Full WebSocket argument example:

Trojan = Trojan,trojan.example.com,443,"password",transport=ws,path=/websocket,host=cdn.example.com,alpn="h2,http/1.1",sni=trojan.example.com,skip-cert-verify=false,tls-profile=chrome,tls-cert-sha256=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef,tls-pubkey-sha256=abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789,fast-open=true,udp=true,block-quic=false,ip-mode=prefer-v4,server-dns="223.5.5.5,https://dns.example.com/dns-query"

Reality argument example:

Trojan-Reality = Trojan,trojan.example.com,443,"password",transport=tcp,public-key="LgJ9bNTyUqBLFkDA12-QgEL7c1yQ1ztk-V1Q-3OLXSk",short-id=164168844958a16d,sni=www.example.com,tls-profile=chrome,alpn=h2,fast-open=true,udp=true,block-quic=false,ip-mode=prefer-v4,server-dns="223.5.5.5,h3://dns.example.com/dns-query"

transport supports tcp, ws, grpc, and xhttp. For compatibility, transport=http is handled as WebSocket. The legacy arguments ws=true, ws-path, and ws-headers=Host:domain correspond to transport=ws, path, and host, respectively. See gRPC and XHTTP for their transport-specific arguments.

gRPC​

VLESS, VMess, and Trojan support transport=grpc for forwarding TCP and UDP over HTTP/2. VMess uses an AEAD request header with alterId=0.

[Proxy]
VLESS-gRPC = VLESS,vless.example.com,443,"52396e06-041a-4cc2-be5c-8525eb457809",transport=grpc,grpc-service-name=vless-grpc,over-tls=true,sni=vless.example.com,udp=true
VMess-gRPC = VMess,vmess.example.com,8080,aes-128-gcm,"52396e06-041a-4cc2-be5c-8525eb457809",alterId=0,transport=grpc,grpc-service-name=vmess-grpc,over-tls=false,udp=true
Trojan-gRPC = Trojan,trojan.example.com,443,"password",transport=grpc,grpc-service-name=trojan-grpc,grpc-mode=multi,grpc-mux-max-streams=8,host=grpc.example.com,sni=trojan.example.com,udp=true

gRPC Arguments​

ArgumentDescription
transport=grpcSelects gRPC. Use the server address, port, and credentials for the node's proxy protocol
grpc-service-nameMatches the Xray server's serviceName. Omit it when the server uses an empty service name
grpc-modeDefaults to gun. Also accepts multi. Choose a mode supported by the server. For a plain service name, these modes use /serviceName/Tun and /serviceName/TunMulti, respectively
grpc-mux-max-streamsMaximum concurrent gRPC calls per HTTP/2 connection. Accepts 1–16 and defaults to 1, which gives each call a dedicated connection. Values 2–16 enable sharing. The effective limit is the lower of this setting and the limit advertised by the server. With 8 configured and a server limit of 3, each connection carries up to 3 TCP and UDP calls in total
hostSets the HTTP/2 :authority for request routing on the server or reverse proxy. With standard TLS, the default is sni if set, then the node's domain name or its IP address and port. Plaintext HTTP/2 uses the node's domain name or IP address and port. REALITY defaults to the node's address and port
udpSet to true to forward application UDP. Each UDP session uses one gRPC stream. TCP and UDP can share the same HTTP/2 connection

Set grpc-service-name to a custom path when the server provides one. For example, /edge/BridgeMulti specifies one method path. /edge/Bridge|BridgeMulti selects the first method for gun and the second for multi.

gRPC Security Settings​

Connection typeArguments
Standard TLSSet over-tls=true. Trojan defaults to TLS when this argument is omitted. Set sni to specify the server name for the handshake. See Common Arguments for certificate verification settings
Plaintext HTTP/2 (h2c)Set over-tls=false explicitly and use plaintext HTTP/2 on the server
REALITYSet over-tls=true, enter the server-provided public-key and sni, and set short-id and tls-profile as needed

gRPC uses HTTP/2. You can omit alpn. If supplied, the only accepted value is h2. The host argument controls HTTP request routing, and sni controls the TLS or REALITY handshake.

VLESS supports VLESS Encryption, with a separate encryption session per gRPC call. Enable Encryption to use XTLS Vision.

gRPC nodes currently work as individual nodes or in regular policy groups. Proxy chains are currently unsupported.

XHTTP​

XHTTP is a transport for VLESS, VMess, and Trojan over HTTP/1.1, HTTP/2, or HTTP/3. It forwards TCP and can carry application UDP datagrams in XHTTP requests when udp=true. VMess uses AEAD with alterId=0. Trojan uses standard TLS or REALITY. For VLESS over XHTTP, enable VLESS Encryption to use XTLS Vision.

[Proxy]
VLESS-XHTTP = VLESS,vless.example.com,443,"52396e06-041a-4cc2-be5c-8525eb457809",transport=xhttp,path=/xhttp,host=vless.example.com,over-tls=true,sni=vless.example.com,alpn=h2,xhttp-mode=packet-up,udp=true
VMess-XHTTP = VMess,vmess.example.com,443,aes-128-gcm,"52396e06-041a-4cc2-be5c-8525eb457809",alterId=0,transport=xhttp,path=/xhttp,host=vmess.example.com,over-tls=true,sni=vmess.example.com,alpn=http/1.1,xhttp-mode=stream-up,udp=true
Trojan-XHTTP = Trojan,trojan.example.com,443,"password",transport=xhttp,path=/xhttp,host=trojan.example.com,sni=trojan.example.com,alpn=h2,xhttp-mode=stream-one,udp=true

Basic Arguments​

ArgumentDescription
transport=xhttpUse XHTTP. The server address, port, and authentication arguments retain the existing format of each protocol
pathBase path for XHTTP requests. Defaults to / and may contain query arguments. It must match the server configuration
hostHTTP request host, sent as :authority in HTTP/2 and HTTP/3. When omitted, Loon uses sni first and then the node server address
over-tlsVLESS and VMess can use true for standard TLS or false for plaintext HTTP/1.1. Trojan defaults to TLS and uses REALITY when a REALITY public key is set
alpnSelects the HTTP version. Standard TLS supports http/1.1, h2, and h3 and defaults to h2. Plaintext uses http/1.1. REALITY uses h2
xhttp-modeSupports auto, packet-up, stream-up, and stream-one; defaults to auto
public-key, short-id, sniFor REALITY, specify the server public key, Short ID, and server name. alpn may be omitted or set to h2
udpSet to true to forward application UDP through XHTTP. HTTP/3 uses UDP for the connection to the node itself and is selected by alpn=h3

See Common Arguments for standard TLS certificate verification and fingerprints. The tls-profile argument applies to TLS or REALITY handshakes over TCP, used by HTTP/1.1 and H2.

Transport Modes​

HTTP/1.1, HTTP/2, and HTTP/3 all support the three explicit modes. Match the server configuration.

ModeUplink and downlink organization
packet-upThe downlink uses a persistent GET. Uplink data is split into multiple sequenced HTTP requests
stream-upThe downlink uses a persistent GET and the uplink uses one persistent request. Both requests use the same session ID
stream-oneThe request body and response body of one persistent request carry the uplink and downlink, respectively
autoSelects packet-up for standard TLS or plaintext. With REALITY, selects stream-one without a separate downlink and stream-up with one

Advanced Arguments​

Write arguments as key=value. Their scope follows the mode the node actually uses. Arguments that accept a range also accept a single value or a closed range such as 100-300. Main request headers apply to the main endpoint. A separate downlink GET uses its own request headers.

ArgumentScopeUsage and default
xhttp-uplink-methodUplink requests in all three modes. GET applies only to packet-upDefaults to POST; other HTTP methods such as PUT are also supported. A separate downlink request still uses GET
xhttp-min-post-interval-msInterval between consecutive packet-up uplink requests onlyIn milliseconds; defaults to 30. Accepts a single value or a closed range such as 30-60. 0 adds no extra delay
xhttp-max-post-bytesEach packet-up uplink request onlyLimits the raw data size of one packet in bytes; defaults to 524288. Accepts a single value or a closed range. 0 uses the default limit. Data placed in a header or Cookie is also constrained by header capacity
xhttp-uplink-data-placementUplink requests. header and cookie apply only to packet-upDefaults to body. Both auto and body use the HTTP body. header or cookie places encoded uplink data in request headers or a Cookie
xhttp-uplink-data-keypacket-up only, when data is placed in a header or cookieData field-name prefix. Defaults to X-Data for request headers and x_data for Cookies
xhttp-uplink-chunk-sizepacket-up only, when data is placed in a header or cookieNumber of characters per Base64URL-encoded chunk; accepts a single value or a closed range. Defaults to 3000-4000 for request headers and 2048-3072 for Cookies. Values below 64 are treated as 64; the final chunk may be shorter

Padding​

All three modes add padding to every HTTP request. By default, repeated X characters are placed in the x_padding query argument of the URL contained in Referer. When custom padding is enabled, its placement, field name, and generation method must match the server configuration.

ArgumentScopeUsage and default
xhttp-padding-bytesRequests to the main endpoint and separate downlink GETs that inherit the main padding settingsDefaults to 100-1000. Accepts a single value or a closed range, selected independently for each request. 0 uses the default range
xhttp-padding-obfs-modeRequests to the main endpoint and separate downlink GETs that inherit the main padding settingsDefaults to false. Set to true to enable the custom padding arguments below
xhttp-padding-placementRequests to the main endpoint and separate downlink GETs that inherit the main padding settings when custom padding is enabledqueryInHeader, the default, places padding in a query argument of the URL contained in the specified request header. query writes it to the actual request URL, header writes it directly as a request-header value, and cookie writes it to a Cookie
xhttp-padding-keyCustom padding with placement queryInHeader, query, or cookiePadding query-argument or Cookie name; defaults to x_padding
xhttp-padding-headerCustom padding with placement queryInHeader or headerName of the request header carrying the padding; defaults to X-Padding
xhttp-padding-methodRequests to the main endpoint and separate downlink GETs that inherit the main padding settings when custom padding is enabledDefaults to repeat-x, which generates repeated X characters by character count. tokenish generates random letters and digits, with padding length measured after HPACK Huffman encoding

Request Headers​

ArgumentScopeUsage and default
xhttp-headerRequests to the main endpoint in all three modesFormat: xhttp-header="Name: Value". Specify one item per request header; the argument may be repeated. Set Host with host. Loon generates the request headers required for padding and HTTP framing
xhttp-no-grpc-headerPersistent stream-up uplink requests and bidirectional stream-one requests onlyDefaults to false. Set to true to omit the automatically added Content-Type: application/grpc

Session IDs and Sequence Numbers​

Session IDs allow the server to pair separate uplink and downlink requests. Sequence numbers start at 0 and are sent only with packet-up uplink requests. Custom placements and field names must match the server configuration. Session ID, sequence, and padding fields in the same placement must use different names.

ArgumentScopeUsage and default
xhttp-session-id-placementpacket-up and stream-up uplink and downlink requestsSupports path, query, header, and cookie; defaults to path
xhttp-session-id-keypacket-up and stream-up when the session ID is placed in a query argument, request header, or CookieDefaults to x_session for query arguments and Cookies, and X-Session for request headers
xhttp-session-id-tablepacket-up and stream-up; used together with the session ID lengthA custom character table or a case-sensitive preset such as Base62, hex, or number. An omitted or invalid setting uses a UUID
xhttp-session-id-lengthpacket-up and stream-up; used together with the session ID character tableAccepts a positive integer or a closed range. Takes effect when the custom settings are valid; the default is a 36-character UUID
xhttp-seq-placementpacket-up uplink requests onlySupports path, query, header, and cookie; defaults to path
xhttp-seq-keypacket-up uplink requests only, when the sequence number is placed in a query argument, request header, or CookieDefaults to x_seq for query arguments and Cookies, and X-Seq for request headers

XMUX​

Direct XHTTP nodes use XMUX by default. With HTTP/2 and HTTP/3, multiple XHTTP sessions can share existing connections. HTTP/1.1 reuses connections for short packet-up uploads. Persistent requests use their own connections.

These arguments apply to the main endpoint. The same endpoint also handles downloads when no separate downlink is configured. Limits accept a positive integer or a closed range. When all arguments are omitted or set to 0, the defaults are 3 pool entries, 600-900 requests per entry, and a reuse lifetime of 1800-3000 seconds. When any argument is nonzero, the configured limits apply as a group and omitted limits are treated as 0. Only one of max-concurrency and max-connections may be positive.

ArgumentDescription
xhttp-xmux-max-concurrencyMaximum number of XHTTP sessions assigned concurrently to one pool entry. Loon can open a new entry when this limit is reached. 0 leaves this concurrency limit unset
xhttp-xmux-max-connectionsNumber of reusable entries to maintain in the pool. With 1, new sessions prefer the same entry while it has capacity. 0 leaves the pool size unspecified
xhttp-xmux-max-reuse-timesTotal number of session assignments per entry, including the first. 1 assigns the entry to one session. 0 leaves this count unlimited
xhttp-xmux-http-max-requestsTotal HTTP requests per entry. 0 leaves the count unlimited. H2/H3 stream-up needs capacity for two requests when both directions use the same endpoint
xhttp-xmux-http-max-reusable-secsHow many seconds after creation an entry can accept new requests or sessions. 0 leaves this time limit unset
xhttp-xmux-http-keepalive-secsH2 PING or H3 QUIC keepalive interval in seconds. Omitted or 0 uses 45 seconds for H2 and 10 for H3. -1 disables keepalive

With stream-up or packet-up, the persistent download GET can use a separate address, port, and HTTP version. auto selects a split mode according to the transport mode rules. The upload and download use the same XHTTP session ID. Both endpoints must recognize that session. Each direction can select its own HTTP version within the limits of its security layer.

ArgumentDescription
xhttp-download-serverDownlink server hostname or IP address. Required for a separate downlink
xhttp-download-portDownlink port, 1–65535. Required for a separate downlink
xhttp-download-hostHost or :authority for the GET. When omitted, a secured connection uses the downlink SNI if set and otherwise uses the server address
xhttp-download-pathBase path for the GET. Defaults to / and may include query arguments. Use the downlink server's actual path
xhttp-download-headerAdds one header only to the separate downlink GET. Repeat xhttp-download-header="Name: Value" for different names. Set Host with xhttp-download-host
xhttp-download-alpnA single HTTP version for the downlink. Plaintext uses http/1.1. Standard TLS supports http/1.1, h2, and h3. REALITY uses h2. The default is h2 for a secured connection and http/1.1 for plaintext
ArgumentDescription
xhttp-download-over-tlstrue enables standard TLS. The default is plaintext. When a downlink REALITY public key is set, omitting this argument enables the security layer. An explicit false is incompatible with REALITY
xhttp-download-sniServer name for downlink TLS or REALITY. Defaults to the downlink server address
xhttp-download-skip-cert-verifyCertificate verification for a standard TLS downlink. true skips verification. Defaults to false. Leave it off for REALITY
xhttp-download-tls-profileDownlink TLS fingerprint for HTTP/1.1 or H2 over TLS, or H2 with REALITY. Omit to use the global fingerprint
xhttp-download-tls-cert-sha256Certificate SHA-256 fingerprint for a standard TLS downlink
xhttp-download-tls-pubkey-sha256Certificate public-key SHA-256 fingerprint for a standard TLS downlink. Takes precedence if both fingerprints are configured
xhttp-download-public-keyREALITY public key for the downlink. Selects REALITY over H2. Leave certificate verification bypass and both standard TLS fingerprint fields unset
xhttp-download-short-idDownlink REALITY Short ID. Use the even-length hexadecimal value specified by the server, with at most 16 digits. Use xhttp-download-short-id="" if the server accepts an empty value

This example uses H3 with TLS for upload and H2 with TLS for download. Use the server-provided downlink address, port, and path.

VLESS-XHTTP-Split = VLESS,upload.example.com,443,"52396e06-041a-4cc2-be5c-8525eb457809",transport=xhttp,over-tls=true,sni=upload.example.com,alpn=h3,path=/xhttp,xhttp-mode=stream-up,xhttp-download-server=download.example.com,xhttp-download-port=443,xhttp-download-sni=download.example.com,xhttp-download-over-tls=true,xhttp-download-alpn=h2,xhttp-download-path=/xhttp

These arguments apply only to separate downlink H2 and H3 connections. Each separate HTTP/1.1 download GET uses its own TCP connection. Omit the whole group to inherit the main XMUX settings. Setting any argument configures the entire downlink group independently. Group defaults, range syntax, and mutually exclusive limits follow the XMUX rules.

ArgumentDescription
xhttp-download-xmux-max-concurrencyConcurrent session assignments per downlink pool entry
xhttp-download-xmux-max-connectionsNumber of reusable entries in the downlink connection pool
xhttp-download-xmux-max-reuse-timesTotal session assignments per downlink entry
xhttp-download-xmux-http-max-requestsTotal GET requests per downlink entry
xhttp-download-xmux-http-max-reusable-secsReuse lifetime per downlink entry in seconds
xhttp-download-xmux-http-keepalive-secsDownlink keepalive interval in seconds. 0 uses the default for the selected HTTP version. -1 disables keepalive

These arguments only affect the separate downlink GET. Omit the whole group to inherit the main padding settings. Setting any argument makes the other arguments use their padding defaults.

ArgumentDescription
xhttp-download-padding-bytesGET padding size or range. Defaults to 100-1000 bytes
xhttp-download-padding-obfs-modeEnables custom downlink padding. Defaults to false, which places padding in a query argument of the URL carried by Referer
xhttp-download-padding-placementCustom padding placement. Supports queryInHeader, query, header, and cookie. Defaults to queryInHeader
xhttp-download-padding-keyQuery argument or Cookie name for custom padding. Defaults to x_padding
xhttp-download-padding-headerRequest header for custom padding in queryInHeader or header. Defaults to X-Padding
xhttp-download-padding-methodCustom padding generation method. Supports repeat-x and tokenish. Defaults to repeat-x

Omit both arguments to inherit the main session ID placement and field name. Setting one makes the other use the defaults below. Both directions send the same ID. The main node settings determine its character set and length.

ArgumentDescription
xhttp-download-session-id-placementSession ID placement in the separate downlink GET. Supports path, query, header, and cookie. Defaults to path
xhttp-download-session-id-keyField name for query, header, or cookie placement. Defaults to x_session for a query argument or Cookie, and X-Session for a header

WireGuard​

A WireGuard node consists of interface arguments and one or more peers:

WireGuard = WireGuard,interface-ip=192.168.2.2,interface-ipv6=2001:db8:1::2,private-key="qF22B3ezOhWGJA4SHwQSsgMa9d6mPGHyFdZMaDTae2E=",mtu=1280,dns=192.168.2.1,dnsv6=2001:db8:1::1,keepalive=45,peers=[{public-key="JFuTIJEcFnt8R04UnAE5o2WfIPJUsumSxsD2ayXzoWY=",preshared-key="yVNv5K05AwVnWaR4OB8BlMX3jJlkS74aKlYC3PD95IE=",reserved=[1,2,3],allowed-ips="0.0.0.0/0,::/0",endpoint=wg.example.com:51820}],udp=true,server-dns="223.5.5.5,https://dns.example.com/dns-query"
ArgumentDescription
interface-ipWireGuard interface IPv4 address
interface-ipv6WireGuard interface IPv6 address
private-keyLocal private key
mtuInterface MTU; defaults to 1280 when omitted
dnsIPv4 DNS used inside the tunnel
dnsv6IPv6 DNS used inside the tunnel
keepalivePersistent Keepalive interval in seconds; defaults to 45 when omitted
peersPeer array; each peer supports public-key, preshared-key, reserved, allowed-ips, and endpoint
udpWhether to enable UDP; defaults to true
server-dnsDNS used to resolve a peer endpoint domain name; distinct from the in-tunnel dns and dnsv6. Requires Loon 3.5.2 (Build 996) or later

An IPv6 endpoint must use the format [IPv6 address]:port.

Tailscale​

Supported starting with Loon 3.5.4 (Build 1016).

A Tailscale node joins your Tailscale network (tailnet) and forwards TCP and UDP through devices in that network. Device addresses and peer connection information are provided by the control server, so you do not need to configure a server address, port, or WireGuard peer manually.

Format:

Node name = tailscale,optional arguments

Browser authorization example:

Tailscale = tailscale,hostname=loon-iphone

When auth-key is omitted, the node obtains a browser authorization URL the first time it is used. After enabling the VPN, send a request through this node. iOS or macOS displays an authorization notification; tap it to open the browser and sign in. Make sure notifications are enabled for Loon. While the VPN is connected, you can also use the Log In action on the node page. Loon saves the identity after authorization and reuses it for subsequent connections.

Using an Auth Key and specifying an exit node:

Tailscale-Exit = tailscale,auth-key="tskey-auth-replace-with-your-key",hostname=loon-iphone,exit-node=100.101.102.103

Set exit-node to auto to randomly select from the available exit nodes. When device information is refreshed, Loon keeps the current selection as long as it remains available.

Example that allows tailnet devices to access local services and advertises this device as an exit node:

Tailscale-Home = tailscale,hostname=loon-home,allow-inbound=true,advertise-exit-node=true,exit-fake-ip=true

When allow-inbound or advertise-exit-node is enabled, Loon proactively connects this node after the VPN starts and keeps it online. Advertising an exit node requires approval in the control panel. Enable only allow-inbound if you only want other devices to access local services.

Full argument example:

Tailscale = tailscale,control-url="https://controlplane.tailscale.com",auth-key="tskey-auth-replace-with-your-key",hostname=loon-iphone,exit-node=auto,accept-routes=true,accept-dns=true,magic-dns=true,allow-inbound=false,advertise-exit-node=false,exit-fake-ip=true,path-mode=auto,mtu=1280,idle-session-timeout=300,ip-mode=prefer-v4,server-dns="223.5.5.5,https://dns.example.com/dns-query",udp=true,block-quic=true
ArgumentDefaultDescription
auth-keyOmittedAuth Key used to register the device. A valid key normally avoids browser sign-in; omit this argument to use browser authorization. Enter the key itself here, not a browser authorization URL
control-urlhttps://controlplane.tailscale.comControl server URL. This argument can be omitted; specify the corresponding HTTP or HTTPS URL when using a custom control server
hostnameAutomatically generatedDevice name used after this device joins the Tailscale network; this is distinct from the node name in Loon
exit-nodenoneDevice used as the Internet exit. none disables exit-node routing; auto selects one automatically. You can also specify a device name, full MagicDNS name, or Tailscale IP address
accept-routestrueUse subnet routes advertised by devices. This allows access to other devices on their local networks, such as reaching a NAS through a Mac at home
accept-dnstrueAccept DNS servers, split-DNS rules, and search domains provided by Tailscale. When using an exit node, Loon selects DNS according to the provided settings or sends queries through the exit node. When disabled, ordinary public domains use Loon's existing DNS flow, while device MagicDNS names can still be resolved from downloaded device information
magic-dnstrueAutomatically add routing rules for full MagicDNS names and device IP addresses from device information. When MagicDNS is enabled for the tailnet, Loon also adds a rule for its domain suffix. Matching requests use this node independently of accept-dns
allow-inboundfalseAllow authorized tailnet devices to connect to local TCP or UDP services, such as SSH or HTTP, through this device's Tailscale address
advertise-exit-nodefalseAdvertise this device as an exit node. After approval in the control panel, other tailnet devices can select it as their exit; this device's Loon rules determine how Internet traffic is forwarded
exit-fake-iptrueWhen this device acts as an exit and handles client DNS queries, return Fake IP addresses for eligible A or AAAA queries. During forwarding, Loon uses the address to recover the domain name and applies local domain rules. Set to false to return real IP addresses
path-modeautoauto selects the path automatically, attempting a direct P2P connection and using a DERP relay when necessary; derp uses DERP relays only
mtu1280MTU of the inner IP packet. Values from 576 through 1280 are allowed; values below 1280 require ip-mode=v4-only
idle-session-timeout300Session idle timeout, in seconds, after all traffic connections have closed. Enter a non-negative integer; 0 disables idle shutdown. The node reconnects the next time it is used, while the saved identity is retained. This value is fixed at 0 when allow-inbound or advertise-exit-node is enabled
ip-modeUnspecifiedAddress-family policy: v4-only, dual, prefer-v4, prefer-v6, or v6-only. This affects the IPv4 or IPv6 addresses used for domain resolution and destination connections
server-dnsNot setDNS used to resolve domain names in control-server, relay-server, and similar connection addresses. See Node DNS for the format. This does not replace DNS settings provided by Tailscale
udptrueWhether to forward application UDP traffic. This is not a P2P switch; set path-mode=derp to use relays only
block-quictrueWhether to block QUIC. Set this to false and keep udp=true when QUIC must be forwarded through the node

accept-dns determines how domain names are resolved, while magic-dns determines which node forwards traffic for device names and IP addresses. For example, automatically routing nas.example.ts.net through this Tailscale node does not mean that all public-domain DNS queries are sent through the node.

Automatic rules are saved after the device first joins the tailnet and refreshed on subsequent connections. Saved rules can also be loaded after the VPN restarts. Automatic magic-dns routing applies in rule mode.

note
  • exit-node identifies the device that receives and forwards traffic; it does not advertise the current Loon device as an exit node. The selected device must have exit-node functionality enabled and be approved for use in the control panel.
  • The default, exit-node=none, provides access to Tailscale devices and accepted subnets. To reach ordinary Internet addresses through this node, specify an available exit node.
  • Loon's rules or global mode still determine whether ordinary requests use this node. accept-routes=true only permits the use of subnet routes; it does not automatically add the entire remote LAN to Loon's routing rules.

Hysteria 2​

Format:

Node name = Hysteria2,server,port,"password",optional arguments

Full argument example:

Hysteria2 = Hysteria2,hy2.example.com,443,"password",sni=hy2.example.com,skip-cert-verify=false,tls-cert-sha256=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef,tls-pubkey-sha256=abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789,alpn="h3",salamander-password=obfs-password,server-ports="20000:20100",hop-interval=30,download-bandwidth=100,fast-open=true,udp=true,block-quic=false,ip-mode=prefer-v4,server-dns="223.5.5.5,quic://dns.example.com"

download-bandwidth is measured in Mbps. server-ports configures port hopping, and hop-interval is the number of seconds between port changes.

Gecko Obfuscation​

Building on Salamander, Gecko splits QUIC handshake datagrams into multiple UDP datagrams with random padding, reducing the fixed-length signature of handshake packets. The node's obfuscation method and password must match the server configuration.

ArgumentDescription
gecko-passwordEnables Gecko and sets its obfuscation password. The password after the port in the node format is used for Hysteria 2 authentication; configure the obfuscation password separately with this argument
gecko-password-base64When the obfuscation password contains double quotes or control characters, specify the standard Base64 encoding of its raw UTF-8 bytes. Use either this argument or gecko-password
salamander-passwordSpecify this when the server uses Salamander. Configure only one obfuscation method per node

Configure a Gecko node in the [Proxy] section:

Hy2-Gecko = Hysteria2,hy2.example.com,443,"auth-password",sni=hy2.example.com,gecko-password="obfs-password",udp=true

You can also import a hysteria2:// or hy2:// URI with obfs=gecko and obfs-password in its query arguments. Percent-encode passwords containing special characters according to URL rules.

hysteria2://auth-password@hy2.example.com:443/?sni=hy2.example.com&obfs=gecko&obfs-password=obfs-password#Hy2-Gecko

AnyTLS​

Format:

Node name = AnyTLS,server,port,"password",optional arguments

Full argument example:

AnyTLS = AnyTLS,anytls.example.com,443,"password",sni=anytls.example.com,skip-cert-verify=false,tls-profile=chrome,tls-cert-sha256=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef,tls-pubkey-sha256=abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789,public-key="LgJ9bNTyUqBLFkDA12-QgEL7c1yQ1ztk-V1Q-3OLXSk",short-id=164168844958a16d,idle-session-timeout=30,max-stream-count=8,udp=true,block-quic=false,ip-mode=prefer-v4,server-dns="223.5.5.5,h3://dns.example.com/dns-query"

idle-session-timeout is the idle session timeout in seconds. max-stream-count is the maximum number of concurrent streams allowed in one session. public-key and short-id are used for Reality.

Snell​

Supported starting with Loon 3.5.4 (Build 1017).

Supports TCP forwarding and standard UDP forwarding with Snell v4 and v5. Standard UDP datagrams are carried over Snell's TCP connection.

Configuration format

Node name = Snell,server,port,"PSK",version=4,optional arguments

Replace "PSK" with the pre-shared key configured on the server. You can also write psk="PSK" in the same position.

Configuration examples

[Proxy]
Snell-v4 = Snell,snell.example.com,6160,"your-psk",version=4
Snell-v5 = Snell,snell.example.com,6161,"your-psk",version=5,udp=true
Snell-HTTP = Snell,snell.example.com,6162,"your-psk",version=4,obfs=http,obfs-host=www.example.com,obfs-uri=/,udp=true,block-quic=false,ip-mode=prefer-v4,server-dns="223.5.5.5,https://dns.example.com/dns-query"

Configure obfs=http only when the server uses HTTP obfuscation.

ArgumentDescription
versionSupports 4 and 5; defaults to 4
udpSet to true to allow UDP forwarding; defaults to false. The server must also support UDP forwarding
block-quicWhether to block QUIC traffic; defaults to true. Set to false to allow eligible QUIC traffic through standard UDP forwarding
obfsObfuscation type: none or http; defaults to none. The argument name obfs-name is also supported
obfs-hostHost used for HTTP obfuscation. Applies only with obfs=http and defaults to the node server address
obfs-uriRequest path used for HTTP obfuscation. Applies only with obfs=http, must begin with /, and defaults to /
ip-mode, server-dnsOptions for resolving the node server's domain name; see Common Arguments

When adding a Snell node manually, Loon uses v4. To specify v5, add version=5 to the node in the [Proxy] section of the configuration file.

Snell v5 QUIC Proxy Mode is not yet supported.

Mieru​

Loon uses Mieru over TCP. Enter the address and port of the Mieru server's TCP listener (mita). When UDP is enabled, the same TCP transport carries UDP datagrams.

Configuration Format

Node name = mieru,server,port,"username","password",optional arguments

Examples

[Proxy]
Mieru-TCP = mieru,mieru.example.com,8443,"alice","your-password"
Mieru-UDP = mieru,mieru.example.com,8443,"alice","your-password",udp=true,block-quic=false,ip-mode=prefer-v4,server-dns="223.5.5.5,https://dns.example.com/dns-query"
Mieru-Pattern = mieru,mieru.example.com,8443,"alice","your-password",udp=true,traffic-pattern=CCoQARoECAEQAyIKCAMqBjBjYjFmZioECAwQGDIECAEQcA==
ArgumentDefaultDescription
ServerRequiredHostname or IP address of the Mieru server. IPv6 addresses can use square brackets, as in [2001:db8::1]
PortRequiredTCP port the server listens on, from 1 to 65535
Username and passwordRequiredEnter the server-provided credentials in this order. Each must be 1–64 bytes in UTF-8. Use double quotes to preserve commas and leading or trailing spaces
udpfalseSet to true to enable UDP over TCP. The connection to the server still uses the same TCP port
block-quictrueBlocks QUIC by default. To forward QUIC, set both udp=true and block-quic=false
traffic-patternUnsetOptional client traffic pattern containing the standard Base64 encoding of a Mieru Protobuf configuration. When omitted, the default traffic pattern is used
ip-modeUnsetAddress-family policy for resolving the node hostname. Accepts auto, v4-only, dual, prefer-v4, prefer-v6, and v6-only
server-dnsUnsetDNS servers for resolving the node hostname. Separate multiple addresses with commas and quote the entire value. See Common Arguments for the supported formats

Omitting udp from a configuration line leaves UDP off. When you add a Mieru node in the iOS or macOS editor, the UDP switch starts on and the editor saves it as udp=true.

Traffic Pattern​

A traffic pattern can adjust Mieru's TCP segmentation, encrypted-frame padding, low-entropy encoding, and related behavior. The client and server can configure their respective sending behavior independently. Use the Base64 value supplied by the node provider, or export the current configuration from the official Mieru client with mieru export traffic-pattern. Preserve the value exactly when copying it, including trailing = padding characters. See the official Mieru traffic-pattern documentation.

When adding or editing a local Mieru node on iOS or macOS, paste the Base64 value under Proxy Options → Traffic Pattern. An existing value is populated when editing; clear it and save to remove the argument. Loon also reads this argument from imported mierus:// URIs and validates the traffic-pattern format when saving.

Custom by JavaScript​

script-path can be a local script filename or a remote URL. Full argument example:

Custom = Custom,custom.example.com,443,aes-128-gcm,"password",script-path=https://example.com/custom-proxy.js,sni=custom.example.com,skip-cert-verify=false,tls-profile=chrome,tls-cert-sha256=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef,tls-pubkey-sha256=abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789,block-quic=false,ip-mode=prefer-v4,server-dns="223.5.5.5,https://dns.example.com/dns-query"

Whether the script protocol uses the encryption method, password, and TLS arguments depends on its implementation. See Custom HTTP Proxy with JavaScript for an example script.

TLS Certificate Fingerprints​

When skip-cert-verify=false, Loon validates the certificate's trust chain, expiration, and hostname. For a self-signed certificate, install and trust the certificate or configure a certificate fingerprint.

Generate a certificate fingerprint:

openssl x509 -noout -fingerprint -sha256 -inform pem -in your-cert.pem

Generate a public-key fingerprint:

openssl x509 -pubkey -noout -in your-cert.pem > server_pubkey.pem
openssl pkey -pubin -in server_pubkey.pem -outform DER | openssl dgst -sha256