LittleShoot Java HTTP Proxy - LittleProxy

You are viewing an old version (v. 30) of this page.
The latest version is v. 31, last edited on Mar 16, 2010 (view differences | )
<< View previous version | view page history | view next version >>

The LittleShoot HTTP proxy, or "LittleProxy", is a high-performance open source HTTP proxy written in Java using Trustin Lee's fantastic Netty networking IO framework. LittleProxy is licensed under the Apache 2 license.

You can find code for the latest release of LittleProxy here:

svn co http://svn.littleshoot.org/svn/littleproxy/tags/littleproxy-0.2

NOTE: THE TRUNK IS THE CURRENTLY RECOMMENDED VERSION. THE 0.3 RELEASE IS IMMINENT, AND UNTIL THAT TIME THE TRUNK SHOULD BE CONSIDERED QUITE STABLE. IT ALSO FIXES SEVERAL PERFORMANCE BOTTLENECKS IN 0.2.

You can checkout all the code for LittleProxy with the following:

svn co http://svn.littleshoot.org/svn/littleproxy

To build the proxy, you need to have Maven installed. You can get it here. Once you have maven, just type:

cd littleproxy/trunk 

and

mvn install

To run the proxy, simply type:

./run.bash

or

./run.bash &

LittleProxy is still in its infancy, so the only configuration option is to pass the listening port as the first argument on the command line. If you pass no argument, the proxy simply runs on default port 8080. More options coming soon!

If you want to bring the proxy into Eclipse or Idea, type

mvn eclipse:eclipse

or

mvn idea:idea

and then "Import existing project into workspace" from within Eclipse. You should be able to just open the project in IDEA. For Eclipse, you'll need to the set the "M2_REPO" variable to tell Eclipse the path to your local Maven repository. On Windows, this is "C:/Users/[your_user_name]/.m2/repository" (at least for Vista and Windows 7). On OSX and Linux, this should be "~/.m2/repository". You can set it under "Java->Build Path->Classpath Variables" in your preferences.

To change the logging configuration, you can modify the src/main/resources/log4j.properties file. You can change, for example, the following line from:

log4j.logger.org.littleshoot.proxy=warn

to

log4j.logger.org.littleshoot.proxy=all

By default, log statements will go to both the log.txt file and to console. To remove console logging, make the following change:

log4j.rootLogger=warn, stdout, TextFile

to

log4j.rootLogger=warn, TextFile

If you want to start LittleProxy programmatically, you can run the following:

final HttpProxyServer server = new DefaultHttpProxyServer(8080);
server.start();

You can follow LittleProxy activity in Jira.

Recently Updated
by Adam Fisk (16 Mar)
LittleShoot Java HTTP Proxy - LittleProxy v. 30 (LittleShoot HTTP Proxy)
by Adam Fisk (24 Oct)
LittleShoot HTTP Proxy
Navigate space
Enter labels to add to this page:
 
Looking for a label? Just start typing.