... The [LittleShoot|http://www.littleshoot.org] HTTP proxy, or "LittleProxy", is a *high-performance open source HTTP proxy* written in Java using Trustin Lee's fantastic [Netty|http://jboss.org/netty/] networking IO framework. LittleProxy is licensed under the Apache 2 license.
You can find code for the latest release of LittleProxy here:
{noformat} svn co http://svn.littleshoot.org/svn/littleproxy/tags/littleproxy-0.2 {noformat}
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:
{noformat} svn co http://svn.littleshoot.org/svn/littleproxy {noformat}
To build the proxy, you need to have Maven installed. You can get it [here|http://maven.apache.org/download.html]. Once you have maven, just type:
{noformat} cd littleproxy/trunk {noformat}
and
{noformat} mvn install {noformat}
To run the proxy, simply type:
{noformat} ./run.bash {noformat}
or {noformat} ./run.bash & {noformat}
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 {noformat} mvn eclipse:eclipse {noformat}
or {noformat} mvn idea:idea {noformat}
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:
{noformat} log4j.logger.org.littleshoot.proxy=warn {noformat}
to
{noformat} log4j.logger.org.littleshoot.proxy=all {noformat}
By default, log statements will go to both the log.txt file and to console. To remove console logging, make the following change:
{noformat} log4j.rootLogger=warn, stdout, TextFile {noformat}
to
{noformat} log4j.rootLogger=warn, TextFile {noformat}
If you want to start LittleProxy programmatically, you can run the following:
{noformat} final HttpProxyServer server = new DefaultHttpProxyServer(8080); server.start(); {noformat}
You can follow LittleProxy activity in [Jira|http://dev.littleshoot.org:8081/browse/LP]. {column:width=60%} {recently-updated} {column} {column:width=5%} {column} |