Lurker News
I'm thinking of tiny projects along the lines of single-function tools like domainr. But also game-changing ebooks, newsletters, courses.

Comments (868) 410 threads

Show all comments

Showing thread 68 of 410

gregfjohnson#
https://github.com/gregfjohnson/netnode

Netnode. It is a little like a unix pipe, a little like netcat, a little like tcpdump. But really simple.
You create a graph of communicating entities with netnode. The terminal nodes of the graph are external data sources/sinks (user input, udp/tcp servers and clients, shell pipes, named pipes, /dev/tty*, etc.) The internal nodes are a mesh of instances of netnode.
It is easy to insert a little instance of netnode anywhere, and have it print the traffic going through it.
I think it turned out really well, and I use it for everything. It feels like "connective tissue" similar to classic Unix pipes, but for the network age.
./netnode -h

    -p/-P:  tcp client/server.
    -u/-U:  udp client/server; client does pings to notify server.
    -k:     stdin/stdout.
    -s:     filename.  works for /dev/ttyS0 etc., named pipes, regular files.
    -X:     tcp proxy; local_server:remote_host:remote_port
    -w:     raw network device interface eth0 etc.  (requires sudo.)

    -i      next interface is input only
    -o      next interface is output only

    -d:     next interface is prefaced with time/direction
    -t:     next interface shows non-printable characters in hex
    -b:     next interface prints data formatted as hex dump