Skip to content
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

HTTP proxy support #290

Merged
merged 7 commits into from
Jul 18, 2022
Merged

HTTP proxy support #290

merged 7 commits into from
Jul 18, 2022

Conversation

BolongZhang-AWS
Copy link
Contributor

Previous approved staging repo PR: https://github.com/awslabs/private-aws-iot-device-client-staging/pull/4

Motivation

  • Please give a brief description for the background of this change.
    Adding HTTP proxy support with basic username and password authentication scheme.
  • Introduced new config type: HTTP proxy config. Default path is ~/.aws-iot-device-client/http-proxy.conf
  • Introduced new CLI argument --http-proxy-config for overriding default config setting in path ~/.aws-iot-device-client/http-proxy.conf

Modifications

  • Added PlainConfig::HttpProxyConfig with HTTP proxy related parameters
  • Implemented several functions from PlainConfig to support loading information from CLI, json config then validate.
  • Modified Config::ParseConfigFile to validate file path and permissions for HTTP proxy config file
  • Added ProxyUtils for HTTP proxy related validation function utilities
  • Unit tests

Change summary

Please describe what changes are included in this pull request.

Revision diff summary

If there is more than one revision, please explain what has been changed since the last revision.

Testing

Unit Test:

  • Added parameterized test for ProxyUtils
  • Added more http proxy config loading validation tests for /config/Config
    Manual testing:
  • Completed simple testing validations for pub/sub example, alone with other existing features.
  • CI test run result:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@@ -185,7 +185,7 @@ endif ()
###############################################
## Build the AWS IoT Device Client Executable #
###############################################
add_executable(${DC_PROJECT_NAME} ${DC_SRC})
add_executable(${DC_PROJECT_NAME} ${DC_SRC} source/util/ProxyUtils.cpp source/util/ProxyUtils.h)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure how this change made it back, but don't forget to remove the changes to the top-level CMakeLists and test/CMakeLists

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! addressed

RogerZhongAWS
RogerZhongAWS previously approved these changes Jul 15, 2022
@BolongZhang-AWS BolongZhang-AWS requested review from marcoemorais-aws and removed request for marcoemorais-aws July 15, 2022 18:25
@BolongZhang-AWS BolongZhang-AWS merged commit e19af86 into main Jul 18, 2022
@BolongZhang-AWS BolongZhang-AWS deleted the http_proxy branch July 18, 2022 17:39
joenghoyin pushed a commit to eguanatech/aws-iot-device-client-deprecated that referenced this pull request Aug 29, 2023
joenghoyin pushed a commit to eguanatech/aws-iot-device-client-deprecated that referenced this pull request Aug 30, 2023
* HTTP proxy support
# Conflicts:
#	docs/PERMISSIONS.md
#	source/config/Config.cpp
#	source/config/Config.h
#	test/config/TestConfig.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants