Skip to content

Commit

Permalink
Do not resolve name when using proxy instead
Browse files Browse the repository at this point in the history
  • Loading branch information
laxa committed Mar 2, 2021
1 parent 7697930 commit cc20c43
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/connection/requester.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ def __init__(
# Resolve DNS to decrease overhead
if ip:
self.ip = ip
elif not requestByHostname:
# A proxy could have a different DNS that would resolve the name. Therefore,
# resolving the name when using proxy to raise an error is pointless
elif not proxy and not proxylist:
try:
self.ip = socket.gethostbyname(self.host)
except socket.gaierror:
Expand Down

0 comments on commit cc20c43

Please sign in to comment.