~psiphon-inc/psiphon/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
-------------------------
Psiphon INSTALL
-------------------------


SUPPORTED PLATFORMS
--------------------------

Psiphon has been tested on the following platforms only:

    Ubuntu - Versions 8.10 and 9.04.

With the following extra packages installed:

Name                    Version                 Description
libgeoip1               1.4.4.dfsg-2            A non-DNS IP-to-country resolver library
libjpeg62-dev           6b-14                   Development files for the IJG JPEG library
libmcrypt-dev           2.5.7-5ubuntu1          De-/Encryption Library development files
libmysqlclient15-dev    5.0.67-0ubuntu6         MySQL database development files
libpng12-dev            1.2.27-1ubuntu0.1       PNG library - development
libssl-dev              0.9.8g-10.1ubuntu2.5    SSL development libraries, header files and documentation
libxml2-dev             2.6.32.dfsg-4ubuntu1.2  Development files for the GNOME XML library
libxslt1-dev            1.1.24-1ubuntu2         XSLT processing library - development kit
mysql-client            5.0.67-0ubuntu6         MySQL database client (metapackage depending on the latest version)
mysql-server            5.0.67-0ubuntu6         MySQL database server (metapackage depending on the latest version)
openssl                 0.9.8g-10.1ubuntu2.5    Secure Socket Layer (SSL) binary and related cryptographic tools
realpath                1.12                    Return the canonicalized absolute pathname


SOURCE DIRECTORY LAYOUT
----------------------------------

 cronjobs/   .............................. Background processes
 doc/   ................................... Documentation and install scripts
 mod_psiphon/
   httpd_conf/   .......................... Apache configuration
   mod_deflate/   ......................... 3rd party module
   mod_proxy/   ........................... 3rd party module
   mod_psiphon_auth/   .................... Authentication module
   mod_psiphon_bluebar/   ................. Bluebar embedding module
   mod_psiphon_headers/   ................. HTTP header transformation module
   mod_psiphon_limitsessconn/   ........... Traffic-shaping module
   mod_psiphon_map2proxy/   ............... Request routing module
   mod_psiphon_post2get/   ................ Request routing module
   mod_psiphon_proxy_css/   ............... CSS rewriter module
   mod_psiphon_proxy_html/   .............. HTML rewriter module
   mod_psiphon_proxy_js/   ................ Javascript rewriter module
   mod_psiphon_xml2enc/   ................. Parsing pre/post-processor
   mod_transform/   ....................... 3rd party module
   utils/   ............................... Utility functions
 proxy-in-cgi/   .......................... Psiphon in-proxy application
 sql/   ................................... Database create/upgrade scripts
 tools/   ................................. Install script and translation  
   langcsv/   ............................. Translation tools
 www/   ................................... PHP web application
   001/   ................................. Web app home page
   css/    ................................ Web app layout
   flash/   ............................... Flash player for supported content
   http-errors/   ......................... Custom web error messages
   images/   .............................. Web app image assets
   includes/ .............................. Web app include files
   js/  ................................... Web app javascript
   xsl/  .................................. RSS rewriting support


INSTALLATION
------------------------

These are installation steps Psiphon Inc. uses to set up development
systems.  Apache and PHP components are built from source for consistency.
This installation is not recommended for a non-dedicated host.  For users that
want to try Psiphon using these instructions, we recommend a virtual machine
environment.

1. Run the script to install Psiphon in install_dir:

    sudo tools/psiphon_install.sh install_dir

This script installs the following packages:
    libpng12-dev 
    libjpeg-dev 
    openssl 
    libssl-dev 
    libxml2-dev
    libxslt1-dev 
    mysql-server 
    mysql-client 
    libmysqlclient15-dev 
    libgeoip1 
    libmcrypt-dev 
    realpath 

The script performs a custom build of Apache HTTP 2.2.13 and PHP 5.2.9 from source.
This step is required as is Psiphon using its own Apache configuration script and relies
on a number of Psiphon specific Apache modules. It also gives the user the flexibility of
having Apache and PHP installed in the provided install_dir making it possible to keep
any existing Apache+PHP.

Then the script installs Psiphon modules, creates and inits psiphon database as described in
less sql/README, creates a user ppcron and sets e-mail notification/ database purging cronjobs
as described in cronjobs/README 

NOTE: The Apache daemon runs as the user 'ppwww'. This may have implications for the choice
of 'install_dir'. For example, if it is installed under the home directory of a user that
has encryption of their home directory enabled, then ppwww will not be able to access the
necessary files.

NOTE: Psiphon e-mailing capabilities rely on system's default MTA(Mail Transfer Agent). 
If you want Psiphon to be able to send notification e-mails you need to setup your MTA 
service to accept connections from localhost at port 25.

2. Starting and stopping Psiphon 

To start service:

    sudo install_directory/apache2/bin/apachectl start

To stop service:

    sudo install_directory/apache2/bin/apachectl stop

3. Try Psiphon

Open a web browser and go to https://127.0.0.1/001/

Default user credentials are admin/admin.

IMPORTANT:
Make sure you change default password as soon as you login to Psiphon!!!

4. Configure Proxies

From the Bluebar, click the "Profile" link.  Then click the "Proxies" link in
the menu on the left.

Add a new Proxy for each system that will directly connect to Psiphon.

If your computer is behind a router or a firewall, you will need to enable port 
forwarding from the router to your local IP address.

Restart Psiphon:

    sudo install_directory/apache2/bin/apachectl restart

EOF