Braiins SV2 Proxy
Braiins SV2 Proxy protects miners whose firmware supports neither Stratum V2 nor verified TLS. It is one program for Linux that runs on a computer in your own network: your miners connect to it inside your LAN, and it connects to Braiins Pool over Stratum V2, which encrypts the connection and verifies that it is talking to the real pool. It installs with one command, runs as a service and has a web interface.
Why it exists
Plain Stratum V1 connections can be intercepted on the way to the pool and the hashrate stolen. Connection Security explains the attack and the ways to protect a miner. Braiins SV2 Proxy is the option for miners that can use neither Stratum V2 nor TLS with certificate validation directly.
This edition is new and may contain bugs. Start with a few miners, and report anything that misbehaves to our support.
So there are two Braiins Proxy tools now?
For now, yes. Braiins SV2 Proxy and the full-featured Braiins Proxy share the same code for routing and aggregating hashrate. What differs is the packaging: the SV2 Proxy is a single program with a simple web interface and a ready-made configuration for Braiins Pool, so it can be set up in one step.
We released it as a separate tool for two reasons. It let us deliver protection against hashrate hijacking quickly, and many miners find the full Braiins Proxy too heavy for what they need.
Soon we will merge the two back into one product, with options that suit both advanced and basic users.
What it does
- Works without configuration. A new installation mines at Braiins Pool over Stratum V2 at once. Each miner mines under its own worker name.
- Secures the connection to the pool. Stratum V2 (encrypted, the pool is authenticated) and Stratum V1 over TLS. One setting refuses every pool that is not secured.
- Accepts Stratum V1 and Stratum V2 miners on the same port (default
3333). Stratum V1 is for any miner; Stratum V2 is for Braiins OS miners. - Splits the hashrate between pools, if you want to. Each pool gets a percentage of the hashrate and can have a backup and a second backup.
- Aggregates miners, optionally: many miners share one pool connection. By default each miner has its own pool connection, so the pool sees each miner separately.
- Built-in services for Braiins OS miners: they get their license through the proxy, and their dev fee connections go through shared pool connections.
- Shows the farm in a web interface: hashrate, miners, pools, events and hashrate history.
- Updates itself with one command and returns to the previous version if the new one does not start.
- Gives metrics for Prometheus at
/metrics.
What you need
- A Linux computer with systemd, for example a Raspberry Pi with Raspberry Pi OS, or a computer with Ubuntu or Debian. On Windows, see Install on Windows.
- A processor of one of these types (command
uname -m):x86_64,aarch64,armv7l. Raspberry Pi 1 and Raspberry Pi Zero are not supported. - An account that can use
sudo(notroot). - Internet access.
- Two free network ports:
8080for the web interface and3333for the miners. - The miners and the proxy computer in the same network.
- A Braiins Pool account to mine at Braiins Pool. The proxy itself needs no account and no configuration.
Install on Linux
Log in to the proxy computer with an ordinary account (not root), or connect to it with SSH. Open a terminal and type:
The command finds the processor type, downloads Braiins SV2 Proxy from downloads.braiins.com, checks the SHA-256 checksum of the download (a damaged or changed file is refused and nothing is installed) and installs the service. sudo asks for the password of the account. The service runs as the account that installs it, and starts by itself with the computer, also without a login.
The three questions
Press Enter to accept the value in brackets:
- If another program uses a port, the install says so and asks again.
- If you press Enter at the password, the install makes a password and shows it at the end. Write it down: the proxy keeps only a hash of the password and cannot show it again.
The result
The end of the output (the addresses and the password are examples):
When the ufw firewall is on, the install opens its two ports. Other firewalls it does not change: open ports 8080 and 3333 in them by hand.
Install without the one command
-
Download the file for your processor from downloads.braiins.com/braiins-proxy:
-
Compare the checksum with the SHA-256 value on the download page. The two values must be the same:
-
Unpack and install:
Install on Windows (WSL2)
Braiins SV2 Proxy runs on Windows inside WSL2.
-
Install WSL2 with Ubuntu and turn on systemd in it. The installer tells you the command when something is missing.
-
Open PowerShell as Administrator and type:
-
Answer the same three questions as on Linux. At the end the installer asks for your Windows password: the proxy then starts with Windows, also without a login.
The installer installs the same service inside WSL and sets up the Windows side: firewall rules, port forwarding to WSL and a startup task. To remove everything, run the script again with -Uninstall.
Connect your miners
- In each miner, set the pool URL to the "Point your miners to" address from the install, for example
stratum+tcp://192.168.1.50:3333, with your usual User ID (userName.workerName). The Overview page of the web interface shows the same address with a Copy button. - Braiins OS miners can connect over Stratum V2 too: the Overview page shows a Stratum V2 address with the proxy's own key.
- As a backup pool entry, use a second Braiins SV2 Proxy. It can run on the same computer with its own ports (a different web interface port and a different port for miners), or on another computer in your network. The proxy itself already falls back between the Braiins Pool endpoints; the second proxy covers the case that the first proxy is down, and a second computer also covers the case that the first computer is down.
- Remove every other pool entry from the miner. A backup that goes straight to the pool over plain Stratum V1 (
stratum+tcp://) would undo the protection. - Check that the miners appear on the Miners page of the web interface and as workers on your Braiins Pool dashboard.
Configuration
None is needed. A new installation uses the default Braiins configuration, and the miners mine under their own worker names:
You can change it in the web interface: Pools & Routing → My own configuration. There you can:
- set the port for miners;
- add pools, each with a protocol (Stratum V2, Stratum V1 + TLS, or plain Stratum V1), an address, an optional pool user name and a share of the hashrate, plus a backup and a second backup;
- choose one last-resort backup pool;
- turn on Aggregate miners (many miners share one pool connection) or keep One connection per miner;
- turn on Allow only encrypted and authenticated pool connections, which refuses any plain
stratum+tcp://pool, also as a backup.
Save and apply applies the configuration at once. Use the default Braiins configuration returns to the default.
Web interface
Open the "Web interface" address from the install in a browser on a computer in the same network, type the password and click Log in.
- Overview: connected miners, hashrate, pools and their state, and the addresses for the miners.
- Miners: each connected miner with its worker name, address, protocol, hashrate, difficulty and pool.
- Events: miners that connect and disconnect, pool outages, configuration changes.
- Pools & Routing: the configuration, see above.
- Settings: how long to keep the history, and the daily check for a new version.
On the proxy computer itself, http://127.0.0.1:8080 opens without a password. A login stays valid for 30 days.
Forgotten password: on the proxy computer, type sudo braiins-proxy reset-password. It asks for a new password, or makes one if you press Enter, and restarts the service. The web interface cannot change the password.
Update and roll back
When a new version is available, the Overview page shows a message with its release notes. To install it, type on the proxy computer:
The update keeps the ports, the configuration, the history and the password. If the new version does not start within 30 seconds, it puts the previous version back.
To go back to the previous version yourself:
Operation
The configuration is in ~/.config/braiins-proxy/config.toml of the account that runs the service (only after Save and apply), and the history in ~/.local/state/braiins-proxy/history.db.
Troubleshooting
Good to know
- The connection between the proxy and Braiins Pool cannot be hijacked: the proxy checks the pool's key and refuses any server that cannot prove it is Braiins Pool. An attacker who hijacks the route can still cut the connection, so the proxy may reconnect from time to time.
- The connection between the miners and the proxy stays inside your own network.
- The proxy needs internet access for the pools, the Braiins OS licenses and the updates.
- To see the web interface from outside your network, use an SSH tunnel to the proxy computer, for example
ssh -L 8080:127.0.0.1:8080 <account>@<proxy computer>, then openhttp://localhost:8080.