Skip to content

molepool/moleproxy

Repository files navigation

moleproxy

Lightweight TCP↔TLS proxy for ASIC miners connecting to Molepool.

MoleProxy is a lightweight standalone TCP↔TLS bridge between ASIC miners and the Molepool mining pool. It is used to connect devices that do not support TLS to Molepool pools where encrypted connections are required.

Description

The program accepts connections from miners over TCP and establishes a TLS connection with the pool. Data is relayed transparently without altering the Stratum protocol. Packet logging, share submission logging, and automatic reconnection on disconnect are supported.

Project structure

moleproxy.go — main source code config.json — configuration file build_linux.sh — Linux build script build_windows.cmd — Windows build script go.mod — Go module information

Configuration

The config.json file must be located in the same directory as the executable.

Example:

{
  "listen": "192.168.100.6:3333",
  "pool": "eu.molepool.com:3333",
  "tls": true,
  "logPackets": true,
  "logShares": true,
  "reconnect": 5
}

Fields:

listen — address and port where MoleProxy listens for miner connections pool — remote pool address and port tls — enable TLS when connecting to the pool logPackets — log Stratum packets logShares — log events (connections, submits, notifies) reconnect — reconnection interval in seconds after disconnection

Build

Linux

chmod +x build_linux.sh  
./build_linux.sh  

or manually:

go build moleproxy.go

Result: binary file moleproxy

Windows

Run build_windows.cmd

or manually:

go build moleproxy.go

Result: moleproxy.exe

Dependencies

Go version 1.20 or higher OS: Linux or Windows No external dependencies

Run

Before running, ensure that config.json is located next to the binary file.

Linux:

./moleproxy

Windows:

moleproxy.exe

Example output

[Bridge] Listening on 192.168.100.6:3333 → eu.molepool.com:3333 (TLS=true)
[Bridge] connected to pool via TLS: eu.molepool.com:3333
[Miner] 192.168.100.10 connected
[Share] user.submit
[Miner] offline user 192.168.100.10

Purpose

Used as an intermediate TLS proxy in the Molepool infrastructure. Allows ASIC miners without native TLS support to securely connect to Molepool pools.

About

Lightweight TCP↔TLS proxy for ASIC miners connecting to Molepool.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages