-
Notifications
You must be signed in to change notification settings - Fork 313
Add support for event hub transport layer proxy #3051
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
Closed
Closed
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
f44c43b
support for eventhub proxy using tokio socks
6f560bc
lint
2ed6aa4
lint
bd2be2d
CR fixes
f2a0fe6
CR fixes
f962c9d
use macro to have one builder for with/without socks5
62a7f91
lint
dbfd605
cr fix
0f8cd3b
cr fix
e52ac92
cr fixes
ad5f5ca
cr fixes
f3afb78
ci fixes
1a7fbb8
cr fixes
5faf056
cr fixes
766b89c
make sanitize public
99f8264
cargo update
d2d4325
lint
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -4,3 +4,6 @@ amqps | |
sastoken | ||
smallulong | ||
smalluint | ||
proxyuser | ||
testuser | ||
testpass |
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 |
---|---|---|
|
@@ -6,6 +6,49 @@ Azure AMQP crate for consumption of AMQP based packages in the Azure SDK for Rus | |
|
||
This crate is part of a collection of crates: for more information please refer to [https://github.com/azure/azure-sdk-for-rust](https://github.com/azure/azure-sdk-for-rust). | ||
|
||
## SOCKS5 Proxy Support | ||
|
||
This crate supports SOCKS5 proxy connections for corporate environments. | ||
|
||
**Note**: SOCKS5 support requires enabling the `socks5` feature: | ||
|
||
```toml | ||
[dependencies] | ||
azure_core_amqp = { version = "0.8", features = ["socks5"] } | ||
``` | ||
|
||
SOCKS5 support is enabled by configuring the `custom_endpoint` option with a SOCKS5 URL: | ||
|
||
```rust,no_run | ||
use azure_core_amqp::AmqpConnectionOptions; | ||
|
||
# fn main() -> Result<(), Box<dyn std::error::Error>> { | ||
let options = AmqpConnectionOptions { | ||
custom_endpoint: Some("socks5h://proxy.contoso.com:8080".parse()?), | ||
..Default::default() | ||
}; | ||
# Ok(()) | ||
# } | ||
``` | ||
|
||
### Supported Protocols | ||
|
||
- **socks5://** - Standard SOCKS5 with local DNS resolution | ||
- **socks5h://** - SOCKS5 with proxy-side DNS resolution (recommended for corporate environments) | ||
|
||
### Authentication | ||
|
||
Username/password authentication is supported via the proxy URL: | ||
```text | ||
socks5://username:[email protected]:1080 | ||
``` | ||
|
||
All proxy credentials are automatically masked in log output for security. | ||
|
||
### Dependencies | ||
|
||
SOCKS5 support adds the `tokio-socks` dependency to the crate. | ||
|
||
## Testing the AMQP Client | ||
|
||
The AMQP package is tested using the standard `cargo test` command line: | ||
|
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.
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.