Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>NetBridge LocalNew to Visual Studio Code? Get it now.
NetBridge Local

NetBridge Local

Aurorix

|
1 install
| (0) | Free
Local egress side for NetBridge, providing HTTP stream and TCP relay commands for remote VS Code scoped proxying.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

NetBridge Local 0.0.10

NetBridge Local 是 NetBridge 的本地端插件,安装在本地 VS Code UI 侧。它负责真正访问外网,并把远程端转发过来的 HTTP、HTTPS、SOCKS5、TCP 请求从本地电脑发出去。

配套远程端插件是:

aurorix-netbridge-remote-0.0.10.vsix

工作链路

远程 VS Code / 远程终端 / AI 子进程
        ↓
NetBridge Remote
        ↓
VS Code command bridge
        ↓
NetBridge Local
        ↓
本地电脑网络出口

本地端负责什么

本地端提供这些 VS Code 命令给远程端调用:

netbridge.local.fetch
netbridge.local.openStream
netbridge.local.readStream
netbridge.local.closeStream
netbridge.local.tcpOpen
netbridge.local.tcpWrite
netbridge.local.tcpRead
netbridge.local.tcpClose

其中:

  • fetch/openStream 用于 VS Code 插件内部 HTTP/HTTPS 请求。
  • tcpOpen/tcpWrite/tcpRead/tcpClose 用于远程 HTTP CONNECT、SOCKS5、终端代理流量。

安装位置

本插件必须安装在本地 VS Code,也就是你实际有外网访问能力的电脑上。

远程编译服务器上不要安装本地端插件,远程应安装:

aurorix-netbridge-remote-0.0.10.vsix

推荐安装步骤

  1. 本地 VS Code 安装:

    aurorix-netbridge-local-0.0.10.vsix
    
  2. Remote-SSH 连接远程主机。

  3. 远程窗口安装:

    aurorix-netbridge-remote-0.0.10.vsix
    
  4. 首次安装后重连远程窗口一次。

  5. 在远程窗口执行:

    NetBridge Remote: Proxy Status
    
  6. 新开远程终端测试:

    curl -I https://github.com --connect-timeout 10
    

配置项

默认配置适合个人可信开发环境测试。

Host allowlist

{
  "netbridge.local.allowedHosts": ["*"]
}

默认允许所有目标 host。更严格的环境可以改成:

{
  "netbridge.local.allowedHosts": [
    "github.com",
    "api.github.com",
    "registry.npmjs.org",
    "pypi.org",
    "files.pythonhosted.org"
  ]
}

是否阻止内网地址

{
  "netbridge.local.blockPrivateNetworks": false
}

默认不阻止内网地址,便于测试。如果担心远程端通过本地电脑访问本地内网资源,可以改成 true。

超时与大小限制

{
  "netbridge.local.maxBodyBytes": 10485760,
  "netbridge.local.requestTimeoutMs": 120000,
  "netbridge.local.tcpConnectTimeoutMs": 30000,
  "netbridge.local.tcpReadTimeoutMs": 120000,
  "netbridge.local.maxTcpChunkBytes": 65536
}

Codex / CLI 类 AI 插件说明

Codex 这类插件如果在远程 VS Code Extension Host 里启动 CLI,远程端 0.0.5 会给该 CLI 注入代理环境变量。本地端只负责接收远程端转过来的连接,并从本地电脑出网。

因此完整覆盖需要两边都安装 0.0.5:

本地端:aurorix-netbridge-local-0.0.10.vsix
远程端:aurorix-netbridge-remote-0.0.10.vsix

如果只有本地端,没有远程端,终端和 AI 子进程不会自动获得代理入口。

安全提醒

本地端是实际出网方。远程端能请求哪些目标,最终由本地端 allowlist 和配置决定。

建议:

  • 个人可信环境可以使用默认 allowedHosts: ["*"]。
  • 多人共用远程服务器时,建议收紧 allowlist。
  • 如担心访问本地内网资源,可开启 blockPrivateNetworks。

故障排查

1. 远程提示 local ping failed

确认本地 VS Code 已安装并启用 netbridge-local。

2. 远程终端代理不通

先在远程执行:

NetBridge Remote: Proxy Status

再新开终端执行:

env | grep -i proxy
curl -I https://github.com --connect-timeout 10

3. TCP 隧道失败

检查本地端输出面板:

View → Output → NetBridge Local

可能原因:

  • 本地网络无法访问目标。
  • allowlist 阻止了目标 host。
  • blockPrivateNetworks 阻止了私有地址。
  • 目标服务拒绝连接。

版本说明

0.0.5

  • 配合远程端 0.0.5 的 HTTP/SOCKS/PAC 全亮代理。
  • 提供 TCP relay 命令供远程 HTTP CONNECT 和 SOCKS5 使用。
  • 保留 HTTP fetch/stream 桥接能力。

Marketplace ID

本版本使用新的 Marketplace 扩展 ID:

Aurorix.aurorix-netbridge-local

旧的 netbridge.* 或 Aurorix.netbridge-* 包不会自动升级到这个新 ID;如果本机已经装过旧包,建议先卸载旧扩展,再安装本版本。

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft