INSTALL 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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. #2. Generate public/private key pair
  47. cd slitheen/telex-tag-v3
  48. make
  49. ./genkeys
  50. cp privkey ../relay_station
  51. cd ..
  52. #3. Build slitheen proxy
  53. cd relay_station
  54. make
  55. else
  56. echo "Usage: ./INSTALL [client|relay]"
  57. fi
  58. ### VIRTUAL MACHINE SETUP ###
  59. # If you wish to do a test run on two virtual machines on a single host, follow these instructions
  60. #
  61. #1. Download an Ubuntu 14.04 .iso (http://releases.ubuntu.com/14.04/)
  62. #
  63. #2. Create an Ubuntu14.04 virtual machine named "slitheen_client"
  64. #
  65. #3. Create an Ubuntu14.04 virtual machine named "slitheen_relay"
  66. #
  67. #4. Install the relay and client onto their respective machines following the
  68. # installation instructions below.
  69. #
  70. #5. Go to the network settings for "slitheen_client" and change Adapter 1 to be
  71. # attached to an internal network named "slitheen_net".
  72. #
  73. #6. In the network settings for "slitheen_relay", enable Adapter 2 and attach
  74. # it to the internal network "slitheen_net". Set promiscuous mode to "allow VMs".
  75. #
  76. #7. With "slitheen_relay" running, go to the network settings, select the adapter
  77. # connected to the internal network (eth1), and manually enter the following IPv4 settings:
  78. # Address: 192.168.3.1 Netmask:255.255.255.0 Gateway: 0.0.0.0
  79. #
  80. #8. With "slitheen_client" running, go to the network settings and manually enter
  81. # the following IPv4 settings:
  82. # Address: 192.168.3.2 Netmask:255.255.255.0 Gateway: 192.168.3.1
  83. #
  84. #9. Set the DNS server to match the one for eth0 on "slitheen_relay"
  85. #
  86. #10. Restart client and test connection
  87. # ping 192.168.3.1
  88. # ping 8.8.8.8
  89. ### RUN INSTRUCTIONS ###
  90. #1. Run relay
  91. # ethtool -K [eth0] tso off
  92. # ethtool -K [eth0] gro off
  93. # ethtool -K [eth0] gso off
  94. # ethtool -K [eth1] tso off
  95. # ethtool -K [eth1] gro off
  96. # ethtool -K [eth1] gso off
  97. # ./slitheen-proxy [interface to client] [interface to world]
  98. #2. Run client
  99. # ./ous.sh
  100. # ./socks
  101. # Connect browser to localhost:1080