51 lines
2.3 KiB
Markdown
51 lines
2.3 KiB
Markdown
|
# uBrowserSync
|
||
|
|
||
|
The _uncomplicated browser sync server_ is an implementation of the [xbrowsersync](https://www.xbrowsersync.org/) server API with no external dependencies.
|
||
|
|
||
|
Being written in Go, the server is a standalone statically linked binary using 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 features missing 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](UNLICENSE) for more details.
|