XrayR-project / XrayR

A Xray backend framework that can easily support many panels. 一个基于Xray的后端框架,支持V2ay,Trojan,Shadowsocks协议,极易扩展,支持多面板对接
https://xrayr-project.github.io/XrayR-doc/
Mozilla Public License 2.0
2.17k stars 858 forks source link

如何在同一台机器上同一个面板部署两个协议 #102

Closed blackshot-zard closed 2 years ago

blackshot-zard commented 2 years ago

看了官方文档,试了很多种写法都不支持,但是支持同时部署多个面板 如果我要同时部署v2ray和ss的话配置文件应该怎么写呢

blackshot-zard commented 2 years ago

之前用笨方法,用xrayr部署trojan 用soga部署ss 但是最近soga好像有问题, 部署了,能用,但是打不开gfwlist的网站,测速啥的都正常

Septrum101 commented 2 years ago

why you are not paste your config ?

blackshot-zard commented 2 years ago

why you are not paste your config ?

写法 一 log和非节点重要部分我就不复制了 太长了

Nodes:

PanelType: "V2board" # Panel type: SSpanel, V2board, PMpanel, Proxypanel
ApiConfig:
  ApiHost: "http://exp.com"
  ApiKey: "exp"
  NodeID: 1
  NodeType: Trojan # Node type: V2ray, Trojan, Shadowsocks, Shadowsocks-Plugin
  Timeout: 30 # Timeout for the api request
  EnableVless: false # Enable Vless for V2ray Type
  EnableXTLS: false # Enable XTLS for V2ray and Trojan

- PanelType: "V2board" # Panel type: SSpanel, V2board ApiConfig: ApiHost: "http://exp.com" ApiKey: "exp" NodeID: 1 NodeType: Shadowsocks # Node type: V2ray, Shadowsocks, Trojan Timeout: 30 # Timeout for the api request EnableVless: false # Enable Vless for V2ray Type, Prefer remote configuration EnableXTLS: false # Enable XTLS for V2ray and Trojan, Prefer remote configuration

写法 二

Nodes:

PanelType: "V2board" # Panel type: SSpanel, V2board, PMpanel, Proxypanel
ApiConfig:
  ApiHost: "http://exp.com"
  ApiKey: "exp"
  NodeID: 1
  NodeType: Trojan # Node type: V2ray, Trojan, Shadowsocks, Shadowsocks-Plugin
  Timeout: 30 # Timeout for the api request
  EnableVless: false # Enable Vless for V2ray Type
  EnableXTLS: false # Enable XTLS for V2ray and Trojan

- ApiConfig: ApiHost: "http://exp.com" ApiKey: "exp" NodeID: 1 NodeType: Shadowsocks # Node type: V2ray, Shadowsocks, Trojan Timeout: 30 # Timeout for the api request EnableVless: false # Enable Vless for V2ray Type, Prefer remote configuration EnableXTLS: false # Enable XTLS for V2ray and Trojan, Prefer remote configuration

写法 三

Nodes:

PanelType: "V2board" # Panel type: SSpanel, V2board, PMpanel, Proxypanel
ApiConfig:
  ApiHost: "http://exp.com"
  ApiKey: "exp"
  NodeID: 1
  NodeType: Trojan # Node type: V2ray, Trojan, Shadowsocks, Shadowsocks-Plugin
  NodeID: 1
  NodeType: Shadowsocks # 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

写法 四

Nodes:

PanelType: "V2board" # Panel type: SSpanel, V2board, PMpanel, Proxypanel
ApiConfig:
  ApiHost: "http://exp.com"
  ApiKey: "exp"
  NodeID: 1
  NodeType: Trojan # Node type: V2ray, Trojan, Shadowsocks, Shadowsocks-Plugin
  Timeout: 30 # Timeout for the api request
  EnableVless: false # Enable Vless for V2ray Type
  EnableXTLS: false # Enable XTLS for V2ray and Trojan

- Nodes:

PanelType: "V2board" # Panel type: SSpanel, V2board, PMpanel, Proxypanel
ApiConfig:
  ApiHost: "http://exp.com"
  ApiKey: "exp"
  NodeID: 1
  NodeType: Shadowsocks # Node type: V2ray, Trojan, Shadowsocks, Shadowsocks-Plugin
  Timeout: 30 # Timeout for the api request
  EnableVless: false # Enable Vless for V2ray Type
  EnableXTLS: false # Enable XTLS for V2ray and Trojan
Septrum101 commented 2 years ago

use gist upload complete config.yml

blackshot-zard commented 2 years ago

use gist upload complete config.yml

try 2.txt try 3.txt try 4.txt try 1.txt

blackshot-zard commented 2 years ago

用try 1报错内容

Nov 17 04:36:21 VM20221005 XrayR[12604]: XrayR 0.8.6 (A Xray backend that supports many panels) Nov 17 04:36:21 VM20221005 XrayR[12604]: 2022/11/17 04:36:21 Config file error: While parsing config: yaml: line 53: did not find expected key Nov 17 04:36:21 VM20221005 XrayR[12604]: panic: Config file error: While parsing config: yaml: line 53: did not find expected key Nov 17 04:36:21 VM20221005 XrayR[12604]: goroutine 1 [running]: Nov 17 04:36:21 VM20221005 XrayR[12604]: log.Panicf({0x2f5ed23?, 0x7fff0a994f06?}, {0xc00061fe88?, 0xc000012020?, 0x2f45265?}) Nov 17 04:36:21 VM20221005 XrayR[12604]: log/log.go:395 +0x67 Nov 17 04:36:21 VM20221005 XrayR[12604]: main.getConfig() Nov 17 04:36:21 VM20221005 XrayR[12604]: github.com/XrayR-project/XrayR/main/main.go:60 +0x11e Nov 17 04:36:21 VM20221005 XrayR[12604]: main.main() Nov 17 04:36:21 VM20221005 XrayR[12604]: github.com/XrayR-project/XrayR/main/main.go:75 +0x9f Nov 17 04:36:21 VM20221005 systemd[1]: XrayR.service: Main process exited, code=exited, status=2/INVALIDARGUMENT Nov 17 04:36:21 VM20221005 systemd[1]: XrayR.service: Failed with result 'exit-code'.

blackshot-zard commented 2 years ago

谢谢 我成功了!!! try 1可以 但是好像对格式要求很高