rovinbhandari / IITG-Transparent-Proxy

A bunch of Linux applications to get net in IITG working without the requirement of a per-app proxy setting.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IITG Transparent Proxy would like to thank the following for their contributions:
(Past, present and future) Users, Testers and Debuggers
Redsocks (http://darkk.net.ru/redsocks/) - an opensource transparent socks redirector that wouldn't work by itself in IITG
ProxyDroid (http://code.google.com/p/proxydroid/) - the open source android app that worked and showed how it can be done
Mini fake DNS server (http://code.activestate.com/recipes/491264-mini-fake-dns-server/) - a small fake dns server conforming to protocol
Me (Suhail Sherif) and Ajaykumar Kannan - for developing it.
iptables - for being so awesome

TODO
- Removing cache entries
- Licensing
- GUI
- packaging
- Improvements (Includes analysis of the working of the IITG DNS)
- fixing libtool of libevent (It does not resolve spaces in the path while "make install"ing)
- On Debian based systems, libevent-2.0.so.5 is not automatically (soft-)linked to its correct place
- Check for port on systems before binding

HOWTO:
(Most of these commands may need superuser priveleges)

The easy way (aka the noob way :D)
./easyStart.sh to start the transparent proxy and ./easyStop.sh to stop the proxy. You can edit easyStart.sh if you don't want to enter the proxy details each time.I've included an example.

The more difficult way:
One-time : In the redsocks folder, "make" to get the executable. If make fails, you will need to compile libevent. I've included the tar file for it. Or you can download it online. 
Run the following:
./script start
sudo python fakeDNS.py
(defaultIPs has some domains and ip addresses that you might want to have preconfigured)
sh redsocksConfig.sh <proxy_ip> <proxy_port> <username> <password>
(username and password are optional. You can edit this file to make it prompt you for the username and password if you don't like your credentials in plaintext in your history. And have it delete the redsocksauto.conf that it creates in the redsocks folder.)

To stop:
Run sh script stop
(Optionally) stop fakeDNS and redsocks.

IMPORTANT:
Edit /etc/resolv.conf and add a line 'nameserver 127.0.0.1' at the top. Or add 127.0.0.1 to your DNS serverlist. The former seems cooler.
If you have installed libevent from the tar file provided in the directory, and you use a Debian based system,  make sure to run the following command:
ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib/libevent-2.0.so.5 (on a 32-bit system)
ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib64/libevent-2.0.so.5 (on a 64-bit system)

Beware! Non-authentic DNS servers can be used VERY convincingly for phishing. Make sure you are in control of your configuration.

About

A bunch of Linux applications to get net in IITG working without the requirement of a per-app proxy setting.


Languages

Language:C 93.6%Language:Shell 2.3%Language:D 2.0%Language:Python 1.6%Language:Objective-C 0.3%Language:Perl 0.2%