diff --git a/sources/COPERNICUS.cpp b/sources/COPERNICUS.cpp index 48747a7..cd64200 100644 --- a/sources/COPERNICUS.cpp +++ b/sources/COPERNICUS.cpp @@ -37,6 +37,13 @@ RetVal> COPERNICUSData::ReadRemoteFileList(const MS bool next = true; CURLRAII chandle; + { + auto oldprefix = michlib::GPL.UsePrefix("COPERNICUS"); + auto proxyurl = michlib::GPL.ParameterSValue("Proxy", ""); + if(proxyurl.Exist()) curl_easy_setopt(chandle, CURLOPT_PROXY, proxyurl.Buf()); + michlib::GPL.UsePrefix(oldprefix); + } + while(next) { MString url = bucket + "?list-type=2&prefix=" + prefix; @@ -133,6 +140,11 @@ Error COPERNICUSData::Mirror(const CLArgs& args) const if(filter.Compile() != 0) return Error(pref, MString("Can't compile regular expression ") + filter.RegStr()); CURLRAII chandle; + { + auto proxyurl = michlib::GPL.ParameterSValue("Proxy", ""); + if(proxyurl.Exist()) curl_easy_setopt(chandle, CURLOPT_PROXY, proxyurl.Buf()); + } + for(const auto& dset: dsets) { michlib::message("Mirroring " + dset);