Gozargah / Marzban

Unified GUI Censorship Resistant Solution Powered by Xray
https://t.me/gozargah_marzban
GNU Affero General Public License v3.0
2.77k stars 403 forks source link

Reduce websocket disruption using reverse proxy on gcore #602

Open ahmadta72 opened 8 months ago

ahmadta72 commented 8 months ago

Hi, when we use websocket on gore cdn. We are witnessing disruptions/slowness/pauses caused by dns etc. that there is practically no problem in Marzban's infrastructure. In order to be able to solve this problem together, I use the configuration without tls so that we don't get involved in tls anymore.

{
      "tag": "VLESS WS NO TLS",
      "listen": "0.0.0.0",
      "port": 80,
      "protocol": "vless",
      "settings": {
        "clients": [],
        "decryption": "none"
      },
      "streamSettings": {
        "network": "ws",
        "security": "none",
        "wsSettings": {
          "path": "/"
        }
      },
      "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls"
        ]
      }
    },

In the panels that use the xray core and have port problems, we use the reverse proxy method and we can easily solve the issues and problems caused by the port. Meanwhile, the path part is added in the json code section. "path": "/" But let's go back to Marzban and the same settings in core setting. This configuration works correctly in other CDNs such as Cloudflare. But to be sure, I went back to other xray panels and ran the reverse proxy method on gcore. The result was successful!

Also, in Nodes and Docker, we have more problems when using nginx at the same time. Therefore, to solve the problems on gcore, I would like to know before any action what is your solution to solve these problems? And what is the easiest way to use gcore(IPs are ok) without disruption?

mdjvd commented 8 months ago

I may be disregarding your explanations of the problem (sorry about that), but in terms of gcore, if you didn't know by any chance, you could set a random port in the origins group section in your account, and use that same port for your inbound in your xray config. and then you could decide whether you want to use your proxy with tls by using port 443 or no tls by using port 80 in your host settings.

ahmadta72 commented 8 months ago

In my opinion, it is better to read the explanation in full in the guidance process. I'm quite familiar with the process of working with gcore, but I'm also considering the flow of using multicdn and .. The point is that currently Marzban is working fine in Cloudflare. And the same gcore when using X-ray core panels (Except for Marzban panel). So, in this flow, the communication between marzban and gcore has a problem, which can probably be used to have a more stable connection with methods such as reverse proxy! Currently, having or not having tls does not matter in a stable connection.