Changes

Jump to: navigation, search

31C3/laptop preparation

2,792 bytes added, 16:06, 1 November 2014
/* Firefox */
==== Firefox ====
Firefox is smart. It can speak "SOCKS". Hence, we can make it speak both i2p and Tor. At the same time. But that's not all: we will also install a specific profile in order to ensure we don't leak too much data. For that, we will use the firefox profile proposed by JonDonym<ref>[https://anonymous-proxy-servers.net/ JonDonym ]</ref>.
 
It will avoid some bad behavior of Firefox, cover up our traces and avoid a too precise match with our browser. You might want to try the well-known [https://panopticlick.eff.org/ Panopticlick] proposed by the EFF in a "before/after" mode ;).
 
Also, we will use a very old standard: Proxy auto-config, also known as PAC file<ref>[https://en.wikipedia.org/wiki/Proxy_auto-config Wikipedia: Proxy auto-config]</ref>.
 
===== JonDonym =====
As said, we will install a special profile. In order to do so, simply follow the steps as described [https://anonymous-proxy-servers.net/en/help/firststeps.html here]. Beware, JonDo is another thing, and proposes some proxies we don't need for the current setup. Follow the steps for the "JonDoFox" installation.
 
Once this is done, start Firefox and check if you have the JonDonym profile ­— you will know pretty soon if you have it or not ;).
===== PAC =====
The PAC file is, in fact, a simple Javascript… err… script. It provides some nice features, allows you to tell Firefox (or any browser supporting this file type) how it should handle a request.
 
The script content looks like that:<br>
<pre><nowiki>
function FindProxyForURL(url, host) {
var lhost = host.toLowerCase();
host = lhost;
tor = 'SOCKS5 localhost:9050';
i2p_ssl = 'PROXY localhost:4445';
i2p_clear = 'PROXY localhost:4444';
 
if (shExpMatch(host, "*.onion")) {
alert("Tor hidden service");
return tor;
}
 
if (shExpMatch(url, "https")) {
if (shExpMatch(host, "*.i2p")) {
alert("i2p SSL");
return i2p_ssl;
}
} else {
if (shExpMatch(host, "*.i2p")) {
alert("i2p CLEAR");
return i2p_clear;
}
}
alert("No match at all for "+url);
 
return tor;
}
</nowiki></pre>
 
Such easiness. Such love. Such nice.
 
It:
# checks if the hostname maches ".onion"
## if it matches ".onion", it redirects to the Tor SOCKS port
# checks if we're using HTTPS
## if it matches ".i2p", redirect to the HTTPS i2p proxy
# If we're "in the clear" (HTTP) and match ".i2p", redirect to the HTTP i2p proxy
# if it matches nothing, it redirects to Tor anyway.
 
 
You might save this file in something like <code><nowiki>~/.mozilla/rules.pac</nowiki></code> and load it in Firefox using Preferences -> Advanced -> Network -> Settings and point to <code><nowiki>file:///home/<user>/.mozilla/rules.pac</nowiki></pre>.
 
You might want to check how it goes using the Browser Console (ctrl+shift+j or Developers -> Web Console).
=== Physical ===
9
edits