The uncomplicated xBrowserSync server
Go to file
Maurizio Porrato c1049eb48e
Add test for FS store driver
2021-05-15 19:54:09 +01:00
cmd/ubsserver First commit 2021-05-15 11:34:04 +01:00
syncstore Add test for FS store driver 2021-05-15 19:54:09 +01:00
.gitignore First commit 2021-05-15 11:34:04 +01:00
.gitlab-ci.yml Add basic .gitlab-ci.yml file 2021-05-15 10:48:04 +00:00
API.md First commit 2021-05-15 11:34:04 +01:00
README.md Minor rewording of README.md 2021-05-15 12:13:48 +01:00
UNLICENSE First commit 2021-05-15 11:34:04 +01:00
go.mod First commit 2021-05-15 11:34:04 +01:00

README.md

uBrowserSync

The uncomplicated browser sync server is an implementation of the xbrowsersync server API with no external dependencies.

Being written in Go, the server is a standalone statically linked binary; it uses the local filesystem as the datastore by default and can be built for any operating system and hardware platform supported by the Go compiler, making it ideal for resource constrained self-hosting scenarios.

Why

xBrowserSync is a great tool for privacy minded people. The problem with the official server code is about the software stack. It's written in NodeJS and requires MongoDB for storing data. I don't use NodeJS or MongoDB for anything else on my VPS so adding a self-hosted xBrowserSync API server would pull in a lot of code and require a lot of additional resources.

The xBrowserSync API is simple enough to make writing a new server an almost trivial exercise. This was the perfect opportunity for me to improve my Go programming skills. I'm still very far from being an expert Go developer but it was worth my time.

How

Building

go install -ldflags="-s -w" -trimpath ./cmd/ubsserver

Running

~/go/bin/ubsserver

TODO: Suggest deployment setups

Roadmap

There are a few missing features that I would like to add.

Hig priority:

  • Enforce storage limit: it's missing in the current implementation, but it must be implemented to prevent abuse

Nice to have:

  • Rate limiting: currently it can be enforced by a reverse proxy in front of the API server but would be nice to have it as part of the server itself
  • Front page: serving a static HTML page on /, perhaps with some simple JS to show the service status, should be fairly straightforward and would improve the end user experience. The main blocker here is my lack of design skills to craft a half decent looking front page
  • Migration tool: a tool able to pull your current sync from a server and push it to a different one might come handy; the main hurdle is that it would require decrypting the payload and re-encrypting it because the sync ID is used as the IV in the AES-GCM encryption process

License

The code is released under the "Unlicense" public domain license. See UNLICENSE for more details.