提供代搭建以及分流规则定制、代写流媒体解锁配置、落地页以及主题等服务,详情请联系TG

前言

由于最近机场纳新,为了更好的管理节点以及用户,我弃用了x-ui并改用V2board+Xrayr来管理自己的代理节点。这个面板让我搭建节点的速度大增同时也能让我对用户的流量使用情况以及节点的状态有一个更加直观的了解,以往为了查看节点服务器的状态我还得去额外搭建一个探针,现在只需要登陆管理后台即可。

V2board搭建

V2board的搭建是一件非常简单的事情,装好宝塔面板后跟着官方教程来就行了。不出意外的话我们很快就能安装好面板。

搭建成功后的管理后台界面

如果使用境内服务器安装面板可能会因为网络原因无法从GitHub上下载资源这时我们可以使用proxychain4来设置一下http代理。详细操作方法请看:

proxychains4简单教程

节点对接

搭建好前端后当然就要开始对接节点了,这里我们以Trojan协议为例子。

1.购买服务器

要对接节点你当然都有台节点服务器,可以从谷歌云、Vultr以及你喜欢的云服务提供商处购买。在购买后你将得到一个公网IP这时我们就要去解析域名了。

2.解析域名

首先先为节点服务器做好域名解析,由于我们需要使用Cloudflare来进行ssl证书的获取请先将域名托管到Cloudflare。具体操作方式请看这篇文章:

在Cloudflare中给域名一个A记录即可,注意不要打开Cloudflare的小云朵(proxy)。

3.安装Xrayr

SSH连接到你的节点服务器执行下面的命令安装Xrayr

wget -N https://raw.githubusercontent.com/XrayR-project/XrayR-release/master/install.sh && bash install.sh

命令执行完毕后我们就能在服务器的/etc/Xrayr目录下找到xrayr的配置文件。我们先回到V2board面板上点击增加节点然后根据节点的状况修改配置文件。

4.增加节点

在面板的节点管理中我们点击加号即可,选择协议后我们在右边弹出来的窗口中填写节点的信息。

填写信息

这里的重点是节点地址和端口,一般而言节点地址我们填写刚刚解析好的域名,端口我们使用443即可,sni请填写域名。权限组我们可以根据用户实际情况来自行填写。

提交后我们就能得到一个节点ID,记住这个节点ID我们在对接Xrayr的时候要用上。

5.对接Xrayr

我们回到节点服务器上,我们先执行命令将/etc/Xrayr目录中的config.yml文件删除然后自己重新创建一个。

rm /etc/Xrayr/config.yml
vi config.yml

然后我们将下面的配置文件内容根据实际情况改好复制进去保存即可。

Log:
  Level: warning # Log level: none, error, warning, info, debug 
  AccessPath: # /etc/XrayR/access.Log
  ErrorPath: # /etc/XrayR/error.log
DnsConfigPath: #/etc/XrayR/dns.json # Path to dns config, check https://xtls.github.io/config/dns.html for help
RouteConfigPath:  #/etc/XrayR/route.json # Path to route config, check https://xtls.github.io/config/routing.html for help
InboundConfigPath:  #/etc/XrayR/custom_inbound.json # Path to custom inbound config, check https://xtls.github.io/config/inbound.html for help
OutboundConfigPath:  #/etc/XrayR/custom_outbound.json # Path to custom outbound config, check https://xtls.github.io/config/outbound.html for help
ConnectionConfig:
  Handshake: 4 # Handshake time limit, Second
  ConnIdle: 30 # 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: "V2board" # Panel type: SSpanel, V2board, NewV2board, PMpanel, Proxypanel, V2RaySocks
    ApiConfig:
      ApiHost: "https://xxx.xxx.com"
      ApiKey: "passwd"
      NodeID: 1
      NodeType: Trojan # Node type: V2ray, Shadowsocks, Trojan, Shadowsocks-Plugin
      Timeout: 120 # 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: # /etc/XrayR/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
      AutoSpeedLimitConfig:
        Limit: 0 # Warned speed. Set to 0 to disable AutoSpeedLimit (mbps)
        WarnTimes: 0 # After (WarnTimes) consecutive warnings, the user will be limited. Set to 0 to punish overspeed user immediately.
        LimitSpeed: 0 # The speedlimit of a limited user (unit: mbps)
        LimitDuration: 0 # How many minutes will the limiting last (unit: minute)
      GlobalDeviceLimitConfig:
        Enable: false # Enable the global device limit of a user
        RedisAddr: 127.0.0.1:6379 # The redis server address
        RedisPassword: YOUR PASSWORD # Redis password
        RedisDB: 0 # Redis DB
        Timeout: 5 # Timeout for redis request
        Expiry: 60 # Expiry time (second)
      EnableFallback: false # Only support for Trojan and Vless
      FallBackConfigs:  # Support multiple fallbacks
        -
          SNI: # TLS SNI(Server Name Indication), Empty for any
          Alpn: # Alpn, Empty for any
          Path: # HTTP PATH, Empty for any
          Dest: 80 # Required, Destination of fallback, check https://xtls.github.io/config/features/fallback.html for details.
          ProxyProtocolVer: 0 # Send PROXY protocol version, 0 for dsable
      CertConfig:
        CertMode: dns # Option about how to get certificate: none, file, http, tls, dns. Choose "none" will forcedly disable the tls config.
        CertDomain: "xx.xxx.xx" # 填入你的域名
        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: i@qq.com
        DNSEnv: # DNS ENV option used by DNS provider
          CLOUDFLARE_EMAIL: 1@qq.com
          CLOUDFLARE_API_KEY: 1234dfsdfa87888

这里要改的地方如下请根据实际情况一一对应

PanelTypeApihostApikeyNodeID
面板类型v2board面板地址面板密钥节点编号
NodeTypeCertDomainCLOUDFLARE_EMAILCLOUDFLARE_API_KEY
节点类型节点域名CF用户名CF全局密钥

6.启动xrayr

填写完配置文件后我们在节点服务器是SSH中输入xrayr然后输入6回车即可。

不出意外的话我们的节点就能亮起来了。

搭建好的节点服务器

分流规则替换

这是一个进阶选项,我们在使用 Clash 内核的客户端时我们可以在 V2board 的服务端写好 customer.clash.yaml 文件来为客户端下发带有流量规则的订阅,这样我们便可以控制我们的网络流量,让该走代理的流量走代理,该直连的流量直连。让用户有更好的体验。毕竟我们并不需要让我们访问百度等境内网站的流量也经过代理。
在使用Clash等客户端时我们能够自定义代理规则集。在V2board的安装目录下找到/resources/rules目录然后替换custom.clash.yaml即可。

解锁流媒体

在使用x-ui时我们使用的是修改配置文件中的outbound和route的方式来实现解锁流媒体,具体操作方法看这篇文章:

使用x-ui面板中转流量解锁流媒体

在使用Xrayr的时候我们也可以通过这种方法来解锁流媒体。具体的方法为将XrarR目录中的config.yml文件中的RouteConfigPathOutboundConfigPath路径前的注释给删掉然后去修改XrayR目录下这两个文件。

RouteConfigPath配置写法

{
  "domainStrategy": "IPOnDemand",
  "rules": [
    {
      "type": "field",
      "outboundTag": "unlock", 
      "domain": ["geosite:netflix","nflxvideo.net","nflxext.com","nflxso.net"] 
}  
  ]
}

可根据需求将Disney+的解锁也加上

OutboundConfigPath配置文件写法

[
  {
  
    "tag": "unlock", 
    "protocol": "vmess",
    "settings": {
      "vnext": [{
        "address": "1.2.3.4", 
        "port": 80,
        "users": [{
          "id": "9154800a-210a-437f-a547-67e3fdfeafc47",
          "security": "auto",
          "alterId": 0
        }]
      }]
    }
  }
]

协议端口请自行替换,符合协议标准即可

然后重启xrayr即可。

主题以及落地页

主题

我们可以更换主题让V2board看起来更美观
下面是一些主题预览:
落地页
仪表盘

最后修改:2023 年 10 月 22 日
如果觉得我的文章对你有用,请随意赞赏