go.bigb.es/claudio

v0.3.0
Doc Versions Source

Functions

f func Start

src
func Start(upstreamURL string, tokenFunc func() (string, error), extraHeaders map[string]string, proxyURL string) (addr string, shutdown func(), err error)

Start launches a local Anthropic-to-OpenAI translation proxy. upstreamURL is the OpenAI-compatible base URL (e.g. "https://api.openai.com/v1"). Returns the proxy address (host:port), a shutdown function, and any error.

f func StartSOCKSBridge

src
func StartSOCKSBridge(socksURL string) (addr string, shutdown func(), err error)

StartSOCKSBridge starts a local HTTP CONNECT proxy that forwards connections through the given SOCKS5 proxy. This allows clients that only support HTTP(S) proxies (like Node.js / Claude Code) to route through SOCKS5.

f func StaticToken

src
func StaticToken(key string) func() (string, error)

StaticToken returns a token function that always returns the given key.