mirror of
https://github.com/XTLS/Xray-docs-next.git
synced 2025-04-02 21:06:15 +03:00
Update work.md
This commit is contained in:
parent
ede029d336
commit
26ba8e0d06
1 changed files with 23 additions and 23 deletions
|
@ -1,37 +1,37 @@
|
|||
# Xray 的工作模式
|
||||
# Xray working mode
|
||||
|
||||
## 单服务器模式
|
||||
## Single Server Mode
|
||||
|
||||
与其它的网络代理工具一样,你需要一台配置了 Xray 的服务器,然后在自己的设备上安装并配置 Xray 客户端,然后即可流畅地访问互联网。
|
||||
Like other network proxy tools, you need a server with Xray configured, then install and configure the Xray client on your device, and then you can access the Internet smoothly.
|
||||
|
||||
```mermaid
|
||||
graph LR;
|
||||
A(PC) -.- B(防火墙);
|
||||
B -.-> C(墙外网站);
|
||||
A(PC) -.- B(firewall);
|
||||
B -.-> C(Websites outside the Great Firewall);
|
||||
A --> D(Xray/VPS);
|
||||
D --> C;
|
||||
A --> E(墙内网站);
|
||||
A --> E(Websites within the wall);
|
||||
```
|
||||
|
||||
一个 Xray 服务器可同时支持多台设备使用不同的代理协议访问。同时,经过合理的配置,Xray 可以识别并区分需要代理以及不需要代理的流量,直连的流量不需要绕路。
|
||||
An Xray server can support multiple devices using different proxy protocols to access at the same time. At the same time, after reasonable configuration, Xray can identify and distinguish between traffic that needs proxy and traffic that does not need proxy, and direct traffic does not need to be detoured.
|
||||
|
||||
## 桥接模式
|
||||
## Bridge mode
|
||||
|
||||
如果你不想在每一台设备上都配置路由,你也可以设置一台中转服务器,用于接收客户端发来的所有流量,然后在服务器中进行转发判断。
|
||||
If you don't want to configure routing on each device, you can also set up a transit server to receive all traffic sent by the client and then forward it in the server.
|
||||
|
||||
```mermaid
|
||||
graph LR;
|
||||
A(PC) -.-> B(防火墙);
|
||||
B -.-> C(墙外网站);
|
||||
A --> D(墙内 VPS);
|
||||
D --> E(墙外 VPS);
|
||||
A(PC) -.-> B(firewall);
|
||||
B -.-> C(Websites outside the Great Firewall);
|
||||
A --> D(Inside the wall VPS);
|
||||
D --> E(Outside the Wall VPS);
|
||||
E --> C;
|
||||
D --> F(墙内网站);
|
||||
D --> F(Websites within the wall);
|
||||
```
|
||||
|
||||
## 工作原理
|
||||
## Working Principle
|
||||
|
||||
在配置 Xray 之前,不妨先来看一下 Xray 的工作原理,以下是单个 Xray 进程的内部结构示意图。多个 Xray 之间相互独立,互不影响。
|
||||
Before configuring Xray, let's take a look at how Xray works. The following is a schematic diagram of the internal structure of a single Xray process. Multiple Xrays are independent of each other and do not affect each other.
|
||||
|
||||
```mermaid
|
||||
graph LR;
|
||||
|
@ -45,10 +45,10 @@ D --> B3(outbound);
|
|||
D --> B4(outbound);
|
||||
```
|
||||
|
||||
- 需要配置至少一个入站连接(Inbound)和一个出站连接(Outbound)才可以正常工作。
|
||||
- 入站连接负责与客户端(如浏览器)通信:
|
||||
- 入站连接通常可以配置用户认证,如 ID 和密码等;
|
||||
- 入站连接收到数据之后,会交给分发器(Dispatcher)进行分发;
|
||||
- 出站连接负责将数据发给服务器,如另一台主机上的 Xray。
|
||||
- 当有多个出站连接时,可以配置路由(Routing)来指定某一类流量由某一个出站连接发出。
|
||||
- 路由会在必要时查询 DNS 以获取更多信息来进行判断。
|
||||
- You need to configure at least one inbound connection (Inbound) and one outbound connection (Outbound) for it to work properly.
|
||||
- Inbound connections are responsible for communicating with clients such as browsers:
|
||||
- Inbound connections can usually be configured with user authentication, such as ID and password;
|
||||
- After the inbound connection receives the data, it will be handed over to the Dispatcher for distribution;
|
||||
- Outbound connections are responsible for sending data to a server, such as Xray on another host.
|
||||
- When there are multiple outbound connections, you can configure routing to specify that a certain type of traffic is sent from a certain outbound connection.
|
||||
- The router will query DNS for more information when necessary to make a decision.
|
||||
|
|
Loading…
Add table
Reference in a new issue