mitre / mitre/HTTP-Proxy-Servlet

HTTPS SNI connections

Open
#61 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
1.5k
Forks
557
PR merge metrics
No merged PRs in 30d

Description

I can not connect to an HTTPS server with SNI with version 1.6 of the HTTP-Proxy-Servlet.

I locally patched the org.mitre.dsmiley.httpproxy.ProxyServlet.createHttpClient(HttpParams) method to enable SNI like the page [1] describes.

I used the following code:

SSLContext sslcontext = SSLContexts.createSystemDefault();
SSLSocketFactory sslsf = new SSLSocketFactory(sslcontext) {
  // here the code from [1]
}
HttpClientBuilder builder = HttpClients.custom().setConnectionManager(new PoolingHttpClientConnectionManager()).setSSLSocketFactory(sslsf);
builder.disableCookieManagement();
if (hcParams.isParameterFalse(ClientPNames.HANDLE_REDIRECTS)) {
  builder.disableRedirectHandling();
}
return builder.build();

I'm not sure if this is compatible with the code for org.apache.http.impl.client.SystemDefaultHttpClient in createHttpClient().

[1] https://wiki.apache.org/HttpComponents/SNISupport

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at org.mitre.dsmiley.httpproxy.ProxyServlet.createHttpClient(HttpParams) and compare its SystemDefaultHttpClient setup with the SNI guidance in the linked HttpComponents documentation. Verify that HTTPS connections to SNI servers succeed while preserving the existing redirect and cookie behavior; no specific test file is mentioned.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.