-
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
69
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.
+1,812
−33
Open
Changes from 56 commits
Commits
Show all changes
69 commits
Select commit
Hold shift + click to select a range
a09ba4f
CSHARP-734: SOCKS5 Proxy Support
papafe 6696184
Small fix
papafe b3020b5
Added options to MongoClient settings
papafe 7931f70
Added uri options test for proxy options
papafe 186df67
Added additional checks on parsing.
papafe 567bfa7
Small fix
papafe feaa948
Added base implementation
papafe f8bd6a3
Improvements plus initial tests
papafe 3665a29
Various corrections
papafe 3845931
Improvements
papafe 83cace4
Various fixes
papafe fad7d42
Simplification
papafe 2ca4b3f
Added comments
papafe a715fef
First version of setting class
papafe e710b13
Various fixes
papafe cbea41d
Small improvements
papafe d49fff5
Added async version
papafe 74ade29
Simplifications
papafe b9ceea0
Removed unused
papafe d2cc5f9
Removed flush and simplified
papafe fda35a1
Simplification
papafe a76dc1d
Fixed auth
papafe 8e7570f
Removed unused parameters
papafe 9d23395
Fixed whitespace
papafe 3cfe101
Added use of async
papafe 896292d
Added comments and removed unused methods
papafe 3d1d2bd
File scoped namespaces
papafe 01dfdb1
Added connection string tests
papafe 6064af9
Added MongoClientSettings test
papafe fb50e10
Removed unused using.
papafe e78c55d
Removed the builder
papafe aa676d5
Added unit tests
papafe 2293afb
Fixed tests and renaming
papafe 26fa95b
Removed comment
papafe a1bb6d3
Small correction
papafe b57542d
Fixed test
papafe 2df31f3
Fixed test
papafe 35f688e
Improved tests
papafe 35f98d1
Improved test.
papafe 69d5190
Removed unused parameter.
papafe c64af48
Evergreen test
papafe cfc32f1
Correction
papafe 05612e1
Small fixes
papafe 3ab4115
Evergreen improvements
papafe d53fda2
Test improvements
papafe d84416e
Small improvements and fix
papafe 58ffb77
Small fixes
papafe 57e6354
Small fix
papafe dfea13d
Small fix
papafe 91fb165
Added missing trait.
papafe bb34734
Trying to add command check
papafe d8e1ecd
Corrected the command calculation
papafe d8569f4
Corrected API
papafe 345614e
Small corrections
papafe 4402181
Smal fix
papafe 97a420d
Various small corrections.
papafe d4bfa81
Small corrections according to PR.
papafe 188c274
Small fixes following PR.
papafe f6163db
Other small fixes.
papafe 3f80519
Added disposal of stream and socket
papafe 286a281
Fix
papafe 8f41748
Removed unnecessary test.
papafe d94aaa5
Added cleanup stage
papafe 8930517
Testing proxyStreamFactory as a wrapper
papafe 142e3fc
Various small fixes
papafe 19b1e1a
Use of LINQ
papafe 4568065
Various fixes
papafe 9c86f44
Added missing docs and fixed error message.
papafe 767d1c3
added comment
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
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": {} | ||
} | ||
] | ||
} |
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,121 @@ | ||
tests: | ||
- | ||
description: "proxyPort without proxyHost" | ||
uri: "mongodb://localhost/?proxyPort=1080" | ||
valid: false | ||
warning: false | ||
hosts: ~ | ||
auth: ~ | ||
options: ~ | ||
- | ||
description: "proxyUsername without proxyHost" | ||
uri: "mongodb://localhost/?proxyUsername=abc" | ||
valid: false | ||
warning: false | ||
hosts: ~ | ||
auth: ~ | ||
options: ~ | ||
- | ||
description: "proxyPassword without proxyHost" | ||
uri: "mongodb://localhost/?proxyPassword=def" | ||
valid: false | ||
warning: false | ||
hosts: ~ | ||
auth: ~ | ||
options: ~ | ||
- | ||
description: "all other proxy options without proxyHost" | ||
uri: "mongodb://localhost/?proxyPort=1080&proxyUsername=abc&proxyPassword=def" | ||
valid: false | ||
warning: false | ||
hosts: ~ | ||
auth: ~ | ||
options: ~ | ||
- | ||
description: "proxyUsername without proxyPassword" | ||
uri: "mongodb://localhost/?proxyHost=localhost&proxyUsername=abc" | ||
valid: false | ||
warning: false | ||
hosts: ~ | ||
auth: ~ | ||
options: ~ | ||
- | ||
description: "proxyPassword without proxyUsername" | ||
uri: "mongodb://localhost/?proxyHost=localhost&proxyPassword=def" | ||
valid: false | ||
warning: false | ||
hosts: ~ | ||
auth: ~ | ||
options: ~ | ||
- | ||
description: "multiple proxyHost parameters" | ||
uri: "mongodb://localhost/?proxyHost=localhost&proxyHost=localhost2" | ||
valid: false | ||
warning: false | ||
hosts: ~ | ||
auth: ~ | ||
options: ~ | ||
- | ||
description: "multiple proxyPort parameters" | ||
uri: "mongodb://localhost/?proxyHost=localhost&proxyPort=1234&proxyPort=12345" | ||
valid: false | ||
warning: false | ||
hosts: ~ | ||
auth: ~ | ||
options: ~ | ||
- | ||
description: "multiple proxyUsername parameters" | ||
uri: "mongodb://localhost/?proxyHost=localhost&proxyUsername=abc&proxyUsername=def&proxyPassword=123" | ||
valid: false | ||
warning: false | ||
hosts: ~ | ||
auth: ~ | ||
options: ~ | ||
- | ||
description: "multiple proxyPassword parameters" | ||
uri: "mongodb://localhost/?proxyHost=localhost&proxyUsername=abc&proxyPassword=123&proxyPassword=456" | ||
valid: false | ||
warning: false | ||
hosts: ~ | ||
auth: ~ | ||
options: ~ | ||
- | ||
description: "only host present" | ||
uri: "mongodb://localhost/?proxyHost=localhost" | ||
valid: true | ||
warning: false | ||
hosts: ~ | ||
auth: ~ | ||
options: {} | ||
- | ||
description: "host and default port present" | ||
uri: "mongodb://localhost/?proxyHost=localhost&proxyPort=1080" | ||
valid: true | ||
warning: false | ||
hosts: ~ | ||
auth: ~ | ||
options: {} | ||
- | ||
description: "host and non-default port present" | ||
uri: "mongodb://localhost/?proxyHost=localhost&proxyPort=12345" | ||
valid: true | ||
warning: false | ||
hosts: ~ | ||
auth: ~ | ||
options: {} | ||
- | ||
description: "replicaset, host and non-default port present" | ||
uri: "mongodb://rs1,rs2,rs3/?proxyHost=localhost&proxyPort=12345" | ||
valid: true | ||
warning: false | ||
hosts: ~ | ||
auth: ~ | ||
options: {} | ||
- | ||
description: "all options present" | ||
uri: "mongodb://rs1,rs2,rs3/?proxyHost=localhost&proxyPort=12345&proxyUsername=asdf&proxyPassword=qwerty" | ||
valid: true | ||
warning: false | ||
hosts: ~ | ||
auth: ~ | ||
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.