Skip to content
Stream huge files out of the browser
Branch: master
Clone or download
Ubuntu Fix an unwrap
Latest commit f5ce7a7 Jun 13, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Fix an unwrap Jun 12, 2019
.gitignore Draft hyper implementation Mar 10, 2019
Cargo.lock Fix an unwrap Jun 12, 2019
Cargo.toml Fix an unwrap Jun 12, 2019
LICENSE Create LICENSE Jun 11, 2019 Update Jun 12, 2019

The point of this is to allow your browser to "host" files which can be streamed over HTTP. This requires a proxy server to handle the HTTP requests and forward them to the browser over websockets.

Why would this be useful? If the user has a very large file (genomic data files can easily be in the 20GB-200GB range), and you want to make ranged requests to that file (ie only download specific chunks) as though it were hosted on a normal server, this will allow that. In iobio we use this to allow our backend system to access a user's local files for processing by backend tools such as samtools.

Example usage

First start up the proxy server. We'll assume it's publicly available at You can either download it from the release page, or see below for instructions on building.

Then start it up:

./fibridge-proxy-rs --port 9001

A few useful options:

sudo ./fibridge-proxy-rs --host --port 80 --ip-address --key keyfile.pem --cert certfile.pem --secure-port 443

Create a hoster object in the browser and host a file (see this page for information about the fibridge-host library):

const fibridge = require('fibridge-host');
fibridge.createHoster({ proxyAddress: '', port: 9001, secure: false }).then((hoster) => {

  const file = new File(["Hi there"], "file.txt", {
    type: "text/plain",

  const path = '/' +;

  hoster.hostFile(path, file);

  // This is necessary because fibridge automatically generates a randomized
  // hoster id which is included in the path.
  const fullPath = hoster.getHostedPath(path);
  const url = `${fullPath}`;


That will print out a URL for the hosted file. You can then retrieve the file using any http client:

Hi there

Ranged requests work too:

curl -H "Range: bytes=0-2"<hoster-uuid>/file.txt


In order to build from source, you'll first need rust installed. The proxy currently expects the GUI repo to be available in the same directory, like this:


See fibridge-gui-js for instructions on building the GUI.

Once the GUI is built, run:

cargo build --release

If all goes well you should end up with a binary in fibridge-proxy-rs/target/release.

Other implementations

There is an API-compatible JavaScript (Node) implementation of the proxy server available here.


I still need to document the API, but it's pretty simple. It uses omni-rpc, which is itself built on top of omnistreams.

You can’t perform that action at this time.