1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-08-06 11:09:10 +00:00

Initial version of websockets notification support.

For now only folder notifications are sent (create, rename, delete).
The notifications are only tested between two web-vault sessions in different browsers, mobile apps and browser extensions are untested.

The websocket server is exposed in port 3012, while the rocket server is exposed in another port (8000 by default). To make notifications work, both should be accessible in the same port, which requires a reverse proxy.

My testing is done with Caddy server, and the following config:

```
localhost {

    # The negotiation endpoint is also proxied to Rocket
    proxy /notifications/hub/negotiate 0.0.0.0:8000 {
        transparent
    }

    # Notifications redirected to the websockets server
    proxy /notifications/hub 0.0.0.0:3012 {
        websocket
    }

    # Proxy the Root directory to Rocket
    proxy / 0.0.0.0:8000 {
        transparent
    }
}
```

This exposes the service in port 2015.
This commit is contained in:
Daniel García 2018-08-30 17:43:46 +02:00
commit d70864ac73
7 changed files with 765 additions and 168 deletions

537
Cargo.lock generated

File diff suppressed because it is too large Load diff