# HG changeset patch # User d3v11 # Date 1322368366 21600 # Node ID 9b9387fead636e28987d88f59db139c285e40180 # Parent 63617812958c5bb6d7853027c11461e0c523d441# Parent a253a7be0c7b1c49b7b79de118aaee50c2160bd2 Merge branch 'master' of git://git1.srn.ano diff -r a253a7be0c7b -r 9b9387fead63 contrib/peer2anonet/DEBIAN/configure --- a/contrib/peer2anonet/DEBIAN/configure Thu Nov 24 21:42:32 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -#!/bin/bash -read -p "Enter your anonet network: " P2A_NET -read -p "Enter your anonet router: " P2A_ROUTE -read -p "Enter your anonet asn: " P2A_ASN -read -p "Enter your anonet ip: " P2A_IP - -echo "P2A_NET=\"$P2A_NET\"" >>DEBIAN/peer2anonet/etc/peer2anonet/p2a.conf -echo "P2A_ROUTE=\"$P2A_ROUTE\"" >>DEBIAN/peer2anonet/etc/peer2anonet/p2a.conf -echo "P2A_ASN=\"$P2A_ASN\"" >>DEBIAN/peer2anonet/etc/peer2anonet/p2a.conf -echo "P2A_IP=\"$P2A_IP\"" >>DEBIAN/peer2anonet/etc/peer2anonet/p2a.conf diff -r a253a7be0c7b -r 9b9387fead63 contrib/peer2anonet/DEBIAN/control --- a/contrib/peer2anonet/DEBIAN/control Thu Nov 24 21:42:32 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -Source: peer2anonet -Priority: optional -Maintainer: d3v11 -Version: 1.0-0 -Package: peer2anonet -Architecture: all -Depends: bash(>= 4.1) -Description: peer2anonet 1.0-0 - peer2anonet is an autoconfiguration utility to easily establish a - peering session with BGP on AnoNet2. - - diff -r a253a7be0c7b -r 9b9387fead63 contrib/peer2anonet/README --- a/contrib/peer2anonet/README Thu Nov 24 21:42:32 2011 +0000 +++ b/contrib/peer2anonet/README Sat Nov 26 22:32:46 2011 -0600 @@ -1,20 +1,112 @@ DESCRIPTION: - peer2anonet is an autoconfiguration utility to easily establish a - peering session with BGP on AnoNet2. + + peer2anonet is an autoconfiguration utility for setting + up core services on AnoNet2. Enjoy :-). DEPENDS ON: - quicktun, bird, daemontools(non-deb), bash + + quicktun, bird, daemontools(non-deb), bash + +AUTHOR: + + d3v11 from www.d3v11.ano somtimes, maybe, dunno. + + REPORT BULLSHIT TO: + + IRC: + + /relayhell/d3v11 + + EMAIL: + + d3v11@d3v11.ano USAGE: - --configure generate a new local configuration and exit + ./contrib/peer2anonet/peer2anonet --configure generate a new local configuration and exit + + ./contrib/peer2anonet/peer2anonet --update regenerate peer configurations + + ./contrib/peer2anonet/peer2anonet --configure-peer generate a new peer configuration and update + + ./contrib/peer2anonet/peer2anonet --rm-peer remove a peer configuration and update + + ./contrib/peer2anonet/peer2anonet --install-daemontools installs daemontools + + ./contrib/peer2anonet/peer2anonet --install-ucspi-tcp installs ucspi-tcp + + ./contrib/peer2anonet/peer2anonet --install-djbdns installs djbdns + + ./contrib/peer2anonet/peer2anonet --configure-dns configures dnscache and tinydns zones + +RTFM: + + CONFIGURE: - --update regenerate peer configurations + I highly recommend that before you use peer2anonet + you ./configure resdb with tinydns support. + + ./contrib/peer2anonet/peer2anonet --configure + + EXAMPLES: + + Enter your AnoNet subnet: 1.2.3.0 + Enter your AnoNet router: 1.2.3.1 + Enter your peering ip: 1.2.3.4 + Enter your AnoNet asn: 1234 + + CONFIGURE PEER: + + ./contrib/peer2anonet/peer2anonet --configure-peer + + KEY PAIRS: + + before running peer2anonet to configure peers you can use + quicktun to generate keypairs: - --configure-peer generate a new peer configuration and update + quicktun.keypair/etc/peer2anonet/p2a.conf echo "P2A_ROUTE=\"$P2A_ROUTE\"">>/etc/peer2anonet/p2a.conf echo "P2A_IP=\"$P2A_IP\"">>/etc/peer2anonet/p2a.conf echo "P2A_ASN=\"$P2A_ASN\"">>/etc/peer2anonet/p2a.conf echo -e '\npeer2anonet: configured\n' + + NICK=`cat conf/git_name` + ./scripts/add_as $P2A_ASN $NICK + ./scripts/add_ip $P2A_NET/24 $NICK exit 0 } UPDATE(){ + if [ -e /etc/peer2anonet/p2a.conf ]; then + source /etc/peer2anonet/p2a.conf + else + CONFIGURE + exit 0 + fi + echo -e '\nUPDATE:\n' if [[ $(ls /etc/peer2anonet/peers) ]]; then for PEER in `ls /etc/peer2anonet/peers`; do @@ -164,7 +181,6 @@ for PEER in `ls /etc/peer2anonet/peers`; do mkdir -p /services/"$PEER" - PEERNAME="$PEER" REMOTEIP=`cat /etc/peer2anonet/peers/"$PEER"/remote_ip` PEERIP=`cat /etc/peer2anonet/peers/"$PEER"/peering_ip` PEERPORT=`cat /etc/peer2anonet/peers/"$PEER"/port` @@ -173,7 +189,7 @@ SECKEY=`cat /etc/peer2anonet/peers/"$PEER"/seckey` echo " -protocol bgp $PEERNAME { table AnoNet_routes; +protocol bgp $PEER { table AnoNet_routes; local as $P2A_ASN; neighbor $PEERIP as $PEERASN; source address $P2A_IP; @@ -181,7 +197,10 @@ export filter only_AnoNet_ebgp_export; }" >> /services/bird/bird.conf - echo "#!/bin/bash + if [ -e /etc/peer2anonet/peers/"$PEER"/run ]; then + cp /etc/peer2anonet/peers/$PEER/run /services/"$PEER"/run + else + echo "#!/bin/bash # uncomment if your peer has a dynamic IP # #export REMOTE_FLOAT=1 @@ -193,11 +212,11 @@ export REMOTE_ADDRESS=$REMOTEIP export REMOTE_PORT=$PEERPORT -export LOCAL_PORT=2${PEERASN:0:5} +export LOCAL_PORT=20${PEERASN:0:4} export PRIVATE_KEY=$SECKEY export PUBLIC_KEY=$PUBKEY export TUN_MODE=1 -export INTERFACE=ppp-$PEERNAME +export INTERFACE=ppp-$PEER # uncomment if you want to nuke your default gateway and configure # routes only to peers through IcannNet. If any of your peers use @@ -218,48 +237,188 @@ # trick used to help bird connect. ping -c 1 -I \$INTERFACE $PEERIP -r -w 5 ) & -exec /usr/sbin/quicktun.nacltai" > /services/"$PEERNAME"/run - chmod +x /services/"$PEERNAME"/run - test -L "/service/$PEERNAME" || ln -s "/services/$PEERNAME" "/service/$PEERNAME" - svc -d "/service/$PEERNAME" && svc -u "/service/$PEERNAME" +exec /usr/sbin/quicktun.nacltai" > /etc/peer2anonet/peers/$PEER/run + cp /etc/peer2anonet/peers/$PEER/run /services/"$PEER"/run + fi + chmod +x /services/"$PEER"/run + test -L "/service/$PEER" || ln -s "/services/$PEER" "/service/$PEER" done test -L /service/bird || ln -s /services/bird /service/bird echo configure | birdc } CONFIGURE_PEER(){ + if [ -e /etc/peer2anonet/p2a.conf ]; then + source /etc/peer2anonet/p2a.conf + else + CONFIGURE + exit 0 + fi + echo -e '\nCONFIGURE PEER:\n' - read -p " Enter your peer's name: " PEERNAME + read -p " Enter your peer's name: " PEER read -p " Enter your peer's remote ip: " REMOTEIP read -p " Enter your peer's peering ip: " PEERIP read -p " Enter your peer's remote port: " PEERPORT read -p " Enter your peer's asn: " PEERASN read -p " Enter your peer's public key: " PUBKEY read -p " Enter your private key: " SECKEY - mkdir -p /etc/peer2anonet/peers/"$PEERNAME" - echo $REMOTEIP >/etc/peer2anonet/peers/"$PEERNAME"/remote_ip - echo $PEERIP >/etc/peer2anonet/peers/"$PEERNAME"/peering_ip - echo $PEERPORT >/etc/peer2anonet/peers/"$PEERNAME"/port - echo $PEERASN >/etc/peer2anonet/peers/"$PEERNAME"/asn - echo $PUBKEY >/etc/peer2anonet/peers/"$PEERNAME"/pubkey - echo $SECKEY >/etc/peer2anonet/peers/"$PEERNAME"/seckey - echo -e "\n configured $PEERNAME\n" + [ -e /etc/peer2anonet/peers/"$PEER" ] && rm -r /etc/peer2anonet/peers/"$PEER" + mkdir -p /etc/peer2anonet/peers/"$PEER" + echo $REMOTEIP >/etc/peer2anonet/peers/"$PEER"/remote_ip + echo $PEERIP >/etc/peer2anonet/peers/"$PEER"/peering_ip + echo $PEERPORT >/etc/peer2anonet/peers/"$PEER"/port + echo $PEERASN >/etc/peer2anonet/peers/"$PEER"/asn + echo $PUBKEY >/etc/peer2anonet/peers/"$PEER"/pubkey + echo $SECKEY >/etc/peer2anonet/peers/"$PEER"/seckey + echo -e "\n configured $PEER\n" } RM_PEER(){ + if [ -e /etc/peer2anonet/p2a.conf ]; then + source /etc/peer2anonet/p2a.conf + else + CONFIGURE + exit 0 + fi + echo -e '\nRM PEER:\n' - read -p " Enter your peer's name: " PEERNAME - if [ -e /etc/peer2anonet/peers/"$PEERNAME" ]; then - rm -r /etc/peer2anonet/peers/"$PEERNAME" + read -p " Enter your peer's name: " PEER + if [ -e /etc/peer2anonet/peers/"$PEER" ]; then + rm -r /etc/peer2anonet/peers/"$PEER" echo - echo -e " removed /etc/peer2anonet/peers/$PEERNAME\n" + echo -e " removed /etc/peer2anonet/peers/$PEER\n" else echo - echo -e " error: /etc/peer2anonet/peers/$PEERNAME not exists\n" + echo -e " error: /etc/peer2anonet/peers/$PEER not exists\n" exit 1 fi } +INSTALL_DAEMONTOOLS(){ + echo -e '\nINSTALL DAEMONTOOLS:\n' + [[ $(echo X`which gcc`) == X ]] && echo ' error: cannot find gcc' + [[ $(echo X`which gcc`) == X ]] && exit 1 + [[ $(echo X`which make`) == X ]] && echo ' error: cannot find make' + [[ $(echo X`which make`) == X ]] && exit 1 + [[ $(echo X`which csh`) == X ]] && echo ' error: cannot find csh' + [[ $(echo X`which csh`) == X ]] && exit 1 + mkdir -p /package + chmod 1755 /package + cd /package + wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz + gunzip daemontools-0.76.tar + tar -xpf daemontools-0.76.tar + rm -f daemontools-0.76.tar + cd admin/daemontools-0.76 + sed -i 's/gcc/gcc -include errno.h/g' src/conf-cc + package/install + cp /etc/rc.local /etc/peer2anonet/rc.local.backup + sed -i "s/exit 0/csh -cf \'\/command\/svscanboot \&\'/" /etc/rc.local + chmod +x /etc/rc.local + } + +INSTALL_UCSPI_TCP(){ + echo -e '\nINSTALL UCSPI-TCP:\n' + [[ $(echo X`which gcc`) == X ]] && echo ' error: cannot find gcc' + [[ $(echo X`which gcc`) == X ]] && exit 1 + [[ $(echo X`which make`) == X ]] && echo ' error: cannot find make' + [[ $(echo X`which make`) == X ]] && exit 1 + cd /usr/local/src + wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz + gunzip ucspi-tcp-0.88.tar + tar -xf ucspi-tcp-0.88.tar + cd ucspi-tcp-0.88 + sed -i 's/gcc/gcc -include errno.h/g' conf-cc + make + make setup check + } + +INSTALL_DJBDNS(){ + echo -e '\nINSTALL DJBDNS:\n' + [[ $(echo X`which gcc`) == X ]] && echo ' error: cannot find gcc' + [[ $(echo X`which gcc`) == X ]] && exit 1 + [[ $(echo X`which make`) == X ]] && echo ' error: cannot find make' + [[ $(echo X`which make`) == X ]] && exit 1 + cd /usr/local/src + wget http://cr.yp.to/djbdns/djbdns-1.05.tar.gz + gunzip djbdns-1.05.tar + tar -xf djbdns-1.05.tar + cd djbdns-1.05 + echo gcc -O2 -include /usr/include/errno.h > conf-cc + make + make setup check + } + +CONFIGURE_DNS(){ + if [ -e /etc/peer2anonet/p2a.conf ]; then + source /etc/peer2anonet/p2a.conf + else + CONFIGURE + exit 0 + fi + + echo -e '\nCONFIGURE DNS:\n' + NICK=`cat conf/git_name` + TINYDNS_ROOT_IP=`cat conf/tinydns__rootsrvrip` + TINYDNS_ROOT_DOMAIN=`cat conf/tinydns__rootsrvrname` + TINYDNS_ANO_IP=`cat conf/tinydns__tldsrvrip` + TINYDNS_ANO_DOMAIN=`cat conf/tinydns__tldsrvrname` + TINYDNS_IP=`cat db/dom/ano/$NICK/ns/a.ns.$NICK.ano` + TINYDNS_DOMAIN="a.ns.$NICK.ano" + GIT_IP=`cat conf/gitd_ip` + GIT_DOMAIN="git.$NICK.ano" + + ip addr add $TINYDNS_ROOT_IP/32 dev lo & + ip addr add $TINYDNS_IP/32 dev lo & + ip addr add $TINYDNS_ANO_IP/32 dev lo & + ip addr add $GIT_IP/32 dev lo & + + echo "ip addr add $TINYDNS_ROOT_IP/32 dev lo &" >> /etc/rc.local + echo "ip addr add $TINYDNS_IP/32 dev lo &" >> /etc/rc.local + echo "ip addr add $TINYDNS_ANO_IP/32 dev lo &" >> /etc/rc.local + echo "ip addr add $GIT_IP/32 dev lo &" >> /etc/rc.local + + useradd Gdnscache + useradd Gdnslog + useradd Gtinydns + + dnscache-conf Gdnscache Gdnslog /services/dnscache + mv /services/dnscache/root/servers/@ /services/dnscache/root/servers/@.icann + echo $TINYDNS_ROOT_IP >/services/dnscache/root/servers/@ + echo 'nameserver 127.0.0.1' >/etc/resolv.conf + ( cd / ; ln -s /services/dnscache /service/dnscache ) + + tinydns-conf Gtinydns Gdnslog /services/tinydns $TINYDNS_IP + ( cd / ; ln -s /services/tinydns /service/tinydns ) + echo ".$NICK.ano:$TINYDNS_IP:a:259200" > /services/tinydns/root/data + echo "=www.$NICK.ano:$GIT_IP:86400" >> /services/tinydns/root/data + echo "+git.$NICK.ano:$GIT_IP:86400" >> /services/tinydns/root/data + echo "+$NICK.ano:$GIT_IP:86400" >> /services/tinydns/root/data + echo "+a.anons.$NICK.ano:$TINYDNS_ANO_IP:3600" >> /services/tinydns/root/data + echo ".1.in-addr.arpa::a.anons.$NICK.ano" >> /services/tinydns/root/data + echo ".2.in-addr.arpa::a.anons.$NICK.ano" >> /services/tinydns/root/data + echo ".ano::a.anons.$NICK.ano" >> /services/tinydns/root/data + echo ".ntwrk::a.anons.$NICK.ano" >> /services/tinydns/root/data + #( cd /service/tinydns/root ; ./add-ns $TINYDNS_DOMAIN $TINYDNS_IP ) + #( cd /service/tinydns/root ; ./add-alias $GIT_DOMAIN $GIT_IP ) + #( cd /service/tinydns/root ; ./add-alias $TINYDNS_ANO_IP $TINYDNS_ROOT_IP ) + #( cd /service/tinydns/root ; ./add-alias $TINYDNS_ANO_DOMAIN $TINYDNS_ANO_IP ) + ( cd /service/tinydns/root ; make ) + + tinydns-conf Gtinydns Gdnslog /services/tinydns-root $TINYDNS_ROOT_IP + ( cd / ; ln -s /services/tinydns-root /service/tinydns-root ) + ./scripts/nameserver_autogen/tinydns_root_datafile > /service/tinydns-root/root/data + ( cd /service/tinydns-root/root ; make ) + + tinydns-conf Gtinydns Gdnslog /services/tinydns-ano $TINYDNS_ANO_IP + ( cd / ; ln -s /services/tinydns-ano /service/tinydns-ano ) + ./scripts/nameserver_autogen/tinydns_tld_datafile > /service/tinydns-ano/root/data + ( cd /service/tinydns-ano/root ; make ) + + ( cd /service ; sleep 5 ; svc -t dnscache tinydns tinydns-ano tinydns-root ) + } + if [ "$1" == '--configure' ]; then CONFIGURE @@ -271,6 +430,14 @@ elif [ "$1" == '--rm-peer' ]; then RM_PEER UPDATE +elif [ "$1" == '--install-daemontools' ]; then + INSTALL_DAEMONTOOLS +elif [ "$1" == '--install-ucspi-tcp' ]; then + INSTALL_UCSPI_TCP +elif [ "$1" == '--install-djbdns' ]; then + INSTALL_DJBDNS +elif [ "$1" == '--configure-dns' ]; then + CONFIGURE_DNS else USAGE fi diff -r a253a7be0c7b -r 9b9387fead63 contrib/splicex/CHANGES --- a/contrib/splicex/CHANGES Thu Nov 24 21:42:32 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,63 +0,0 @@ -CHANGES: - - d3v11 - Sat Oct 22 2011: - - SpliceX is the new replacement for Splice3. - it includes some new options and should be - compatible with most versions of Python. - - see README, splicex --help, splicex --rtfm - - d3v11 - Sun Oct 23 2011: - - Added some colour enhancements to SpliceX - :-). This is a useless update but i thought - it was fun. - - Also, I trimmed down much unnecessary - code. - - 'deshadow' bug fixed in splicex.py src - - d3v11 - Fri Oct 28 2011: - - SpliceX now compiles to machine language - via Cython. see README for dependencies - and installation details. - - SpliceX compiler flags patched. recent - update did not distinguish: - - /usr/include/ - - -FROM- - - /usr/local/include/ - - Thus, if you have debian python-dev or - source python-dev the ./configure script - should choose the appropriate option. - if the configure still failed to locate - the python development files (headers) - please let me know and I will correct. - - SpliceX can now optionally do a pure - python install. This cuts down on - dependencies and is useful if you just - want to test, try, and/or debug. - - SpliceX now detects invalid arguments - and prints with error message. - - d3v11 - Sat Oct 29 2011: - - Old timing bug is now fixed. --time now - how a consistant tracking of how many - passwords and how much time has elapsed - among each brute force algorithm. This - new patch also simplified the code and - makes the functions faster. Much code - has been trimmed from splicex without - removing any options or functionality. - - --no-char bug fixed diff -r a253a7be0c7b -r 9b9387fead63 contrib/splicex/DEBIAN/control --- a/contrib/splicex/DEBIAN/control Thu Nov 24 21:42:32 2011 +0000 +++ b/contrib/splicex/DEBIAN/control Sat Nov 26 22:32:46 2011 -0600 @@ -7,6 +7,6 @@ Architecture: all Depends: python2.6 (>= 2.6) Description: SpliceX - brute force utilities for the linux shell. + Brute Force Utilities For GNU/Linux. diff -r a253a7be0c7b -r 9b9387fead63 contrib/splicex/LICENSE --- a/contrib/splicex/LICENSE Thu Nov 24 21:42:32 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ - __________ _ _ __ __ ______ - / / / / ___| _ __ | (_) ___ ___\ \/ / / / / / - / / / /\___ \| '_ \| | |/ __/ _ \\ / / / / / - / / / / ___) | |_) | | | (_| __// \ / / / / - /_/_/_/ |____/| .__/|_|_|\___\___/_/\_\/_/_/_/ - |_| - - - - .:Brute Force Utilities For GNU/Linux:. - - - - SpliceX is free software: you can redistribute it and/or modify it under - the terms of the GNU General Public License as published by the Free - Software Foundation, either version 3 of the License, or (at your option) - any later version. - - SpliceX is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. diff -r a253a7be0c7b -r 9b9387fead63 contrib/splicex/README --- a/contrib/splicex/README Thu Nov 24 21:42:32 2011 +0000 +++ b/contrib/splicex/README Sat Nov 26 22:32:46 2011 -0600 @@ -7,16 +7,6 @@ .:Brute Force Utilities For GNU/Linux:. - SpliceX is free software: you can redistribute it and/or modify it under - the terms of the GNU General Public License as published by the Free - Software Foundation, either version 3 of the License, or (at your option) - any later version. - - SpliceX is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. http://www.gnu.org/licenses/ - AUTHOR: d3v11 diff -r a253a7be0c7b -r 9b9387fead63 contrib/splicex/src/manual --- a/contrib/splicex/src/manual Thu Nov 24 21:42:32 2011 +0000 +++ b/contrib/splicex/src/manual Sat Nov 26 22:32:46 2011 -0600 @@ -8,19 +8,6 @@ .:Brute Force Utilities For GNU/Linux:. - - SpliceX is free software: you can redistribute it and/or modify it under - the terms of the GNU General Public License as published by the Free - Software Foundation, either version 3 of the License, or (at your option) - any later version. - - SpliceX is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - - .SH OPTIONS diff -r a253a7be0c7b -r 9b9387fead63 contrib/splicex/src/splicex.pyx --- a/contrib/splicex/src/splicex.pyx Thu Nov 24 21:42:32 2011 +0000 +++ b/contrib/splicex/src/splicex.pyx Sat Nov 26 22:32:46 2011 -0600 @@ -22,18 +22,6 @@ print('') print('') print('') - print(' SpliceX is free software: you can redistribute it and/or modify it under ') - print(' the terms of the GNU General Public License as published by the Free ') - print(' Software Foundation, either version 3 of the License, or (at your option)') - print(' any later version. ') - print('') - print(' SpliceX is distributed in the hope that it will be useful, but WITHOUT ') - print(' ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ') - print(' FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ') - print(' for more details. ') - print('') - print('') - print('') print(Red + ' --help ' + DefColour + 'Show help display and exit') print('') print(Red + ' --command ' + DefColour + 'Parse passwords to this command') diff -r a253a7be0c7b -r 9b9387fead63 contrib/tor2dns/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/contrib/tor2dns/README Sat Nov 26 22:32:46 2011 -0600 @@ -0,0 +1,32 @@ +DESCRIPTION: + tor2dns is a quick solution to non-free + and centralized dns. + +DEPENDS: + tor, daemontools, python + +INSTALL: + +mkdir /var/lib/tor/tor2dns +echo 'HiddenServiceDir /var/lib/tor/tor2dns' >> /etc/tor/torrc +echo 'HiddenServicePort 8053 127.0.0.1:8053' >> /etc/tor/torrc + +#See note below, you may need to use the commented line. +#chown debian-tor /var/lib/tor/tor2dns + +/etc/init.d/tor restart +mkdir /services/tor2dns +tar -xvf tor2dns.tgz --directory='/services' +cd / +ln -s /services/tor2dns /service +echo 'new dns link >>> http://'`cat /var/lib/tor/tor2dns/hostname`':8053' + +UPDATE: + +# pull a copy from AnoNet2 +wget http://d3v11.ano/tor2dns.tgz + +NOTE: + On some systems /var/lib/tor/tor2dns will need a special owner + like "debian-tor". If tor2dns fails for you please troubleshoot + your logs. diff -r a253a7be0c7b -r 9b9387fead63 contrib/tor2dns/run --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/contrib/tor2dns/run Sat Nov 26 22:32:46 2011 -0600 @@ -0,0 +1,13 @@ +#!/bin/bash +GETIP() { + while true; do + wget 'http://www.showmyip.com/simple/' -O index.html + sleep 5h + done + } + +[ -e SHARE ] || mkdir SHARE +cd SHARE +../serve & +GETIP + diff -r a253a7be0c7b -r 9b9387fead63 contrib/tor2dns/serve --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/contrib/tor2dns/serve Sat Nov 26 22:32:46 2011 -0600 @@ -0,0 +1,9 @@ +#!/usr/bin/python +import SimpleHTTPServer +import SocketServer + +PORT = 8053 + +Handler = SimpleHTTPServer.SimpleHTTPRequestHandler +httpd = SocketServer.TCPServer(("", PORT), Handler) +httpd.serve_forever() diff -r a253a7be0c7b -r 9b9387fead63 contrib/tor2dns/tor2dns/README --- a/contrib/tor2dns/tor2dns/README Thu Nov 24 21:42:32 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -DESCRIPTION: - tor2dns is a quick solution to non-free - and centralized dns. - -DEPENDS: - tor, daemontools, python - -INSTALL: - -mkdir /var/lib/tor/tor2dns -echo 'HiddenServiceDir /var/lib/tor/tor2dns' >> /etc/tor/torrc -echo 'HiddenServicePort 8053 127.0.0.1:8053' >> /etc/tor/torrc - -#See note below, you may need to use the commented line. -#chown debian-tor /var/lib/tor/tor2dns - -/etc/init.d/tor restart -mkdir /services/tor2dns -tar -xvf tor2dns.tgz --directory='/services' -cd / -ln -s /services/tor2dns /service -echo 'new dns link >>> http://'`cat /var/lib/tor/tor2dns/hostname`':8053' - -UPDATE: - -# pull a copy from AnoNet2 -wget http://d3v11.ano/tor2dns.tgz - -NOTE: - On some systems /var/lib/tor/tor2dns will need a special owner - like "debian-tor". If tor2dns fails for you please troubleshoot - your logs. diff -r a253a7be0c7b -r 9b9387fead63 contrib/tor2dns/tor2dns/run --- a/contrib/tor2dns/tor2dns/run Thu Nov 24 21:42:32 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ -#!/bin/bash -GETIP() { - while true; do - wget 'http://www.showmyip.com/simple/' -O index.html - sleep 5h - done - } - -[ -e SHARE ] || mkdir SHARE -cd SHARE -../serve & -GETIP - diff -r a253a7be0c7b -r 9b9387fead63 contrib/tor2dns/tor2dns/serve --- a/contrib/tor2dns/tor2dns/serve Thu Nov 24 21:42:32 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -#!/usr/bin/python -import SimpleHTTPServer -import SocketServer - -PORT = 8053 - -Handler = SimpleHTTPServer.SimpleHTTPRequestHandler -httpd = SocketServer.TCPServer(("", PORT), Handler) -httpd.serve_forever()