diff options
author | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2016-10-27 14:56:05 +1100 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2016-11-24 11:42:25 +1100 |
commit | a055f6714fd06aa3b633b1bc44a8dbf42a0eedb0 (patch) | |
tree | 6223076e8bcfe2c828f4b40d6a4fb8760f520c7b /discover/platform.c | |
parent | 1dd51e986202e5e111c1042f148867bd08c2bedc (diff) | |
download | talos-petitboot-a055f6714fd06aa3b633b1bc44a8dbf42a0eedb0.tar.gz talos-petitboot-a055f6714fd06aa3b633b1bc44a8dbf42a0eedb0.zip |
Support HTTP(S) proxies when downloading resources
Allow the user to specify a HTTP and HTTPS proxy server. The discover
server will set the http_proxy and https_proxy environment variables,
enabling the proxy servers for any further HTTP(S) requests.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'discover/platform.c')
-rw-r--r-- | discover/platform.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/discover/platform.c b/discover/platform.c index 93cd057..cc6306f 100644 --- a/discover/platform.c +++ b/discover/platform.c @@ -87,6 +87,11 @@ static void dump_config(struct config *config) if (config->manual_console) pb_log(" (Manually set)\n"); + if (config->http_proxy) + pb_log(" HTTP Proxy: %s\n", config->http_proxy); + if (config->https_proxy) + pb_log(" HTTPS Proxy: %s\n", config->https_proxy); + pb_log(" language: %s\n", config->lang ?: ""); } @@ -121,6 +126,8 @@ void config_set_defaults(struct config *config) config->network.n_interfaces = 0; config->network.dns_servers = NULL; config->network.n_dns_servers = 0; + config->http_proxy = NULL; + config->https_proxy = NULL; config->safe_mode = false; config->allow_writes = true; config->disable_snapshots = false; |