bing-ai-gateway-go
A high-fidelity proxy service enabling streamlined access to Microsoft Bing AI's conversational interface and integrated features, including image synthesis capabilities. This solution supports local setup and configuration adjustments, crucially allowing users to interact without requiring prerequisite Microsoft account authentication.
Author

Karry-cpu
Quick Info
Actions
Tags
BingAI-Access-Proxy (Powered by Go)
This project introduces a streamlined demonstration interface for Microsoft's New Bing AI, architected using Vue3 for the frontend and Go for the backend. It guarantees a uniform user experience across sessions and integrates support for standard ChatGPT prompts. It functions effectively within mainland China and retains nearly all native functionalities of the Bing AI service, notably permitting conversation without user sign-in.
⭐ If the default, comparatively faster and more reliable Microsoft official chat endpoint (wss://sydney.bing.com/sydney/ChatHub) is inaccessible, consider these fallback strategies:
Employ a tool like ModHeader to inject the
X-Forwarded-Forrequest header targeting the specified WebSocket URL. Refer to Issue #71 and this Zhihu article for implementation specifics.Self-host an instance of this proxy to act as a dedicated chat relay service, or download a pre-compiled executable from the Releases section. Configure the application settings to point the custom chat server URL to
http://localhost:8080and select it.
⭐ The presently active chat endpoint (defaulting to Cloudflare Workers, subject to a daily quota of 100,000 requests—unsustainable long-term) can be switched via the Settings menu (top-right corner) to Service Selection. Self-hosting a dedicated relay is strongly recommended; deployment guides are available under the Deploy Chat Server section below.
⭐ Geographic Accessibility: Operates successfully in regions with connectivity restrictions, provided the deployed server can directly reach www.bing.com without redirection to the Chinese regional domain (cn.bing.com). SOCKS proxy configuration is supported for such scenarios.
⭐ Compatibility with established open-source ChatGPT prompt libraries is implemented.
⭐ For advanced features like image generation (which requires selecting the More Creative mode or enabling Image Creation in Settings), users must log into a Microsoft account and provide their session Cookie.
⭐ Troubleshooting: For any encountered issues (e.g., 24-hour limits, unauthorized access messages), first attempt the button on the bottom-left. If that fails, execute a hard refresh (Shift + F5 or Ctrl + Shift + R, or use the reset option in settings). The final resort is clearing browser cache and cookies.
- Proxy Gateway Overview
- Visual Interface Screenshots
- Sidebar Integration
- Live Demonstration Instances
- User Cookie Configuration
- Environment Variables Reference
- Deployment Guide
- Chat Relay Server Deployment
- Planned Enhancements (TODO)
Visual Interface Screenshots
-
Desktop View (Unauthenticated)
-
Desktop View (Authenticated)
-
Desktop View (Image Generation)
⭐ Requires authentication and selection of the More Creative conversation preset.
- Mobile View (Unauthenticated)
Sidebar Integration
- In the Edge browser, both the chat functionality and the composition tool can be added to the sidebar.
Live Demonstration Instances
Small VPS Instances (Low Load Tolerance)
- Instance Link 1: https://bing.vcanbb.top
Railway Platform Deployments
-
Instance Link 2: https://bing-railway.vcanbb.top
-
Instance Link 3: https://go-proxy-bingai-production.up.railway.app
Vercel Deployments
-
Instance Link 4: https://bing-vercel.vcanbb.top
-
Instance Link 5: https://go-proxy-bingai-adams549659584.vercel.app
Render Deployments
-
Instance Link 6: https://bing-render.vcanbb.top
-
Instance Link 7: https://go-proxy-bingai.onrender.com
User Cookie Configuration
-
Navigate to https://www.bing.com/ or https://cn.bing.com// and successfully log in.
-
Open Developer Tools (F12 or Ctrl + Shift + I).
-
Extract the value associated with the
_Ucookie. Input this value into the Set User field within the application's Settings section.
Environment Variables Reference
bash
Runtime port selection. Defaults to 8080.
PORT=8080
SOCKS Proxy configuration details (Optional)
Go_Proxy_BingAI_SOCKS_URL=192.168.0.88:1070
SOCKS Authentication Credentials (Optional)
Go_Proxy_BingAI_SOCKS_USER=xxx Go_Proxy_BingAI_SOCKS_PWD=xxx
Pre-configured User Tokens (Optional, discouraged for shared instances). Tokens prefixed with Go_Proxy_BingAI_USER_TOKEN_N will be used cyclically for unauthenticated users, risking rapid rate-limiting or security challenges for shared tokens.
Go_Proxy_BingAI_USER_TOKEN_1=xxx Go_Proxy_BingAI_USER_TOKEN_2=xxx Go_Proxy_BingAI_USER_TOKEN_3=xxx ...
Basic access authentication password (Optional)
Go_Proxy_BingAI_AUTH_KEY=xxx
Deployment Guide
⭐ HTTPS Requirement: Deployment requires a domain secured with HTTPS (using Nginx or similar reverse proxy), as browsers typically only send the
brencoding type within theAccept-Encodingheader when secure connections are established (localhost exempt).Supported Operating Systems: Linux (amd64 / arm64), Windows (amd64 / arm64).
For domestic Chinese server deployments, configure the SOCKS environment variables detailed above.
Containerization (Docker)
Consult the Dockerfile and docker-compose.yml for source files.
- Docker Command Example
bash
Start container, mapping host port 8080 to container port 8080, ensuring restart policy
docker run -d -p 8080:8080 --name go-proxy-bingai --restart=unless-stopped adams549659584/go-proxy-bingai
Start container with SOCKS proxy environment variables configured
docker run -e Go_Proxy_BingAI_SOCKS_URL=192.168.0.88:1070 -e Go_Proxy_BingAI_SOCKS_USER=xxx -e Go_Proxy_BingAI_SOCKS_PWD=xxx -d -p 8080:8080 --name go-proxy-bingai --restart=unless-stopped adams549659584/go-proxy-bingai
- Docker Compose Example
yaml version: '3'
services:
go-proxy-bingai:
# Image Identifier
image: adams549659584/go-proxy-bingai
# Container Name Assignment
container_name: go-proxy-bingai
# Automatic Restart Policy
restart: unless-stopped
ports:
- 8080:8080
# environment:
# - Go_Proxy_BingAI_SOCKS_URL=192.168.0.88:1070
# - Go_Proxy_BingAI_SOCKS_USER=xxx
# - Go_Proxy_BingAI_SOCKS_PWD=xxx
# - Go_Proxy_BingAI_USER_TOKEN_1=xxx
# - Go_Proxy_BingAI_USER_TOKEN_2=xxx
Direct Executable (Release)
Download the appropriate compressed archive for your target platform from the GitHub Releases page. After extraction, execute the go-proxy-bingai binary directly.
Railway Platform
Configuration requires specifying the Dockerfile path and the listening port.
bash PORT=8080 RAILWAY_DOCKERFILE_PATH=docker/Dockerfile
One-click deployment via Railway =>
Manual Railway Configuration:
Vercel Environment
⭐ Vercel deployments do not natively support the required WebSocket connections; use the Official Chat Server fallback or a Cloudflare Worker relay.
One-click deployment via Vercel =>
Render Platform
One-click deployment via Render =>
Chat Relay Server Deployment
Core logic resides in worker.js
General deployment steps for Cloudflare Workers (consult external guides for full details):
-
Create a new Worker service, copy the entire content of worker.js, paste it into the service editor, save, and deploy.
-
Configure a custom domain route under the Triggers section for access.
Planned Enhancements (TODO)
- [x] Composition/Drafting Feature
- [x] Frontend Migration to Vue3 Complete
- [x] Prompt Management Support
- [x] Conversation History Persistence
- [x] Message Export Functionality (Markdown, Images, PDF)
- [x] Basic Access Control Mechanisms
