<p dir="auto">Hi, plz have a look at this <a href="https://github.com/bulkan/robotframework-requests/issues/116" data-hovercard-type="issue" data-hovercard-url="/MarketSquare/robotframework-requests/issues/116/hovercard">issue #116</a>  with <a href="https://github.com/bulkan/robotframework-requests">robotframework-requests</a> library, take particular notice of my <a href="https://github.com/bulkan/robotframework-requests/issues/116#issuecomment-224537034" data-hovercard-type="issue" data-hovercard-url="/MarketSquare/robotframework-requests/issues/116/hovercard">second comment</a>, it might be related to 'requests'.</p>
<p dir="auto">Cheers<br>
Tset</p>
<p dir="auto">Requests uses <code class="notranslate">urlib.proxy_bypass</code> to check if the proxy should be bypassed. This uses <code class="notranslate">socket.gethostbyaddr</code> to check if the provided IP matches a hostname entered in the proxy bypass list. In some cases, <code class="notranslate">gethostbyaddr</code> takes up to 4.5 seconds on Windows (e.g. when the IP is found but the primary DNS doesn't recognize it).</p>
<p dir="auto">Currently, the proxy bypass detection is done for <em>every</em> request, making it pretty unusable when the conditions are met where <code class="notranslate">gethostbyaddr</code> is this slow.</p>
<p dir="auto">A reasonable solution might be caching the results from <code class="notranslate">urlib.proxy_bypass</code>.</p>