| Author: prabhakar khare 21 Sep 2008 | Member Level: Silver Points : 2 |
Introduction
This article explains how to configure a machine running Debian in order to use the YourFreedom SOCKS proxy. The article will explain how to install Sun Java Virtual Machine, and how to configure the system in order to use the proxy.
What is a SOCKS proxy?
A SOCKS proxy is a server that can transport the TCP/IP protocol over HTTP.
In a less technical way we can say that a SOCKS proxy is a nice tool that allow you to establish connections to every host and port you want even if you are behind a firewall. You will be able to use any instant messaging software or protocol, you can play chess on line, you can visit www pages that are on a port other than 80 [that sites that have an URL like http://www.unreachable.com:8080. You can also use a SOCKS proxy to connect to BitTorrent or some other file sharing networks.
YourFreedom provides SOCKS proxy service for free. The only limitation you have is in bandwidth. Step 1 - Installing the Java Runtime Environment
YourFreedom is distributed for Linux as a JAR file [that is a packed java application]. In order to run it you need to install the Sun Java Runtime Environment [JRE]. As far as I know other java versions [non Sun ones] are not able to run YourFreedom. On newer Debian (and probably oyher sitros) versions there is a nice handy package to install the JRE. you simply will need to type:
su apt-get install sun-java5-jre
For distro that do not provide JRE ready to install, you will need to do things by yourself. To download JRE do the following [some distros has their own method to install JVM]:
1. Go to http://java.sun.com/. Chose J2SE 5.0 from popular downloads on the right, or go here 2. Click on the link to download the JRE. A list of JRE for different OS and architectures will be displayed. Chose the self-extracting file for Linux.
Now you have a self-extracting file. You can extract the file whereever you want. For this tutorial we will use /opt location. First of all you need to copy the file jre-1_5_0_06-linux-i586.bin to /opt. After you can install the JRE doing the following:
su cd /opt chmod +x jre-1_5_0_06-linux-i586.bin ./jre-1_5_0_06-linux-i586.bin
Now you have the JRE installed in /opt/jre1.5.0_06. Step 2 - Installing YourFreedom
YourFreedom is developed in Java, so it runs on almost all platform. To download the Java. To download the Java archive version of YourFreedom you need to do the following:
1. Log in with your account [if you don't have one, you need to register] 2. Go to download page, and download the Java archive version from one of the server available.
After that you can unpack the .zip file. Do the followings [supposing you are still logged as root]:
cd /opt mkdir your_freedom cd your_freedom cp /the_right_path/freedom-20060530-01.zip . unzip freedom-20060530-01.zip ls
Now we have all the files needed in order to run YourFreedom. The most important is freedom.jar that contains the proper executable.
To run the proxy you can use this command [is better not to run it as root]:
/opt/jre1.5.0_06/bin/java -jar /opt/your_freedom/freedom.jar
For newer distros providing Java as a package, you will simply need yo type:
java -jar /opt/your_freedom/freedom.jar
Step 3 - Create a link to YourFreedom proxy
For your convenience you can create a link [for example on your desktop] to run YourFreedom. First of all go into installation directory and create a little bash script in order to run the application. The script should be the following (replace /opt/jre1.5.0_06/bin/java with simply java if you installed java as distro package):
#!/bin/bash /opt/jre1.5.0_06/bin/java -jar /opt/your_freedom/freedom.jar
To create it you need these commands:
cd /opt/your_freedom nano YF # Create the described file chmod +x YF
Now, supposing you are using KDE, you can create a desktop shortcut doing the following:
1. Righ click on the desktop, chose Create New ยป Link to application 2. Chose a name for the link, for example YF 3. Chose the Application tab, in command put /opt/your_freedom/YF and in Work Path put /opt/your_freedom
Step 4 - Using application with SOCKS proxy
Some applications can be configured to use a SOCKS proxy [for example firefox, gftp] . Many other applications do not support SOCKS proxy. Anyway there is a good workaround that allows you to use nearly any application with a SOCKS proxy.
In order to head all connections that an application tries to make to a SOCKS proxy, you can use tsocks libraries. These libraries are available as a package for Debian [and probably for some other distros]. You need to install the package. After that you can configure tsocks editing the /etc/tsocks.conf file as follows:
local = 192.168.0.1/255.255.255.0 #Put your LAN IP address and subnet mask here server = 127.0.0.1 server_type = 5 server_port = 1080
If you do not have a LAN or do not need to connect to any host on your LAN, you can remove the first line.
After that you can run any application you need as follow:
tsocks myapp
|