Alyssa Rosenzweig b49a7b490f Switch to set | hace 6 años | |
---|---|---|
accounts | hace 6 años | |
.editorconfig | hace 6 años | |
.gitignore | hace 6 años | |
LICENSE | hace 6 años | |
Makefile | hace 6 años | |
README.md | hace 6 años | |
cert.sh | hace 6 años | |
core.c | hace 6 años | |
core.h | hace 6 años | |
event-loop.c | hace 6 años | |
event-loop.h | hace 6 años | |
jailed.sh | hace 6 años | |
json_compat.h | hace 6 años | |
proxy.c | hace 6 años | |
push.c | hace 6 años | |
push.h | hace 6 años | |
sapphire-accounts.json | hace 6 años | |
secure-compare-64.h | hace 6 años | |
websocket.c | hace 6 años | |
websocket.h | hace 6 años |
sapphire-backend communicates only over local filesystem-resident sockets, to simplify jailing. To reach the outside world -- in particular, to benefit from websockets -- it must be paired with sapphire-proxy, which implements proxying, authentication, and SSL.
To set this up, use:
$ ./sapphire-backend & ./sapphire-proxy
And if you need to restart, it's probably safest to quit both.
This process might be further streamlined in the future.
Historically, on a local single-user Sapphire instance, the architecture was simple:
Browser <--> Backend
However, this does not work for multi-user, public-facing instances. In these cases, to minimise attack surface, this proxy is publicly facing while the backends only listen to localhost and are sandboxed:
Browser <--> Proxy (<--> Backends)
This package proxies WebSockets and implements authentication. It therefore depends on glib/json-glib/libsoup, but it MUST NOT depend on libpurple due to security isolation concerns.