Giter Site home page Giter Site logo

proxy's Introduction

proxy - A simple transperent web proxy written in go.

This was written after my neighbours have taken it a bit too far using
my wireless and I wanted to have a bit of fun.  It was inspired by
upside-down-ternet[1].  :-)

src/proxy is the main proxy library.  This repository also includes
multiple simple proxies written using it:

	upsidedown flips every image requested through it.

	logger simply logs every request.

	rickroll takes a path to an flv file, and replaces every flv
	request with its contents.  i.e. it turns every youtube video
	into a rickroll.

they all listen on port 3128.

Look at src/logger or src/upsidedown for examples on how to write a
custom proxy.

To forward all web traffic to the machine running the proxy (in my case on
192.168.1.11:3128), I use the following iptables commands on the router:

iptables -t nat -A PREROUTING -s '!' 192.168.1.11 -p tcp --dport 80 -j DNAT --to 192.168.1.11:3128
iptables -t nat -A POSTROUTING -s 192.168.1.0/255.255.255.0 -d 192.168.1.11 -j MASQUERADE
iptables -A FORWARD -s 192.168.1.0/255.255.255.0 -d 192.168.1.11 -p tcp --dport 3128 -j ACCEPT

Exercises for the reader: inject js into all html pages.

[1] http://www.ex-parrot.com/pete/upside-down-ternet.html

proxy's People

Contributors

saljam avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.