-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add https proxy support #6215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gaganis
wants to merge
8
commits into
eclipse-vertx:master
Choose a base branch
from
gaganis:https-proxy-support
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add https proxy support #6215
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
fb36bc9
Add https proxy support
gaganis 8ae9b16
Update vertx-core/src/main/java/io/vertx/core/net/ProxyOptions.java
gaganis 050a51a
User assertions for expected failures in HttpsProxyTest
gaganis 68916d0
Add https proxy support to Proxy rule
gaganis 93c8818
Test sendFile through https proxy
gaganis 2e95e4b
Add isSsl tests
gaganis 5bfc8a9
Fix isSsl inconsistency
gaganis d9f9a04
Fix hanging of http origin through https proxy
gaganis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the motivation of this change ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is used in sendFile to decide whether the connection is encrypted and if the connection is encrypted then it desides not to use zero-copy. The reasoning to my understanding is the the way zero copy writes to the socket bypasses the encryption which is why it is disabled.
In my PR I have opted for
isSsl()to refer to how we connect to the origin and not if the connection is encrypted.So the addition covers the case where we have an SSL connection to the proxy but the origin is plain http. In this case we would have encryption on the pipeline. In that case
isSsl()would be false but encryption would exist in the pipeline.Maybe we should write a test to actually see how this is working. @vietj Are you aware of any tests that exercise this zero-copy function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your comment @vietj. It led to finding multiple problems with my implementation that I have now hopefully fixed. I have added a test to verify my motivation for the zero copy
io.vertx.tests.http.HttpsProxyTest#testHttpsProxy_sendFileThroughTunneland I have found the way that I addressed it above was not correct. Instead the fix should have been inNetClientImpl.initChannel. I have fixed that in the latest commited code.This work also motivated me that I needed to be more precise with how I address my intention to keep
isSsl()independent of the existence of an https proxy. The way this was working for not consistent before. I have addedio.vertx.tests.http.ProxyIsSslConsistencyTestto confirm this and fixed the cases that were not working correctly.