summaryrefslogtreecommitdiffstats
path: root/lib/pb-config
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>2016-10-27 14:56:05 +1100
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2016-11-24 11:42:25 +1100
commita055f6714fd06aa3b633b1bc44a8dbf42a0eedb0 (patch)
tree6223076e8bcfe2c828f4b40d6a4fb8760f520c7b /lib/pb-config
parent1dd51e986202e5e111c1042f148867bd08c2bedc (diff)
downloadpetitboot-a055f6714fd06aa3b633b1bc44a8dbf42a0eedb0.zip
petitboot-a055f6714fd06aa3b633b1bc44a8dbf42a0eedb0.tar.gz
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 'lib/pb-config')
-rw-r--r--lib/pb-config/pb-config.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/pb-config/pb-config.c b/lib/pb-config/pb-config.c
index 2f9af28..7fa925c 100644
--- a/lib/pb-config/pb-config.c
+++ b/lib/pb-config/pb-config.c
@@ -63,6 +63,9 @@ struct config *config_copy(void *ctx, const struct config *src)
dest->network.dns_servers[i] = talloc_strdup(dest,
src->network.dns_servers[i]);
+ dest->http_proxy = talloc_strdup(dest, src->http_proxy);
+ dest->https_proxy = talloc_strdup(dest, src->https_proxy);
+
dest->n_autoboot_opts = src->n_autoboot_opts;
dest->autoboot_opts = talloc_array(dest, struct autoboot_option,
dest->n_autoboot_opts);
OpenPOWER on IntegriCloud