@@ -76,7 +76,6 @@ HttpResponse executeRequest(@NonNull HttpProxy httpProxy,
7676
7777 // If the origin is HTTPS, wrap the tunnel socket with a new SSLSocket (system CA)
7878 if (HTTPS .equalsIgnoreCase (targetUrl .getProtocol ())) {
79- Logger .v ("Wrapping tunnel socket with new SSLSocket for origin server handshake" );
8079 try {
8180 // Use the provided SSLSocketFactory, which is configured to trust the origin's CA
8281 finalSocket = sslSocketFactory .createSocket (
@@ -99,7 +98,6 @@ HttpResponse executeRequest(@NonNull HttpProxy httpProxy,
9998 } else {
10099 throw new IOException ("Failed to create SSLSocket to origin" );
101100 }
102- Logger .v ("SSL handshake with origin server completed" );
103101 } catch (Exception sslEx ) {
104102 Logger .e ("Failed to establish SSL connection to origin: " + sslEx .getMessage ());
105103 throw new IOException ("Failed to establish SSL connection to origin server" , sslEx );
@@ -135,6 +133,7 @@ HttpResponse executeRequest(@NonNull HttpProxy httpProxy,
135133 // Let socket-related IOExceptions pass through unwrapped for consistent error handling
136134 throw e ;
137135 } catch (Exception e ) {
136+ Logger .e ("Failed to execute request through custom tunnel: " + e .getMessage ());
138137 throw new IOException ("Failed to execute request through custom tunnel" , e );
139138 }
140139 }
@@ -168,7 +167,6 @@ HttpStreamResponse executeStreamRequest(@NonNull HttpProxy httpProxy,
168167
169168 // If the origin is HTTPS, wrap the tunnel socket with a new SSLSocket (system CA)
170169 if (HTTPS .equalsIgnoreCase (targetUrl .getProtocol ())) {
171- Logger .v ("Wrapping tunnel socket with new SSLSocket for origin server handshake" );
172170 try {
173171 // Use the provided SSLSocketFactory, which is configured to trust the origin's CA
174172 finalSocket = sslSocketFactory .createSocket (
@@ -191,7 +189,6 @@ HttpStreamResponse executeStreamRequest(@NonNull HttpProxy httpProxy,
191189 } else {
192190 throw new IOException ("Failed to create SSLSocket to origin" );
193191 }
194- Logger .v ("SSL handshake with origin server completed" );
195192 } catch (Exception sslEx ) {
196193 Logger .e ("Failed to establish SSL connection to origin: " + sslEx .getMessage ());
197194 throw new IOException ("Failed to establish SSL connection to origin server" , sslEx );
0 commit comments