Skip to content

Commit

Permalink
Documentation updates for the selenium 3/firefox issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jekh committed Feb 4, 2017
1 parent 3352e50 commit 4485feb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 22 deletions.
21 changes: 3 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,6 @@ Then create a proxy server instance:
The "port" is the port of the newly-created proxy instance, so configure your HTTP client or web browser to use a proxy on the returned port.
For more information on the features available in the REST API, see [the REST API documentation](#rest-api).

## Changes since the 2.1-beta series

**The `browsermob-core-littleproxy` module is now `browsermob-core`**

After six beta releases, the LittleProxy implementation now supports more features and is more stable than the legacy implementation. To reflect that level of maturity and long-term support, the `browsermob-core` module now uses LittleProxy by default.

**Note about Legacy support**: In the 2.1-betas, if you were using the `ProxyServer` or `LegacyProxyServer` classes, use the `browsermob-core-legacy` module in 2.1.0 and higher.

*LittleProxy support for `LegacyProxyServer` has moved to `BrowserMobProxyServerLegacyAdapter`*. Using the LittleProxy implementation with the `LegacyProxyServer` interface is still fully supported as a means to help you transition from 2.0.0. Unlike the 2.1-beta series, the `BrowserMobProxyServer` class
no longer implements `LegacyProxyServer`; however, the `BrowserMobProxyServerLegacyAdapter` can be used to integrate legacy code with the new LittleProxy interface. You must still use the `browsermob-core-legacy` module when using the LegacyAdapter.

```java
LegacyProxyServer proxy = new BrowserMobProxyServerLegacyAdapter();
proxy.setPort(8081); // method only supported by the legacy interface
proxy.start();
```

## Changes since 2.0.0

The new [BrowserMobProxyServer class](browsermob-core/src/main/java/net/lightbody/bmp/BrowserMobProxyServer.java) has replaced the legacy ProxyServer implementation. The legacy implementation is no longer actively supported; all new code should use `BrowserMobProxyServer`. We highly recommend that existing code migrate to the new implementation.
Expand Down Expand Up @@ -118,7 +101,7 @@ The proxy is programmatically controlled via a REST interface or by being embedd

### REST API

**New in 2.1:** The REST API now supports LittleProxy. As of 2.1.0-beta-3, LittleProxy is the default implementation. (You may specify `--use-littleproxy false` to disable LittleProxy in favor of the legacy Jetty 5-based implementation.)
**New in 2.1:** LittleProxy is the default implementation of the REST API. You may specify `--use-littleproxy false` to disable LittleProxy in favor of the legacy Jetty 5-based implementation.

To get started, first start the proxy by running `browsermob-proxy` or `browsermob-proxy.bat` in the bin directory:

Expand Down Expand Up @@ -239,6 +222,8 @@ Consult the Javadocs on the `net.lightbody.bmp.BrowserMobProxy` class for the fu

### Using With Selenium

**Selenium 3 users**: Due to a [geckodriver issue](https://github.com/mozilla/geckodriver/issues/97), Firefox 51 and lower do not properly support proxies with WebDriver's DesiredCapabilities. See [this answer](http://stackoverflow.com/a/41373808/4256475) for a suitable work-around.

BrowserMob Proxy makes it easy to use a proxy in Selenium tests:
```java
// start the proxy
Expand Down
6 changes: 2 additions & 4 deletions mitm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@ The MITM module uses "sensible" default settings that should work for the vast m
### LittleProxy (without BrowserMob Proxy)
**Note:** The MITM module requires Java 7

**Compatibility note:** The current version of the MITM module is compatible with LittleProxy 1.1.0. If you are using LittleProxy 1.1.0-beta2 or earlier, use MITM 2.1.0-beta-5.

To use MITM with standalone LittleProxy, add a dependency to the mitm module in your pom:

```xml
<!-- existing LittleProxy dependency -->
<dependency>
<groupId>org.littleshoot</groupId>
<artifactId>littleproxy</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
</dependency>

<-- new dependency on the MITM module -->
Expand Down Expand Up @@ -102,7 +100,7 @@ Whether you are using the MITM module with LittleProxy or BrowserMob Proxy, you
You can also load the root certificate and private key from separate PEM-encoded files using the `PemFileCertificateSource` class, or create an implementation of `CertificateAndKeySource` that loads the certificate and private key from another source.

## Trusted Root Certificates
As of 2.1.0-beta-6, the MITM module explicitly trusts the Certificate Authorities in the JVM's default trust store, as well as a default list of trusted CAs derived from NSS/Firefox's list of trusted CAs (courtesy of the cURL team: https://curl.haxx.se/ca/cacert.pem).
The MITM module trusts the Certificate Authorities in the JVM's default trust store, as well as a default list of trusted CAs derived from NSS/Firefox's list of trusted CAs (courtesy of the cURL team: https://curl.haxx.se/ca/cacert.pem).

To add your own CA to the list of root CAs trusted by the MITM module, use the `add()` methods in the `net.lightbody.bmp.mitm.TrustSource` class. Alternatively, it is possible to disable upstream server validation, but this is only recommended when testing. Examples:
```java
Expand Down

0 comments on commit 4485feb

Please sign in to comment.