XrayR-doc/dui-jie-sspanel/sspanel/sspanel_custom_config.md
2022-07-22 12:14:07 +10:00

207 lines
3.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 对接新版SSPanel Custom Config
对于sspanel >= 2021.11的版本中自动启用Custom_config的配置方法请查看以下配置正确配置结点信息。关于订阅相关信息请查看[SSPanel相关文档](https://wiki.sspanel.org/#/universal-subscription)。
如果不想使用custom config请在`ApiConfig`中将`DisableCustomConfig`设为`true`
# Shadowsocks
```json
{
"offset_port_user": "12345", //前端/订阅中下发的端口
"offset_port_node": "12345", //节点服务器下发的端口
"server_user": "hk.domain.com", //前端/订阅中下发的服务器地址
"mu_encryption": "chacha20-ietf-poly1305", // `aes-128-gcm`, `aes-256-gcm`, `chacha20-ietf-poly1305`三者之一
}
```
# V2ray
alterId设为0则自动启用VMessAEAD。
{% hint style="info" %} 注意VMESS AEAD 将在 2022 年 1 月 1 日强制启用 请注意更新服务端配置设置alterId = 0 {% endhint %}
## tcp示例
``` json
{
"offset_port_node": 12345,
"server_sub": "hk.domain.com",
"alter_id": 0,
"network": "tcp",
"security": "none",
}
```
## tcp+http示例
```json
{
"offset_port_node": 12345,
"server_sub": "hk.domain.com",
"alter_id": 0,
"network": "tcp",
"security": "none",
"header": {
"type": "http",
"request": {
"path": ["/"],
"headers": {
"Host": ["www.baidu.com"]
}
},
"response": {}
}
}
```
## tcp+tls示例
```json
{
"offset_port_node": 443,
"server_sub": "hk.domain.com",
"host": "hk.domain.com",
"alter_id": 0,
"network": "tcp",
"security": "tls",
}
```
## ws示例
```json
{
"offset_port_node": 80,
"server_sub": "hk.domain.com",
"host": "hk.domain.com",
"alter_id": 0,
"network": "ws",
"security": "none",
"path": "/v2ray"
}
```
## ws+tls示例
```json
{
"offset_port_node": 443,
"server_sub": "hk.domain.com",
"host": "hk.domain.com",
"alter_id": 0,
"network": "ws",
"security": "tls",
"path": "/v2ray"
}
```
## grpc+tls示例
```json
{
"offset_port_node": 443,
"server_sub": "hk.domain.com",
"host": "hk.domain.com",
"alter_id": 0,
"network": "grpc",
"security": "tls",
"servicename": "some_name"
}
```
## 中转端口示例
在任一配置中设置`offset_port_user`为用户连接端口
``` json
{
"offset_port_user": 8888,
"offset_port_node": 12345,
"server_sub": "hk.domain.com",
"alter_id": 0,
"network": "tcp",
"security": "none",
}
```
此时用户连接端口为8888结点监听端口为12345
## 启用vless
在任一配置中设置`enable_vless: 1`为用户连接端口
``` json
{
"offset_port_node": 443,
"server_sub": "hk.domain.com",
"host": "hk.domain.com",
"alter_id": 0,
"network": "tcp",
"security": "tls",
"enable_vless": 1
}
```
请开启vless同时务必使用tls或者xtls。
## 启用xtls
在任一配置中设置`security: xtls`。
``` json
{
"offset_port_node": 443,
"server_sub": "hk.domain.com",
"host": "hk.domain.com",
"alter_id": 0,
"network": "tcp",
"security": "xtls",
"enable_vless": 1
}
```
# Trojan
## tcp示例
``` json
{
"offset_port_node": 443,
"server_sub": "hk.domain.com",
"host": "hk.domain.com"
}
```
## grpc示例
``` json
{
"offset_port_node": 443,
"server_sub": "hk.domain.com",
"host": "hk.domain.com",
"grpc": 1,
"servicename": "some_name"
}
```
## 中转示例
在任一配置中设置`offset_port_user`为用户连接端口
``` json
{
"offset_port_user": 443,
"offset_port_node": 12345,
"server_sub": "hk.domain.com",
"host": "hk.domain.com"
}
```
此时用户连接443结点监听12345
## 启用xtls
在任一配置中设置`enable_xtls: 1`。
``` json
{
"offset_port_node": 443,
"server_sub": "hk.domain.com",
"host": "hk.domain.com",
"enable_xtls": 1
}
```