Skip to content
This repository was archived by the owner on Dec 13, 2023. It is now read-only.

Commit d761d36

Browse files
committed
additional logging
1 parent 8b3b3fc commit d761d36

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

browsermob-core/src/main/java/net/lightbody/bmp/BrowserMobProxyServer.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,10 +1016,15 @@ public void setTrustAllServers(boolean trustAllServers) {
10161016
throw new IllegalStateException("Cannot disable upstream server verification after the proxy has been started");
10171017
}
10181018

1019+
System.out.println("trustAllServers is " + trustAllServers);
1020+
10191021
if (trustAllServers) {
1022+
System.out.println("trustAllServers was true, setting trustSource to null");
10201023
trustSource = null;
10211024
} else {
1025+
System.out.println("trustAllServers was false, going to check what trustSource is");
10221026
if (trustSource == null) {
1027+
System.out.println("trustSource was null, setting it to defaultTrustSource");
10231028
trustSource = TrustSource.defaultTrustSource();
10241029
}
10251030
}

browsermob-rest/src/main/java/net/lightbody/bmp/proxy/ProxyManager.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,14 @@ public LegacyProxyServer create(Map<String, String> options, Integer port, Strin
146146
}
147147

148148
if (trustAllServers) {
149+
System.out.println("trustAllServers is true");
149150
if (proxy instanceof BrowserMobProxyServer) {
151+
System.out.println("Going to trust all servers");
150152
((BrowserMobProxyServer) proxy).setTrustAllServers(true);
151153
}
154+
} else {
155+
System.out.println("Disabling mitm");
156+
((BrowserMobProxyServer) proxy).setMitmDisabled(true);
152157
}
153158

154159
if (useDirect) {

0 commit comments

Comments
 (0)