<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>ProxyMesh Blog - Releases</title><link href="https://proxymesh.com/posts/" rel="alternate"/><link href="https://proxymesh.com/posts/feeds/releases.atom.xml" rel="self"/><id>https://proxymesh.com/posts/</id><updated>2026-11-16T00:00:00+00:00</updated><subtitle>Features, open-source releases, proxy and scraping news from ProxyMesh.</subtitle><entry><title>python-proxy-headers 0.2.5 requires Python 3.10 or later</title><link href="https://proxymesh.com/posts/python-proxy-headers-0-2-5/" rel="alternate"/><published>2026-11-16T00:00:00+00:00</published><updated>2026-11-16T00:00:00+00:00</updated><author><name>ProxyMesh</name></author><id>tag:proxymesh.com,2026-11-16:/posts/python-proxy-headers-0-2-5/</id><summary type="html">&lt;p&gt;python-proxy-headers 0.2.5 requires Python 3.10 or later, pins client extras, and raises ImportError on httpx 1.x. Python 3.8 and 3.9 stay on 0.2.4.&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;a href="https://github.com/proxymesh/python-proxy-headers"&gt;python-proxy-headers&lt;/a&gt; 0.2.5
requires Python 3.10 or later and doesn't support httpx 1.x. If you run Python
3.10 or newer, upgrade. If you use httpx, install the &lt;code&gt;[httpx]&lt;/code&gt; extra so you
stay on httpx 0.28.x. Typical request code doesn't need to change.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;-U&lt;span class="w"&gt; &lt;/span&gt;python-proxy-headers
pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;-U&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;python-proxy-headers[httpx]&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="python-310-or-newer-is-required"&gt;Python 3.10 or newer is required&lt;/h2&gt;
&lt;p&gt;0.2.5 needs Python 3.10 or newer. If you're on Python 3.8 or 3.9, stay on 0.2.4
and pin it:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;python-proxy-headers==0.2.4&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="httpx-1x-is-not-supported"&gt;httpx 1.x is not supported&lt;/h2&gt;
&lt;p&gt;The httpx adapter needs httpx 0.28.x, and &lt;code&gt;httpcore&lt;/code&gt;, which that line uses for
proxy tunnels. httpx 1.0 removes proxy support, so importing
&lt;code&gt;python_proxy_headers.httpx_proxy&lt;/code&gt; on httpx 1.x raises an &lt;code&gt;ImportError&lt;/code&gt; that
starts with &lt;code&gt;python_proxy_headers.httpx_proxy requires httpx&amp;gt;=0.28,&amp;lt;1&lt;/code&gt; and
names the httpx version it found. If you installed an httpx 1.0 development
build, you will see it.&lt;/p&gt;
&lt;p&gt;To stay on a supported httpx, install the extra, which keeps httpx at
&lt;code&gt;&amp;gt;=0.28,&amp;lt;1&lt;/code&gt;. The &lt;a href="https://python-proxy-headers.readthedocs.io/en/latest/httpx.html"&gt;httpx page in the package docs&lt;/a&gt;
covers the adapter in full.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;python-proxy-headers[httpx]&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="install-your-client-as-an-extra"&gt;Install your client as an extra&lt;/h2&gt;
&lt;p&gt;You can now install the package together with your HTTP client as an extra, for
example &lt;code&gt;pip install 'python-proxy-headers[requests]'&lt;/code&gt;. The extra gives you a
version range of that client that the package is tested with.&lt;/p&gt;
&lt;h2 id="example-send-a-country-header-and-read-the-proxy-ip"&gt;Example: send a country header and read the proxy IP&lt;/h2&gt;
&lt;p&gt;The httpx adapter sends custom headers on the HTTPS CONNECT handshake and
returns the proxy's response headers on the response. Use the
&lt;a href="https://docs.proxymesh.com/article/80-proxy-server-locations"&gt;Proxy Server Locations article&lt;/a&gt;
to find the host and port for &lt;code&gt;PROXY_HOST:PORT&lt;/code&gt;. &lt;code&gt;X-ProxyMesh-Country&lt;/code&gt; works
only on the World and Open proxies.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;httpx&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;python_proxy_headers&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;httpx_proxy&lt;/span&gt;

&lt;span class="n"&gt;proxy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;httpx&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Proxy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s1"&gt;&amp;#39;http://USERNAME:PASSWORD@PROXY_HOST:PORT&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;X-ProxyMesh-Country&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;US&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;httpx_proxy&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;https://api.ipify.org?format=json&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;proxy&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;proxy&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;X-ProxyMesh-IP&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Look for &lt;code&gt;X-ProxyMesh-IP&lt;/code&gt; in the printed output. The
&lt;a href="https://docs.proxymesh.com/article/7-request-response-headers"&gt;request and response headers article&lt;/a&gt;
lists every header ProxyMesh accepts and returns, and the
&lt;a href="https://docs.proxymesh.com/article/4-python-proxy-configuration"&gt;Python proxy configuration article&lt;/a&gt;
covers the other clients, including &lt;code&gt;requests&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Links: &lt;a href="https://pypi.org/project/python-proxy-headers/0.2.5/"&gt;python-proxy-headers 0.2.5 on PyPI&lt;/a&gt;,
the &lt;a href="https://github.com/proxymesh/python-proxy-headers/releases/tag/v0.2.5"&gt;GitHub release&lt;/a&gt;,
the &lt;a href="https://github.com/proxymesh/python-proxy-headers/compare/v0.2.4...v0.2.5"&gt;full diff from 0.2.4&lt;/a&gt;,
the &lt;a href="https://github.com/proxymesh/python-proxy-headers/blob/v0.2.5/CHANGELOG.md"&gt;changelog&lt;/a&gt;,
and the &lt;a href="https://python-proxy-headers.readthedocs.io/en/latest/"&gt;package documentation&lt;/a&gt;.&lt;/p&gt;</content><category term="Releases"/><category term="release"/><category term="python"/><category term="httpx"/></entry><entry><title>scrapy-proxy-headers 0.3.0 works with Scrapy 2.20</title><link href="https://proxymesh.com/posts/scrapy-proxy-headers-0-3-0/" rel="alternate"/><published>2026-11-16T00:00:00+00:00</published><updated>2026-11-16T00:00:00+00:00</updated><author><name>ProxyMesh</name></author><id>tag:proxymesh.com,2026-11-16:/posts/scrapy-proxy-headers-0-3-0/</id><summary type="html">&lt;p&gt;scrapy-proxy-headers 0.3.0 adds Scrapy 2.20 support and has no upper Scrapy cap. It requires Python 3.10 or newer, so Python 3.8 and 3.9 stay on 0.2.2.&lt;/p&gt;</summary><content type="html">&lt;p&gt;scrapy-proxy-headers 0.3.0 runs on Scrapy 2.20 and newer. If you run Scrapy
2.17 or later on Python 3.10 or newer, install 0.3.0. If you must stay on
Python 3.8 or 3.9, stay on
&lt;a href="../scrapy-proxy-headers-0-2-2/"&gt;0.2.2&lt;/a&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;-U&lt;span class="w"&gt; &lt;/span&gt;scrapy-proxy-headers
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="requirements-python-310-and-scrapy-217"&gt;Requirements: Python 3.10+ and Scrapy 2.17+&lt;/h2&gt;
&lt;p&gt;0.3.0 requires Python 3.10 or newer, matching Scrapy 2.17.0, and
&lt;code&gt;scrapy&amp;gt;=2.17.0&lt;/code&gt; with no upper cap. 0.2.2 is the last release for Python 3.8
and 3.9. Scrapy 2.20.0 and Scrapy master require Python 3.11 or newer, because
&lt;a href="https://docs.scrapy.org/en/latest/news.html#scrapy-2-20-0-2026-11-06"&gt;Scrapy 2.20&lt;/a&gt;
dropped support for Python 3.10.&lt;/p&gt;
&lt;h2 id="scrapy-220-support"&gt;Scrapy 2.20 support&lt;/h2&gt;
&lt;p&gt;0.3.0 works with the proxy headers support built into
&lt;a href="https://docs.scrapy.org/en/latest/news.html#scrapy-2-20-0-2026-11-06"&gt;Scrapy 2.20.0&lt;/a&gt;.
You send headers the same way, with &lt;code&gt;proxy_headers&lt;/code&gt; in your request meta, and
you still get the &lt;code&gt;X-ProxyMesh-IP&lt;/code&gt; response header, which Scrapy alone doesn't
give you.&lt;/p&gt;
&lt;p&gt;Keep &lt;code&gt;DOWNLOAD_HANDLERS&lt;/code&gt; set to &lt;code&gt;scrapy_proxy_headers.HTTP11ProxyDownloadHandler&lt;/code&gt;
if your spider reads &lt;code&gt;X-ProxyMesh-IP&lt;/code&gt; from &lt;code&gt;response.headers&lt;/code&gt;. On Scrapy 2.20
and newer, a project that only sends &lt;code&gt;proxy_headers&lt;/code&gt; can omit the handler and
keep the same meta value.&lt;/p&gt;
&lt;h2 id="different-headers-stay-separate"&gt;Different headers stay separate&lt;/h2&gt;
&lt;p&gt;0.3.0 keeps &lt;code&gt;X-ProxyMesh-IP&lt;/code&gt; matched to the &lt;code&gt;proxy_headers&lt;/code&gt; you sent, so
requests with different headers never share another request's value. On Scrapy
2.17 through 2.19, each set of &lt;code&gt;proxy_headers&lt;/code&gt; also gets its own connection to
the proxy. Those Scrapy releases otherwise reuse one connection per proxy, so a
later request with different headers could skip its own.&lt;/p&gt;
&lt;h2 id="example-choose-a-country-and-read-the-proxy-ip"&gt;Example: choose a country and read the proxy IP&lt;/h2&gt;
&lt;p&gt;Scrapy 2.16 removed &lt;code&gt;start_requests()&lt;/code&gt;, so a spider that only defines it sends
no requests on any Scrapy version 0.3.0 supports. Define &lt;code&gt;async def start()&lt;/code&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;scrapy&lt;/span&gt;


&lt;span class="k"&gt;class&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nc"&gt;CountrySpider&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;scrapy&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Spider&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;country&amp;quot;&lt;/span&gt;
    &lt;span class="n"&gt;custom_settings&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;&amp;quot;DOWNLOAD_HANDLERS&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;&amp;quot;https&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;scrapy_proxy_headers.HTTP11ProxyDownloadHandler&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;yield&lt;/span&gt; &lt;span class="n"&gt;scrapy&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="s2"&gt;&amp;quot;https://api.ipify.org?format=json&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;meta&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="c1"&gt;# X-ProxyMesh-Country works on the World and Open proxies.&lt;/span&gt;
                &lt;span class="s2"&gt;&amp;quot;proxy&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;http://USERNAME:PASSWORD@PROXY_HOST:PORT&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;&amp;quot;proxy_headers&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;X-ProxyMesh-Country&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;DE&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;proxy_ip&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;b&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;X-ProxyMesh-IP&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;yield&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;proxy_ip&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;proxy_ip&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;proxy_ip&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Only some ProxyMesh proxies honor &lt;code&gt;X-ProxyMesh-Country&lt;/code&gt;. The
&lt;a href="https://docs.proxymesh.com/article/7-request-response-headers"&gt;request and response headers article&lt;/a&gt;
lists every header ProxyMesh accepts and returns, and the
&lt;a href="https://docs.proxymesh.com/article/4-python-proxy-configuration#Scrapy--send-and-read"&gt;Python proxy configuration article&lt;/a&gt;
covers the Scrapy setup.&lt;/p&gt;
&lt;p&gt;Install it from
&lt;a href="https://pypi.org/project/scrapy-proxy-headers/0.3.0/"&gt;scrapy-proxy-headers 0.3.0 on PyPI&lt;/a&gt;.
The &lt;a href="https://github.com/proxymesh/scrapy-proxy-headers/releases/tag/v0.3.0"&gt;GitHub release notes&lt;/a&gt;
and the &lt;a href="https://github.com/proxymesh/scrapy-proxy-headers/compare/v0.2.2...v0.3.0"&gt;full diff from 0.2.2&lt;/a&gt;
list the changes. Usage is covered in the
&lt;a href="https://scrapy-proxy-headers.readthedocs.io/"&gt;scrapy-proxy-headers documentation&lt;/a&gt;.&lt;/p&gt;</content><category term="Releases"/><category term="release"/><category term="scrapy"/><category term="python"/></entry><entry><title>ruby-proxy-headers 0.3.0 fixes CONNECT headers and Typhoeus</title><link href="https://proxymesh.com/posts/ruby-proxy-headers-0-3-0/" rel="alternate"/><published>2026-11-13T00:00:00+00:00</published><updated>2026-11-13T00:00:00+00:00</updated><author><name>ProxyMesh</name></author><id>tag:proxymesh.com,2026-11-13:/posts/ruby-proxy-headers-0-3-0/</id><summary type="html">&lt;p&gt;ruby-proxy-headers 0.3.0 requires Ruby 3.2 or later, sends Typhoeus proxy headers on CONNECT, and fixes Net::HTTP, HTTP.rb, RestClient, and Faraday.&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;a href="https://github.com/proxymesh/ruby-proxy-headers"&gt;ruby-proxy-headers&lt;/a&gt; 0.3.0
fixes HTTPS requests that send proxy headers through Typhoeus, HTTP.rb, and
RestClient, which failed in 0.2.3. It also requires Ruby 3.2 or newer. If you
run Ruby 3.2 or newer, upgrade. If you run Ruby 3.1, stay on 0.2.3.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;gem&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;ruby-proxy-headers
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;In your &lt;code&gt;Gemfile&lt;/code&gt;, use &lt;code&gt;gem 'ruby-proxy-headers', '~&amp;gt; 0.3.0'&lt;/code&gt;, then run
&lt;code&gt;bundle update ruby-proxy-headers&lt;/code&gt;. The gem doesn't install Typhoeus, Faraday,
or the other clients, so you add the one you use.&lt;/p&gt;
&lt;h2 id="typhoeus-httprb-and-restclient-requests-now-work"&gt;Typhoeus, HTTP.rb, and RestClient requests now work&lt;/h2&gt;
&lt;p&gt;In 0.2.3, HTTPS requests with proxy headers through Typhoeus, HTTP.rb, and
RestClient failed. They work in 0.3.0, and you don't need to change your code.&lt;/p&gt;
&lt;p&gt;Typhoeus now sends your proxy headers and gives you the proxy's reply in
&lt;code&gt;proxy_response_headers&lt;/code&gt;, including &lt;code&gt;X-ProxyMesh-IP&lt;/code&gt;. &lt;code&gt;response.headers&lt;/code&gt; still
holds the website's response. With HTTP.rb and RestClient, you read
&lt;code&gt;response.proxy_response_headers&lt;/code&gt;. This needs Typhoeus 1.7 or the &lt;code&gt;http&lt;/code&gt; gem 6
or newer.&lt;/p&gt;
&lt;h2 id="nethttp-uses-your-installed-net-http-settings"&gt;Net::HTTP uses your installed net-http settings&lt;/h2&gt;
&lt;p&gt;0.3.0 works with the timeouts and HTTPS proxy settings of the net-http you have
installed, and you can still send extra CONNECT headers and read the proxy's
reply. You still call &lt;code&gt;RubyProxyHeaders::NetHTTP.patch!&lt;/code&gt; once before you create
connections.&lt;/p&gt;
&lt;h2 id="ruby-32-or-newer-is-required"&gt;Ruby 3.2 or newer is required&lt;/h2&gt;
&lt;p&gt;0.3.0 needs Ruby 3.2 or newer. On Ruby 3.1, stay on 0.2.3 by pinning it in your
&lt;code&gt;Gemfile&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;gem&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;ruby-proxy-headers&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;0.2.3&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="faraday-works-with-current-faraday-net_http"&gt;Faraday works with current faraday-net_http&lt;/h2&gt;
&lt;p&gt;0.3.0 works with faraday-net_http 3.4 and 3.5, and you don't need to change
your Faraday code. &lt;code&gt;res.headers['X-ProxyMesh-IP']&lt;/code&gt; still works.&lt;/p&gt;
&lt;h2 id="example-read-the-proxy-ip-with-typhoeus"&gt;Example: read the proxy IP with Typhoeus&lt;/h2&gt;
&lt;p&gt;Use &lt;a href="https://docs.proxymesh.com/article/80-proxy-server-locations"&gt;Proxy Server Locations&lt;/a&gt;
to find the host and port for &lt;code&gt;PROXY_HOST:PORT&lt;/code&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;ruby_proxy_headers/typhoeus&amp;#39;&lt;/span&gt;

&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;RubyProxyHeaders&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Typhoeus&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;https://api.ipify.org?format=json&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="ss"&gt;proxy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;http://USERNAME:PASSWORD@PROXY_HOST:PORT&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="ss"&gt;proxy_headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;X-ProxyMesh-Country&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;US&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;puts&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;proxy_response_headers&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;X-ProxyMesh-IP&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Look for the proxy IP in &lt;code&gt;response.proxy_response_headers&lt;/code&gt;, not in
&lt;code&gt;response.headers&lt;/code&gt;. &lt;code&gt;X-ProxyMesh-Country&lt;/code&gt; works only on the World and Open
proxies, and the
&lt;a href="https://docs.proxymesh.com/article/7-request-response-headers"&gt;request and response headers article&lt;/a&gt;
lists every header ProxyMesh accepts and returns. The
&lt;a href="https://docs.proxymesh.com/article/117-ruby-proxy-configuration-examples"&gt;Ruby proxy configuration examples&lt;/a&gt;
cover the other clients.&lt;/p&gt;
&lt;p&gt;Links: &lt;a href="https://rubygems.org/gems/ruby-proxy-headers/versions/0.3.0"&gt;ruby-proxy-headers 0.3.0 on RubyGems&lt;/a&gt;,
the &lt;a href="https://github.com/proxymesh/ruby-proxy-headers/releases/tag/v0.3.0"&gt;GitHub release&lt;/a&gt;,
the &lt;a href="https://github.com/proxymesh/ruby-proxy-headers/compare/v0.2.3...v0.3.0"&gt;full diff from 0.2.3&lt;/a&gt;,
the &lt;a href="https://github.com/proxymesh/ruby-proxy-headers/blob/v0.3.0/CHANGELOG.md"&gt;changelog&lt;/a&gt;,
and the &lt;a href="https://www.rubydoc.info/gems/ruby-proxy-headers"&gt;API docs on RubyDoc&lt;/a&gt;.&lt;/p&gt;</content><category term="Releases"/><category term="release"/><category term="ruby"/><category term="https"/></entry><entry><title>scrapy-proxy-headers 0.2.2 hardens CONNECT header handling</title><link href="https://proxymesh.com/posts/scrapy-proxy-headers-0-2-2/" rel="alternate"/><published>2026-11-12T00:00:00+00:00</published><updated>2026-11-12T00:00:00+00:00</updated><author><name>ProxyMesh</name></author><id>tag:proxymesh.com,2026-11-12:/posts/scrapy-proxy-headers-0-2-2/</id><summary type="html">&lt;p&gt;scrapy-proxy-headers 0.2.2 hardens CONNECT header handling and requires Scrapy 2.17.0, which patches a high-severity advisory. It runs on Scrapy 2.17 to 2.19.&lt;/p&gt;</summary><content type="html">&lt;p&gt;scrapy-proxy-headers 0.2.2 hardens how the package handles proxy headers, and
it requires Scrapy 2.17.0 or later, the release that patches a
high-severity advisory. If you run Scrapy 2.17 through 2.19 on Python 3.8 or
newer, upgrade from 0.2.1. Your settings and request meta don't need to change.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;-U&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;scrapy-proxy-headers==0.2.2&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="security-connect-header-handling"&gt;Security: CONNECT header handling&lt;/h2&gt;
&lt;p&gt;0.2.2 rejects a line break (CR or LF) in a &lt;code&gt;proxy_headers&lt;/code&gt; name or value and
raises &lt;code&gt;ValueError&lt;/code&gt;, so a header can't add extra lines to the request the
package sends to the proxy. It also reads the proxy's reply more carefully: a
header split across network packets stays intact, and bytes after the headers
aren't treated as headers.&lt;/p&gt;
&lt;p&gt;When the package copies the proxy's headers onto the HTTPS response, it leaves
the website's headers unchanged. 0.2.1 replaces a website header such as
&lt;code&gt;Content-Type&lt;/code&gt; or &lt;code&gt;Set-Cookie&lt;/code&gt; when the proxy sends a header with the same
name. New proxy headers such as &lt;code&gt;X-ProxyMesh-IP&lt;/code&gt; are still copied.&lt;/p&gt;
&lt;h2 id="security-scrapy-2170-is-required"&gt;Security: Scrapy 2.17.0 is required&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://github.com/advisories/GHSA-76g3-c3x4-crvx"&gt;CVE-2026-84366&lt;/a&gt; is a
high-severity advisory (CVSS 7.4) for Scrapy versions before 2.17.0.
Before 2.17.0, Scrapy's S3 download handler sends signed &lt;code&gt;s3://&lt;/code&gt; requests over
plaintext HTTP unless &lt;code&gt;request.meta["is_secure"]&lt;/code&gt; is true, which exposes the
request path, the AWS &lt;code&gt;Authorization&lt;/code&gt; header, and the response to a network
attacker. If you make
&lt;code&gt;s3://&lt;/code&gt; requests with AWS credentials, this affects you.
&lt;a href="https://docs.scrapy.org/en/latest/news.html#scrapy-2-17-0-2026-07-07"&gt;Scrapy 2.17.0&lt;/a&gt;
uses HTTPS by default. 0.2.2 requires &lt;code&gt;scrapy&amp;gt;=2.17.0&lt;/code&gt;, so the upgrade command
above also upgrades Scrapy when the environment has an older version.&lt;/p&gt;
&lt;h2 id="requirements-scrapy-217-to-219-python-38"&gt;Requirements: Scrapy 2.17 to 2.19, Python 3.8+&lt;/h2&gt;
&lt;p&gt;0.2.2 requires Scrapy 2.17.0 up to, but not including, 2.20, and Python 3.8 or
newer. It doesn't install or run on
&lt;a href="https://docs.scrapy.org/en/latest/news.html#scrapy-2-20-0-2026-11-06"&gt;Scrapy 2.20&lt;/a&gt;,
which adds built-in proxy headers support. Install
&lt;a href="../scrapy-proxy-headers-0-3-0/"&gt;scrapy-proxy-headers 0.3.0&lt;/a&gt;
for Scrapy 2.20, or if you run Python 3.10 or newer.&lt;/p&gt;
&lt;h2 id="example-choose-a-country-and-read-the-proxy-ip"&gt;Example: choose a country and read the proxy IP&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;scrapy&lt;/span&gt;


&lt;span class="k"&gt;class&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nc"&gt;CountrySpider&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;scrapy&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Spider&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;country&amp;quot;&lt;/span&gt;
    &lt;span class="n"&gt;custom_settings&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;&amp;quot;DOWNLOAD_HANDLERS&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;&amp;quot;https&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;scrapy_proxy_headers.HTTP11ProxyDownloadHandler&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;yield&lt;/span&gt; &lt;span class="n"&gt;scrapy&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="s2"&gt;&amp;quot;https://api.ipify.org?format=json&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;meta&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="c1"&gt;# X-ProxyMesh-Country works on the World and Open proxies.&lt;/span&gt;
                &lt;span class="s2"&gt;&amp;quot;proxy&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;http://USERNAME:PASSWORD@PROXY_HOST:PORT&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;&amp;quot;proxy_headers&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;X-ProxyMesh-Country&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;DE&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;proxy_ip&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;b&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;X-ProxyMesh-IP&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;yield&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;proxy_ip&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;proxy_ip&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;proxy_ip&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The &lt;a href="https://docs.proxymesh.com/article/7-request-response-headers"&gt;request and response headers article&lt;/a&gt;
lists every header ProxyMesh accepts and returns. The
&lt;a href="https://docs.proxymesh.com/article/4-python-proxy-configuration#Scrapy--send-and-read"&gt;Python proxy configuration article&lt;/a&gt;
covers the Scrapy setup.&lt;/p&gt;
&lt;p&gt;Install it from
&lt;a href="https://pypi.org/project/scrapy-proxy-headers/0.2.2/"&gt;scrapy-proxy-headers 0.2.2 on PyPI&lt;/a&gt;.
The &lt;a href="https://github.com/proxymesh/scrapy-proxy-headers/releases/tag/v0.2.2"&gt;GitHub release notes&lt;/a&gt;
and the &lt;a href="https://github.com/proxymesh/scrapy-proxy-headers/compare/v0.2.1...v0.2.2"&gt;full diff from 0.2.1&lt;/a&gt;
list the changes. Usage is covered in the
&lt;a href="https://scrapy-proxy-headers.readthedocs.io/"&gt;scrapy-proxy-headers documentation&lt;/a&gt;.&lt;/p&gt;</content><category term="Releases"/><category term="release"/><category term="scrapy"/><category term="python"/><category term="security"/></entry><entry><title>javascript-proxy-headers 0.4.0 keeps traffic on the proxy</title><link href="https://proxymesh.com/posts/javascript-proxy-headers-0-4-0/" rel="alternate"/><published>2026-11-02T00:00:00+00:00</published><updated>2026-11-02T00:00:00+00:00</updated><author><name>ProxyMesh</name></author><id>tag:proxymesh.com,2026-11-02:/posts/javascript-proxy-headers-0-4-0/</id><summary type="html">&lt;p&gt;javascript-proxy-headers 0.4.0 keeps got and undici on the configured proxy and returns a native ky Response. Upgrade if you use those adapters.&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;a href="https://github.com/proxymesh/javascript-proxy-headers"&gt;javascript-proxy-headers&lt;/a&gt; 0.4.0 keeps undici and got requests on the proxy you configured, and it makes the ky adapter return a native &lt;code&gt;Response&lt;/code&gt;. If you use the undici, got, or ky adapter, upgrade. Your settings and request code stay the same, except that ky users shouldn't rely on &lt;code&gt;clone()&lt;/code&gt; to copy &lt;code&gt;proxyHeaders&lt;/code&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;npm&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;javascript-proxy-headers@0.4.0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Install the HTTP client you use too, such as &lt;code&gt;got&lt;/code&gt;, &lt;code&gt;undici&lt;/code&gt;, or &lt;code&gt;ky&lt;/code&gt;, if it isn't already in your project. Other adapters are unchanged in this release.&lt;/p&gt;
&lt;h2 id="undici-requests-no-longer-go-direct"&gt;undici requests no longer go direct&lt;/h2&gt;
&lt;p&gt;On 0.3.0, an undici request could reach the target directly instead of going through the proxy. 0.4.0 keeps that request on the CONNECT tunnel, so your call site can stay the same if you already pass &lt;code&gt;proxy&lt;/code&gt; and &lt;code&gt;proxyHeaders&lt;/code&gt;. If the proxy accepts CONNECT but doesn't forward the tunnel, 0.4.0 doesn't open a connection to the target, and the request fails with &lt;code&gt;UND_ERR_CONNECT_TIMEOUT&lt;/code&gt; once your &lt;code&gt;connectTimeout&lt;/code&gt; passes.&lt;/p&gt;
&lt;p&gt;The undici adapter also gains two options: &lt;code&gt;tlsOptions&lt;/code&gt; for the TLS connection to the target, and &lt;code&gt;connectTimeout&lt;/code&gt;, a timeout in milliseconds for the CONNECT and TLS handshake.&lt;/p&gt;
&lt;h2 id="got-now-rejects-plain-http"&gt;got now rejects plain HTTP&lt;/h2&gt;
&lt;p&gt;The got adapter is HTTPS-only. Without a guard, got uses its default HTTP agent for an &lt;code&gt;http://&lt;/code&gt; URL and connects directly, which skips the proxy. 0.4.0 rejects &lt;code&gt;http://&lt;/code&gt; URLs and HTTPS-to-HTTP redirects with a &lt;code&gt;TypeError&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;javascript-proxy-headers/got only supports HTTPS; HTTP would bypass the proxy
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Your HTTPS got code doesn't need to change. If you see this error, switch the URL to &lt;code&gt;https://&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="ky-22-and-later-gets-a-response-it-accepts"&gt;ky 2.2 and later gets a Response it accepts&lt;/h2&gt;
&lt;p&gt;ky 2.2 and later requires &lt;code&gt;fetch&lt;/code&gt; to resolve with a global &lt;code&gt;Response&lt;/code&gt;, and the node-fetch &lt;code&gt;Response&lt;/code&gt; the adapter returned failed that check. 0.4.0 returns a global &lt;code&gt;Response&lt;/code&gt; with the same &lt;code&gt;proxyHeaders&lt;/code&gt; Map attached. You still need &lt;code&gt;node-fetch&lt;/code&gt;, and &lt;code&gt;createProxyKy(...)&lt;/code&gt; is still async.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;response.clone()&lt;/code&gt; doesn't copy &lt;code&gt;proxyHeaders&lt;/code&gt;. If you clone a response, read &lt;code&gt;proxyHeaders&lt;/code&gt; from the original.&lt;/p&gt;
&lt;h2 id="example-choose-a-country-and-read-the-proxy-ip"&gt;Example: choose a country and read the proxy IP&lt;/h2&gt;
&lt;p&gt;This got example sends &lt;code&gt;X-ProxyMesh-Country&lt;/code&gt; on the CONNECT request and reads the proxy's reply. Use the host and port from &lt;a href="https://docs.proxymesh.com/article/80-proxy-server-locations"&gt;Proxy Server Locations&lt;/a&gt;. &lt;code&gt;X-ProxyMesh-Country&lt;/code&gt; works only on the World and Open proxies.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;createProxyGot&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;javascript-proxy-headers/got&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;createProxyGot&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;proxy&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;http://USERNAME:PASSWORD@PROXY_HOST:PORT&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;proxyHeaders&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;X-ProxyMesh-Country&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;US&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;https://api.ipify.org?format=json&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;proxyHeaders&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;x-proxymesh-ip&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Look for the proxy IP in &lt;code&gt;response.proxyHeaders&lt;/code&gt;, not in &lt;code&gt;response.headers&lt;/code&gt;. The &lt;a href="https://docs.proxymesh.com/article/7-request-response-headers"&gt;request and response headers article&lt;/a&gt; lists every header ProxyMesh accepts and returns.&lt;/p&gt;
&lt;h2 id="coming-from-02x"&gt;Coming from 0.2.x&lt;/h2&gt;
&lt;p&gt;0.3.0 already moved the proxy's CONNECT response headers off &lt;code&gt;response.headers&lt;/code&gt;, and 0.4.0 doesn't change that. If you still read &lt;code&gt;response.headers['x-proxymesh-ip']&lt;/code&gt;, switch to &lt;code&gt;response.proxyHeaders.get('x-proxymesh-ip')&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Install it from &lt;a href="https://www.npmjs.com/package/javascript-proxy-headers/v/0.4.0"&gt;javascript-proxy-headers 0.4.0 on npm&lt;/a&gt;. The &lt;a href="https://github.com/proxymesh/javascript-proxy-headers/releases/tag/v-0.4.0"&gt;GitHub release&lt;/a&gt; and the &lt;a href="https://github.com/proxymesh/javascript-proxy-headers/compare/v-0.3.0...v-0.4.0"&gt;full diff from 0.3.0&lt;/a&gt; list the changes. The &lt;a href="https://github.com/proxymesh/javascript-proxy-headers"&gt;README and docs&lt;/a&gt; cover each adapter, and the &lt;a href="https://docs.proxymesh.com/article/41-javascript-proxy-configuration-examples"&gt;JavaScript proxy configuration examples&lt;/a&gt; show the ProxyMesh side.&lt;/p&gt;</content><category term="Releases"/><category term="release"/><category term="javascript"/><category term="node"/></entry><entry><title>scrapy-proxy-headers 0.2.1 works with Scrapy 2.16 and later</title><link href="https://proxymesh.com/posts/scrapy-proxy-headers-0-2-1/" rel="alternate"/><published>2026-09-01T00:00:00+00:00</published><updated>2026-09-01T00:00:00+00:00</updated><author><name>ProxyMesh</name></author><id>tag:proxymesh.com,2026-09-01:/posts/scrapy-proxy-headers-0-2-1/</id><summary type="html">&lt;p&gt;scrapy-proxy-headers 0.2.1 fixes an import error on Scrapy 2.16 and later, and requires Scrapy 2.14.2 to avoid a high-severity Scrapy advisory.&lt;/p&gt;</summary><content type="html">&lt;p&gt;scrapy-proxy-headers 0.2.1 fixes the package on Scrapy 2.16 and later, where
version 0.2.0 fails to load. It also raises the minimum Scrapy version to
2.14.2, the release that patches a high-severity &lt;code&gt;Referrer-Policy&lt;/code&gt;
vulnerability. If you run Scrapy 2.16 or newer, or still have Scrapy 2.14.1
installed, upgrade now. Your settings and spider code don't need to change.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;-U&lt;span class="w"&gt; &lt;/span&gt;scrapy-proxy-headers
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="why-020-broke-on-scrapy-216"&gt;Why 0.2.0 broke on Scrapy 2.16&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://docs.scrapy.org/en/latest/news.html#release-2-16-0"&gt;Scrapy 2.16&lt;/a&gt; made
several classes in its HTTP/1.1 download handler private, including
&lt;code&gt;TunnelingAgent&lt;/code&gt; and &lt;code&gt;ScrapyAgent&lt;/code&gt;. scrapy-proxy-headers 0.2.0 imported them by
their old public names, so on Scrapy 2.16 through 2.18 Scrapy can't load
&lt;code&gt;HTTP11ProxyDownloadHandler&lt;/code&gt;. Every HTTPS request then fails with an error like
this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;NotSupported: Unsupported URL scheme &amp;#39;https&amp;#39;: cannot import name &amp;#39;TunnelingAgent&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Version 0.2.1 looks up both the old and the new names, so one release works on
every Scrapy version from 2.14.2 to 2.18. It also builds its own tunneling agent
for HTTPS requests sent through a proxy, so your &lt;code&gt;proxy_headers&lt;/code&gt; still go out
with the &lt;code&gt;CONNECT&lt;/code&gt; request on newer Scrapy releases.&lt;/p&gt;
&lt;h2 id="security-scrapy-2142-is-now-required"&gt;Security: Scrapy 2.14.2 is now required&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://github.com/advisories/GHSA-cwxj-rr6w-m6w7"&gt;GHSA-cwxj-rr6w-m6w7&lt;/a&gt; is a
high-severity advisory for Scrapy 1.4.0 through 2.14.1. When a site sent a
&lt;code&gt;Referrer-Policy&lt;/code&gt; header that looked like a Python import path, Scrapy imported
that object and called it. A malicious site could use this to make your
crawler call something like &lt;code&gt;sys.exit&lt;/code&gt; and stop.
&lt;a href="https://docs.scrapy.org/en/latest/news.html#scrapy-2-14-2-2026-03-12"&gt;Scrapy 2.14.2&lt;/a&gt;
fixes it.&lt;/p&gt;
&lt;p&gt;scrapy-proxy-headers 0.2.0 still allowed Scrapy 2.14.1. Version 0.2.1 requires
&lt;code&gt;scrapy&amp;gt;=2.14.2&lt;/code&gt;, so &lt;code&gt;pip install -U scrapy-proxy-headers&lt;/code&gt; also upgrades Scrapy
if you're on the affected release.&lt;/p&gt;
&lt;h2 id="example-choose-a-country-and-read-the-proxy-ip"&gt;Example: choose a country and read the proxy IP&lt;/h2&gt;
&lt;p&gt;Headers you set on a Scrapy request travel inside the encrypted HTTPS tunnel,
so the proxy never sees them. scrapy-proxy-headers sends &lt;code&gt;proxy_headers&lt;/code&gt; in the
&lt;code&gt;CONNECT&lt;/code&gt; request instead, and copies the proxy's reply headers into
&lt;code&gt;response.headers&lt;/code&gt;. With ProxyMesh, pick a country with &lt;code&gt;X-ProxyMesh-Country&lt;/code&gt;
and log which IP served each request from &lt;code&gt;X-ProxyMesh-IP&lt;/code&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;scrapy&lt;/span&gt;


&lt;span class="k"&gt;class&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nc"&gt;CountrySpider&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;scrapy&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Spider&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;country&amp;quot;&lt;/span&gt;
    &lt;span class="n"&gt;custom_settings&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;&amp;quot;DOWNLOAD_HANDLERS&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;&amp;quot;https&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;scrapy_proxy_headers.HTTP11ProxyDownloadHandler&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;yield&lt;/span&gt; &lt;span class="n"&gt;scrapy&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="s2"&gt;&amp;quot;https://api.ipify.org?format=json&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;meta&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="c1"&gt;# X-ProxyMesh-Country works on the World and Open proxies.&lt;/span&gt;
                &lt;span class="s2"&gt;&amp;quot;proxy&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;http://USERNAME:PASSWORD@PROXY_HOST:PORT&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;&amp;quot;proxy_headers&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;X-ProxyMesh-Country&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;DE&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;proxy_ip&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;b&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;X-ProxyMesh-IP&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;yield&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;proxy_ip&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;proxy_ip&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;proxy_ip&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;See &lt;a href="https://docs.proxymesh.com/article/7-request-response-headers"&gt;Proxy Server Request &amp;amp; Response Headers&lt;/a&gt;
for every header ProxyMesh accepts and returns.&lt;/p&gt;
&lt;h2 id="other-changes"&gt;Other changes&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;An &lt;code&gt;https://&lt;/code&gt; proxy URL with an HTTPS destination now raises
  &lt;code&gt;NotImplementedError&lt;/code&gt;, the same limit Scrapy 2.16 added to its own handler.
  ProxyMesh proxy URLs use &lt;code&gt;http://&lt;/code&gt;, so this doesn't affect ProxyMesh setups.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;HTTP11ProxyDownloadHandler.download_request()&lt;/code&gt; is now a coroutine, matching
  Scrapy's current download handler API. This only matters if you subclass the
  handler.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Install it from
&lt;a href="https://pypi.org/project/scrapy-proxy-headers/0.2.1/"&gt;scrapy-proxy-headers 0.2.1 on PyPI&lt;/a&gt;.
The &lt;a href="https://github.com/proxymesh/scrapy-proxy-headers/releases/tag/v0.2.1"&gt;GitHub release notes&lt;/a&gt;
and the &lt;a href="https://github.com/proxymesh/scrapy-proxy-headers/compare/v0.2.0...v0.2.1"&gt;full diff from 0.2.0&lt;/a&gt;
list the changes. Usage is covered in the
&lt;a href="https://scrapy-proxy-headers.readthedocs.io/"&gt;scrapy-proxy-headers documentation&lt;/a&gt;.&lt;/p&gt;</content><category term="Releases"/><category term="release"/><category term="scrapy"/><category term="python"/><category term="security"/></entry></feed>