Skip to content

Transport Configuration

proxies:
- name: "http-opts-example"
type: xxxxx
network: http
http-opts:
method: "GET"
path:
- '/'
- '/video'
headers:
Connection:
- keep-alive

http transport settings. Only effective when the transport layer is http.

HTTP request method.

HTTP request path.

HTTP request headers.

h2 transport settings. Only effective when the transport layer is h2.

List of hostnames. If set, the client randomly selects one and the server validates it.

HTTP request path.

grpc transport settings. Only effective when the transport layer is grpc.

gRPC service name.

gRPC User-Agent.

gRPC heartbeat interval. Disabled by default, in seconds.

Maximum number of connections. The default value is 1, meaning only one underlying connection is used.

Conflicts with max-streams.

Minimum number of multiplexed streams in a connection before opening a new connection.

Conflicts with max-streams.

Maximum number of multiplexed streams in a connection before opening a new connection.

Conflicts with max-connections and min-streams.

ws transport settings. Only effective when the transport layer is ws.

Request path.

Request headers.

Early Data first-packet length threshold.

Use HTTP upgrade.

Enable fast open for HTTP upgrade.

mkcp transport settings. Only effective when the transport layer is mkcp.

Maximum transmission unit.

Transmission time interval in milliseconds.

Uplink capacity in MB/s.

Downlink capacity in MB/s.

Whether to enable congestion control.

Write buffer size in bytes.

Read buffer size in bytes.

Seed used for AES-GCM authentication. Leave empty to use the default authentication.

Packet header camouflage. Available values: none/srtp/utp/wechat-video/dtls/wireguard.

mekya transport settings. Only effective when the transport layer is mekya.

Mekya server URL.

Maximum aggregation wait time after the first packet, in milliseconds.

Maximum payload size of a single HTTP request, in bytes.

Empty polling interval in milliseconds.

HTTP/2 connection pool size.

Internal KCP parameters for Mekya. The fields are the same as mkcp-opts.

xhttp transport settings. Only effective when the transport layer is xhttp.

By default, only h2 is supported. To enable h3 mode, set alpn: [h3]. To enable HTTP/1.1 mode, set alpn: [http/1.1].

Request path.

Hostname.

Mode. Available values: auto, stream-one, stream-up, or packet-up.

Request headers.

Sets whether stream-up/one uplink sends a Content-Type: application/grpc header to mimic gRPC.

The request headers sent by the client include Referer: ...?x_padding=XXX... by default. The default length is 100-1000 and is randomized for each request. The server checks whether it falls within the allowed range.

Enables padding obfuscation. Defaults to false for backward compatibility.

Key name used to store the padding value. Its meaning depends on x-padding-placement:

  • Query parameter name in the URL when placement is queryInHeader.
  • Cookie name.
  • HTTP header name.
  • URL query parameter name.

HTTP header name. Only relevant when x-padding-placement is header or queryInHeader.

Defines where the padding value is placed. Available values: queryInHeader, cookie, header, query. Only valid when x-padding-obfs-mode is true.

Defines how the padding value is generated.

  • repeat-x: default method, a long sequence containing X characters.
  • tokenish: generates a random Base62 token.

Changes the HTTP method used for uplink data transfer. Use any method that supports a request body, such as PUT or PATCH, and is allowed by the CDN.

Placement of the session ID. Options: path, query, cookie, header.

Key name for the session ID. Not applicable when placement is path.

Character table used to generate session IDs. Available values: "", uuid, ALPHABET, Alphabet, BASE36, Base62, HEX, alphabet, base36, hex, number.

Session ID length range. The start value cannot be 0; the total ID space must be larger than 2.1 billion. Effective only when session-table is non-empty or uuid.

Placement of the sequence number. Options: path, query, cookie, header. If session-placement is set to path, seq-placement must also be set to path.

Key name for the sequence number. Not applicable when placement is path.

Placement of split uplink data fragments, only for packet-up mode. Options: cookie or header.

Base name of the key used to pass data fragments. The client automatically splits data into multiple chunks and the server reassembles them.

Maximum size of each uplink data chunk, in bytes. Only applicable when uplink-data-placement is not body.

Minimum value: 64 bytes.

Recommended values:

  • For cookie placement: 3072 bytes (default 3KB).
  • For header placement: 4096 bytes (default 4KB).

If unspecified, an appropriate default is selected automatically based on uplink-data-placement.

Maximum amount of data carried by each client POST. Default: 1000000, or 1MB. This value should be smaller than the maximum allowed by CDNs and other HTTP middleboxes. The server also rejects POSTs larger than this value.

Minimum interval for the client to initiate POST requests based on a single proxy request. Default: 30 milliseconds.

Connection reuse settings, also known as XMUX.

Note: unlike the original implementation, this option has no default value. If omitted, connection reuse is disabled and each request opens a new underlying connection.

Maximum number of proxy requests that can exist simultaneously in each underlying connection. When the number of proxy requests in the connection reaches this value, a new connection is established to accommodate more requests.

Maximum number of simultaneous connections. Before this value is reached, each new proxy request opens a new connection. After that, existing connections start to be reused.

This conflicts with max-concurrency; only one can be used.

xhttp-opts.reuse-settings.c-max-reuse-times

Section titled “xhttp-opts.reuse-settings.c-max-reuse-times”

Maximum number of times a connection can be reused. After this count is reached, it will not be assigned new proxy requests and will be closed after the last internal proxy request finishes.

xhttp-opts.reuse-settings.h-max-request-times

Section titled “xhttp-opts.reuse-settings.h-max-request-times”

Maximum cumulative number of requests carried by a connection. This counter is not strict, and Golang GET requests have automatic retries, so filling this is not recommended.

xhttp-opts.reuse-settings.h-max-reusable-secs

Section titled “xhttp-opts.reuse-settings.h-max-reusable-secs”

After a TCP/QUIC connection lasts this long, it will no longer be assigned new HTTP requests and will be closed after the last internal HTTP request finishes.

xhttp-opts.reuse-settings.h-keep-alive-period

Section titled “xhttp-opts.reuse-settings.h-keep-alive-period”

How often the client sends keepalive packets when the H2/H3 connection is idle. Default: 0, meaning Chrome H2’s 45 seconds or quic-go H3’s 10 seconds. This is the only XMUX option that does not allow ranges, because randomizing it is itself a fingerprint, and it allows negative values such as -1 to disable idle keepalive packets. Leaving it at 0 is recommended.

Separate upload/download settings.

Note: this option overrides the original configuration. Any item left unset inherits the uplink parameter. Only the options listed in the example can be overridden; unlisted options are not overwritten.