... 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 more documentation for LittleProxy on the [LittleShoot site|http://www.littleshoot.org/littleproxy], including JavaDocs.
You can find code for the latest release of LittleProxy here: |
... You can also just clone git directly in read-only mode, as follows:
{noformat} git clone git://github.com/adamfisk/LittleProxy.git {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 {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} {column:width=35%}
{section} |