Server configuration
The port on which the proxy server listens for incoming requests.Source:
scripts/proxy.mjs:18Path to the authentication file containing your GitHub Copilot access token.The auth file is created when you run Source:
node scripts/auth.mjs and contains:access_token- Your GitHub OAuth tokenprovider- Always “github-copilot”github_user- Your GitHub usernamecreated_at- Timestamp of authentication
scripts/proxy.mjs:19-20, scripts/auth.mjs:18-19Web search configuration
API key for Brave Search integration. When provided, the proxy uses Brave Search as the primary web search provider.Getting a Brave API key:When
- Visit https://api.search.brave.com/
- Sign up for a free account
- Create an API key from your dashboard
- Add it to your environment
BRAVE_API_KEY is set:- Primary: Brave Search API
- Fallback: DuckDuckGo Lite → DuckDuckGo Instant Answer API
scripts/proxy.mjs:23Maximum number of search results to return per web search query.This limit applies to all search providers (Brave, DuckDuckGo Lite, DuckDuckGo Instant Answer).Source:
scripts/proxy.mjs:24Debugging
Enable debug logging for streaming responses. Set to When enabled, the proxy logs each streaming chunk with delta information and finish reasons to help debug streaming issues.Source:
"1" to see detailed stream chunk information.scripts/proxy.mjs:689Claude Code integration
Points Claude Code to use the proxy server instead of Anthropic’s API.If you changed
COPILOT_PROXY_PORT, update this URL accordingly:When using the proxy, set this to any non-empty value. The actual authentication is handled by your GitHub Copilot token.The proxy ignores this value and uses
COPILOT_AUTH_FILE for authentication.Complete example
Docker environment
When running with Docker Compose, set these variables in a.env file:
.env
- Exposes port 18080 (configurable in
docker-compose.yml) - Mounts
~/.claude-copilot-auth.jsonas read-only - Sets
COPILOT_PROXY_PORT=18080
docker-compose.yml:10-13