From 4476d9d02ac7af21a7bc6ef92490491d308237f4 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 29 Apr 2020 22:20:21 +0300 Subject: Add --pkg-proxy common option --- bpkg/fetch.hxx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'bpkg/fetch.hxx') diff --git a/bpkg/fetch.hxx b/bpkg/fetch.hxx index ed1fd50..d57dcf3 100644 --- a/bpkg/fetch.hxx +++ b/bpkg/fetch.hxx @@ -6,8 +6,6 @@ #include // time_t -#include - #include #include @@ -20,6 +18,9 @@ namespace bpkg // Repository type pkg (fetch-pkg.cxx). // + // If HTTP proxy is specified via the --pkg-proxy option, then use it for + // fetching manifests and archives from the remote pkg repository. + // pkg_repository_manifests pkg_fetch_repositories (const dir_path&, bool ignore_unknown); @@ -120,13 +121,17 @@ namespace bpkg // Start the process of fetching the specified URL. If out is empty, then // fetch to stdout. In this case also don't show any progress unless we are // running verbose. If user_agent is empty, then send the default (fetch - // program specific) User-Agent header value. + // program specific) User-Agent header value. If the HTTP proxy URL is not + // empty and the URL to fetch is HTTP(S), then fetch it via the specified + // proxy server converting the https URL scheme to http (see the --pkg-proxy + // option for details). // - butl::process + process start_fetch (const common_options& o, const string& url, const path& out = {}, - const string& user_agent = {}); + const string& user_agent = {}, + const butl::url& proxy = {}); } #endif // BPKG_FETCH_HXX -- cgit v1.1