Networking_Proxy_GetProxyAddress Function
Header: #include <applibs/networking.h>
Gets the network address used by the proxy.
const char *Networking_Proxy_GetProxyAddress(const Networking_ProxyConfig *proxyConfig);
Parameters
proxyConfig
A pointer to the Networking_ProxyConfig struct with the proxy configuration.
Errors
If an error is encountered, returns NULL and sets errno
to the error value.
- EFAULT: the proxyConfig parameter is NULL.
Any other errno
may also be specified; such errors aren't deterministic and there's no guarantee that the same behavior will be retained through system updates.
Returns
On success: Returns a const pointer to the proxy address. Remains valid until Networking_Proxy_Destroy is called.
On failure: Returns NULL.
Concepts and samples
The proxy code snippets demonstrate the following:
- The Configure Proxy Settings code snippet demonstrates how to configure the proxy settings on an Azure Sphere device.
- The Get Proxy Settings code snippet demonstrates how to retrieve the proxy settings on an Azure Sphere device.
- The Enable/Disable Configured Proxy code snippet demonstrates how to enable/disable an already configured proxy on an Azure Sphere device.
The HTTPS samples demonstrate using the HTTPS_Curl_Easy and HTTPS_Curl_Multi APIs to fetch content over HTTPS. By default, they configure the cURL handle to use a proxy.
The AzureIoT sample contains instructions and code for adding web proxy support to the sample.