If you make network connections in a local network of a big company, you often have no direct internet access. There are proxy for mail, web, ftp and other services. So you need to know the proxy settings of your computer.
Whether you use CURL, httpsocket or something else to download files, all expect that you provide the proxy settings.
To get them we have plugin classes: SystemConfigurationMBS and WindowsProxyMBS.
We do have examples for both, but the easiest for you may be to just copy the code from our Updater Kit. Of course you need a license for Updater Kit to use it.