Coder Social home page Coder Social logo

Websockets about send HOT 4 CLOSED

0xspade avatar 0xspade commented on July 18, 2024
Websockets

from send.

Comments (4)

jun66j5 avatar jun66j5 commented on July 18, 2024 1

I think it is caused by wrong your configuration.

-  RewriteRule .* "ws:/127.0.0.1:1443/$1" [P,L]
+  RewriteRule /(.*) ws://127.0.0.1:1443/$1 [P,L]

See also https://github.com/timvisee/send/blob/master/docs/deployment.md#apache-webserver

from send.

timvisee avatar timvisee commented on July 18, 2024

wss:// stands for a secure (HTTPS) websocket. You may have to configure a SSL certificate, for the domain and websocket. It looks like your current configuration is only for non-secure connections.

I came across these two answers on SO, that might help:

from send.

0xspade avatar 0xspade commented on July 18, 2024

Thanks @jun66j5 and @timvisee looks like I need an SSL Certificate.

from send.

0xspade avatar 0xspade commented on July 18, 2024

To those wondering how I fix this, here's how, so I setup a docker on my VPS my DNS is in cloudflare.

I have apache2 and here's my virtual config:

<IfModule mod_ssl.c>                                                                                     
<VirtualHost *:443>                                                                                      
        ServerName send.instance.me                                                                         
        ErrorLog ${APACHE_LOG_DIR}/send_error.log
        CustomLog ${APACHE_LOG_DIR}/send_access.log combined
                                                    
        ProxyPreserveHost on              
        ProxyRequests Off   
        ProxyVia Full                              
        ProxyPass / http://localhost:1443                                                                
        ProxyPassReverse / http://localhost:1443                                                         
        ProxyPass / ws://localhost:1443
        ProxyPassReverse / ws://localhost:1443

        SSLEngine on
        SSLProxyEngine on
        SSLProtocol -all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1 +TLSv1.2
        SSLCipherSuite HIGH:aNULL:eNULL:EXPORT:DES:RC4:!MD5:!PSK:!SRP:!CAMELLIA

        SSLCertificateFile /home/[REDACTED]/certs/send.instance.me/cert.pem
        SSLCertificateKeyFile /home/[REDACTED]/certs/send.instance.me/privkey.pem
        SSLCertificateChainFile /home/[REDACTED]/certs/send.instance.me/chain.pem

        RewriteEngine on
        RequestHeader set X-Forwarded-Proto https
        RewriteCond %{REQUEST_FILENAME} -f
        RewriteRule .* - [L]
        RewriteCond %{HTTP:Upgrade} =websocket [NC]
        RewriteRule /(.*) ws://127.0.0.1:1443/$1 [P,L]
        RewriteRule ^/(.*)$ http://127.0.0.1:1443/$1 [P,QSA]
</VirtualHost>
</IfModule>

from send.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.