XrayR启动失败
公司要用服务器之间进行数据加密,这里用的XrayR
我使用的Centos 7。
我这里使用一键脚本安装后,/etc/XrayR目录下没有配置文件。
解决方案
XrayR安装时,系统没有unzip工具,也是会安装失败的,因为Centos7已经停止维护了,得换个数据源。
vi /etc/yum.repos.d/CentOS-Base.repo
把下面的配置文件,替换掉源文件。
[base]
name=CentOS-7 - Base
baseurl=http://vault.centos.org/7.9.2009/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7[updates]
name=CentOS-7 - Updates
baseurl=http://vault.centos.org/7.9.2009/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7[extras]
name=CentOS-7 - Extras
baseurl=http://vault.centos.org/7.9.2009/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
保存退出后,再执行:
yum clean all
yum makecache
yum install unzip -y
下面所有命令都用 root 直接复制粘贴即可:
cat >/etc/yum.repos.d/CentOS-Base.repo <<'EOF'
[base]
name=CentOS-7 - Base
baseurl=http://vault.centos.org/7.9.2009/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7[updates]
name=CentOS-7 - Updates
baseurl=http://vault.centos.org/7.9.2009/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7[extras]
name=CentOS-7 - Extras
baseurl=http://vault.centos.org/7.9.2009/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
EOFyum clean all
yum makecache
# 把缺的工具一次性补上
yum -y install wget curl unzip tar
删除残缺目录,重新跑官方一键脚本:
rm -rf /usr/local/XrayR
bash <(curl -Ls https://raw.githubusercontent.com/XrayR-project/XrayR-release/master/install.sh)
OK完成。
config.yml配置示例
Log:Level: none # Log level: none, error, warning, info, debug AccessPath: # /etc/XrayR/access.LogErrorPath: # /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, SecondConnIdle: 10 # Connection idle time limit, SecondUplinkOnly: 2 # Time limit when the connection downstream is closed, SecondDownlinkOnly: 4 # Time limit when the connection is closed after the uplink is closed, SecondBufferSize: 64 # The internal cache size of each connection, kB
Nodes:-PanelType: "V2board" # Panel type: SSpanel, NewV2board, V2board, PMpanel, ProxypanelApiConfig:ApiHost: "http://xin.students.xin"ApiKey: "V2boardV2boardV2board"NodeID: 1NodeType: Shadowsocks # Node type: V2ray, Trojan, Shadowsocks, Shadowsocks-PluginTimeout: 30 # Timeout for the api requestEnableVless: false # Enable Vless for V2ray TypeEnableXTLS: false # Enable XTLS for V2ray and TrojanSpeedLimit: 0 # Mbps, Local settings will replace remote settings, 0 means disableDeviceLimit: 0 # Local settings will replace remote settings, 0 means disableRuleListPath: # /etc/XrayR/rulelist Path to local rulelist fileControllerConfig:ListenIP: 0.0.0.0 # IP address you want to listenSendIP: 0.0.0.0 # IP address you want to send pacakageUpdatePeriodic: 60 # Time to update the nodeinfo, how many sec.EnableDNS: false # Use custom DNS config, Please ensure that you set the dns.json wellDNSType: AsIs # AsIs, UseIP, UseIPv4, UseIPv6, DNS strategyDisableUploadTraffic: false # Disable Upload Traffic to the panelDisableGetRule: false # Disable Get Rule from the panelDisableIVCheck: false # Disable the anti-reply protection for ShadowsocksDisableSniffing: false # Disable domain sniffing EnableProxyProtocol: falseAutoSpeedLimitConfig: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 userRedisAddr: 127.0.0.1:6379 # The redis server addressRedisPassword: YOUR PASSWORD # Redis passwordRedisDB: 0 # Redis DBTimeout: 5 # Timeout for redis requestExpiry: 60 # Expiry time (second)EnableFallback: false # Only support for Trojan and VlessFallBackConfigs: # Support multiple fallbacks-SNI: # TLS SNI(Server Name Indication), Empty for anyAlpn: # Alpn, Empty for anyPath: # HTTP PATH, Empty for anyDest: 80 # Required, Destination of fallback, check https://xtls.github.io/config/fallback/ for details.ProxyProtocolVer: 0 # Send PROXY protocol version, 0 for dsableCertConfig:CertMode: dns # Option about how to get certificate: none, file, http, dns. Choose "none" will forcedly disable the tls config.RejectUnknownSni: false # Reject unknown SNICertDomain: "niuyuenoe.guangdongxjl.cfd" # Domain to certCertFile: /etc/XrayR/cert/node1.test.com.cert # Provided if the CertMode is fileKeyFile: /etc/XrayR/cert/node1.test.com.keyProvider: alidns # DNS cert provider, Get the full support list here: https://go-acme.github.io/lego/dns/Email: test@me.comDNSEnv: # DNS ENV option used by DNS providerALICLOUD_ACCESS_KEY: aaaALICLOUD_SECRET_KEY: bbb