2021-05-26 11:05:53 +00:00
---
2023-03-12 01:44:54 +00:00
title: Configurations
lang: en-US
2021-05-26 11:05:53 +00:00
---
2023-03-12 01:44:54 +00:00
> **This section will tell you all the details of Xray configuration. By mastering these contents, Xray will unleash its full power in your hands.**
2021-05-26 11:05:53 +00:00
2023-03-12 01:44:54 +00:00
## Overview
2021-05-26 11:05:53 +00:00
2023-03-12 01:44:54 +00:00
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:
2021-05-26 11:05:53 +00:00
```json
{
"log": {},
"api": {},
"dns": {},
"routing": {},
"policy": {},
"inbounds": [],
"outbounds": [],
"transport": {},
"stats": {},
"reverse": {},
"fakedns": {}
}
```
::: warning
2023-03-12 01:44:54 +00:00
If you are new to Xray, you can first click to view [configuration and running in the Quick Start guide ](../document/install.md ), to learn the most basic configuration method, and then refer to the contents of this section to master all the configuration methods of Xray.
2021-05-26 11:05:53 +00:00
:::
2023-03-12 01:44:54 +00:00
## Basic Configuration Modules
2021-05-26 11:05:53 +00:00
> log:[LogObject](./log.md)
2023-03-12 01:44:54 +00:00
Log configuration, which controls the way Xray outputs logs.
2021-05-26 11:05:53 +00:00
> api:[ApiObject](./api.md)
2023-03-12 01:44:54 +00:00
Provides some API interfaces for remote calls.
2021-05-26 11:05:53 +00:00
> dns: [DnsObject](./dns.md)
2023-03-12 01:44:54 +00:00
Built-in DNS server. If this item is not configured, the system's DNS settings will be used.
2021-05-26 11:05:53 +00:00
> routing: [RoutingObject](./routing.md)
2023-03-12 01:44:54 +00:00
Routing function. You can set rules to route data to different outbounds.
2021-05-26 11:05:53 +00:00
> policy: [PolicyObject](./policy.md)
2023-03-12 01:44:54 +00:00
Local policy, which can set different user levels and corresponding policy settings.
2021-05-26 11:05:53 +00:00
> inbounds: \[ [InboundObject](./inbound.md) \]
2023-03-12 01:44:54 +00:00
An array, with each element being an inbound connection configuration.
2021-05-26 11:05:53 +00:00
> outbounds: \[ [OutboundObject](./outbound.md) \]
2023-03-12 01:44:54 +00:00
An array, with each element being an outbound connection configuration.
2021-05-26 11:05:53 +00:00
> transport: [TransportObject](./transport.md)
2023-03-12 01:44:54 +00:00
Used to configure the way Xray establishes and uses network connections with other servers.
2021-05-26 11:05:53 +00:00
> stats: [StatsObject](./stats.md)
2023-03-12 01:44:54 +00:00
Used to configure traffic data statistics.
2021-05-26 11:05:53 +00:00
> reverse: [ReverseObject](./reverse.md)
2023-03-12 01:44:54 +00:00
Reverse proxy. You can forward server-side traffic to the client, that is, reverse traffic forwarding.
2021-05-26 11:05:53 +00:00
> fakedns: [FakeDnsObject](./fakedns.md)
2023-03-12 01:44:54 +00:00
FakeDNS configuration. It can be used with transparent proxy to obtain the actual domain name.