Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Website hangs after websocket turned on #129

Closed
msberends opened this issue Jul 17, 2021 · 3 comments
Closed

Website hangs after websocket turned on #129

msberends opened this issue Jul 17, 2021 · 3 comments

Comments

@msberends
Copy link

The app hangs when you push the lightning bolt in 1.3.1. It keeps saying ‘Connecting’. Restarting does not help.

I don’t see anything changed in config.json, so where is this set? I cannot undo it now…

@boypt
Copy link
Owner

boypt commented Jul 17, 2021

are u using a nginx as frontend server? the previous config of nginx cannot support both eventstream and websocket mode. refer to the wiki page for an updated config

https://github.com/boypt/simple-torrent/wiki/ReverseProxy#nginx

The mode of connect is recored in your browser local storage, you can also delete the veloxCON item from F12 dev tools.

I will make the connection button clickable when such happends.

@msberends
Copy link
Author

No, Apache:

<VirtualHost *:443>
  SSLEngine on
  SSLProxyEngine On
  ServerName some.domain.zzz

  <Proxy *>
    Allow from localhost
  </Proxy>

  ProxyPass / http://localhost:8085/
  ProxyPassReverse / http://localhost:8085/
  ProxyRequests Off
</VirtualHost>

Thanks! I’ll look for veloxCON.
What is the benefit of using websocket? That’s not documented I think.

@boypt
Copy link
Owner

boypt commented Jul 19, 2021

Add 3 lines to you config will be ok.

<VirtualHost *:443>
  SSLEngine on
  SSLProxyEngine On
  ServerName some.domain.zzz

  <Proxy *>
    Allow from localhost
  </Proxy>

  RewriteEngine On
  RewriteCond %{HTTP:Upgrade} =websocket [NC]
  RewriteRule /(.*)           ws://localhost:8085/$1 [P,L]

  ProxyPass / http://localhost:8085/
  ProxyPassReverse / http://localhost:8085/
  ProxyRequests Off
</VirtualHost>

Websocket is just another technic the browser establishing a long connection to the server, only that websocket is bidirectional, evenstream is only down forward. But in this project only use the down forward tunnel.

I have a node proxied by cloudflare, the websocket mode seems response faster.

I'll document this in the wiki page later.

@boypt boypt closed this as completed Jul 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants