Prioritized roadmap for extension modules, aligned with javascript-proxy-headers and python-proxy-headers.
┌─────────────────────────────────────────────────────────────┐
│ ruby-proxy-headers │
├─────────────────────────────────────────────────────────────┤
│ Faraday / HTTParty / Excon helpers │
│ │ │
│ ▼ │
│ Net::HTTP patch — CONNECT send + capture + thread-local │
└─────────────────────────────────────────────────────────────┘
RubyProxyHeaders::NetHTTP.patch!extendsNet::HTTP#connectfor HTTPS + proxy.last_proxy_connect_response_headerson theNet::HTTPinstance.Thread.current[:ruby_proxy_headers_connect_headers]+RubyProxyHeaders.proxy_connect_response_headersfor cross-library reads.
File: lib/ruby_proxy_headers/net_http.rb
- Adapter
ruby_proxy_headers_net_http(subclass ofFaraday::Adapter::NetHttp) merges CONNECT response headers into Faraday response headers. - Helper
RubyProxyHeaders::FaradayIntegration.connection(...).
File: lib/ruby_proxy_headers/faraday.rb
RubyProxyHeaders::ProxyHeadersConnectionAdapter— passproxy_connect_request_headersin HTTParty options.
File: lib/ruby_proxy_headers/httparty.rb
Ethon does not expose libcurl CURLOPT_PROXYHEADER in its option layer. See DEFERRED.md.
- Sending extra CONNECT headers: supported upstream via
:ssl_proxy_headers;RubyProxyHeaders::ExconIntegration.getpasses them through. - Reading CONNECT response headers: not exposed on
Excon::Responsefor the tunneled request. See DEFERRED.md.
File: lib/ruby_proxy_headers/excon.rb
Uses net-http-persistent; needs dedicated integration. See DEFERRED.md.
bundle exec ruby test/test_proxy_headers.rb with PROXY_URL set. Modules: net_http, faraday, httparty, excon (excon is a smoke test; CONNECT response headers are not asserted).
Updated: March 2026