Skip to content

[Bug]: ProxyBridge fails to proxy Node.js (SillyTavern) requests to Google APIs #104

@leon911000

Description

@leon911000

Platform
Windows

ProxyBridge Version
3.2.0

OS and Version
Windows 11 24H2

Documentation
[x] I have read the Windows documentation

[ ] I have read the macOS documentation

[ ] I have read the Linux documentation

Code Review
[ ] I have gone through the code page

Describe the Bug
Description:
ProxyBridge works fine when mounting gcli2api (https://github.com/su-kaka/gcli2api) — Google AI Studio API requests succeed.
However, when SillyTavern (Node.js app) directly connects to Google AI Studio API (generativelanguage.googleapis.com) through ProxyBridge, the requests consistently fail with ETIMEDOUT.

Error example:

Code
Error fetching Google AI Studio models: FetchError: request to https://generativelanguage.googleapis.com/v1beta/models?key=xxxxx failed, reason: ETIMEDOUT
at ClientRequest. (node-fetch/src/index.js:108:11)
at ClientRequest.emit (node:events:519:28)
...
errno: 'ETIMEDOUT',
code: 'ETIMEDOUT'
Comparison:

ProxyBridge + gcli2api → works correctly, requests succeed.

ProxyBridge + SillyTavern direct API calls → fails with ETIMEDOUT.

Proxifier or direct proxy in config.yaml → works correctly.

curl tests → work correctly.

Steps to reproduce:

Run SillyTavern with ProxyBridge enabled.

Add process rule for node.exe (also tried *.exe, *, full path).

Add target host rules:

Code
*.googleapis.com; generativelanguage.googleapis.com
Attempt to fetch models from Google AI Studio API.

Observe timeout error.

Expected behavior:
Node.js (node-fetch/libuv) requests should be intercepted and proxied correctly by ProxyBridge, same as with Proxifier or direct proxy configuration.

Actual behavior:
Requests time out. ProxyBridge logs show no matching rule or no interception of Node.js socket connections.

Environment
Windows 11 24H2

SillyTavern (Node.js app,ver1.16.0)

ProxyBridge 3.2.0

Proxy type: SOCKS5 / Clash

Proxy itself works fine (tested with curl, Proxifier, config.yaml)

Additional Context
It seems ProxyBridge may not fully intercept Node.js/libuv socket connections, unlike Proxifier which hooks Winsock. This makes ProxyBridge unusable for SillyTavern direct Google API calls, even though gcli2api works fine through the same proxy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions