Skip to content

Sticky Sessions โ€‹

ProxyHerd supports 2 modes for maintaining sticky sessions: through headers or cookies.

When ProxyHerd receives a response, it includes the X-Scrapoxy-Proxyname header. This header contains the ID of the proxy used to initiate the request.

To use sticky sessions, ensure that your requests include the X-Scrapoxy-Proxyname header. ProxyHerd will then route the request to the same proxy that initiated the session.

This functionality is implemented by Scrapy's middleware StickySpiderMiddleware.

WARNING

ProxyHerd automatically filters this header in requests, eliminating the need for manual intervention.

To enable sticky sessions with cookies, navigate to project settings and activate the option Keep the same proxy with cookie injection:

Sticky sessions with cookies

ProxyHerd will append a cookie to all responses, ensuring that later requests from the browser are routed to the same proxy.

INFO

Cookie injection is particularly crucial when using a headless browser (Playwright or Puppeteer) alongside a residential network to prevent IP rotation between requests.

Released under the MIT License. ProxyHerd is a community fork of Scrapoxy 4.17.4 and is not affiliated with its original author.