Skip to content

feat: add sticky per-account proxy support with VNC binding and local bypass#214

Open
MaziarAshtari wants to merge 4 commits into
iBUHub:mainfrom
MaziarAshtari:sticky-proxy
Open

feat: add sticky per-account proxy support with VNC binding and local bypass#214
MaziarAshtari wants to merge 4 commits into
iBUHub:mainfrom
MaziarAshtari:sticky-proxy

Conversation

@MaziarAshtari

Copy link
Copy Markdown

What does this PR do?

Adds sticky per-account proxy support so each Google account always uses
the same proxy from proxylist.txt.

Features:

  • Reads proxylist.txt and assigns proxies to accounts persistently
    via proxy_mapping.json
  • Supports formats: user:pass@ip:port, ip:port:user:pass,
    ip:port, http://user:pass@ip:port
  • VNC account binding now also uses a sticky proxy (not just API contexts)
  • Local addresses (127.0.0.1, localhost, 0.0.0.0) bypass the proxy
    to prevent WebSocket connection failures
  • If no free proxy is available, VNC returns an error instead of
    falling back to direct connection
  • Configurable via STICKY_PROXY_BYPASS environment variable

Files changed:

  • src/utils/StickyProxyManager.js (new)
  • src/core/BrowserManager.js
  • src/auth/CreateAuth.js
  • README_EN.md

Tested:

  • Docker deployment with 99 proxies in proxylist.txt
  • VNC account binding with proxy works (Google login succeeds)
  • API requests work with sticky proxy + local bypass

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0cad4dc574

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +399 to +400
const rawName = typeof authData?.accountName === "string" ? authData.accountName.trim() : "";
const key = rawName ? rawName.toLowerCase() : `auth-${authIndex}`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Don't collapse non-email account labels

When two valid auth files have the same non-email accountName (for example the bundled auth saver uses "unknown" when email detection fails, or a user enters the same manual label twice), AuthSource still treats them as distinct accounts because it only canonicalizes email-looking names. This key generation collapses both to one mapping entry, so _getProxyMapping() assigns one proxy and getProxyForAuth() returns that same proxy for both accounts, breaking the promised per-account proxy isolation. Include the auth index in the key for non-email labels, or mirror AuthSource's email-only normalization.

Useful? React with 👍 / 👎.

@rb05180518

Copy link
Copy Markdown

What does this PR do?

Adds sticky per-account proxy support so each Google account always uses the same proxy from proxylist.txt.

Features:

  • Reads proxylist.txt and assigns proxies to accounts persistently
    via proxy_mapping.json
  • Supports formats: user:pass@ip:port, ip:port:user:pass,
    ip:port, http://user:pass@ip:port
  • VNC account binding now also uses a sticky proxy (not just API contexts)
  • Local addresses (127.0.0.1, localhost, 0.0.0.0) bypass the proxy
    to prevent WebSocket connection failures
  • If no free proxy is available, VNC returns an error instead of
    falling back to direct connection
  • Configurable via STICKY_PROXY_BYPASS environment variable

Files changed:

  • src/utils/StickyProxyManager.js (new)
  • src/core/BrowserManager.js
  • src/auth/CreateAuth.js
  • README_EN.md

Tested:

  • Docker deployment with 99 proxies in proxylist.txt
  • VNC account binding with proxy works (Google login succeeds)
  • API requests work with sticky proxy + local bypass

Hi, have you ever encountered the 'queue closed' issue?

@bbbugg bbbugg added 🗓️ Planned This will be worked on later ✨ Feature New feature or implementation labels Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feature New feature or implementation 🗓️ Planned This will be worked on later

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants