-
Notifications
You must be signed in to change notification settings - Fork 1.3k
CSHARP-734: SOCKS5 Proxy Support #1731
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
papafe
wants to merge
87
commits into
mongodb:main
Choose a base branch
from
papafe:csharp734
base: main
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
Changes from all commits
Commits
Show all changes
87 commits
Select commit
Hold shift + click to select a range
161bcb0
CSHARP-734: SOCKS5 Proxy Support
papafe 0467f72
Small fix
papafe 38ca1ab
Added options to MongoClient settings
papafe 558656e
Added uri options test for proxy options
papafe 372262d
Added additional checks on parsing.
papafe be65cf4
Small fix
papafe 74fd94d
Added base implementation
papafe 9afcac1
Improvements plus initial tests
papafe 1453c60
Various corrections
papafe 0eb374c
Improvements
papafe 35f6c17
Various fixes
papafe 91f60cd
Simplification
papafe 843d6f3
Added comments
papafe d651145
First version of setting class
papafe 079d9c2
Various fixes
papafe 6aaa7d8
Small improvements
papafe 430ad84
Added async version
papafe 94c42cd
Simplifications
papafe a329f37
Removed unused
papafe 35a0e48
Removed flush and simplified
papafe 34c8145
Simplification
papafe 4bfd007
Fixed auth
papafe 5a733d6
Removed unused parameters
papafe e34be95
Fixed whitespace
papafe c104292
Added use of async
papafe e49b60f
Added comments and removed unused methods
papafe eac292d
File scoped namespaces
papafe d19dd1c
Added connection string tests
papafe b913f07
Added MongoClientSettings test
papafe 7f3a0c4
Removed unused using.
papafe ed02b51
Removed the builder
papafe d2839f1
Added unit tests
papafe 23b30cd
Fixed tests and renaming
papafe f35e0a4
Removed comment
papafe e5636aa
Small correction
papafe 532738d
Fixed test
papafe 9cee149
Fixed test
papafe 91887c5
Improved tests
papafe e46575f
Improved test.
papafe ccd6e83
Removed unused parameter.
papafe d537f3d
Evergreen test
papafe ae5f096
Correction
papafe 95068bc
Small fixes
papafe 678956d
Evergreen improvements
papafe 449bcf5
Test improvements
papafe cbea7d9
Small improvements and fix
papafe c35e098
Small fixes
papafe bec16a5
Small fix
papafe 3ccfc6c
Small fix
papafe 52419d7
Added missing trait.
papafe 48e8d91
Trying to add command check
papafe ba322d4
Corrected the command calculation
papafe 4ac9e00
Corrected API
papafe c39f80a
Small corrections
papafe 6f6ac2d
Smal fix
papafe 392fab3
Various small corrections.
papafe 8aa643f
Small corrections according to PR.
papafe e3d023a
Small fixes following PR.
papafe fc845c1
Other small fixes.
papafe 11c71a6
Added disposal of stream and socket
papafe c78fc55
Fix
papafe 065e487
Removed unnecessary test.
papafe 07694b4
Added cleanup stage
papafe c68e416
Testing proxyStreamFactory as a wrapper
papafe 1f1b051
Various small fixes
papafe b50a252
Use of LINQ
papafe cf3d5a5
Various fixes
papafe 67bcc6f
Added missing docs and fixed error message.
papafe 2b68319
added comment
papafe 7d4e234
Small naming corrections
papafe ae3174e
Remove unused
papafe cceeff1
Fixed cleanup
papafe 8c4a8e9
Removed unused
papafe 7cadcac
Small corrections.
papafe 1cd9e8d
Fixed error message.
papafe d316dc2
Moved tests to their own file.
papafe 0f2ab46
CSHARP-5581: Test MONGODB-X509 on cloud-dev (#1757)
papafe 1ab97b1
Removed double definition.
papafe bc7ec34
Correction.
papafe c8b702a
Improved exception message.
papafe 0ef36f4
Small correction.
papafe 34d86a2
Added pre-checking of host, username and password length.
papafe 87a0d09
Added explicit error messages.
papafe 8b0c369
Small fixes to tests
papafe 60cf78a
Various small fixes following PR's suggestions
papafe 79fb680
Moved stream extension methods to more appropriate place.
papafe b4d184a
Corrected order and parameter name.
papafe 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
{ | ||
"tests": [ | ||
{ | ||
"description": "proxyPort without proxyHost", | ||
"uri": "mongodb://localhost/?proxyPort=1080", | ||
"valid": false, | ||
"warning": false, | ||
"hosts": null, | ||
"auth": null, | ||
"options": null | ||
}, | ||
{ | ||
"description": "proxyUsername without proxyHost", | ||
"uri": "mongodb://localhost/?proxyUsername=abc", | ||
"valid": false, | ||
"warning": false, | ||
"hosts": null, | ||
"auth": null, | ||
"options": null | ||
}, | ||
{ | ||
"description": "proxyPassword without proxyHost", | ||
"uri": "mongodb://localhost/?proxyPassword=def", | ||
"valid": false, | ||
"warning": false, | ||
"hosts": null, | ||
"auth": null, | ||
"options": null | ||
}, | ||
{ | ||
"description": "all other proxy options without proxyHost", | ||
"uri": "mongodb://localhost/?proxyPort=1080&proxyUsername=abc&proxyPassword=def", | ||
"valid": false, | ||
"warning": false, | ||
"hosts": null, | ||
"auth": null, | ||
"options": null | ||
}, | ||
{ | ||
"description": "proxyUsername without proxyPassword", | ||
"uri": "mongodb://localhost/?proxyHost=localhost&proxyUsername=abc", | ||
"valid": false, | ||
"warning": false, | ||
"hosts": null, | ||
"auth": null, | ||
"options": null | ||
}, | ||
{ | ||
"description": "proxyPassword without proxyUsername", | ||
"uri": "mongodb://localhost/?proxyHost=localhost&proxyPassword=def", | ||
"valid": false, | ||
"warning": false, | ||
"hosts": null, | ||
"auth": null, | ||
"options": null | ||
}, | ||
{ | ||
"description": "multiple proxyHost parameters", | ||
"uri": "mongodb://localhost/?proxyHost=localhost&proxyHost=localhost2", | ||
"valid": false, | ||
"warning": false, | ||
"hosts": null, | ||
"auth": null, | ||
"options": null | ||
}, | ||
{ | ||
"description": "multiple proxyPort parameters", | ||
"uri": "mongodb://localhost/?proxyHost=localhost&proxyPort=1234&proxyPort=12345", | ||
"valid": false, | ||
"warning": false, | ||
"hosts": null, | ||
"auth": null, | ||
"options": null | ||
}, | ||
{ | ||
"description": "multiple proxyUsername parameters", | ||
"uri": "mongodb://localhost/?proxyHost=localhost&proxyUsername=abc&proxyUsername=def&proxyPassword=123", | ||
"valid": false, | ||
"warning": false, | ||
"hosts": null, | ||
"auth": null, | ||
"options": null | ||
}, | ||
{ | ||
"description": "multiple proxyPassword parameters", | ||
"uri": "mongodb://localhost/?proxyHost=localhost&proxyUsername=abc&proxyPassword=123&proxyPassword=456", | ||
"valid": false, | ||
"warning": false, | ||
"hosts": null, | ||
"auth": null, | ||
"options": null | ||
}, | ||
{ | ||
"description": "only host present", | ||
"uri": "mongodb://localhost/?proxyHost=localhost", | ||
"valid": true, | ||
"warning": false, | ||
"hosts": null, | ||
"auth": null, | ||
"options": {} | ||
}, | ||
{ | ||
"description": "host and default port present", | ||
"uri": "mongodb://localhost/?proxyHost=localhost&proxyPort=1080", | ||
"valid": true, | ||
"warning": false, | ||
"hosts": null, | ||
"auth": null, | ||
"options": {} | ||
}, | ||
{ | ||
"description": "host and non-default port present", | ||
"uri": "mongodb://localhost/?proxyHost=localhost&proxyPort=12345", | ||
"valid": true, | ||
"warning": false, | ||
"hosts": null, | ||
"auth": null, | ||
"options": {} | ||
}, | ||
{ | ||
"description": "replicaset, host and non-default port present", | ||
"uri": "mongodb://rs1,rs2,rs3/?proxyHost=localhost&proxyPort=12345", | ||
"valid": true, | ||
"warning": false, | ||
"hosts": null, | ||
"auth": null, | ||
"options": {} | ||
}, | ||
{ | ||
"description": "all options present", | ||
"uri": "mongodb://rs1,rs2,rs3/?proxyHost=localhost&proxyPort=12345&proxyUsername=asdf&proxyPassword=qwerty", | ||
"valid": true, | ||
"warning": false, | ||
"hosts": null, | ||
"auth": null, | ||
"options": {} | ||
} | ||
] | ||
} |
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.
Uh oh!
There was an error while loading. Please reload this page.