[ANN] B·o·B, an universal & secure peer-to-peer file-transfer in OCaml

I am very pleased to announce the experimental distribution of Bob available on this website.

Bob is an OCaml-based file-sharing application. For the Robur team, this is our first application using the Esperanto project (announced some time ago) allowing us to distribute a single binary that works on almost all platforms (including Windows).

This software also uses, as far as its relay is concerned, a unikernel developed with MirageOS and deployed by yours truly.

Finally, the distribution of the binary or the relay is offered by the reproducible infrastructure developed by the Robur team and available here: https://builds.osau.re/

The website (also a unikernel) contains all the information about Bob, its use, its configuration, etc. A series of Questions/Answers is also available there.

We would like to say that the project is experimental. Even though we are ready to deliver the software in due form, we are aware of some bugs and we will continue to improve the software. However, the practical case, its use and user feedback are needed at this stage - and that is why we are announcing its availability.

A series of articles to understand the whole development and deployment process is available:

If you are interested in the project and want to help us maintain all that it entails or if you consider what we do to be super cool, you can donate here.

The Robur team

19 Likes

Very cool project. Just a couple of questions.

However, we don’t want to infer the content of what you want to send (to protect your privacy) - so it’s up to you to recognise whether using --no-compression is appropriate or not.

Does this mean that uncompressed files are sent without encryption?

A speed problem may exist and concerns all 3 parties involved in the transfer: you, the relay and the receiver. The transfer speed is essentially the one with the lowest transfer speed.

Would it be possible to use the relay only for establishing the connection and after that is done for the relay to connect the two peers directly, removing itself from the middle?

1 Like

Hello and thank you for your interest in the project!

Any documents sent with Bob is encrypted :slight_smile: . What we don’t want to do is infer the MIME type of what the user wants to send - in this we are not trying to introspect the content of the document. The trade-off is that we can’t infer whether it would make sense to compress the document or not. For example, a user might expect Bob to be smart enough to recognise the document as a video and, in that case, not compress the document. This is not the case, however, if you do not want to introspect the MIME type of the document to be sent.

In other words, the user must be aware of what is trying to be sent and use --no-compression or not accordingly. Again, the latter option does not override the encryption :slight_smile: .

One of the improvements we want to make is the ability for Bob to actually do “peer-to -peer” - and not go through the relay. However, we would like to keep the default of using the relay for simplicity. The peer-to-peer case probably requires a network state (open ports, accessible peer) that many don’t have for various reasons - conversely, we know that it is possible for the user not to have access to our relay (but to have access to the peer) and it is in this case that we would like to do true peer-to-peer.

2 Likes

Regarding compression: from the discussion here (not looked at the details), one option would be for bob to receive the mime-type as argument, and decide how/whether to encode. This way you could document that users can just do bob send --mime-type $(file --brief --mime-type $FILE) $FILE, and not worry about encryption themselves.

2 Likes

Indeed, we can assume few MIME types which should not be compressed :+1: I will make an issue about that. Thanks for the outcome.

EDIT: moreover, we can advise the user to use conan :sweat_smile:

Hello,

Great project!
But my experiments are frustrating. On macos, all my sends ends up at 64KiB don’t know why…
So I tried to build locally bob, is it possible on macos (x86-64), it seems you require esperanto-cosmopolitan that is not available for macos.
Is it possible to build a native version on macos to test whether the problem comes from the binary format or another bug?
It works fine to receive files sent by a linux and every seems to work finely when the source is linux.
Fabien

1 Like

Thanks for trying :slight_smile: . Indeed, not being a Mac owner, it is difficult for me to test the latter (and especially on the performances).

So I tried to build locally bob, is it possible on macos (x86-64), it seems you require esperanto-cosmopolitan that is not available for macos.

Bob’s distribution contains 2 OPAM packages: bob.opam and com.opam. The first is the software, the second is about building Bob with Cosmopolitan. If you want to compile Bob natively, you should select the first one with (which does not require Esperanto/Cosmopolitan):

$ opam pin add bob https://github.com/dinosaure/bob.git
# or ...
$ git clone https://github.com/dinosaure/bob.git
$ cd bob
$ opam pin add bob .

I hope this can help you to at least get a native Bob for Mac. If you want, we can also talk about it in more detail on GitHub (as an issue).