Skip to content

Add HTTP proxy support to iotcored #821

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

Merged
merged 1 commit into from
Apr 3, 2025

Conversation

cookpate
Copy link
Member

@cookpate cookpate commented Mar 27, 2025

Allows MQTT connections on networks where all outbound communication is gated by a proxy server.

Tested by running a deployment to a remote tinyproxy server. Configure the network proxy by writing the following configuration object to services/aws.greengrass.NucleusLite/configuration/networkProxy:

"networkProxy": {
    "noProxyAddresses": "192.168.1.1,*.example.com:80",
    "proxy": {
        "url": "http://www.myproxy.io:8888"
    }
}

These settings are equivalent to setting no_proxy and https_proxy environment variables for OpenSSL

Description of changes:

  • Split TLS connect flow into different paths for http proxy and no proxy.
  • Determine based on environment variables and configuration database whether to connect with a proxy

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

@cookpate cookpate force-pushed the proxy-support branch 9 times, most recently from c7e8291 to a883aea Compare April 1, 2025 21:58
archigup
archigup previously approved these changes Apr 2, 2025
@cookpate cookpate enabled auto-merge (squash) April 3, 2025 20:34
@cookpate cookpate disabled auto-merge April 3, 2025 20:35
Allows MQTT connections on networks where all outbound communication
is gated by a proxy server.

Tested by running a deployment to a remote tinyproxy server.
Configure the network proxy by writing the following configuration
object to services/aws.greengrass.NucleusLite/configuration/networkProxy:
networkProxy: {
    noProxyAddresses: "192.168.1.1,*.example.com:80",
    proxy: {
        url: "http://www.myproxy.io:8888"
    }
}
These settings are equivalent to setting no_proxy and https_proxy
environment variables for OpenSSL
@cookpate cookpate enabled auto-merge (rebase) April 3, 2025 20:39
@cookpate cookpate merged commit 6d7eefb into aws-greengrass:main Apr 3, 2025
17 checks passed
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.

2 participants