chika0801 / Xray-examples

Xray 配置示例
https://github.com/XTLS/Xray-core
506 stars 97 forks source link

MUX - gRPC+TLS #26

Closed hawshemi closed 7 months ago

hawshemi commented 7 months ago

Hello. I the table below:

image

It is said that Vless+gRPC+TLS (with Nginx) comes with MUX.

  1. What is the default number of mux?
  2. There is no need to set mux from the client in this config? or do I have to set mux? (like below)
            "mux": {
                "enabled": true,
                "concurrency": 8, 
                "xudpConcurrency": 8, 
                "xudpProxyUDP443": "reject"
            }
chika0801 commented 7 months ago

What is the default number of mux?

I'm also not sure what the default MUX is for gRPC.

There is no need to set mux from the client in this config? or do I have to set mux? (like below)

            "mux": {
                "enabled": true,
                "concurrency": -1,  
                "xudpConcurrency": 8, 
                "xudpProxyUDP443": "reject"
            }

"concurrency": -1,

The gRPC MUX conflicts with Xray's built-in TCP MUX, which you can turn off like this. But you can use the new UDP MUX feature in XUDP. This new feature is not necessary, you can try it, it is UDP over TCP, it will not conflict with gRPC's MUX.

hawshemi commented 7 months ago

So when the transport is gRPC, mux is automatically enabled and used by the client and server?

chika0801 commented 7 months ago

So when the transport is gRPC, mux is automatically enabled and used by the client and server?

yes This is a fundamental feature of gRPC (HTTP2).

hawshemi commented 7 months ago

Thanks. Appreciate it.