Eugeny / tabby-connection-gateway

Connection gateway for Tabby Web
https://tabby.sh
MIT License
116 stars 24 forks source link

Failed to connect to the connection gateway 400 bad request when using SSL #12

Open LeehamElectronics opened 1 year ago

LeehamElectronics commented 1 year ago

Hi, I'm hosting Tabby web behind nginx reverse proxy using HTTPS, therefore, I have to use SSL with tabby-connection-gateway. When trying to connect to a host I get:

image I also see the response from TCB on the docker logs: image

What am I doing wrong here? Here is my docker run command: docker run -e TABBY_AUTH_TOKEN=REDACTED -e certificate=ssl.pem -e key=ssl.key -p 9751:443 ghcr.io/eugeny/tabby-connection-gateway:master --token-auth --host 0.0.0.0 --port 443 --token-auth

Any help would be greatly appreciated, Cheers.

bepstein111 commented 10 months ago

nginx provides HTTPS, so you can just use standard ports for the gateway and let nginx talk to tabby via HTTP (insecure, but internal to your docker network) while letting nginx provide HTTPS to the outside world, where it's important.

looks like this: internet > HTTPS > Nginx > HTTP > Tabby gateway

TomErnst1972 commented 2 months ago

can confirm, this works for me as well. I use wss://host.name.tld, while this points to nginx proxy manager and then nginx forwards it to http://internal.ip:yourport.

image