diff --git a/browsermob-core/src/main/java/net/lightbody/bmp/BrowserMobProxyServer.java b/browsermob-core/src/main/java/net/lightbody/bmp/BrowserMobProxyServer.java index d4ddc5543..acff67ea7 100644 --- a/browsermob-core/src/main/java/net/lightbody/bmp/BrowserMobProxyServer.java +++ b/browsermob-core/src/main/java/net/lightbody/bmp/BrowserMobProxyServer.java @@ -258,6 +258,11 @@ public class BrowserMobProxyServer implements BrowserMobProxy { * Base64-encoded credentials to use to authenticate with the upstream proxy. */ private volatile String chainedProxyCredentials; + + /** + * Determines whether to start LittleProxy in transparent mode. + */ + private volatile boolean transparent = false; public BrowserMobProxyServer() { } @@ -299,6 +304,7 @@ public int getMaximumResponseBufferSizeInBytes() { return getMaximumResponseBufferSize(); } }) + .withTransparent(transparent) .withServerResolver(delegatingResolver) .withAddress(clientBindSocket) .withConnectTimeout(connectTimeoutMs) @@ -1029,6 +1035,10 @@ public boolean isMitmDisabled() { public void setUseEcc(boolean useEcc) { this.useEcc = useEcc; } + + public void setTransparent(boolean transparent) { + this.transparent = transparent; + } /** * Adds the basic browsermob-proxy filters, except for the relatively-expensive HAR capture filter.