Skip to content

fix(whatsapp): add HTTPS proxy support for Baileys WebSocket (#43603) - #43822

Closed
kyssta-exe wants to merge 1 commit into
NousResearch:mainfrom
kyssta-exe:auto-fix/issue-43603
Closed

fix(whatsapp): add HTTPS proxy support for Baileys WebSocket (#43603)#43822
kyssta-exe wants to merge 1 commit into
NousResearch:mainfrom
kyssta-exe:auto-fix/issue-43603

Conversation

@kyssta-exe

Copy link
Copy Markdown
Contributor

Fixes #43603. Add https-proxy-agent dependency and pass an HttpsProxyAgent to Baileys makeWASocket when standard HTTPS_PROXY/HTTP_PROXY environment variables are set, allowing WhatsApp pairing to succeed behind HTTP(S) proxies.

@kyssta-exe
kyssta-exe requested a review from a team June 10, 2026 23:02
@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery platform/whatsapp WhatsApp Business adapter P2 Medium — degraded but workaround exists duplicate This issue or pull request already exists labels Jun 10, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #43607 — identical approach and files (add https-proxy-agent, pass HttpsProxyAgent into Baileys makeWASocket on HTTP(S)_PROXY). Both fix #43603. #43607 is the earlier same-day open canonical; older general proxy PR #12787 also open.

@austinpickett austinpickett left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving as the canonical proxy implementation for this cluster (duplicates: #43607, #43659).

Why this PR wins:

  • PROXY_AGENT naming is consistent with the surrounding module-level ALL_CAPS constants (CHUNK_DELAY_MS, MAX_MESSAGE_LENGTH, etc.)
  • ✅ Proxy block is placed logically in the env-var parsing section (around line 57), not hoisted to the very top
  • ✅ Comment references the tracking issue (#43603)
  • ✅ No package-lock.json change — avoids a conflict with the pending Baileys rc13 bump in #43840

Minor nit (non-blocking): package-lock.json isn't included, but it can be regenerated with npm install after merge — not a blocker given the clean implementation.

Code looks correct: reads HTTPS_PROXY / https_proxy / HTTP_PROXY / http_proxy in priority order, constructs HttpsProxyAgent only when set, and passes it as agent: to makeWASocket. No behaviour change when the env var is unset. ✅

@kyssta-exe

Copy link
Copy Markdown
Contributor Author

Duplicate of #43607 — same HTTPS proxy support for Baileys WebSocket (#43603). Closing as superseded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists platform/whatsapp WhatsApp Business adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WhatsApp pairing fails behind HTTP(S) proxy with repeated 408 disconnects

3 participants