You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dragonbreath2000 ee405ff6b2
Freedom outbound: Update noises (#579)
2 months ago
..
features Rewrite the browser dialer docs (#533) 4 months ago
inbounds Remove legacy `timeout` config (#577) 2 months ago
outbounds Freedom outbound: Update noises (#579) 2 months ago
transports SplitHTTP: Document xmux (#578) 2 months ago
README.md Fix "missing translation" alert and translate a few pages 5 months ago
api.md Fix "missing translation" alert and translate a few pages 5 months ago
dns.md Change the default port of Dns over Quic 4 months ago
dns_flow.png 压缩所有的 PNG 图片 (#561) 3 months ago
fakedns.md Translate to English #2 (#340) 2 years ago
inbound.md Translate to English #2 (#340) 2 years ago
log.md Translate to English #2 (#340) 2 years ago
metrics.md HTTPUpgrade (#483) 9 months ago
observatory.md Add observatory.md (en) 3 months ago
outbound.md Sync outbound.md (en) 3 months ago
policy.md Translate to English #2 (#340) 2 years ago
reverse.md Translate to English #2 (#340) 2 years ago
routing.md Remove .hk in tld-!cn (#569) 3 months ago
stats.md Translate to English #2 (#340) 2 years ago
transport.md Remove QUIC, DomainSocket and global transport from EN/RU (#571) 3 months ago

README.md

title lang
Configurations en-US

This section will tell you all the details of Xray configuration. By mastering these contents, Xray will unleash its full power in your hands.

Overview

The configuration file of Xray is in JSON format, and the configuration format for the client and server is the same, except for the actual configuration content. It takes the following form:

{
  "log": {},
  "api": {},
  "dns": {},
  "routing": {},
  "policy": {},
  "inbounds": [],
  "outbounds": [],
  "transport": {},
  "stats": {},
  "reverse": {},
  "fakedns": {},
  "metrics": {},
  "observatory": {},
  "burstObservatory": {}
}

::: warning If you are new to Xray, you can first click to view configuration and running in the Quick Start guide, to learn the most basic configuration method, and then refer to the contents of this section to master all the configuration methods of Xray. :::

Basic Configuration Modules

log:LogObject

Log configurations, controlling how Xray emits logs.

api:ApiObject

Configures how Xray provides API interfaces for calling remotely.

dns: DnsObject

Configures the built-in DNS server. System DNS will be used if not configured.

routing: RoutingObject

Configures routing. Specify rules to route connections through different outbounds.

policy: PolicyObject

Local policy configurations, specifying different user levels and corresponding policies.

inbounds: [ InboundObject ]

An array of inbound connection configurations.

outbounds: [ OutboundObject ]

An array of outbound connection configurations.

transport: TransportObject

Configures how Xray establishes and uses network connections to other servers.

stats: StatsObject

Configures traffic statistics.

reverse: ReverseObject

Configures the built-in reverse proxy. You can forward server traffic to the client, effectively achieving reverse proxying.

fakedns: FakeDnsObject

FakeDNS configuration. Can be used with a transparent proxy to obtain the actual domains.

metrics: metricsObject

Metrics configuration. A more straightforward (and hopefully better) way to export metrics.

observatory: ObservatoryObject

Background connection observation. Detect the connection status of outbound proxies.

burstObservatory: BurstObservatoryObject

Concurrent connection observation. Detect the connection status of outbound proxies.