ruby / ruby/net-http

Feature Request: Add support for SSL settings for SSL proxies

Open
#209 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
148
Forks
95
Avg merge
10h 54m
Merged PRs (30d)
4

Description

https://github.com/ruby/net-http/pull/55 added support for HTTPS proxies, which is a nice feature. In that MR the lack of ability to set verification settings was called out as improvement point, but wasn't a blocker. I believe being able to pass SSL settings to the Proxy socket is needed. As outbound proxies are almost always internal to an org, it's quite likely they will use an internal CA, or possibly require mutual TLS. In both these cases being able to pass CA files or key settings to the SSL socket is either very nice, or required. Unless the proxy uses a publicly trusted cert, the only option is to build the internal cert into the host level CA config. Mutual TLS isn't possible.

This has tripped my attempt to use this feature, and I think users of libraries leveraging this will be confused that the endpoint level SSL settings, like specifying a CA bundle, don't apply to the proxy SSL connection.

As an aside, I also think that the argument list to Net::HTTP.new is getting a bit cumbersome. When using a HTTPS Proxy that doesn't require auth it's likely the Net::HTTP.new will look something like: Net::HTTP.new(endpoint.host, endpoint.port, proxy.host, proxy.port, nil, nil, nil, true). I think for this level of advanced config kwargs might be more manageable or instance attributes, like .use_ssl=.

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 the Net::HTTP.new entry point and the HTTPS proxy handling added by ruby/net-http#55. Trace how the proxy SSL socket is configured and identify the existing endpoint SSL settings that do not reach it. Done means proxy-specific CA and client key settings can be supplied, with behavior covered by the relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
networking
Issue type
Feature
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.