Skip to content

Commit

Permalink
Use proxy settings to configure https proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
ruediger101 authored and rickysarraf committed Jul 25, 2022
1 parent a514a29 commit 48dd054
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apt_offline_core/AptOfflineCoreLib.py
Original file line number Diff line number Diff line change
Expand Up @@ -971,12 +971,12 @@ def fetcher( args ):
if Str_ProxyHost:
if Str_ProxyPort:
log.verbose(Str_ProxyHost + ":" + str(Str_ProxyPort))
proxy_support = urllib.request.ProxyHandler({'http': Str_ProxyHost + ":" + str(Str_ProxyPort) })
proxy_support = urllib.request.ProxyHandler({'http': Str_ProxyHost + ":" + str(Str_ProxyPort), 'https': Str_ProxyHost + ":" + str(Str_ProxyPort)})
opener = urllib.request.build_opener(proxy_support)
urllib.request.install_opener(opener)
log.verbose("Proxy successfully set up with Host %s and port %s\n" % (Str_ProxyHost, str(Str_ProxyPort)))
else:
proxy_support = urllib.request.ProxyHandler({'http': Str_ProxyHost})
proxy_support = urllib.request.ProxyHandler({'http': Str_ProxyHost, 'https': Str_ProxyHost})
opener = urllib.request.build_opener(proxy_support)
urllib.request.install_opener(opener)
log.verbose("Proxy successfully set up with Host %s and default port\n" % (Str_ProxyHost) )
Expand Down

0 comments on commit 48dd054

Please sign in to comment.