[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [ooni-probe/master] add psiphon_install.sh, code should be improved



commit 3eeaa200e29ea4dbfea36a8b68302321aefe5d4e
Author: juga0 <juga>
Date:   Sun Sep 20 21:23:47 2015 +0000

    add psiphon_install.sh, code should be improved
---
 scripts/psiphon_install.sh |   51 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/scripts/psiphon_install.sh b/scripts/psiphon_install.sh
new file mode 100644
index 0000000..e03e663
--- /dev/null
+++ b/scripts/psiphon_install.sh
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+PSIPHON_PATH=$HOME
+PSIPHON_PYCLIENT_PATH=$PSIPHON_PATH/psiphon-circumvention-system/pyclient
+
+sudo apt-get install mercurial
+cd $PSIPHON_PATH
+hg clone https://bitbucket.org/psiphon/psiphon-circumvention-system
+# optional, compile their ssh
+#cd psiphon-circumvention-system/Server/3rdParty/openssh-5.9p1/
+#./configure
+#make
+#cp ssh ../../../pyclient/
+#cd $PSIPHON_PATH
+
+# create psi_client.dat
+cat <<EOF > psi_generate_dat.py
+#!/usr/bin/env python
+
+import wget
+import os
+import json
+
+# Delete 'server_list' if exists
+if os.path.exists("server_list"):
+    # os.remove("server_list")
+    # os.rename("server_list", "server_list")
+    pass
+else:
+    # Download 'server_list'
+    url ="https://psiphon3.com/server_list'
+    wget.download(url)
+
+# convert server_list to psi_client.dat
+dat = {}
+dat["propagation_channel_id"] = "FFFFFFFFFFFFFFFF"
+dat["sponsor_id"] = "FFFFFFFFFFFFFFFF"
+dat["servers"] = json.load(open('server_list'))['data'].split()
+json.dump(dat, open('psi_client.dat', 'w'))
+EOF
+
+chmod +x psi_generate_dat.py 
+./psi_generate_dat.py
+cp psi_client.dat $PSIPHON_PYCLIENT_PATH
+
+# assuming to be inside a virtualenv
+pip install jsonpickle pexpect
+
+# run psiphon
+# cd $PSIPHON_PYCLIENT_PATH
+# psi_client.py



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits