Categorygithub.com/isobit/ndog
repositorypackage
0.0.11
Repository: https://github.com/isobit/ndog.git
Documentation: pkg.go.dev

# README

ndog

Ndog is like Ncat, but friendlier! It is a networking multitool that can act as a client or server for a number of network schemes/protocols.

:warning: This project is under active development and is subject to major breaking changes prior to the 1.0 release.

Features/goals (unchecked boxes have not been implemented yet):

  • Composability with other UNIX-philosophy tools
    • Streams multiplexed over STDIN/STDOUT
    • Spawn subprocesses to handle individual streams (--exec)
  • Listening (act like a server)
  • Connecting (act like a client)
  • Proxying (bridge listen and connect)
  • Support for many more schemes/protocols than just TCP and UDP
    • TCP
    • UDP
    • HTTP
    • WebSockets
    • PostgreSQL
    • SSH
    • QUIC
    • GraphQL
    • More schemes TBD!
  • Support for TLS
  • Interactive terminal user interface
    • Autocomplete per scheme/protocol
  • Recording and playback with pattern matching

Concepts

Ndog represents all schemes using streams, which are bidirectional (duplex) byte streams. Streams can be multiplexed together (e.g. when listening with no --exec), or handled individually (e.g. by an --exec subprocess).

ContextReadWrite
ListenData from client (request)Data to client (response)
ConnectData from server (response)Data to server (request)

Schemes

SchemeStream perDefault representation
tcpTCP connectionRaw data
udpUDP remote addressRaw data
wsWebSocketRaw data
httpHTTP requestRequest/response body
postgresql, postgresPostgreSQL connectionSQL statements/row CSV

Examples

DescriptionIncantation
Start a TCP server on port 8000, all interfacesndog -l tcp://:8000
Start a UDP server on port 8125, localhostndog -l udp://localhost:8125
Start an HTTP server on port 8080, all interfacesndog -l http://:8080
Serve current directory file system over HTTP serverndog -l http://localhost:8080 -o serve_file=.
Connect to a TCP server on port 8000, localhostndog -c tcp://localhost:8000
Connect to a UDP server on port 8125, localhostndog -c udp://localhost:8000