Go library and hub implementation for ADC and NMDC protocols.
Branch: master
Clone or download

README.md

go-dcpp

Go library and hub implementation for ADC and NMDC protocols.

Requires Go 1.11+.

Hub

Features:

  • Fully multi-threaded.
  • Support NMDC, ADC and IRC users on the same hub.
  • Uses a single port for all protocols (protocol auto-detection).
  • Supports TLS for ADC and NMDC.
  • Automatic TLS certificate generation.
  • HTTP pinger support.
  • User registration.
  • Chat rooms.
  • User commands.

TODO:

  • Search between NMDC and ADC.
  • Operators.
  • Extensions and scripts.
  • Spam filters.
  • Get certificates from LetsEncrypt.

Building on Linux

Download and install Go 1.11+ from this page, or install it with Snap:

# install the Snap package manager:
sudo apt install snapd
# install the latest stable Go version:
sudo snap install --classic go

And build the hub binary:

go build ./cmd/go-hub

Building on Windows

Download and install Go 1.11+ from this page. You may also need to install Git.

To build the hub binary, run:

go build .\cmd\go-hub

Running the hub

First, run the hub configuration:

./go-hub init

This will create a file called hub.yml with the default configuration.

To run the hub:

./go-hub serve

Check help for additional commands and flags:

./go-hub -h

Profiling

To enable performance profiling:

./go-hub serve --pprof

A profiling endpoint will be available at http://localhost:6060/debug/pprof.

See pprof documentation for more details.

License

BSD 3-Clause License