Anonymous and decentralized: File-sharing using torrents on the I2P network (library.nu exiles take a look)
So your lamenting the downfall of library.nu and you would like to use a platform that isn’t as prone to bullying from the publishing industry as a centralized, “clearnet” website and/or filehoster, and not as transparent as a public torrent tracker. In that case, I2P might be what you are looking for.
I2P stands for Invisible Internet Project. It’s a darknet, which means that data traffic within the network is routed through other peers in the network before it reaches its destination. This means that neither servers, nor users within the I2P network can be tied to an IP address.
All I2P users act as a network node themselves (unlike, for example, the Tor network) and thus relay traffic for other users.
Due to the routing of traffic through other peers, the average speed will be considerably lower than on the clearnet, but this won’t be a major burden for sharing e-books, since these are generally quite small. In my experience, the average speed is about 17KBps per torrent, but I’m not sure if this is representative for all I2P torrent users.
In this tutorial, I will explain how to use the torrent functionality of I2P. I will cover both Ubuntu and Windows.
Installing I2P on Ubuntu is straight-forward. Open a terminal (Ctrl+Alt+T) and issue the following commands:
sudo apt-add-repository ppa:i2p-maintainers/i2p sudo apt-get update sudo apt-get install i2p
Yay! Into the dark we shall go.
To launch I2P, open a terminal and issue the following command:
(DO NOT use sudo or run it as root, because http://i2p2.de/debian.html says so.)
A web page should be opened in your browser shortly after you started the router. From this point on there is no major difference in usage between Windows and Ubuntu, so please skip ahead to USAGE.
Installing I2P in Windows is not much of a hassle either. Just grab the graphical installer from http://i2p2.de/download.html which at the time of writing was i2pinstall_0.8.12.exe.
If you do not already have Java, the I2P installer will open java.com where you can download Java. If it doesn’t, you can get Java here: http://java.com/en/download/index.jsp Download and install Java (make sure to not install the Ask Toolbar) and then relaunch the I2P installer.
Choose you language and click ‘next’ twice. You can now choose to install I2P as a windows service. If you do so, I2P will start every time you start Windows. I would advice you to do so to improve your anonymity and the strength of the network.
Click ‘next’ again twice. You can now select you shortcut options. The defaults should be fine for most users.
Click ‘next’ and wait for it to install. Then click ‘next’ and ‘done’.
The installer should have automatically started I2P. If it hasn’t, go to Start Menu -> I2P, and click “Start I2P (no window)”. You can now launch the graphical interface of I2P, which is a webpage, by going to Start Menu -> I2P, and clicking “I2P router console”.
After you have launched the I2P Router Console it doesn’t really matter what operating system you’re on.
Now here are some basic things which I urge you to do to improve your I2P experience:
- Port forwarding. This will improve your connectivity with the I2P network. Go to http://127.0.0.1:7657/confignet. You can either use UPnP or manually open the UDP port specified at “UDP Configuration”. Try UPnP first by clicking UPnP status and if that isn’t working, open the UDP port. For the less technical, this has to do with your router (assuming you have one, which you almost certainly do). You can find out how to configure your router using http://portforward.com. Once you’re logged into your router, either enable UPnP (preferable) or manually port forward the UDP port specified by I2P if your router doesn’t have UPnP or if UPnP isn’t functioning properly.
- Raising the bandwidth of I2P. Go to http://127.0.0.1:7657/config. You will see 96KBps and 40KBps for the In and Out speeds respectively. Your most likely have an internet speed far greater than this. Therefore, you should raise the speeds significantly. I suggest you raise them to half of your internet speed, but this is up to your personal preference. You can find out your internet speed using http://speedtest.net, for example. In my experience, the average bandwidth I2P is using is at least half as low than the speeds you’ve set in the Bandwidth Limiter.
CONFIGURING FOXYPROXY TO REACH EEPSITES (.I2P)
As you probably already know, to download a file using a torrent, you first have to get a .torrent file. The way this works within I2P is analogous to clearnet – you get them from sites that index torrents. At the time of writing, there are 2 torrent indexes on I2P. The one we will be using is the Postman tracker located at http://tracker2.postman.i2p. To access a website with an .i2p pseudo-TLD, you need to configure Firefox to route those requests through a local proxy. Sounds like moonspeak to you? Don’t worry, it’s easy.
- Launch Firefox and go to https://addons.mozilla.org/en-US/firefox/addon/foxyproxy-standard/
- Click “Continue to download” and then “Add to Firefox” to install the FoxyProxy.
- Restart Firefox and click the FoxyProxy logo next to the URL bar.
- Change “Select Mode:” to “Use proxies based on their pre-defined patterns and priorities”
- Click “Add a new proxy”
- On the “General” tab, make sure “Enabled” is checked and enter a fancy name (ie. I2P) in the “Proxy Name” field. Also make sure that “Perform remote DNS lookups on hostnames loading through this proxy” is checked.
- One the “Proxy Details” tab, select “Manual Proxy Configuration” and enter “localhost” in the “Host or IP Address” field and “4444″ in the port field.
- On the “URL Patterns” tab, click “Add New Pattern”, make sure “Enabled” is checked and “Whitelist” and “Wildcards” are selected. Pick a fancy Pattern Name (ie. I2P) and in the “URL Pattern” field, enter “*.i2p/*”
- Click “OK” twice to return to the main FoxyProxy window and Close it if your proxy has been succesfully added and enabled.
Firefox will now send all .i2p requests through the local proxy. You can now access the eepsites hosted within I2P.
BROWSING THE POSTMAN TRACKER AND DOWNLOADING A FILE
Now that FoxyProxy is configured, we should be able to reach the Postman Tracker at http://tracker2.postman.i2p. If this isn’t working, I2P might not have finished integrating you into the I2P network. To see if this is the case, go to your I2P Route Console (http://127.0.0.1:7657) and look for “Rejecting Tunnels: Starting Up” which should be above Local Destinations in the sidebar on the left. If it’s present, wait a couple of minutes.
In Firefox, go to http://tracker2.postman.i2p. After the site has loaded, right-click on a magnet link (one of the magnet icons) and click “Copy Link Location”. Now return to your I2P Router Console and click “Torrents” underneath “I2P Services” (you can also go there directly using this URL http://127.0.0.1:7657/i2psnark). This will open I2PSnark, the default I2P torrent client. Paste your magnet link in the “From URL:” field and click “Add torrent”. Your torrent will be added immediately and you can now start it by click the play button to the right of the torrent. To automatically start torrents once they are added, go to “Configuration”, check “Auto start” and click “Save configuration”.
While you’re in “Configuration” anyway, you should edit the “Up bandwidth limit” to half the upload Out bandwidth limit you have set for you I2P Router earlier in this tutorial. “Total uploader limit” can be raised, but it isn’t of the highest importance. Don’t forget to click “Save configuration”.
If you don’t like the default data directory (where your downloads and .torrent files will end up), you can change it by editing i2psnark.config located in the I2P installation directory (~/.i2p for Ubuntu, %APPDATA%/I2P for Windows). Go there, open i2psnark.config in a text editor, enter your preferred directory at i2psnark.dir and save the file. Windows example: “i2psnark.dir=C:/Users/John/Downloads/I2P” Ubuntu example: “i2psnark.dir=/home/John/Downloads/I2P”. Again, click “Save configuration”.
Note: You cannot add I2P torrents to a regular torrent client nor can you add regular torrents to I2PSnark. You should therefore avoid changing your Data directory to your default torrent directory (if you have one) for I2PSnark automatically loads all the torrents that are present in the data directory.
UPLOADING A TORRENT TO THE POSTMAN TRACKER
Now downloading files is all cool, but Alexandria won’t rebuild itself so please do share your books. To do so, you will first have to create a torrent. First put the file you want to upload into your data directory. Then open I2PSnark and enter the filename (including the extension) into the “Data to seed:” field. Select Postman in the drop-down box besides “Tracker:” and click “Create torrent”. If succesful (on Linux), the I2PSnark terminal underneath the buttons on top will display:
Many I2P trackers require you to register new torrents before seeding - please do so before starting "Abbie Hoffman - Steal This Book.pdf" Torrent created for "Abbie Hoffman - Steal This Book.pdf": /home/John/Downloads/I2P/Abbie Hoffman - Steal This Book.pdf.torrent Torrent added: "Abbie Hoffman - Steal This Book.pdf"
You should now start the torrent by clicking the play button to its right. Now your torrent is ready for sharing on the Postman Tracker. You will need an account to do so, so go to http://tracker2.postman.i2p/?view=Register to get one. Once you have logged in, click “Upload”, accept the Rules and fill out the Upload form. It should be pretty self-explanatory, but just in case, “Upload” is where you select the .torrent file you have created. Click “>>> Proceed” to add your torrent. As you have already started your torrent, it should show up on the front-page really soon.
I hope that this tutorial has taught you the basics of file-sharing using the I2P network – now go and spread some knowledge!
I hereby release this article into the public domain. Feel free to copy, edit, use, criticize, praise, burn, commercialize and tweet it with or without attribution.
If you have any comments or suggestions, please do leave a comment.