Nayancode · Bridge
Nayancode Bridge
A small program that lets the Workbench run heavy native tools, such as GROMACS, on your own computer. You start it yourself, it listens only on your machine, and nothing is sent to Solagene.
What it is
The missing link between the browser and your installed tools
The browser cannot start GROMACS or samtools by itself. The Bridge is a single Node.js file that you download and run. It exposes a local address that the Workbench can talk to, and it starts only the programs you allow.
It is not a service from Solagene. There is no Solagene account, no cloud job and no upload to Solagene: the page sends files only to the Bridge on your own machine. The program runs on your computer, under your user, with your files.
Need a browser-only tool? Everything in the free tools and most apps runs without the Bridge. Read how tools run on your device.
Download
Get the Bridge
The file is plain JavaScript for Node.js, with no dependencies. Download it, then check the SHA-256 before running it.
SHA-256
3c1c71909f70da04351f932ba5acaf89267dcb667666223181a63ad79e0b43a6Checking the file in your browser…
Check from a terminal: sha256sum nayancode-bridge.mjs on Linux or macOS, or Get-FileHash .\nayancode-bridge.mjs -Algorithm SHA256 in PowerShell.
Licence: MIT. Read the source.
Install and start
Three steps, one terminal
You need Node.js 18 or newer. Check with node --version. Then download and start the program in a terminal. Keep the terminal open while you use it.
Linux or macOS
Windows (PowerShell)
The Bridge prints a URL (http://127.0.0.1:8787 by default) and a random token. Keep the token private. Press Ctrl+C to stop.
Connect
Point the Workbench at your copy
Open the Workbench and find the Nayancode Bridge card. Paste the URL and the token the Bridge printed, then connect. The card lists the tools that were found and the graphics hardware on that machine.
Programs it can drive by default
- gmx
- gmx_mpi
- samtools
- bcftools
- minimap2
- bwa
- bwa-mem2
- STAR
- fastp
- seqtk
- nvidia-smi
Change the list with --allow. A program must be installed and found on PATH.
Security model
Why it is hard to misuse
- Loopback only. The default address is 127.0.0.1, so other machines cannot reach it. For a remote machine, use your own SSH tunnel.
- A random token. Every request must carry the token printed at start. It is compared in constant time and never stored by the website.
- Origin and Host checks. Requests from websites it was not started with are rejected, and the Host header must be a loopback name. That blocks other sites and DNS rebinding.
- Allow-listed programs only. A request names a program from the list; the Bridge finds it through PATH. A path supplied by the page is never used.
- No shell. Programs start with an argument array, never through bash or sh. The Bridge never runs bash, sh, python, node or rm, and arguments cannot escape the job folder.
- Limits and clean-up. Concurrent runs, run time, upload size and log size are limited. Job folders are removed, and Ctrl+C stops everything.
Remote use
A lab server, HPC node or cloud GPU
Run the Bridge on the machine that has the tools and the data, then forward its loopback port to your computer. On your computer, run:
Start node nayancode-bridge.mjs on the server, then connect the Workbench to http://127.0.0.1:8787 with the token. Do not expose the Bridge directly to the internet. For a cloud notebook, use a private tunnel that you create and start the Bridge with --origin and --allow-host for that hostname.
It is designed to be hard to misuse: it listens on 127.0.0.1 only, requires a random token, checks the page origin and Host header, runs only allow-listed programs through PATH with no shell, keeps file arguments inside the job folder, and cleans up job folders. The source is one readable file under the MIT licence: check the SHA-256 above before you run it.
No. It rejects requests from any web origin it was not started with. The defaults are https://solagene.com, https://www.solagene.com and local development addresses; you can add your own with --origin.
Yes. Press Ctrl+C in the terminal. The Bridge stops the server and kills any program it started. Closing the terminal also stops it.
No. Files travel only between the Workbench page in your browser and the Bridge on your computer, over loopback or your own SSH tunnel. Solagene has no server in that path.
Only the programs on its allow-list. The default list is shown above; you can change it when you start the Bridge with --allow. It never runs a shell, Python, Node or rm.
Node.js 18 or newer and the native programs you want, installed and found on PATH. GROMACS, samtools, bcftools, minimap2, BWA, STAR, fastp and seqtk are supported by default.