MCPcopy Index your code
hub / github.com/direct-connect/go-dcpp

github.com/direct-connect/go-dcpp @v0.26.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.26.0 ↗ · + Follow
1,107 symbols 3,194 edges 84 files 109 documented · 10%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

GoHub

Github Release

Direct Connect hub implementation for ADC and NMDC protocols (and beyond).

Requires Go 1.12+.

Features:

  • Fully multi-threaded.
  • Support NMDC, ADC and IRC users on the same hub.
  • Uses a single port for all protocols (protocol auto-detection).
  • Search and chat between NMDC and ADC.
  • Supports TLS for ADC (adcs://) and NMDC (nmdcs://).
  • Automatic TLS certificate generation.
  • HTTP(S) pinger support.
  • User registration, profiles and operators.
  • User commands.
  • Chat rooms.
  • Go plugins.
  • LUA scripts.
  • PtokaX LUA scripts support.
  • Flood filters.

TODO:

  • Spam filters.
  • Get certificates from LetsEncrypt.

Building on Linux

Download and install Go 1.12+ 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.12+ 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 create a user with admin permissions:

./go-hub user add "Bob" "MyPass" root 

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

Extension points exported contracts — how you extend this code

Database (Interface)
(no doc) [26 implementers]
hub/users.go
Plugin (Interface)
(no doc) [5 implementers]
hub/plugins.go
SearchRequest (Interface)
(no doc) [3 implementers]
hub/search.go
Registry (Interface)
Registry is an interface for a hublist registry.
hublist/autoreg/autoreg.go
Instance (Interface)
(no doc) [2 implementers]
hub/plugins/lua/lua.go
File (Interface)
(no doc) [1 implementers]
adc/client/client2client.go
PeerTopic (Interface)
(no doc) [1 implementers]
hub/peer.go
UserDatabase (Interface)
(no doc) [2 implementers]
hub/users.go

Core symbols most depended-on inside this repo

New
called by 113
hub/plugins/lua/lua.go
Close
called by 84
hub/peer.go
Name
called by 69
hub/peer.go
String
called by 64
hub/plugins.go
Logf
called by 47
hub/logs.go
Online
called by 39
hub/peer.go
RemoteAddr
called by 38
hub/peer.go
Close
called by 30
hub/plugins/lua/lua.go

Shape

Method 833
Function 133
Struct 109
Interface 19
TypeAlias 11
FuncType 2

Languages

Go100%

Modules by API surface

hub/hub_nmdc.go66 symbols
hub/hub.go65 symbols
hub/users.go63 symbols
hub/hub_adc.go55 symbols
hub/plugins/lua/px/core.go50 symbols
hub/plugins/lua/lua.go46 symbols
hub/peer.go45 symbols
hub/cmds.go43 symbols
adc/client/client2hub.go36 symbols
hub/hubdb/hubdb.go35 symbols
hub/plugins/lua/px/settings.go34 symbols
nmdc/conn.go32 symbols

For agents

$ claude mcp add go-dcpp \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page