Go Language dns seeder for Bitcoin based networks
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lyndsay Roger d26cb31732 Start audit feature and fix race when adding new twistees 9 years ago
vendor/github.com Initial commit of code 9 years ago
.gitignore Initial commit 9 years ago
LICENSE Initial commit 9 years ago
README.md Initial commit of code 9 years ago
crawler.go Start audit feature and fix race when adding new twistees 9 years ago
dnsseeder.go Start audit feature and fix race when adding new twistees 9 years ago
main.go Start audit feature and fix race when adding new twistees 9 years ago
server.go Bug fix for loop on message receive & other fixes 9 years ago

README.md

dnsseeder

Go Language dns seeder for the Twister P2P network

This is a dns seeder for the Twister P2P network

It is based on the original twister-seeder https://github.com/miguelfreitas/twister-seeder

NOTE: This repository is under ongoing development and is likely to break over time. Use at your own risk.

Installing

Simply use go get to download the code:

$ go get github.com/gombadi/dnsseeder

Dependencies are handled by the Go vendor directory.

Note: This means the codebase requires Go 1.5 or higher and use of GO15VENDOREXPERIMENT=1

Usage

$ dnsseeder -h <domain respond to>

An easy way to run the program is with tmux or screen. This enables you to log out and leave the program running.


Command line Options:
-h hostname to serve 
-p port to listen on
-d Produce debug output
-v Produce verbose output
-v Produce stats output

An easy way to run the program is with the following script. Change to suit your system.


#!/bin/bash

LOGDIR=${HOME}/goseederlogs/

mkdir -p ${LOGDIR}

# pass through the logging level needed
if [ -z ${1} ]; then
        LOGLV="-v"
else
        LOGLV="${1}"
fi

cd
echo
echo "======= Run the Go Language dnsseed ======="
echo
${HOME}/go/bin/dnsseeder -h <host.to.serve> -p <port.to.listen.on> ${LOGLV} 2>&1 | tee ${LOGDIR}/$(date +%F-%s)-goseeder.log


RUNNING AS NON-ROOT

Typically, you'll need root privileges to listen to port 53 (name service).

One solution is using an iptables rule (Linux only) to redirect it to a non-privileged port:

$ iptables -t nat -A PREROUTING -p udp --dport 53 -j REDIRECT --to-port 5353

If properly configured, this will allow you to run dnsseeder in userspace, using the -p 5353 option.

License

For the DNS library license see https://github.com/miekg/dns

For the bitcoin library license see https://github.com/btcsuite/btcd