Xray-docs-next/docs/en/config/outbounds/socks.md

92 lines
1.8 KiB
Markdown
Raw Normal View History

2021-05-26 11:05:53 +00:00
# Socks
The Socks protocol is a standard protocol implementation that is compatible with [Socks 5](http://ftp.icm.edu.pl/packages/socks/socks4/SOCKS4.protocol).
2021-05-26 11:05:53 +00:00
::: danger
The Socks protocol does not provide encryption for transmission and is not suitable for transmitting data over public networks.
2021-05-26 11:05:53 +00:00
:::
## OutboundConfigurationObject
```json
{
"servers": [
{
"address": "127.0.0.1",
"port": 1234,
"users": [
{
"user": "test user",
"pass": "test pass",
"level": 0
}
]
}
]
}
```
> `servers`: \[ [ServerObject](#serverobject) \]
An array representing a list of Socks servers, where each item is a server configuration.
2021-05-26 11:05:53 +00:00
### ServerObject
```json
{
"address": "127.0.0.1",
"port": 1234,
"users": [
{
"user": "test user",
"pass": "test pass",
"level": 0
}
]
}
```
> `address`: address
The server address. Required.
2021-05-26 11:05:53 +00:00
::: tip
Only connections to Socks 5 servers are supported.
2021-05-26 11:05:53 +00:00
:::
> `port`: number
The server port. Required.
2021-05-26 11:05:53 +00:00
> `users`: \[ [UserObject](#userobject) \]
An array representing a list of users. Each item in the array is a user configuration.
2021-05-26 11:05:53 +00:00
When the list is not empty, the Socks client will authenticate using the user information. If not specified, no authentication is performed.
2021-05-26 11:05:53 +00:00
The default value is an empty array.
2021-05-26 11:05:53 +00:00
#### UserObject
```json
{
"user": "test user",
"pass": "test pass",
"level": 0
}
```
> `user`: string
The username. Required.
2021-05-26 11:05:53 +00:00
> `pass`: string
The password. Required.
2021-05-26 11:05:53 +00:00
> `level`: number
The user level. Connections will use the corresponding [local policy](../policy.md#levelpolicyobject) associated with this user level.
2021-05-26 11:05:53 +00:00
The `level` value corresponds to the `level` value in the [policy](../policy.md#policyobject). If not specified, the default value is 0.