Skip to content
TLS proxy server for NMDC protocol | Support hub: nmdcs://
Go C Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
certs automatically generate TLS certificate May 16, 2019
LICENSE Initial commit Apr 5, 2019 Add TLS version to $MyIP command Apr 20, 2019
go.mod don't compile metrics by default Apr 11, 2019

TLS proxy

TLS proxy server for NMDC protocol. Currently supported by Verlihub and later.

Generate self signed certificate

openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out "CertName.crt" -keyout "KeyName.key"

Install GoLang

In order to install latest version:

sudo snap install --classic go

Else use:

sudo apt-get install golang

Compile proxy server

git clone
cd tls-proxy
go build proxy.go

With metrics:

go build --tags metrics proxy.go

Start proxy server

./proxy --cert="/path/to/CertName.crt" --key="/path/to/KeyName.key" --host="" --hub="" is the proxy listening socket, the address that hub would normally be listening on. is the hub listening socket, the address that accepts connections from the proxy. Add & at the end of command to run the process in background.

Configure the hub

!set listen_ip

!set tls_proxy_ip

Then start the hub as usual.

Protocol specification

Following command is sent to the hub right after the connection is established:

$MyIP 1.0| is the real IP address of connected user. Second parameter stands for TLS version used by client, in case of non secure connection, 0.0 is passed to hub.

Important to know

Remember to set twice the regular ulimit before starting both servers, because there will be twice as many connections than you would usually have.

You can’t perform that action at this time.