Skip to content

Instantly share code, notes, and snippets.

@edsu
Last active December 31, 2018 16:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edsu/f58f9c51787eed29768393432eebc9c5 to your computer and use it in GitHub Desktop.
Save edsu/f58f9c51787eed29768393432eebc9c5 to your computer and use it in GitHub Desktop.
list ip addresses of connections in dat network
#!/usr/bin/env node
Dat = require('dat-node')
Dat('/Users/edsu/Dat/datproject.org', (err, dat) => {
dat.joinNetwork()
dat.network.on('connection', (conn, info) => {
console.log(info.host)
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment