HTTPS proxy is only enabled if the proxied connection is also SSL
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- ruby
- Domain
- networking
Research direction
Start in lib/net/http.rb around lines 1667-1674 and reproduce the reported Net::HTTP configuration with a clear HTTP target and HTTPS proxy. Trace the proxy socket setup and verify that clear HTTP requests can be transported through an HTTPS proxy without changing the target connection. Confirm the behavior with a focused regression test using the shown configuration.
Written by the indexing model from the issue text.
Description
irb(main):001> require 'net/http'
=> true
irb(main):002> n = Net::HTTP.new('192.0.2.10', 80, '127.0.0.1', 5000, nil, nil, nil, true)
=> #<Net::HTTP 192.0.2.10:80 open=false>
irb(main):003> n.instance_variable_get(:@proxy_use_ssl)
=> true
irb(main):004> n.start
=> #<Net::HTTP 192.0.2.10:80 open=true>
irb(main):005> n.get('/')
Data sent to the listener at 127.0.0.1:5000:
GET http://192.0.2.10/ HTTP/1.1
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Accept: */*
User-Agent: Ruby
Host: 192.0.2.10
This is due to the proxy SSL socket setup being inside a if use_ssl? block.
https://github.com/ruby/net-http/blob/master/lib/net/http.rb#L1667-L1674
Transporting clear HTTP over a HTTPS proxy is a valid configuration, the library should support this.
- Dominant language
- Ruby
- Stars
- 148
- Forks
- 95
- Avg merge
- 10h 54m
- Merged PRs (30d)
- 4
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ruby/net-http
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
-
Difficulty 5/5 Over a week Newbie friendliness 38/100
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Similar issues
-
SyncEm always forwards a dummy block, so wrapped methods lose their no-block/Enumerator behavior Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
dependabot
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
githubnext/gh-aw-cao#13349 ·
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·