tobychui / zoraxy

A general purpose HTTP reverse proxy and forwarding tool. Now written in Go!
https://zoraxy.aroz.org
GNU Affero General Public License v3.0
2.96k stars 182 forks source link

[BUG] Apache Guacamole very laggy with zoraxy #347

Open psycho160 opened 1 week ago

psycho160 commented 1 week ago

Apache Guacamole requires several settings on a reverse proxy as you can see here:

https://guacamole.apache.org/doc/gug/reverse-proxy.html#proxying-with-apache

I tried to move from nginx to zoraxy but the established remote desktop session is very laggy an unusable.

Log is full of POST /tunnel?write:0039daa4-8e32-3f85-a70b-a8381774011d 200 about 5 lines per second.

I cant´find the (probably) related settings in zoraxy for proxy_buffering off and SetEnvIf Request_URI "^/guacamole/tunnel" dontlog

To Reproduce Steps to reproduce the behavior:

  1. Use zoraxy as reverse porxy for apache guacamole
  2. Establish connection to rdp or vnc and see how laggy it works

Expected behavior On nginx with same backend everything runs smooth and rdp is usable like physical pc

Host Environment (please complete the following information):

tobychui commented 1 week ago

@psycho160 I am kinda amazed that they didn't use websocket for that.

Back to your question, currently Zoraxy don't have ways to disable log for a certain path. Even if it does, Zoraxy speed will not be comparable with apache or nginx. That was caused by the implementation of Zoraxy are highly focused in "smart" routing logic in which some extra code segments (and thus, CPU cycles) are used to do things like SNI, request header sniffing or auto path rewrite corrections.

If speed and low latency are really your main concerns, I would recommend keeping the current setup or use Zoraxy as a secondary reverse proxy (i.e. use nginx in your gateway node which forward some subdomains / hostnames to Zoraxy).

psycho160 commented 1 week ago

They use websocket indeed but maybe i have to configure something that zoraxy can use it. In the upstream i disabled the Skip websocket... option.