fix: support HTTP proxy in c8y remote access plugin#3600
fix: support HTTP proxy in c8y remote access plugin#3600jarhodes314 merged 3 commits intothin-edge:mainfrom
Conversation
Signed-off-by: James Rhodes <jarhodes314@gmail.com>
1a8cd28 to
957f742
Compare
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
Robot Results
|
| let stream = TcpStream::connect(&host_port).await.into_diagnostic()?; | ||
| let mut stream = match address.scheme() { | ||
| ProxyScheme::Https => { | ||
| let connector: TlsConnector = config.clone().unwrap().into(); |
There was a problem hiding this comment.
Could the config be None?
There was a problem hiding this comment.
Not in practice. In the unit tests, we set config to None in order to avoid TLS on the server it's hosting, but for the plugin code that calls this, we always have this value set
| assert_cmd = "2.0" | ||
| assert_matches = "1.5" | ||
| async-compat = "0.2.1" | ||
| async-http-proxy = "1.2" |
There was a problem hiding this comment.
Being surprised to see that this has not been required sooner, notably for c8y_auth_proxy to connect c8y, I added a test 4391f1e. Indeed, this dependency is not required before because c8y_auth_proxy 's connection is opened by reqwest which is properly configured with the proxy when it applies.
|
I've pushed a system test to verify the remote access access. |
reubenmiller
left a comment
There was a problem hiding this comment.
Approved (and tested it locally)
Signed-off-by: reubenmiller <reuben.d.miller@gmail.com>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
651d642 to
136e46e
Compare
Proposed changes
Support the HTTP proxy configuration in the c8y remote access plugin. This was an accidental omission with the proxy feature.
Types of changes
Paste Link to the issue
Checklist
just prepare-devonce)just formatas mentioned in CODING_GUIDELINESjust checkas mentioned in CODING_GUIDELINESFurther comments