Browse Source

updated README file to be Ian's run-through

cecylia 4 years ago
parent
commit
3739086038
1 changed files with 68 additions and 40 deletions
  1. 68 40
      README

+ 68 - 40
README

@@ -1,65 +1,93 @@
-These are instructions for setting up a test environment for slitheen!
+#### BUILDING
 
-0. Dependencies
+# Instructions to build slitheen (client and proxy)
 
-- You must have the most recent version of Docker installed. For detailed instructions on how to do this, visit: https://docs.docker.com/install/linux/docker-ce/ubuntu/
+# Requirements (with versions I used):
+#   docker (18.03.1-ce)
+#   git (2.7.4)
+#   mercurial (3.7.3)
+#   vncviewer
+#   koko (v0.61) from https://github.com/redhat-nfvpe/koko/releases
+#     koko should be installed with owner root, group docker, and mode 04750
 
-- You must install koko. For instructions to build from source, or binaries, visit: https://github.com/redhat-nfvpe/koko/releases
+mkdir slitheen; cd slitheen
 
-1. Setting up the docker containers
+# Get the bootstrapped docker image for building slifox
+wget https://cs.uwaterloo.ca/~cbocovic/ff_bootstrapped_2018_03_25.tar.gz
+echo '6c45728775474f5fdae4b0c7477b1ca71271357cfb04fd29446c99b5ea4adf7b  ff_bootstrapped_2018_03_25.tar.gz' | sha256sum -c
+docker load < ff_bootstrapped_2018_03_25.tar.gz
+rm ff_bootstrapped_2018_03_25.tar.gz
 
-There are two different docker containers: one for the client, and one for the relay station. These containers will be networked together such that the client's traffic is routed through the relay station.
+# Get the slifox hg repo
+hg clone ssh://hg@git-crysp.uwaterloo.ca/firefox
+cd firefox
+hg checkout slitheen
+cd ..
 
-    A. Setting up the client docker container
+# Get the slitheen code repo
+git clone git@git-crysp.uwaterloo.ca:slitheen/code
 
-    - The client container must build our modified version of firefox. Firefox has an intense bootstrapping process, so download https://cs.uwaterloo.ca/~cbocovic/ff_bootstrapped_2018_03_25.tar.gz and run
-    bzcat ff_build_bootstrapped.tar.bz2 | docker load
+# Get the build and test environments
+git clone git@git-crysp.uwaterloo.ca:slitheen/testenv
+cd testenv
+./build-slitheen
+./mktestenvconfig
+sed -i s,/somewhere/firefox,$(cd ..; /bin/pwd)/firefox, testenv_config
+sed -i s,/somewhere/slitheen/code,$(cd ..; /bin/pwd)/code, testenv_config
 
-    - clone the firefox and slitheen repositories
+# Start the slifox docker
+./ous_run
 
-        hg clone ssh://hg@git-crysp.uwaterloo.ca/firefox
-        git clone git@git-crysp.uwaterloo.ca:slitheen/code
+    # Inside that docker, build slifox and the socks proxy and exit the
+    # docker when finished
+    ./mach build   # This will take a while
+    cd ../slitheen_code/client
+    make
+    exit
 
-    - edit testenv_config to point to these two repositories
+# Start the relay station docker
+./relay_run
 
-    - run ./mktestenvconfig
+    # Inside that docker, build the slitheen relay
+    make
+    # Build the key generator and run it
+    /cd ../telex-tag-v3/
+    make genkeys
+    ./genkeys
+    exit
 
-    - run ./ous_run
+# Copy the private and public keys to the right places
+cp ../code/telex-tag-v3/privkey ../code/relay_station/
+cp ../code/telex-tag-v3/pubkey ../firefox/
+cp ../code/telex-tag-v3/pubkey ../code/client/
 
-    - build firefox by running ./mach build (this will take a while)
+#### RUNNING
 
-    B. Setting up the relay station docker container
+# You will need four terminals, each starting in the testenv directory
+# (start them in this order):
 
-    - run ./relay_run
+A. ./relay_run
 
-    - run make
+B. ./ous_run
 
-    C. Setting up networking
+C. ./socks_run
 
-    - To network the two containers, run ./net_run
+D. ./net_run
 
-    - on the host machine, follow the instructions to disable TCP offloading, as directed by the output of net_run.
+    # Run (as root) the ethtool commands it outputs, if any
 
-    D. Check to make sure network is properly set up
+# Still in D:
+    vncviewer localhost # password: 1234 to view slifox
 
-    - run sudo ./slitheen veth1 eth0
+# In A:
+    sudo ./slitheen veth1 eth0
 
-    - you should be able to ping 8.8.8.8 from the client machine
+# In B:
+    ./mach run  # Wait for it to start up
 
-2. Running tests
+# In C:
+    ./socks
 
-    You will need 5 terminals for this task:
-
-    A. ./relay_run
-        - inside the relay station container, run
-            sudo ./slitheen veth1 eth0
-    B. ./ous_run
-        - inside the ous container, run ./mach run to start firefox
-
-    C. ./socks_run
-        - inside another instance of the ous container, run ./socks
-
-    D. vncviewer localhost (password: 1234) to view firefox
-
-    E. connect to localhost:1080 to proxy to covert site.
 
+# Now point your browser's SOCKS proxy to localhost:1080 while you load
+# youtube videos in slifox