krita-ai-diffusion icon indicating copy to clipboard operation
krita-ai-diffusion copied to clipboard

Websocket support when server address is https

Open codescv opened this issue 1 year ago • 3 comments

On some cloud services the service address of the tunnel is https://{host}. In that case we should replace "https" with "ws" to get the correct websocket address.

codescv avatar May 16 '24 08:05 codescv

The way it currently works and is intended is to

  • replace http with ws (for local use)
  • replace https with wss (for cloud service with TLS)

Which service are you using that requires some mix (https but unsecure websocket connection)?

Acly avatar May 17 '24 06:05 Acly

When using cloudflared to forward the port, the web socket doesn't work unless I specify ws.

So this may actually be a bug of cloudflared?

On Fri, May 17, 2024 at 14:55 Acly @.***> wrote:

The way it currently works and is intended is to

  • replace http with ws (for local use)
  • replace https with wss (for cloud service with TLS)

Which service are you using that requires some mix (https but unsecure websocket connection)?

— Reply to this email directly, view it on GitHub https://github.com/Acly/krita-ai-diffusion/pull/715#issuecomment-2116877562, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA6KHXQKFBYEBT3QYDSHXTZCWSU7AVCNFSM6AAAAABHZXO3ZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJWHA3TONJWGI . You are receiving this because you authored the thread.Message ID: @.***>

codescv avatar May 19 '24 23:05 codescv

Not sure I'd call it a bug, I can't find a lot of information about cloudflared support for web socket, and whether it will encrypt it by default. Maybe it has to be setup explicitly?

Acly avatar May 22 '24 18:05 Acly

I have an Apache proxy that wraps LetsEncrypt https around my local ComfyUI. WSS works fine over it as-is.

FeepingCreature avatar Aug 25 '24 01:08 FeepingCreature