Skip to content

Trojan 对接

内容来源

XrayR 官方文档:https://aiastia.gitbook.io/xrayr/
参考视频地址:https://www.youtube.com/watch?v=9wG1UVownKA&t=1539s

前置信息

V2board 面板服务器

面板域名:www.chengzi.xyz
服务器 ip:111.111.111.111
V2board 版本(1.7.4)

XrayR 节点服务器

域名:noed.chengzi.xyz
服务器 ip:222.222.222.222
XrayR 版本(0.9.0)

开始对接

1. V2board 面板配置

登录 V2board 管理面板

系统配置 > 节点 > 通讯密钥:abcdefg123456789
节点管理 > 新增节点 > Trojan

参数信息:

节点名称自定义
节点标签自定义
权限组自定义
节点地址noed.chengzi.xyz
连接端口10003
服务端口10003
是否允许不安全
服务器名称指示(sni)noed.chengzi.xyz
父节点

2. XrayR 配置

  1. 登录 XrayR 节点服务器

配置 /etc/XrayR/config.yml 文件

PanelTypeV2board
ApiHosthttps://www.chengzi.xyz
ApiKeyabcdefg123456789
NodeID查看 V2board 管理面板
NodeTypeTrojan
CertDomainnoed.chengzi.xyz
其他选项保持默认

备注 ApiHost :
https://www.chengzi.xyz 正确
https://www.chengzi.xyz/ 错误

  1. 申请证书:

本教程使用 Cloudflare 作演示,其他方式需自行查阅 https://go-acme.github.io/lego/dns/

登录 Cloudflare
右上角 > 我的个人资料 > API 令牌 >查看并保存 Global API Key

配置 /etc/XrayR/config.yml 文件中的 CertConfig 部分

CertModedns
CertDomainhttps://noed.chengzi.xyz
CertFile默认
KeyFile默认
Providercloudflare
Email默认
DNSEnv > CLOUDFLARE_EMAIL你的 Cloudflare 邮箱
DNSEnv > CLOUDFLARE_API_KEY你的 Global API Key

如:

CertConfig:
    CertMode: dns # Option about how to get certificate: none, file, http, tls, dns. Choose "none" will forcedly disable the tls config.
    CertDomain: "https://noed.chengzi.xyz" # Domain to cert
    CertFile: /etc/XrayR/cert/node1.test.com.cert # Provided if the CertMode is file
    KeyFile: /etc/XrayR/cert/node1.test.com.key
    Provider: cloudflare # DNS cert provider, Get the full support list here: https://go-acme.github.io/lego/dns/
    Email: test@me.com
    DNSEnv: # DNS ENV option used by DNS provider
        CLOUDFLARE_EMAIL: 你的 Cloudflare 邮箱
        CLOUDFLARE_API_KEY: 你的 Global API Key

3. XrayR 节点服务器放行 10003 端口,并重启 XrayR

www.yehu.xyz