Giter Club home page Giter Club logo

xrayr-project / xrayr Goto Github PK

View Code? Open in Web Editor NEW
1.6K 1.6K 714.0 5.08 MB

A Xray backend framework that can easily support many panels. 一个基于Xray的后端框架,支持V2ay,Trojan,Shadowsocks协议,极易扩展,支持多面板对接

Home Page: https://xrayr-project.github.io/XrayR-doc/

License: Mozilla Public License 2.0

Dockerfile 0.18% Go 99.82%
shadowsocks socks5 sspanel-uim trojan v2board v2ray v2ray-core vless vmess xray-core xrayr xtls

xrayr's Introduction

XrayR

Github All Releases

English|Iranian|Vietnamese

A Xray backend framework that can easily support many panels.

一个基于Xray的后端框架,支持V2ay,Trojan,Shadowsocks协议,极易扩展,支持多面板对接。

如果您喜欢本项目,可以右上角点个star+watch,持续关注本项目的进展。

使用教程:详细使用教程

免责声明

本项目只是本人个人学习开发并维护,本人不保证任何可用性,也不对使用本软件造成的任何后果负责。

特点

  • 永久开源且免费。
  • 支持V2ray,Trojan, Shadowsocks多种协议。
  • 支持Vless和XTLS等新特性。
  • 支持单实例对接多面板、多节点,无需重复启动。
  • 支持限制在线IP
  • 支持节点端口级别、用户级别限速。
  • 配置简单明了。
  • 修改配置自动重启实例。
  • 方便编译和升级,可以快速更新核心版本, 支持Xray-core新特性。

功能介绍

功能 v2ray trojan shadowsocks
获取节点信息
获取用户信息
用户流量统计
服务器信息上报
自动申请tls证书
自动续签tls证书
在线人数统计
在线用户限制
审计规则
节点端口限速
按照用户限速
自定义DNS

支持前端

前端 v2ray trojan shadowsocks
sspanel-uim √ (单端口多用户和V2ray-Plugin)
v2board
PMPanel
ProxyPanel
WHMCS (V2RaySocks)
GoV2Panel
BunPanel

软件安装

一键安装

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

使用Docker部署软件

Docker部署教程

手动安装

手动安装教程

配置文件及详细使用教程

详细使用教程

Thanks

Licence

Mozilla Public License Version 2.0

Telgram

XrayR后端讨论

XrayR通知

Stargazers over time

Stargazers over time

xrayr's People

Contributors

amin550 avatar autisticshark avatar betaxab avatar danielblackbeard avatar dependabot[bot] avatar github-aiko avatar ihategfw avatar isluckys avatar jat001 avatar joshuacylinder avatar mengxin239 avatar misakano7545 avatar nagaame avatar oppo9008 avatar pennymorant avatar pingpromax avatar pocketw avatar qiuzi avatar septrum101 avatar thh1451 avatar wyx2685 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xrayr's Issues

面板获取不到用户已使用流量

面板:SSPanel UIM new-feat 分支
系统:Debian11

测试消耗流量后,管理面板看不到用户消耗的流量,一直是0
注意到两条报错,一条是Debian或许有兼容性问题,一条是反馈了405错误,我需要安装什么软件包或者修改配置来适配呢?
image

Sep 21 17:50:35 hkg1 XrayR[546033]: 2022/09/21 17:50:35 Ret {"ret":0,"data":"The interface for the node to report the traffic usage should use the post request. If you see this message, check the server. This problem may occur in the debian system, you can try to replace the ubuntu system and try again."} invalid Sep 21 17:50:35 hkg1 XrayR[546033]: 2022/09/21 17:50:35 [V2ray: 1] 0 user deleted, 0 user added Sep 21 17:50:35 hkg1 XrayR[546033]: 2022/09/21 17:50:35 request http://xxx/mod_mu/users/aliveip failed: <!doctype html> Sep 21 17:50:35 hkg1 XrayR[546033]: <html lang="zh"> Sep 21 17:50:35 hkg1 XrayR[546033]: <head> Sep 21 17:50:35 hkg1 XrayR[546033]: <meta charset="utf-8" /> Sep 21 17:50:35 hkg1 XrayR[546033]: <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" /> Sep 21 17:50:35 hkg1 XrayR[546033]: <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" /> Sep 21 17:50:35 hkg1 XrayR[546033]: <meta http-equiv="X-UA-Compatible" content="ie=edge" /> Sep 21 17:50:35 hkg1 XrayR[546033]: <title>All-In-Dev Airport</title> Sep 21 17:50:35 hkg1 XrayR[546033]: <link href="/theme/tabler/css/tabler.min.css" rel="stylesheet" /> Sep 21 17:50:35 hkg1 XrayR[546033]: <link href="/theme/tabler/css/tabler-flags.min.css" rel="stylesheet" /> Sep 21 17:50:35 hkg1 XrayR[546033]: <link href="/theme/tabler/css/tabler-payments.min.css" rel="stylesheet" /> Sep 21 17:50:35 hkg1 XrayR[546033]: <link href="/theme/tabler/css/tabler-vendors.min.css" rel="stylesheet" /> Sep 21 17:50:35 hkg1 XrayR[546033]: <link href="/theme/tabler/css/demo.min.css" rel="stylesheet" /> Sep 21 17:50:35 hkg1 XrayR[546033]: <script src="/theme/tabler/js/jquery-3.6.0.min.js"></script> Sep 21 17:50:35 hkg1 XrayR[546033]: <script src="/theme/tabler/js/tabler.min.js"></script> Sep 21 17:50:35 hkg1 XrayR[546033]: </head><body class="border-top-wide border-primary d-flex flex-column"> Sep 21 17:50:35 hkg1 XrayR[546033]: <div class="page page-center"> Sep 21 17:50:35 hkg1 XrayR[546033]: <div class="container-tight py-4"> Sep 21 17:50:35 hkg1 XrayR[546033]: <div class="empty"> Sep 21 17:50:35 hkg1 XrayR[546033]: <div class="empty-header">405</div> Sep 21 17:50:35 hkg1 XrayR[546033]: <p class="empty-subtitle text-muted"> Sep 21 17:50:35 hkg1 XrayR[546033]: 状态码 405 Method Not Allowed 表明服务器禁止了使用当前 HTTP 方法的请求 Sep 21 17:50:35 hkg1 XrayR[546033]: </p> Sep 21 17:50:35 hkg1 XrayR[546033]: <div class="empty-action"> Sep 21 17:50:35 hkg1 XrayR[546033]: <a href="/user" class="btn btn-primary"> Sep 21 17:50:35 hkg1 XrayR[546033]: <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> Sep 21 17:50:35 hkg1 XrayR[546033]: <path stroke="none" d="M0 0h24v24H0z" fill="none" /> Sep 21 17:50:35 hkg1 XrayR[546033]: <line x1="5" y1="12" x2="19" y2="12" /> Sep 21 17:50:35 hkg1 XrayR[546033]: <line x1="5" y1="12" x2="11" y2="18" /> Sep 21 17:50:35 hkg1 XrayR[546033]: <line x1="5" y1="12" x2="11" y2="6" /> Sep 21 17:50:35 hkg1 XrayR[546033]: </svg> Sep 21 17:50:35 hkg1 XrayR[546033]: 返回用户首页 Sep 21 17:50:35 hkg1 XrayR[546033]: </a> Sep 21 17:50:35 hkg1 XrayR[546033]: </div> Sep 21 17:50:35 hkg1 XrayR[546033]: </div> Sep 21 17:50:35 hkg1 XrayR[546033]: </div> Sep 21 17:50:35 hkg1 XrayR[546033]: </div> Sep 21 17:50:35 hkg1 XrayR[546033]: </body> Sep 21 17:50:35 hkg1 XrayR[546033]: <script> Sep 21 17:50:35 hkg1 XrayR[546033]: // Initialize the agent at application startup. Sep 21 17:50:35 hkg1 XrayR[546033]: // You can also use https://openfpcdn.io/fingerprintjs/v3/esm.min.js Sep 21 17:50:35 hkg1 XrayR[546033]: const fpPromise = import('/theme/tabler/js/esm.min.js') Sep 21 17:50:35 hkg1 XrayR[546033]: .then(FingerprintJS => FingerprintJS.load()) Sep 21 17:50:35 hkg1 XrayR[546033]: // Get the visitor identifier when you need it. Sep 21 17:50:35 hkg1 XrayR[546033]: fpPromise Sep 21 17:50:35 hkg1 XrayR[546033]: .then(fp => fp.get()) Sep 21 17:50:35 hkg1 XrayR[546033]: .then(result => { Sep 21 17:50:35 hkg1 XrayR[546033]: // This is the visitor identifier: Sep 21 17:50:35 hkg1 XrayR[546033]: visitorId = result.visitorId Sep 21 17:50:35 hkg1 XrayR[546033]: }) Sep 21 17:50:35 hkg1 XrayR[546033]: </script> Sep 21 17:50:35 hkg1 XrayR[546033]: </html>, %!s(<nil>)

无法读取证书文件

日志:
xrayr_1 | XrayR 0.8.0 (A Xray backend that supports many panels)
xrayr_1 | 2022/07/30 12:26:22 Start the panel..
xrayr_1 | 2022/07/30 12:26:22 Xray Core Version: 1.5.4
xrayr_1 | 2022/07/30 12:26:22 [Warning] core: Xray 1.5.4 started
xrayr_1 | 2022/07/30 12:26:25 infra/conf: Failed to build TLS config. > infra/conf: failed to parse certificate > open /XrayR-release/aaaaaaa.cert: no such file or directory
xrayr_1 | panic: infra/conf: Failed to build TLS config. > infra/conf: failed to parse certificate > open /XrayR-release/aaaaaaa.cert: no such file or directory
xrayr_1 |

证书文件是用Acme 脚本安装的,已经手动给到777权限也还是这样 。因为在用.cf免费域名,没法用XrayR自带的证书申请

fallback到某个域名怎么设置?

  EnableFallback: true # 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: demo.cloudreve.org:443 # Required, Destination of fallback, check https://xtls.github.io/config/features/fallback.html for details.
      ProxyProtocolVer: 0 # Send PROXY protocol version, 0 for dsable

比如我这样设置后网页访问显示
ERR_HTTP2_PROTOCOL_ERROR
请问怎么设置?

对接sspanel流量反馈只有实际使用的一半

用的是vless+ws+tls+nginx, 日志没有报错, 但是发现面板中流量记录只有vps面板展示的流量的一半, 所有节点都是如此
可以通过修改配置的方式实现流量正常汇报吗

panic: runtime error: index out of range [0] with length 0

XrayR[10181]: 2022/08/07 06:38:54 [INFO] [xxx.xxx.xxx] Server responded with a certificate.
XrayR[10181]: panic: runtime error: index out of range [0] with length 0
XrayR[10181]: goroutine 1 [running]:
XrayR[10181]: github.com/XrayR-project/XrayR/service/controller.(*Controller).addNewUser(0xc000294820, 0xc00000d710, 0xc0005d5d78?)
XrayR[10181]: github.com/XrayR-project/XrayR/service/controller/controller.go:352 +0x2cf
XrayR[10181]: github.com/XrayR-project/XrayR/service/controller.(*Controller).Start(0xc000294820)
XrayR[10181]: github.com/XrayR-project/XrayR/service/controller/controller.go:77 +0x2a9
XrayR[10181]: github.com/XrayR-project/XrayR/panel.(*Panel).Start(0xc000125ec0)
XrayR[10181]: github.com/XrayR-project/XrayR/panel/panel.go:192 +0x4fa
XrayR[10181]: main.main()
XrayR[10181]: github.com/XrayR-project/XrayR/main/main.go:92 +0x1ed
systemd[1]: XrayR.service: main process exited, code=exited, status=2/INVALIDARGUMENT
systemd[1]: Unit XrayR.service entered failed state.
systemd[1]: XrayR.service failed.

config:
PanelType: "V2board"
除了必要项其他全默认 不管怎么样都是这个错误

xtls-splice

大神好!
请问目前新版支持linux xtls-splice吗

use 443 trojan and website as same time

hi
i wnat use 443 port for v2board and trojan but i can not find way to solve it can you explain me how to revers proxy in nginx to handle trojan with 443 and v2board with 443

回落到trojan提示“tls: first record does not look like a TLS handshake”

错误提示:

`
2022/11/05 17:35:25 *************:38824 rejected proxy/trojan: not trojan protocol

2022/11/05 17:35:25 http: TLS handshake error from 127.0.0.1:57726: tls: first record does not look like a TLS handshake

2022/11/05 17:35:25 [Info] [3589224691] proxy/trojan: firstLen = 189

2022/11/05 17:35:25 [Info] [3589224691] proxy/trojan: fallback starts > proxy/trojan: not trojan protocol

2022/11/05 17:35:25 [Info] [3589224691] proxy/trojan: realName = *************

2022/11/05 17:35:25 [Info] [3589224691] proxy/trojan: realAlpn = http/1.1

2022/11/05 17:35:25 [Info] [3589224691] proxy/trojan: realPath = /****

2022/11/05 17:35:25 *************:38852 rejected proxy/trojan: not trojan protocol

2022/11/05 17:35:25 http: TLS handshake error from 127.0.0.1:57742: tls: first record does not look like a TLS handshake

2022/11/05 17:35:25 [Info] [2532349702] proxy/trojan: firstLen = 189

2022/11/05 17:35:25 [Info] [2532349702] proxy/trojan: fallback starts > proxy/trojan: not trojan protocol

2022/11/05 17:35:25 [Info] [2532349702] proxy/trojan: realName = *************

2022/11/05 17:35:25 [Info] [2532349702] proxy/trojan: realAlpn = http/1.1

2022/11/05 17:35:25 [Info] [2532349702] proxy/trojan: realPath = /****

2022/11/05 17:35:25 [Info] [400680815] proxy/trojan: firstLen = 189

2022/11/05 17:35:25 [Info] [400680815] proxy/trojan: fallback starts > proxy/trojan: not trojan protocol
`

尝试过vmess+trojan,vless+trojan,trojan+vless等各种组合,均无法正常回落到8443端口,
回落到80 http可以正常访问。

xrayr配置:

PanelType: "SSpanel" # Panel type: SSpanel, V2board, PMpanel, Proxypanel, V2RaySocks
ApiConfig:
ApiHost: ""
ApiKey: "
"
NodeID: 80
NodeType: Trojan # Node type: V2ray, Shadowsocks, Trojan, Shadowsocks-Plugin
Timeout: 30 # Timeout for the api request
EnableVless: false # Enable Vless for V2ray Type
EnableXTLS: true # 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
EnableFallback: true # Only support for Trojan and Vless
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)
FallBackConfigs: # Support multiple fallbacks
-
Dest: "enp2.owall.icu:80" # Required, Destination of fallback, check https://xtls.github.io/config/fallback/ for details.
ProxyProtocolVer: 0 # Send PROXY protocol version, 0 for dsable
-
SNI: # TLS SNI(Server Name Indication), Empty for any
Alpn: # Alpn, Empty for any
Path: "/wsl" # HTTP PATH, Empty for any
Dest: 8443 # Required, Destination of fallback, check https://xtls.github.io/config/fallback/ for details.
ProxyProtocolVer: 1 # Send PROXY protocol version, 0 for dsable
CertConfig:
. . .

- #Trojan
  PanelType: "SSpanel" # Panel type: SSpanel, V2board, PMpanel, Proxypanel, V2RaySocks
  ApiConfig:
    ApiHost: "****"
    ApiKey: "****"
    NodeID: 81
    NodeType: Trojan # Node type: V2ray, Shadowsocks, Trojan, Shadowsocks-Plugin
    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: # /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
    EnableFallback: true # Only support for Trojan and Vless
    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)
    FallBackConfigs:  # Support multiple fallbacks
      -
        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:
    . . .

sspanel 配置:
443端口
{ "offset_port_node": "443", "server_sub": "****", "host": "****", "enable_xtls": "1", "decryption": "none" }
8443端口
{ "offset_port_node": "8443", "server_sub": "****", "host": "****", "network": "ws", "path": "/****", "tcpSettings": { "acceptProxyProtocol": "true" } }

sspanel uim对接出现问题

{
"offset_port_user": null
}

null写的nginx监听的用户端口

sspanel trojan节点自定义配置填入后xrayr无法启动。xrayr最新release版,sspanel uim也是。

invalid memory address or nil pointer dereference

我尝试过编译方法和脚本方法安装均会报错

Aug 22 15:19:51 s3960 systemd[1]: XrayR.service: Scheduled restart job, restart counter is at 39.
Aug 22 15:19:51 s3960 systemd[1]: Stopped XrayR Service.
Aug 22 15:19:51 s3960 systemd[1]: Started XrayR Service.
Aug 22 15:19:51 s3960 XrayR[317893]: XrayR 0.8.2 (A Xray backend that supports many panels)
Aug 22 15:19:51 s3960 XrayR[317893]: 2022/08/22 15:19:51 Start the panel..
Aug 22 15:19:51 s3960 XrayR[317893]: 2022/08/22 15:19:51 Xray Core Version: 1.5.9
Aug 22 15:19:51 s3960 XrayR[317893]: panic: runtime error: invalid memory address or nil pointer dereference
Aug 22 15:19:51 s3960 XrayR[317893]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x19ac5a8]
Aug 22 15:19:51 s3960 XrayR[317893]: goroutine 1 [running]:
Aug 22 15:19:51 s3960 XrayR[317893]: github.com/XrayR-project/XrayR/panel.(*Panel).Start(0xc0001c22c0)
Aug 22 15:19:51 s3960 XrayR[317893]: github.com/XrayR-project/XrayR/panel/panel.go:167 +0x1c8
Aug 22 15:19:51 s3960 XrayR[317893]: main.main()
Aug 22 15:19:51 s3960 XrayR[317893]: github.com/XrayR-project/XrayR/main/main.go:92 +0x1f0
Aug 22 15:19:51 s3960 systemd[1]: XrayR.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Aug 22 15:19:51 s3960 systemd[1]: XrayR.service: Failed with result 'exit-code'.

我无法排除错误,我不确定这是否是我错误的配置文件导致的。如果需要,我将会提供
ubuntu 22TLS
nginx 1.21
脚本安装的 XrayR 应该是跟随脚本的版本
前端 V2board

无法获取证书是什么情况,谢谢

用的一件脚本 麻烦看下 谢谢

请输入选择 [0-13]: 8
-- Logs begin at 日 2022-08-07 18:49:20 CST. --
8月 07 18:54:32 c11-v2 systemd[1]: Started XrayR Service.
8月 07 18:54:32 c11-v2 XrayR[5424]: XrayR 0.8.1 (A Xray backend that supports many panels)
8月 07 18:54:32 c11-v2 XrayR[5424]: 2022/08/07 18:54:32 Start the panel..
8月 07 18:54:32 c11-v2 XrayR[5424]: 2022/08/07 18:54:32 Xray Core Version: 1.5.9
8月 07 18:54:32 c11-v2 XrayR[5424]: 2022/08/07 18:54:32 No key found for account [email protected]. Generating a P256 key.
8月 07 18:54:32 c11-v2 XrayR[5424]: 2022/08/07 18:54:32 Saved key to /etc/XrayR/cert/accounts/acme-v02.api.letsencrypt.org/[email protected]/keys/[email protected]
8月 07 18:54:33 c11-v2 XrayR[5424]: 2022/08/07 18:54:33 [INFO] acme: Registering account for [email protected]
8月 07 18:54:33 c11-v2 XrayR[5424]: !!!! HEADS UP !!!!
8月 07 18:54:33 c11-v2 XrayR[5424]: Your account credentials have been saved in your Let's Encrypt
8月 07 18:54:33 c11-v2 XrayR[5424]: configuration directory at "/etc/XrayR/cert/accounts".
8月 07 18:54:33 c11-v2 XrayR[5424]: You should make a secure backup of this folder now. This
8月 07 18:54:33 c11-v2 XrayR[5424]: configuration directory will also contain certificates and
8月 07 18:54:33 c11-v2 XrayR[5424]: private keys obtained from Let's Encrypt so making regular
8月 07 18:54:33 c11-v2 XrayR[5424]: backups of this folder is ideal.
8月 07 18:54:33 c11-v2 XrayR[5424]: 2022/08/07 18:54:33 [INFO] [c1.5xxxxx.xyz] acme: Obtaining bundled SAN certificate
8月 07 18:54:33 c11-v2 XrayR[5424]: 2022/08/07 18:54:33 [INFO] [c1.5xxxxx.xyz] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/139327755396
8月 07 18:54:33 c11-v2 XrayR[5424]: 2022/08/07 18:54:33 [INFO] [c1.5xxxxx.xyz] acme: Could not find solver for: tls-alpn-01
8月 07 18:54:33 c11-v2 XrayR[5424]: 2022/08/07 18:54:33 [INFO] [c1.5xxxxx.xyz] acme: Could not find solver for: http-01
8月 07 18:54:33 c11-v2 XrayR[5424]: 2022/08/07 18:54:33 [INFO] [c1.5xxxxx.xyz] acme: use dns-01 solver
8月 07 18:54:33 c11-v2 XrayR[5424]: 2022/08/07 18:54:33 [INFO] [c1.5xxxxx.xyz] acme: Preparing to solve DNS-01
8月 07 18:54:33 c11-v2 XrayR[5424]: 2022/08/07 18:54:33 [INFO] cloudflare: new record for c1.5xxxxx.xyz, ID b40d92837d7a6db325c32d712dbe795d
8月 07 18:54:33 c11-v2 XrayR[5424]: 2022/08/07 18:54:33 [INFO] [c1.5xxxxx.xyz] acme: Trying to solve DNS-01
8月 07 18:54:33 c11-v2 XrayR[5424]: 2022/08/07 18:54:33 [INFO] [c1.5xxxxx.xyz] acme: Checking DNS record propagation using [8.8.8.8:53 8.8.4.4:53]
8月 07 18:54:35 c11-v2 XrayR[5424]: 2022/08/07 18:54:35 [INFO] Wait for propagation [timeout: 2m0s, interval: 2s]
8月 07 18:54:45 c11-v2 XrayR[5424]: 2022/08/07 18:54:45 [INFO] [c1.5xxxxx.xyz] acme: Waiting for DNS record propagation.
8月 07 18:54:57 c11-v2 XrayR[5424]: 2022/08/07 18:54:57 [INFO] [c1.5xxxxx.xyz] acme: Waiting for DNS record propagation.
8月 07 18:55:09 c11-v2 XrayR[5424]: 2022/08/07 18:55:09 [INFO] [c1.5xxxxx.xyz] acme: Waiting for DNS record propagation.
8月 07 18:55:21 c11-v2 XrayR[5424]: 2022/08/07 18:55:21 [INFO] [c1.5xxxxx.xyz] acme: Waiting for DNS record propagation.
8月 07 18:55:33 c11-v2 XrayR[5424]: 2022/08/07 18:55:33 [INFO] [c1.5xxxxx.xyz] acme: Waiting for DNS record propagation.
8月 07 18:55:45 c11-v2 XrayR[5424]: 2022/08/07 18:55:45 [INFO] [c1.5xxxxx.xyz] acme: Waiting for DNS record propagation.
8月 07 18:55:57 c11-v2 XrayR[5424]: 2022/08/07 18:55:57 [INFO] [c1.5xxxxx.xyz] acme: Waiting for DNS record propagation.
8月 07 18:56:09 c11-v2 XrayR[5424]: 2022/08/07 18:56:09 [INFO] [c1.5xxxxx.xyz] acme: Waiting for DNS record propagation.
8月 07 18:56:21 c11-v2 XrayR[5424]: 2022/08/07 18:56:21 [INFO] [c1.5xxxxx.xyz] acme: Waiting for DNS record propagation.
8月 07 18:56:33 c11-v2 XrayR[5424]: 2022/08/07 18:56:33 [INFO] [c1.5xxxxx.xyz] acme: Waiting for DNS record propagation.
8月 07 18:56:35 c11-v2 XrayR[5424]: 2022/08/07 18:56:35 [INFO] [c1.5xxxxx.xyz] acme: Cleaning DNS-01 challenge
8月 07 18:56:36 c11-v2 XrayR[5424]: 2022/08/07 18:56:36 [INFO] retry due to: acme: error: 400 :: POST :: https://acme-v02.api.letsencrypt.org/acme/authz-v3/139327755396 :: urn:ietf:params:acme:error:badNonce :: JWS has an invalid anti-replay nonce: "0002VJ5Exa3hGCg9ClonshIax5CbxNa0Y5HSup9REiui80w"
8月 07 18:56:36 c11-v2 XrayR[5424]: 2022/08/07 18:56:36 [INFO] Deactivating auth: https://acme-v02.api.letsencrypt.org/acme/authz-v3/139327755396
8月 07 18:56:36 c11-v2 XrayR[5424]: 2022/08/07 18:56:36 Could not obtain certificates:
8月 07 18:56:36 c11-v2 XrayR[5424]: error: one or more domains had a problem:
8月 07 18:56:36 c11-v2 XrayR[5424]: [c1.5xxxxx.xyz] time limit exceeded: last error: read udp [2607:f130:0:151:216:3eff:fe2d:8f76]:57894->[2606:4700:50::adf5:3a56]:53: i/o timeout
8月 07 18:56:36 c11-v2 XrayR[5424]: 2022/08/07 18:56:36 Could not obtain certificates:
8月 07 18:56:36 c11-v2 XrayR[5424]: error: one or more domains had a problem:
8月 07 18:56:36 c11-v2 XrayR[5424]: [c1.5xxxxx.xyz] time limit exceeded: last error: read udp [2607:f130:0:151:216:3eff:fe2d:8f76]:57894->[2606:4700:50::adf5:3a56]:53: i/o timeout
8月 07 18:56:36 c11-v2 XrayR[5424]: panic: Could not obtain certificates:
8月 07 18:56:36 c11-v2 XrayR[5424]: error: one or more domains had a problem:
8月 07 18:56:36 c11-v2 XrayR[5424]: [c1.5xxxxx.xyz] time limit exceeded: last error: read udp [2607:f130:0:151:216:3eff:fe2d:8f76]:57894->[2606:4700:50::adf5:3a56]:53: i/o timeout
8月 07 18:56:36 c11-v2 XrayR[5424]: goroutine 1 [running]:
8月 07 18:56:36 c11-v2 XrayR[5424]: log.Panic({0xc00054fd48?, 0xc000220a90?, 0xc00086fd78?})
8月 07 18:56:36 c11-v2 XrayR[5424]: log/log.go:385 +0x65
8月 07 18:56:36 c11-v2 XrayR[5424]: github.com/XrayR-project/XrayR/service/controller.(*Controller).Start(0xc000220820)
8月 07 18:56:36 c11-v2 XrayR[5424]: github.com/XrayR-project/XrayR/service/controller/controller.go:68 +0x256
8月 07 18:56:36 c11-v2 XrayR[5424]: github.com/XrayR-project/XrayR/panel.(*Panel).Start(0xc000039e00)
8月 07 18:56:36 c11-v2 XrayR[5424]: github.com/XrayR-project/XrayR/panel/panel.go:192 +0x4fa
8月 07 18:56:36 c11-v2 XrayR[5424]: main.main()
8月 07 18:56:36 c11-v2 XrayR[5424]: github.com/XrayR-project/XrayR/main/main.go:92 +0x1ed
8月 07 18:56:36 c11-v2 systemd[1]: XrayR.service: main process exited, code=exited, status=2/INVALIDARGUMENT
8月 07 18:56:36 c11-v2 systemd[1]: Unit XrayR.service entered failed state.
8月 07 18:56:36 c11-v2 systemd[1]: XrayR.service failed.
8月 07 18:56:46 c11-v2 systemd[1]: XrayR.service holdoff time over, scheduling restart.
8月 07 18:56:46 c11-v2 systemd[1]: Stopped XrayR Service.
8月 07 18:56:46 c11-v2 systemd[1]: Started XrayR Service.
8月 07 18:56:46 c11-v2 XrayR[6980]: XrayR 0.8.1 (A Xray backend that supports many panels)
8月 07 18:56:46 c11-v2 XrayR[6980]: 2022/08/07 18:56:46 Start the panel..

最新版本的后端启动时会panic

日志如下
systemd[1]: Started XrayR Service.
XrayR[15776]: XrayR 0.8.1 (A Xray backend that supports many panels)
XrayR[15776]: 2022/08/01 02:45:29 Start the panel..
XrayR[15776]: 2022/08/01 02:45:29 Xray Core Version: 1.5.9
XrayR[15776]: panic: runtime error: invalid memory address or nil pointer dereference
XrayR[15776]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x19e7868]
XrayR[15776]: goroutine 1 [running]:
XrayR[15776]: github.com/XrayR-project/XrayR/panel.(*Panel).Start(0xc0000e7e00)
XrayR[15776]: github.com/XrayR-project/XrayR/panel/panel.go:165 +0x1c8
XrayR[15776]: main.main()
XrayR[15776]: github.com/XrayR-project/XrayR/main/main.go:92 +0x1ed
systemd[1]: XrayR.service: main process exited, code=exited, status=2/INVALIDARGUMENT
systemd[1]: Unit XrayR.service entered failed state.
systemd[1]: XrayR.service failed.
systemd[1]: XrayR.service holdoff time over, scheduling restart.
systemd[1]: Stopped XrayR Service.
网上搜了下貌似是源代码问题,也不知道是不是我的配置文件没写好

Help needed to tunnelling v2ray

Hi, Thanks for your excellent Xray backend framework
So in IRAN, Internet is f******d and only way to connect is buying Iranian VPS and connect them to outside, and it's connecting only with VLESS/VMESS + WebSocket Transport Protocol

here terminology:

  • Upstream Server: A server that has free access to the Internet.
  • Bridge Server: A server that is available to clients and has access to the upstream server.
  • Client: A user side application with access to the bridge server.

I have v2board panel and I am failing all time and I can't make right config to work.
Is there any example for such a case ?
here is my config but not working:

Bridge Server conf:

"outbounds": [
    {
      "tag": "proxy",
      "protocol": "vmess",
      "settings": {
        "vnext": [
          {
            "address": "<UPSTREAM-IP>",
            "port": 1310,
            "users": [
              {
                "id": "<UPSTREAM-UUID>",
                "alterId": 0,
                "security": "none"
              }
            ]
          }
        ]
      },
      "streamSettings": {
        "network": "ws"
      },

GCP 提示挖矿被封

GCP 提示挖矿被封
之前用GCP的镜像被封,改用萌卡的dd脚本重装Debian10一样
配置了ssh密钥并修改了ssh端口
新开实例ps-aux就有crypto进程,所以不清楚什么情况
root 30 0.0 0.0 0 0 ? I< 07:37 0:00 [crypto]
这怎么申诉?

报错:Parse config file %!s(*string=0xc00049a8f0) failed: 1 error(s) decoding:

Sep 28 08:28:40 VM35703 systemd[1]: Started XrayR Service.
Sep 28 08:28:40 VM35703 XrayR[16833]: XrayR 0.8.4 (A Xray backend that supports many panels)
Sep 28 08:28:40 VM35703 XrayR[16833]: 2022/09/28 08:28:40 Parse config file %!s(*string=0xc00049a8f0) failed: 1 error(s) decoding:
Sep 28 08:28:40 VM35703 XrayR[16833]: * 'Nodes[0].ControllerConfig.CertConfig.DNSEnv' expected a map, got 'string'
Sep 28 08:28:40 VM35703 XrayR[16833]: panic: Parse config file %!s(*string=0xc00049a8f0) failed: 1 error(s) decoding:
Sep 28 08:28:40 VM35703 XrayR[16833]: * 'Nodes[0].ControllerConfig.CertConfig.DNSEnv' expected a map, got 'string'
Sep 28 08:28:40 VM35703 XrayR[16833]: goroutine 1 [running]:
Sep 28 08:28:40 VM35703 XrayR[16833]: log.Panicf({0x21843b5?, 0x1b48c20?}, {0xc00053ff18?, 0x0?, 0x0?})
Sep 28 08:28:40 VM35703 XrayR[16833]: log/log.go:395 +0x67
Sep 28 08:28:40 VM35703 XrayR[16833]: main.main()
Sep 28 08:28:40 VM35703 XrayR[16833]: github.com/XrayR-project/XrayR/main/main.go:77 +0x130
Sep 28 08:28:40 VM35703 systemd[1]: XrayR.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Sep 28 08:28:40 VM35703 systemd[1]: XrayR.service: Failed with result 'exit-code'.

试了centos7+debian10 都更新了系统
还是出现这个问题

panic: runtime error: index out of range [1] with length 1

9月 08 10:14:35 t8.vm XrayR[2584]: XrayR 0.8.2 (A Xray backend that supports many panels)
9月 08 10:14:35 t8.vm XrayR[2584]: 2022/09/08 10:14:35 Start the panel..
9月 08 10:14:35 t8.vm XrayR[2584]: 2022/09/08 10:14:35 Xray Core Version: 1.5.9
9月 08 10:14:35 t8.vm XrayR[2584]: 2022/09/08 10:14:35 [Warning] core: Xray 1.5.9 started
9月 08 10:14:36 t8.vm XrayR[2584]: panic: runtime error: index out of range [1] with length 1
9月 08 10:14:36 t8.vm XrayR[2584]: goroutine 1 [running]:
9月 08 10:14:36 t8.vm XrayR[2584]: github.com/XrayR-project/XrayR/api/sspanel.(*APIClient).ParseV2rayNodeResponse(0xc00058ed80, 0xc00048e100)
9月 08 10:14:36 t8.vm XrayR[2584]: github.com/XrayR-project/XrayR/api/sspanel/sspanel.go:386 +0xa12
9月 08 10:14:36 t8.vm XrayR[2584]: github.com/XrayR-project/XrayR/api/sspanel.(*APIClient).GetNodeInfo(0xc00058ed80)
9月 08 10:14:36 t8.vm XrayR[2584]: github.com/XrayR-project/XrayR/api/sspanel/sspanel.go:191 +0x525
9月 08 10:14:36 t8.vm XrayR[2584]: github.com/XrayR-project/XrayR/service/controller.(*Controller).Start(0xc0006d3ee0)
9月 08 10:14:36 t8.vm XrayR[2584]: github.com/XrayR-project/XrayR/service/controller/controller.go:58 +0xf5
9月 08 10:14:36 t8.vm XrayR[2584]: github.com/XrayR-project/XrayR/panel.(*Panel).Start(0xc0006de280)
9月 08 10:14:36 t8.vm XrayR[2584]: github.com/XrayR-project/XrayR/panel/panel.go:196 +0x537
9月 08 10:14:36 t8.vm XrayR[2584]: main.main()
9月 08 10:14:36 t8.vm XrayR[2584]: github.com/XrayR-project/XrayR/main/main.go:92 +0x1f0
9月 08 10:14:36 t8.vm systemd[1]: XrayR.service: main process exited, code=exited, status=2/INVALIDARGUMENT
9月 08 10:14:36 t8.vm systemd[1]: Unit XrayR.service entered failed state.
9月 08 10:14:36 t8.vm systemd[1]: XrayR.service failed.

面板是SSpanel
开启了vless和xtls

panic: runtime error: index out of range [0] with length 0

安装后无法启动

日志内容:

Jul 28 12:11:21 localhost systemd[1]: Stopped XrayR Service.
Jul 28 12:11:21 localhost systemd[1]: Started XrayR Service.
Jul 28 12:11:21 localhost XrayR[117953]: XrayR 0.8.0 (A Xray backend that supports many panels)
Jul 28 12:11:21 localhost XrayR[117953]: 2022/07/28 12:11:21 Start the panel..
Jul 28 12:11:21 localhost XrayR[117953]: 2022/07/28 12:11:21 Xray Core Version: 1.5.4
Jul 28 12:11:21 localhost XrayR[117953]: 2022/07/28 12:11:21 [Debug] app/log: Logger started
Jul 28 12:11:21 localhost XrayR[117953]: 2022/07/28 12:11:21 [Info] app/dns: DNS: created localhost client
Jul 28 12:11:21 localhost XrayR[117953]: 2022/07/28 12:11:21 [Warning] core: Xray 1.5.4 started
Jul 28 12:11:21 localhost XrayR[117953]: 2022/07/28 12:11:21 [Debug] app/proxyman/inbound: creating stream worker on 0.0.0.0:1000
Jul 28 12:11:21 localhost XrayR[117953]: 2022/07/28 12:11:21 [Info] transport/internet/tcp: listening TCP on 0.0.0.0:1000
Jul 28 12:11:22 localhost XrayR[117953]: panic: runtime error: index out of range [0] with length 0
Jul 28 12:11:22 localhost XrayR[117953]: goroutine 1 [running]:
Jul 28 12:11:22 localhost XrayR[117953]: github.com/XrayR-project/XrayR/service/controller.(*Controller).addNewUser(0xc00013ac80, 0xc00001bec0, 0xc00053fd68?)
Jul 28 12:11:22 localhost XrayR[117953]: github.com/XrayR-project/XrayR/service/controller/controller.go:339 +0x2cf
Jul 28 12:11:22 localhost XrayR[117953]: github.com/XrayR-project/XrayR/service/controller.(*Controller).Start(0xc00013ac80)
Jul 28 12:11:22 localhost XrayR[117953]: github.com/XrayR-project/XrayR/service/controller/controller.go:64 +0x2a9
Jul 28 12:11:22 localhost XrayR[117953]: github.com/XrayR-project/XrayR/panel.(*Panel).Start(0xc00009e480)
Jul 28 12:11:22 localhost XrayR[117953]: github.com/XrayR-project/XrayR/panel/panel.go:192 +0x59a
Jul 28 12:11:22 localhost XrayR[117953]: main.main()
Jul 28 12:11:22 localhost XrayR[117953]: github.com/XrayR-project/XrayR/main/main.go:92 +0x1ed
Jul 28 12:11:22 localhost systemd[1]: XrayR.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jul 28 12:11:22 localhost systemd[1]: XrayR.service: Failed with result 'exit-code'.
Jul 28 12:11:31 localhost systemd[1]: Stopped XrayR Service.

错误:Panel Start fialed: Ret {"ret":0,"data":"IP is invalid. Now, your IP address is xx.xx.xx.xxx"} invalid

提示我的ip地址无效,日志如下:

Oct 28 23:05:25 Spartan systemd[1]: XrayR.service: Scheduled restart job, restart counter is at 8.
Oct 28 23:05:25 Spartan systemd[1]: Stopped XrayR Service.
Oct 28 23:05:25 Spartan systemd[1]: Started XrayR Service.
Oct 28 23:05:25 Spartan XrayR[741]: XrayR 0.8.5 (A Xray backend that supports many panels)
Oct 28 23:05:25 Spartan XrayR[741]: 2022/10/28 23:05:25 Start the panel..
Oct 28 23:05:25 Spartan XrayR[741]: 2022/10/28 23:05:25 Xray Core Version: 1.6.0
Oct 28 23:05:25 Spartan XrayR[741]: 2022/10/28 23:05:25 [Warning] core: Xray 1.6.0 started
Oct 28 23:05:25 Spartan XrayR[741]: 2022/10/28 23:05:25 Panel Start fialed: Ret {"ret":0,"data":"IP is invalid. Now, your IP address is xx.xx.xx.xxx"} invalid
Oct 28 23:05:25 Spartan XrayR[741]: panic: Panel Start fialed: Ret {"ret":0,"data":"IP is invalid. Now, your IP address is xx.xx.xx.xxx"} invalid
Oct 28 23:05:25 Spartan XrayR[741]: goroutine 1 [running]:
Oct 28 23:05:25 Spartan XrayR[741]: log.Panicf({0x2e7eed7?, 0x0?}, {0xc000ad7e80?, 0xc000163e30?, 0xc000076810?})
Oct 28 23:05:25 Spartan XrayR[741]: log/log.go:395 +0x67
Oct 28 23:05:25 Spartan XrayR[741]: github.com/XrayR-project/XrayR/panel.(*Panel).Start(0xc0008dddc0)
Oct 28 23:05:25 Spartan XrayR[741]: github.com/XrayR-project/XrayR/panel/panel.go:198 +0x57c
Oct 28 23:05:25 Spartan XrayR[741]: main.main()
Oct 28 23:05:25 Spartan XrayR[741]: github.com/XrayR-project/XrayR/main/main.go:96 +0x250
Oct 28 23:05:25 Spartan systemd[1]: XrayR.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Oct 28 23:05:25 Spartan systemd[1]: XrayR.service: Failed with result 'exit-code'.

sspanel最新版本 自定义配置判断bug

// New sspanel API
disableCustomConfig := c.DisableCustomConfig
if nodeInfoResponse.Version == "2021.11" && !disableCustomConfig {
// Check if custom_config is empty
if configString, err := json.Marshal(nodeInfoResponse.CustomConfig); err != nil || string(configString) == "[]" {
log.Printf("custom_config is empty! take config from address now.")
disableCustomConfig = true
}
} else {
disableCustomConfig = true
}

此处代码只判断版本是否2021.11 版本号升级后 会出现等于 false
{"ret":1,"data":{"node_group":0,"node_class":0,"node_speedlimit":0,"traffic_rate":1,"mu_only":-1,"sort":11,"server":"xx","custom_config":{"offset_port_node":"443","server_sub":"xx","host":"xx","alter_id":"0","network":"ws","security":"tls","path":"/v2ray"},"type":"SSPanel-UIM","version":"2022.8"}}

搭建最新dev版本如下,config.yml已配置 DisableCustomConfig=false
但是最终DisableCustomConfig会被设置成 true 因为 (nodeInfoResponse.Version == "2021.11 = false && !disableCustomConfig ) =false 最终跑去 else disableCustomConfig = true

Limit Device

is there a way to limit users on a sub link ?

i am using v2board . I wish there was a function to limit users on all servers that install XrayR instead of one .

xrayr启动失败

配置没有填错,以前一直都没问题的,但是不知道为什么突然就无法启动了,重装系统也一样。

Snipaste_2022-11-04_01-26-09

修改配置文件触发的自动重启会导致流量信息丢失不计费

程序版本:XrayR v0.8.3
面板:v2board 1.6.0
协议:Trojan

已知情况:
XrayR 在运行中修改配置文件会触发自动重启,日志里会有显示,但和硬重启不一样,这种重启不会中断正在进行的连接
比如正在下载一个文件,这时候修改了限速值 SpeedLimit 文件下载不会中断,但是修改后的限速对已经建立的TCP连接是不生效的
这时候暂停下载或取消重新下载就会应用到新的限速值,这个是非常正常的,通过这种方式可以在不强制中断的情况下做限速调节

但是有一个问题,就是修改配置文件重启后会丢失已经产生的流量消耗信息

情况复现:
1、确保只有一台设备在线并记录测试用户的当前流量消耗
2、下载一个大文件,比如200M
3、在下载的中途修改配置文件触发自动重启
4、文件下载完成后等60秒程序会自动上报用户情况到面板
5、这时候就会发现面板上显示的流量消耗情况完全无变化,也就是说刚下载产生的200M流量完全没有计费

经过多次测试可以确定就是这个原因
只要修改配置文件触发了重启,那么只有在重启后建立的TCP连接产生的流量消耗才会被记录
重启前建立的TCP连接流量消耗信息完全丢失,虽然这个TCP连接并没有中断,但是完全不计费了
如果有一个用户在下载大文件,刚好快结束时修改了配置文件,就等于流量白消耗了

重要程度和原因:
1、虽然程序有限速值设定,但是是固定死的,如果想实现动态限速,只能通过外部脚本动态修改 SpeedLimit 的值
2、但是由于修改配置文件会导致部分流量消耗信息丢失不计费导致只能降低动态调节的频率

预期效果:
1、能不能在修改配置文件后的 “ 软重启 ” 的过程中保留重启前建立TCP连接的流量消耗情况
2、或者能不能设定一种可以动态修改限速值的方法,比如默认设置一个固定的值,后面可以通过命令的方法动态修改限速值,但不重启程序

由于不是太懂代码这块,所以没法提交PR如果能优化这块的话就更棒了
最后感谢作者的开发和开源精神,谢谢 🙏

使用自定义route规则后无法启动,xrayr报错日志如下:

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
ConnetionConfig:
  Handshake: 4 # Handshake time limit, Second
  ConnIdle: 30 # Connection idle time limit, Second
  UplinkOnly: 1 # Time limit when the connection downstream is closed, Second
  DownlinkOnly: 2 # 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, PMpanel, Proxypanel, V2RaySocks
    ApiConfig:
      ApiHost: "https://website"
      ApiKey: "hashvalue"
      NodeID: 1
      NodeType: V2ray # Node type: V2ray, Shadowsocks, Trojan, Shadowsocks-Plugin
      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: # /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: true # 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
      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)
      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: none # 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: /etc/XrayR/cert/node1.test.com.cert # Provided if the CertMode is file
        KeyFile: /etc/XrayR/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

重启Xrayx后报错如下:

Nov 07 20:32:13 BuyVM systemd[1]: XrayR.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Nov 07 20:32:13 BuyVM systemd[1]: XrayR.service: Failed with result 'exit-code'.
Nov 07 20:32:23 BuyVM systemd[1]: XrayR.service: Scheduled restart job, restart counter is at 5.
Nov 07 20:32:23 BuyVM systemd[1]: Stopped XrayR Service.
Nov 07 20:32:23 BuyVM systemd[1]: Started XrayR Service.
Nov 07 20:32:23 BuyVM XrayR[164752]: XrayR 0.8.5 (A Xray backend that supports many panels)
Nov 07 20:32:23 BuyVM XrayR[164752]: 2022/11/07 20:32:23 Start the panel..
Nov 07 20:32:24 BuyVM XrayR[164752]: 2022/11/07 20:32:24 failed to create instance: app/router: this rule has no effective fields
Nov 07 20:32:24 BuyVM XrayR[164752]: panic: failed to create instance: app/router: this rule has no effective fields
Nov 07 20:32:24 BuyVM XrayR[164752]: goroutine 1 [running]:
Nov 07 20:32:24 BuyVM XrayR[164752]: log.Panicf({0x2e971df?, 0xc0008e7740?}, {0xc000497bf8?, 0x2417700?, 0xc000d9e048?})
Nov 07 20:32:24 BuyVM XrayR[164752]:         log/log.go:395 +0x67
Nov 07 20:32:24 BuyVM XrayR[164752]: github.com/XrayR-project/XrayR/panel.(*Panel).loadCore(0xc0008d9e80?, 0xc000162af0)
Nov 07 20:32:24 BuyVM XrayR[164752]:         github.com/XrayR-project/XrayR/panel/panel.go:146 +0x9e5
Nov 07 20:32:24 BuyVM XrayR[164752]: github.com/XrayR-project/XrayR/panel.(*Panel).Start(0xc0008ebdc0)
Nov 07 20:32:24 BuyVM XrayR[164752]:         github.com/XrayR-project/XrayR/panel/panel.go:159 +0xe9
Nov 07 20:32:24 BuyVM XrayR[164752]: main.main()
Nov 07 20:32:24 BuyVM XrayR[164752]:         github.com/XrayR-project/XrayR/main/main.go:96 +0x250

请协助我解决,感谢!

能否增加动态限速功能

能否增加动态限速功能
功能如下:
当用户A在60秒内的均速超过100Mbps,则用户A被限速到30Mbps
持续600秒后用户A的限速解除。

Error: strconv.ParseInt: parsing "tls": invalid syntax

Error: strconv.ParseInt: parsing "tls": invalid syntax panic: Panel Start fialed: Parse node info failed: {"node_group":0,"node_class":2,"node_speedlimit":0,"traffic_rate":2,"mu_only":1,"sort":11,"server":"abc.com;10770;tls;ws;path=/abc|host=abc.com|server=abc.com|outside_port=443","type":"SSPanel-UIM","custom_config":{"offset_port_node":"10770","offset_port_user":"443","server_sub":"abc.com","alter_id":"0","network":"ws","path":"\/abc","security":"tls","host":"abc.com"},"version":"2021.11"}, Error: strconv.ParseInt: parsing "tls": invalid syntax

UIM自定义设置为:

{
"offset_port_node": "10770",
"offset_port_user": "443",
"server_sub": "abc.com",
"alter_id": "0",
"network": "ws",
"path": "/abc",
"security": "tls",
"host": "abc.com"
}

不知道哪里有问题,另一个节点同样的设置没有报错…

最新版本启动失败

Aug 04 02:50:28 Node-1 systemd[1]: Started XrayR Service.
Aug 04 02:50:28 Node-1 XrayR[948]: XrayR 0.8.1 (A Xray backend that supports many panels)
Aug 04 02:50:28 Node-1 XrayR[948]: 2022/08/04 02:50:28 Start the panel..
Aug 04 02:50:28 Node-1 XrayR[948]: 2022/08/04 02:50:28 Xray Core Version: 1.5.9
Aug 04 02:50:28 Node-1 XrayR[948]: 2022/08/04 02:50:28 Panel Start fialed: Ret {"ret":0,"data":"IP is invalid. Now, your IP address is 2001:19f0:7001:3f75:5400:4ff:fe17:b92d"} invalid
Aug 04 02:50:28 Node-1 XrayR[948]: panic: Panel Start fialed: Ret {"ret":0,"data":"IP is invalid. Now, your IP address is 2001:19f0:7001:3f75:5400:4ff:fe17:b92d"} invalid

提示是 ip 是无效的,我的是有 ipv4 和 ipv6,但是也没找到在哪可以设置的地方

ipv6导致无法使用的问题

我没能在配置文件中找到监听端口是ipv6还是ipv4的选项。在我这边建立的节点的监听类型均为ipv6,导致无法使用
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.