INSTALL 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. #Slitheen is a decoy routing system for censorship resistance. The source code consists of two parts: the client code (to be distributed and run on the machines of users wishing to circumvent censorship), and the relay station code (to be run on a relay station deployed by an ISP in the middle of the network).
  2. #If you have any questions about the code or installation, please contact Cecylia Bocovich <cbocovic@uwaterloo.ca>.
  3. ### INSTALLTION INSTRUCTIONS: ###
  4. target=$1
  5. if [ "$target" == "client" ];
  6. then
  7. #For the client:
  8. # - The client code consists of two parts: (1) an Overt User Simulator (OUS) that issues repeated requests to uncensored sites, and (2) a SOCKS proxy frontend that takes connection requests and data from the user's browser and feeds it to the OUS.
  9. #
  10. #0. Building this system requires the following dependencies:
  11. sudo apt-get install build-essential g++ flex bison gperf ruby perl \
  12. libsqlite3-dev libfontconfig1-dev libicu-dev libfreetype6 libssl-dev \
  13. libpng-dev libjpeg-dev python libx11-dev libxext-dev git
  14. #1. Fetch all necessary git repositories:
  15. cd ..
  16. git clone -b slitheen git://git-crysp.uwaterloo.ca/openssl
  17. git clone -b slitheen git://git-crysp.uwaterloo.ca/phantomjs
  18. #2. Build our modified version of openssl
  19. parent_dir=`pwd`
  20. cd openssl
  21. ./config --prefix=$parent_dir/sslout --openssldir=$parent_dir/sslout/openssl
  22. make
  23. make test
  24. make install
  25. cd ..
  26. #3. Build phantomJS (Note: this takes a ridiculously long time)
  27. cd phantomjs
  28. sed -i "s#sslout#$parent_dir/sslout#g" build.py
  29. ./build.py
  30. cp bin/phantomjs ../slitheen/client
  31. cd ..
  32. #4. Build SOCKS proxy frontend
  33. cd slitheen/client
  34. make
  35. #5. Run socks and exit to initialize OUS_out pipe
  36. ./socks
  37. #6. Obtain public key from relay station save file as pubkey in client/ directory
  38. elif [ "$target" == "relay" ];
  39. then
  40. #For the relay station:
  41. #0. Install dependencies
  42. sudo apt-get install libpcap-dev libssl-dev git
  43. #1. Fetch necessary git repository:
  44. cd ..
  45. git clone git://git-crysp.uwaterloo.ca/slitheen
  46. git clone -b slitheen git://git-crysp.uwaterloo.ca/openssl
  47. #2. Build our modified version of openssl
  48. parent_dir=`pwd`
  49. cd openssl
  50. ./config --prefix=$parent_dir/sslout --openssldir=$parent_dir/sslout/openssl
  51. make
  52. make test
  53. make install
  54. cp ../sslout/lib/*.a ../slitheen/relay_station
  55. cd ..
  56. #3. Generate public/private key pair
  57. cd slitheen/telex-tag-v3
  58. make
  59. ./genkeys
  60. cp privkey ../relay_station
  61. cd ..
  62. #4. Update slitheen.h with correct MAC addresses for client-side and world-side interfaces
  63. # If using VM setup, postpone until VM step 10.
  64. #5. Build slitheen proxy
  65. cd relay_station
  66. make
  67. else
  68. echo "Usage: ./INSTALL [client|relay]"
  69. fi
  70. ### VIRTUAL MACHINE SETUP ###
  71. # If you wish to do a test run on two virtual machines on a single host, follow these instructions
  72. #
  73. #1. Download an Ubuntu 14.04 .iso (http://releases.ubuntu.com/14.04/)
  74. #
  75. #2. Create an Ubuntu14.04 virtual machine named "slitheen_client"
  76. #
  77. #3. Create an Ubuntu14.04 virtual machine named "slitheen_relay"
  78. #
  79. #4. Install the relay and client onto their respective machines following the
  80. # installation instructions below.
  81. #
  82. #5. Go to the network settings for "slitheen_client" and change Adapter 1 to be
  83. # attached to an internal network named "slitheen_net".
  84. #
  85. #6. In the network settings for "slitheen_relay", enable Adapter 2 and attach
  86. # it to the internal network "slitheen_net". Set promiscuous mode to "allow VMs".
  87. #
  88. #7. With "slitheen_relay" running, go to the network settings, select the adapter
  89. # connected to the internal network (eth1), and manually enter the following IPv4 settings:
  90. # Address: 192.168.3.1 Netmask:255.255.255.0 Gateway: 0.0.0.0
  91. #
  92. #8. With "slitheen_client" running, go to the network settings and manually enter
  93. # the following IPv4 settings:
  94. # Address: 192.168.3.2 Netmask:255.255.255.0 Gateway: 192.168.3.1
  95. #
  96. #9. Set the DNS server to match the one for eth0 on "slitheen_relay"
  97. #
  98. #10. In relay station code file slitheen.h, set macaddr to client's MAC address and compile
  99. #
  100. #11. Restart client and test connection
  101. # ping 192.168.3.1
  102. # ping 8.8.8.8
  103. ### RUN INSTRUCTIONS ###
  104. #1. Run relay
  105. # ethtool -K [eth0] tso off
  106. # ethtool -K [eth0] gro off
  107. # ethtool -K [eth0] gso off
  108. # ethtool -K [eth1] tso off
  109. # ethtool -K [eth1] gro off
  110. # ethtool -K [eth1] gso off
  111. # ./slitheen-proxy [interface to client] [interface to world]
  112. #2. Run client
  113. # ./ous.sh
  114. # ./socks
  115. # Connect browser to localhost:1080