opencode-go-proxy v0.1.0: OpenCode Go API 本地转发代理
- 透明转发 /v1/responses、/v1/chat/completions、/v1/messages、/v1/models - 自动注入上游认证 / User-Agent / x-opencode-session 会话头 - 双层密钥:上游 key(-k)+ 客户端访问 key(-c),客户端认证头不透传 - 手写 HTTP/1.1(rustls 仅用于 TLS):keep-alive、chunked、100-continue - SSE 逐块流式透传,上游错误响应详情日志 - mini-socks 同款 systemd 安装(-i/--uninstall),musl 静态单文件 - 37 个单元/集成测试
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
[package]
|
||||
name = "opencode-go-proxy"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
description = "OpenCode Go API 本地转发代理:自动注入认证 / User-Agent / 会话头,让任意 OpenAI/Anthropic 兼容客户端透明使用 OpenCode Go"
|
||||
license = "MIT"
|
||||
|
||||
[dependencies]
|
||||
tokio = { version = "1", features = ["rt-multi-thread", "macros", "net", "io-util", "time"] }
|
||||
rustls = { version = "0.23", default-features = false, features = ["logging", "ring", "std", "tls12"] }
|
||||
tokio-rustls = { version = "0.26", default-features = false, features = ["ring", "tls12"] }
|
||||
webpki-roots = "1.0"
|
||||
|
||||
[profile.release]
|
||||
opt-level = 3
|
||||
lto = true
|
||||
codegen-units = 1
|
||||
strip = true
|
||||
panic = "abort"
|
||||
Reference in New Issue
Block a user