changeset 777:b13bf8dc2c0c draft

updated peer2anonet stuff
author d3v11 <d3v11@d3v11.ano>
date Sat, 26 Nov 2011 00:27:46 +0000
parents cc3ed3f29ec7
children 150043713880
files contrib/peer2anonet/README contrib/peer2anonet/peer2anonet
diffstat 2 files changed, 41 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/peer2anonet/README	Fri Nov 25 23:40:28 2011 +0000
+++ b/contrib/peer2anonet/README	Sat Nov 26 00:27:46 2011 +0000
@@ -23,10 +23,42 @@
 
 NOTES:
 
-    peer2anonet exports the /service/$PEER/run file to
-    /etc/peer2anonet/peers/$PEER/run. If you need to
-    create customizations for peerings then make adjustments
-    to that file.
+    KEY PAIRS:
+
+        before running peer2anonet to configure peers you can use
+        quicktun to generate keypairs:
+
+            quicktun.keypair</dev/random
+
+    RUN CHANGES:
+
+        peer2anonet exports the /service/$PEER/run file to
+        /etc/peer2anonet/peers/$PEER/run. If you need to
+        create customizations for peerings then make adjustments
+        to that file.
+
+    EXAMPLES:
+
+        ./peer2anonet --configure
+
+            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
+
+
+        ./peer2anonet --configure-peer
+
+            Enter your peer's name: d3v11
+            Enter your peer's remote ip: 11.11.55.1
+            Enter your peer's peering ip: 1.1.5.2
+            Enter your peer's remote port: 201150
+            Enter your peer's asn: 1150
+            Enter your peer's public key: * see keypairs above *
+            Enter your private key: * see keypairs above *
+
+            # peer2anonet uses the following for port configurations:
+            LOCAL_PORT=20${PEERASN:0:4}
 
 
 
--- a/contrib/peer2anonet/peer2anonet	Fri Nov 25 23:40:28 2011 +0000
+++ b/contrib/peer2anonet/peer2anonet	Sat Nov 26 00:27:46 2011 +0000
@@ -4,6 +4,10 @@
     exit 1
 fi
 
+if [ -e /services/bird ]; then
+    [ -e /etc/peer2anonet/bird.tar ] || (cd /services ; tar /etc/peer2anonet/bird.tar bird)
+fi
+
 USAGE(){
     echo -e '\npeer2anonet:'
     echo -e '\n    --configure             generate a new local configuration and exit'
@@ -198,7 +202,7 @@
 
 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