Pavel Piatruk’ tech & personal blog

Psiphon: setting up Linux client (with free servers)

Psiphon is obfuscated proxy, and its client & server are open-source.

The plan is:

  • setting up Linux Psiphon Client that connects to free Psiphon network.
rm -rf ~/psiphon.client.free
mkdir -p ~/psiphon.client.free
cd ~/psiphon.client.free
curl https://github.com/Psiphon-Labs/psiphon-tunnel-core-binaries/raw/master/linux/psiphon-tunnel-core-x86_64 -L -o psiphon-tunnel-core-x86_64
chmod 755 psiphon-tunnel-core-x86_64
vim client.free.conf

paste text below

{
"LocalHttpProxyPort":8081,
"LocalSocksProxyPort":1081,
"PropagationChannelId":"FFFFFFFFFFFFFFFF",
"RemoteServerListDownloadFilename":"remote_server_list",
"RemoteServerListSignaturePublicKey":"MIICIDANBgkqhkiG9w0BAQEFAAOCAg0AMIICCAKCAgEAt7Ls+/39r+T6zNW7GiVpJfzq/xvL9SBH5rIFnk0RXYEYavax3WS6HOD35eTAqn8AniOwiH+DOkvgSKF2caqk/y1dfq47Pdymtwzp9ikpB1C5OfAysXzBiwVJlCdajBKvBZDerV1cMvRzCKvKwRmvDmHgphQQ7WfXIGbRbmmk6opMBh3roE42KcotLFtqp0RRwLtcBRNtCdsrVsjiI1Lqz/lH+T61sGjSjQ3CHMuZYSQJZo/KrvzgQXpkaCTdbObxHqb6/+i1qaVOfEsvjoiyzTxJADvSytVtcTjijhPEV6XskJVHE1Zgl+7rATr/pDQkw6DPCNBS1+Y6fy7GstZALQXwEDN/qhQI9kWkHijT8ns+i1vGg00Mk/6J75arLhqcodWsdeG/M/moWgqQAnlZAGVtJI1OgeF5fsPpXu4kctOfuZlGjVZXQNW34aOzm8r8S0eVZitPlbhcPiR4gT/aSMz/wd8lZlzZYsje/Jr8u/YtlwjjreZrGRmG8KMOzukV3lLmMppXFMvl4bxv6YFEmIuTsOhbLTwFgh7KYNjodLj/LsqRVfwz31PgWQFTEPICV7GCvgVlPRxnofqKSjgTWI4mxDhBpVcATvaoBl1L/6WLbFvBsoAUBItWwctO2xalKxF5szhGm8lccoc5MZr8kfE0uxMgsxz4er68iCID+rsCAQM=",
"RemoteServerListUrl":"https://s3.amazonaws.com//psiphon/web/mjr4-p23r-puwl/server_list_compressed",
"SponsorId":"FFFFFFFFFFFFFFFF",
"UseIndistinguishableTLS":true
}
echo './psiphon-tunnel-core-x86_64 -config client.free.conf' > run.client
chmod 755 run.client
./run.client

It will start Http proxy on local port 8081 and Socks proxy on port 1081. Test those proxies in another console.

curl -x localhost:8081 gmail.com -v 

That gave me 150KB/s speed.

Solve the situation when you are already under DPI.

As you can see in free client config, it downloads servers list from RemoteServerListUrl. Of course you can download it beforehand & point Psiphon client to some arbitrary Psiphon server . Get server tokens list:

cd ~/tmp/
wget https://s3.amazonaws.com//psiphon/web/mjr4-p23r-puwl/server_list_compressed

 printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" |cat - server_list_compressed |gzip -dc | json_xs | grep '"data"' | awk -F\" '{print $4}' | sed "s@\\\n@\n\n\n\n@g"  > server_tokens.txt

less server_tokens.txt

Each line is then a token. Use client config like this ( client.free_servers.1.conf ) :

( replace __TOKEN__ to some token from the file server_tokens.txt )

{
    "LocalHttpProxyPort" : 8081,
    "LocalSocksProxyPort" : 1081,
    "PropagationChannelId" : "FFFFFFFFFFFFFFFF",
    "SponsorId" :            "FFFFFFFFFFFFFFFF",
    "TargetServerEntry" : "__TOKEN__"
}
./psiphon-tunnel-core-x86_64 -config  client.free_servers.1.conf