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.11k stars 840 forks source link

Can Use V2BOARD XrayR with nginx for reverse proxy to cdn? #162

Closed Redshado0w closed 1 year ago

Redshado0w commented 1 year ago

hello all i need hide XrayR node behind Cloudflare and tunnel to XrayR with Server a

v2board can support this config ? i do reverse proxy with TLS in Both Server But i get WebSocket error

thanks

Septrum101 commented 1 year ago

Only websocket support CDN. You can use vmess+ws.

Redshado0w commented 1 year ago

Only websocket support CDN. You can use vmess+ws. Thanks Brother i get this error what mean of this log ? `Configuration successful [] [VMess] ویژه ایرانسل 3 تحت تعمیر(iran3***info:443) Start service (12/16/2022 4:49:32 PM)... Xray 1.6.0 (Xray, Penetrates Everything.) Custom (go1.19.1 windows/amd64) A unified platform for anti-censorship. 2022/12/16 16:49:32 [Info] infra/conf/serial: Reading config: C:\Users\somayeh\Desktop\v2rayN-Core\v2rayN-Core\config.json 2022/12/16 16:49:32 [Warning] core: Xray 1.6.0 started 2022/12/16 16:49:33 127.0.0.1:11532 accepted http://cdf-anon.xboxlive.com/en-us/x8/feeds/1.1/Tile-Games [http -> proxy] 2022/12/16 16:49:33 127.0.0.1:11534 accepted //push.digitalocean.com:443 [http -> proxy] 2022/12/16 16:49:34 127.0.0.1:11537 accepted //alive.github.com:443 [http -> proxy] 2022/12/16 16:49:35 127.0.0.1:11539 accepted //signaler-pa.clients6.google.com:443 [http -> proxy] 2022/12/16 16:49:38 127.0.0.1:11546 accepted //cloud.digitalocean.com:443 [http -> proxy] 2022/12/16 16:49:39 127.0.0.1:11550 accepted //alive.github.com:443 [http -> proxy] 2022/12/16 16:49:40 127.0.0.1:11552 accepted //alive.github.com:443 [http -> proxy] 2022/12/16 16:49:40 [Warning] [46569321] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: failed to find an available destination > common/retry: [transport/internet/websocket: failed to dial WebSocket > transport/internet/websocket: failed to dial to (wss://mydomain/my patch): 403 Forbidden > websocket: bad handshake] > common/retry: all retry attempts failed

Septrum101 commented 1 year ago

You should comfirm your wss://mydomain/my patch can be access.

Redshado0w commented 1 year ago

my nginx conf is :

server {
    listen       443 ssl http2;
    listen       [::]:443 ssl http2;
    server_name  _;
    root         /usr/share/nginx/html;
    ssl_certificate "/etc/letsencrypt/live/my fullchain server 1/fullchain.pem";
    ssl_certificate_key "/etc/letsencrypt/live/my key server 1/privkey.pem";
    ssl_session_cache shared:SSL:1m;
    ssl_session_timeout  10m;
    ssl_ciphers HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers on;

man baraye reverse ezafe kardam

location /1378 { if ($http_upgrade != "websocket") return 500; } proxy_redirect off; proxy_pass https://my backend server:443; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade;

Septrum101 commented 1 year ago

curl mydomain/my patch

Redshado0w commented 1 year ago

i try dont get anything (i proxied my server 2 behind cloudflare) log : [root@vije nginx]# curl https://domain(server2)/patch(server1) [root@vije nginx]#

Redshado0w commented 1 year ago

[root@vije nginx]# curl https://my server2 domain.info curl: (35) Encountered end of file [root@vije nginx]# curl https://my server2 domain:443 curl: (35) Encountered end of file [root@vije nginx]#

Redshado0w commented 1 year ago

any idea ?

Septrum101 commented 1 year ago

Google: how to use nginx reserve proxy and how to install xrayR follew the user guide.

Redshado0w commented 1 year ago

ok thanks

FlyFrg commented 1 year ago

Only websocket support CDN. You can use vmess+ws.

Are you sure about this? Why is it written differently here?

https://guide.v2fly.org/advanced/h2.html