<commit_before>[![Build Status](https://travis-ci.org/adamfisk/LittleProxy.png?branch=master)](https://travis-ci.org/adamfisk/LittleProxy)

LittleProxy is a high performance HTTP proxy written in Java atop Trustin Lee's excellent Netty event-based networking library. It's quite stable, performs well, and is easy to integrate into your projects. 

One option is to clone LittleProxy and run it from the command line. This is as simple as:

```
$ git clone git://github.com/adamfisk/LittleProxy.git
$ cd LittleProxy
$ ./run.bash
```

You can embed LittleProxy in your own projects through maven with the following:

```
    <dependency>
        <groupId>org.littleshoot</groupId>
        <artifactId>littleproxy</artifactId>
        <version>0.5.3</version>
    </dependency>
```

Once you've included LittleProxy, you can start the server with the following:

```
HttpProxyServer server =
    DefaultHttpProxyServer.bootstrap()
        .withPort(8080)
        .start();
```

There are lots of filters and such you can also add to LittleProxy. You can add request and reponse filters, for example, as in:

```
HttpProxyServer server =
    DefaultHttpProxyServer.bootstrap()
        .withPort(8080)
        .withRequestFilter(new DefaultHttpProxyServer(PROXY_PORT, new HttpRequestFilter() {
                @Override
                public void filter(HttpRequest httpRequest) {
                    System.out.println("Request went through proxy");
                }
            })
        .withResponseFilters(new HttpResponseFilters() {
                @Override
                public HttpFilter getFilter(String hostAndPort) {
                    return null;
                }
            })
        .start();
```                

If you want to create additional proxy servers with similar configuration but
listening on different ports, you can clone an existing server.  The cloned
servers will share event loops to reduce resource usage and when one clone is
stopped, all are stopped.

```
existingServer.clone().withPort(8081).start()
```

If you have questions, please visit our Google Group here:

https://groups.google.com/forum/#!forum/littleproxy

Project reports, including the [API Documentation]
(http://adamfisk.github.io/LittleProxy/apidocs/index.html), can be found here:

http://adamfisk.github.io/LittleProxy/

Benchmarking instructions and results can be found [here](benchmarking/).

Acknowledgments
---------------<commit_msg>Added README link to performance section<commit_after>[![Build Status](https://travis-ci.org/adamfisk/LittleProxy.png?branch=master)](https://travis-ci.org/adamfisk/LittleProxy)

LittleProxy is a high performance HTTP proxy written in Java atop Trustin Lee's excellent Netty event-based networking library. It's quite stable, performs well, and is easy to integrate into your projects. 

One option is to clone LittleProxy and run it from the command line. This is as simple as:

```
$ git clone git://github.com/adamfisk/LittleProxy.git
$ cd LittleProxy
$ ./run.bash
```

You can embed LittleProxy in your own projects through maven with the following:

```
    <dependency>
        <groupId>org.littleshoot</groupId>
        <artifactId>littleproxy</artifactId>
        <version>0.5.3</version>
    </dependency>
```

Once you've included LittleProxy, you can start the server with the following:

```
HttpProxyServer server =
    DefaultHttpProxyServer.bootstrap()
        .withPort(8080)
        .start();
```

There are lots of filters and such you can also add to LittleProxy. You can add request and reponse filters, for example, as in:

```
HttpProxyServer server =
    DefaultHttpProxyServer.bootstrap()
        .withPort(8080)
        .withRequestFilter(new DefaultHttpProxyServer(PROXY_PORT, new HttpRequestFilter() {
                @Override
                public void filter(HttpRequest httpRequest) {
                    System.out.println("Request went through proxy");
                }
            })
        .withResponseFilters(new HttpResponseFilters() {
                @Override
                public HttpFilter getFilter(String hostAndPort) {
                    return null;
                }
            })
        .start();
```                

If you want to create additional proxy servers with similar configuration but
listening on different ports, you can clone an existing server.  The cloned
servers will share event loops to reduce resource usage and when one clone is
stopped, all are stopped.

```
existingServer.clone().withPort(8081).start()
```

If you have questions, please visit our Google Group here:

https://groups.google.com/forum/#!forum/littleproxy

Project reports, including the [API Documentation]
(http://adamfisk.github.io/LittleProxy/apidocs/index.html), can be found here:

http://adamfisk.github.io/LittleProxy/

Benchmarking instructions and results can be found [here](performance).

Acknowledgments
---------------
{'fraction_non_alphanumeric': 0.0960016237061092, 'fraction_numerical': 0.006088897909478384, 'mean_word_length': 3.0162999185004074, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '435627', 'n_tokens_mistral': 1377, 'n_tokens_neox': 1259, 'n_words': 441}