-
Notifications
You must be signed in to change notification settings - Fork 37
对接XrayR后端
ByteInternetHK edited this page Jul 2, 2021
·
3 revisions
-
安装docker和docker-compose->参考XrayR教程
-
在PMPanel后台添加节点
节点地址按如下格式填写
xxxxx.com;10000;2;ws;;path=/video|server=xxxxx.com|host=www.iqiyi.com
目前PMPanel的订阅只支持ws(其他的我没配置过,所以不会用,我太菜了,我需要勇士来帮我对接节点,我来写订阅),以上只需要修改端口号10000,以及server=xxxxx.com
- 如果是直连节点,只需要修改server=xxxxx.com中的地址和端口为直连节点的ip和XrayR的端口
- 如果是中转节点,中转请保持端口一致,然后修改server=xxxxx.com为中转机ip或ddns域名等
- 编辑XrayR的config文件
Log:
Level: info # Log level: none, error, warning, info, debug
AccessPath: # ./access.Log
ErrorPath: # ./error.log
DnsConfigPath: # ./dns.json Path to dns config
ConnetionConfig:
Handshake: 4 # Handshake time limit, Second
ConnIdle: 10 # Connection idle time limit, Second
UplinkOnly: 2 # Time limit when the connection downstream is closed, Second
DownlinkOnly: 4 # Time limit when the connection is closed after the uplink is closed, Second
BufferSize: 64 # The internal cache size of each connection, kB
Nodes:
-
PanelType: "PMpanel" # Panel type: SSpanel, V2board, PMpanel
ApiConfig:
ApiHost: "http://webapi.yyds.me" # 修改为自己的api地址,不需要/结尾
ApiKey: "testWEBAPI" # api对接的key
NodeID: 19 #节点id
NodeType: V2ray # Node type: V2ray, Shadowsocks, Trojan
Timeout: 30 # Timeout for the api request
EnableVless: false # Enable Vless for V2ray Type
EnableXTLS: false # Enable XTLS for V2ray and Trojan
SpeedLimit: 0 # Mbps, Local settings will replace remote settings, 0 means disable
DeviceLimit: 0 # Local settings will replace remote settings, 0 means disable
RuleListPath: # ./rulelist Path to local rulelist file
ControllerConfig:
ListenIP: 0.0.0.0 # IP address you want to listen
SendIP: 0.0.0.0 # IP address you want to send pacakage
UpdatePeriodic: 60 # Time to update the nodeinfo, how many sec.
EnableDNS: false # Use custom DNS config, Please ensure that you set the dns.json well
DNSType: AsIs # AsIs, UseIP, UseIPv4, UseIPv6, DNS strategy
EnableProxyProtocol: false # Only works for WebSocket and TCP
EnableFallback: false # Only support for Trojan and Vless
FallBackConfigs: # Support multiple fallbacks
-
SNI: # TLS SNI(Server Name Indication), Empty for any
Path: # HTTP PATH, Empty for any
Dest: 80 # Required, Destination of fallback, check https://xtls.github.io/config/fallback/ for details.
ProxyProtocolVer: 0 # Send PROXY protocol version, 0 for dsable
CertConfig:
CertMode: dns # Option about how to get certificate: none, file, http, dns. Choose "none" will forcedly disable the tls config.
CertDomain: "node1.test.com" # Domain to cert
CertFile: ./cert/node1.test.com.cert # Provided if the CertMode is file
KeyFile: ./cert/node1.test.com.key
Provider: alidns # DNS cert provider, Get the full support list here: https://go-acme.github.io/lego/dns/
Email: [email protected]
DNSEnv: # DNS ENV option used by DNS provider
ALICLOUD_ACCESS_KEY: aaa
ALICLOUD_SECRET_KEY: bbb
- docker-compose up -d 启动容器
一些常用的docker命令
docker ps 查看当前运行的容器
docker ps -a 查看所有容器
docker logs -f --tail 100 容器name 查看该容器最近的100条日志(可以用于检查对接日志)
docker stop 容器name 停止容器
docker start 容器name 启动容器
docker restart 容器name 重启容器