现有代理自定义出口
/etc/XrayR/custom_outbound.json
[
{
"tag": "IPv4_out",
"protocol": "freedom",
"settings": {}
},
{
"protocol": "blackhole",
"tag": "block"
},
{
"tag": "hk1",
"protocol": "shadowsocks",
"settings": {
"servers": [
{
"address": "107.174.37.148",
"method": "aes-128-gcm",
"password": "xd69sx+5Wusudw8C18QIVFX4YETgXG6Qv8paYxeL+Jc",
"port": 57915
}
]
}
},
{
"tag": "111",
"protocol": "shadowsocks",
"settings": {
"servers": [
{
"address": "92.111.231.47",
"method": "aes-128-gcm",
"password": "e7c42a89-8153-4cb4-bf7c-0a113d2ac6d7",
"port": 10001
}
]
}
}
]
自定义路由功能
/etc/XrayR/route.json
{
"domainStrategy": "IPOnDemand",
"rules": [
{
"type": "field",
"inboundTag": ["Vmess_0.0.0.0_10001"],
"outboundTag": "hk1"
},
{
"type": "field",
"inboundTag": ["Shadowsocks_0.0.0.0_30001"],
"outboundTag": "tw1"
},
{
"type": "field",
"inboundTag": ["Shadowsocks_0.0.0.0_30007"],
"outboundTag": "ua1"
}
]
}
基本配置
/etc/XrayR/config.yml
Log:
Level: warning # 日志级别: none(无日志), error(错误), warning(警告), info(信息), debug(调试)
AccessPath: # /etc/XrayR/access.Log 访问日志路径
ErrorPath: # /etc/XrayR/error.log 错误日志路径
DnsConfigPath: # /etc/XrayR/dns.json DNS 配置文件路径,查看 https://xtls.github.io/config/dns.html 以获取帮助
RouteConfigPath: /etc/XrayR/route.json # 路由配置文件路径,查看 https://xtls.github.io/config/routing.html 以获取帮助
InboundConfigPath: /etc/XrayR/custom_inbound.json # 入站配置文件路径,查看 https://xtls.github.io/config/inbound.html 以获取帮助
OutboundConfigPath: /etc/XrayR/custom_outbound.json # 出站配置文件路径,查看 https://xtls.github.io/config/outbound.html 以获取帮助
ConnectionConfig:
Handshake: 4 # 握手时间限制(秒)
ConnIdle: 30 # 连接空闲时间限制(秒)
UplinkOnly: 2 # 下行关闭后,连接保持时间(秒)
DownlinkOnly: 4 # 上行关闭后,连接保持时间(秒)
BufferSize: 64 # 每个连接的内部缓存大小(KB)
Nodes:
- PanelType: "NewV2board" # 面板类型: SSpanel, NewV2board, PMpanel, Proxypanel, V2RaySocks, GoV2Panel, BunPanel
ApiConfig:
ApiHost: "" # API 服务器地址
ApiKey: "" # API 密钥
NodeID: 1 # 节点 ID
NodeType: Vmess # 节点类型: V2ray, Vmess, Vless, Shadowsocks, Trojan, Shadowsocks-Plugin
Timeout: 30 # API 请求超时时间(秒)
EnableVless: false # 是否启用 Vless(仅适用于 V2ray 类型)
VlessFlow: "xtls-rprx-vision" # 仅支持 Vless
SpeedLimit: 0 # 速度限制(Mbps),本地设置会覆盖远程设置,0 表示禁用
DeviceLimit: 0 # 设备连接数限制,本地设置会覆盖远程设置,0 表示禁用
RuleListPath: # /etc/XrayR/rulelist 本地规则列表文件路径
DisableCustomConfig: false # 是否禁用自定义配置(适用于 SSpanel)
ControllerConfig:
ListenIP: 0.0.0.0 # 监听的 IP 地址
SendIP: 0.0.0.0 # 发送数据包的 IP 地址
UpdatePeriodic: 60 # 更新节点信息的时间间隔(秒)
EnableDNS: false # 是否启用自定义 DNS 配置,请确保已正确设置 dns.json
DNSType: AsIs # DNS 解析策略: AsIs(原样返回), UseIP(返回 IP 地址), UseIPv4(仅返回 IPv4 地址), UseIPv6(仅返回 IPv6 地址)
EnableProxyProtocol: false # 是否启用 Proxy Protocol,仅适用于 WebSocket 和 TCP
AutoSpeedLimitConfig:
Limit: 0 # 速度警告阈值(Mbps),0 表示禁用自动限速
WarnTimes: 0 # 达到 (WarnTimes) 次警告后,用户将被限速,0 表示立即限速
LimitSpeed: 0 # 被限速用户的速度上限(Mbps)
LimitDuration: 0 # 限速时长(分钟)
GlobalDeviceLimitConfig:
Enable: false # 是否启用全局设备限制
RedisNetwork: tcp # Redis 连接协议: tcp 或 unix
RedisAddr: 127.0.0.1:6379 # Redis 服务器地址或 Unix 套接字路径
RedisUsername: # Redis 用户名
RedisPassword: YOUR PASSWORD # Redis 密码
RedisDB: 0 # Redis 数据库索引
Timeout: 5 # Redis 请求超时时间(秒)
Expiry: 60 # 过期时间(秒)
EnableFallback: false # 是否启用 Fallback(仅支持 Trojan 和 Vless)
FallBackConfigs: # 支持多个 Fallback 配置
- SNI: # TLS SNI(服务器名称指示),留空表示匹配任意
Alpn: # ALPN 协议,留空表示匹配任意
Path: # HTTP 路径,留空表示匹配任意
Dest: 80 # 目标端口(必填),详细信息请查看 https://xtls.github.io/config/features/fallback.html
ProxyProtocolVer: 0 # Proxy Protocol 版本号,0 表示禁用
DisableLocalREALITYConfig: false # 是否禁用本地 REALITY 配置
EnableREALITY: false # 是否启用 REALITY
REALITYConfigs:
Show: true # 是否显示 REALITY 调试信息
Dest: www.amazon.com:443 # 目标地址(必填),与 fallback 目标相同
ProxyProtocolVer: 0 # Proxy Protocol 版本号,0 表示禁用
ServerNames: # 客户端可用的 ServerName 列表(必填),当前不支持 * 通配符
- www.amazon.com
PrivateKey: YOUR_PRIVATE_KEY # 私钥(必填),使用 './XrayR x25519' 生成
MinClientVer: # 可选,Xray 客户端的最低版本(格式 x.y.z)
MaxClientVer: # 可选,Xray 客户端的最高版本(格式 x.y.z)
MaxTimeDiff: 0 # 可选,最大允许的时间差(毫秒)
ShortIds: # 客户端可用的 ShortId 列表(必填,可用于区分不同客户端)
- ""
- 0123456789abcdef
CertConfig:
CertMode: file # 证书获取方式: none(禁用 TLS 配置), file(使用本地证书), http, tls, dns
CertDomain: "af.abx.xyz" # 证书绑定的域名
CertFile: /etc/XrayR/zs/fullchain.crt # 证书文件路径(当 CertMode 为 file 时)
KeyFile: /etc/XrayR/zs/private.key # 私钥文件路径(当 CertMode 为 file 时)
Provider: alidns # DNS 证书提供商,完整支持列表请查看 https://go-acme.github.io/lego/dns/
Email: [email protected] # 证书申请邮箱
DNSEnv: # DNS 证书提供商的环境变量
ALICLOUD_ACCESS_KEY: aaa
ALICLOUD_SECRET_KEY: bbb
THE END
暂无评论内容