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.
JimhHan 8a0c7d76e8
Fix: not enough links
4 years ago
..
features fix links 4 years ago
inbounds fix links 4 years ago
outbounds fix links 4 years ago
transports Fix:gRPC 4 years ago
README.md Fix: not enough links 4 years ago
api.md Fix: not enough links 4 years ago
dns.md Fix: not enough links 4 years ago
dns_flow.png Add: inbound, outbound, transport 4 years ago
fakedns.md Fix: not enough links 4 years ago
inbound.md Fix: not enough links 4 years ago
log.md Add: inbound, outbound, transport 4 years ago
outbound.md Fix: not enough links 4 years ago
policy.md Fix: not enough links 4 years ago
reverse.md Fix: not enough links 4 years ago
routing.md Fix: not enough links 4 years ago
stats.md Fix: not enough links 4 years ago
transport.md Fix: not enough links 4 years ago

README.md

title lang
配置文件 zh-CN

这个章节将告诉您所有的 Xray 配置细节,掌握这些内容,在您手中 Xray 将发挥更大威力.

概述

Xray 的配置文件为 json 格式, 客户端和服务端的配置格式没有区别, 只是实际的配置内容不一样。
形式如下:

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

::: warning 如果你刚接触 Xray, 您可以先点击查看快速入门中的配置运行, 学习最基本的配置方式, 然后查看本章节内容以掌握所有 Xray 的配置方式. :::

基础配置模块

log:LogObject

日志配置,控制 Xray输出日志的方式.

api:ApiObject

提供了一些API接口供远程调用。

dns: DnsObject

内置的 DNS 服务器. 如果没有配置此项,则使用系统的 DNS 设置。

routing: RoutingObject

路由功能。可以设置规则分流数据从不同的outbound发出.

policy: PolicyObject

本地策略,可以设置不同的用户等级和对应的策略设置。

inbounds: [ InboundObject ]

一个数组,每个元素是一个入站连接配置。

outbounds: [ OutboundObject ]

一个数组,每个元素是一个出站连接配置。

transport: TransportObject

用于配置 Xray 其它服务器建立和使用网络连接的方式。

stats: StatsObject

用于配置流量数据的统计。

reverse: ReverseObject

反向代理。可以把服务器端的流量向客户端转发,即逆向流量转发

fakedns: FakeDnsObject

FakeDNS. 可配合透明代理使用,以获取实际域名。