sing-box/service
Oleg Artyomov 1d388547ee
service/ccm: strip Accept-Encoding before forwarding to avoid untracked usage
When clients (e.g. Node.js Anthropic SDK) explicitly set Accept-Encoding: gzip,
Go's http.Transport does not transparently decompress the response body, because
it only does so when it added the header itself. This causes CCM's json.Unmarshal
to receive raw gzip bytes, silently failing to parse usage data and leaving the
usage counter unchanged.

Fix: remove Accept-Encoding from the outgoing proxy request. Transport adds it
automatically and transparently decompresses response.Body before CCM reads it.

Wire compression (CCM→Anthropic) is preserved — Transport still negotiates gzip.
Only CCM→localhost path is affected; compression on loopback has no practical
benefit.
2026-03-09 20:06:34 +08:00
..
ccm service/ccm: strip Accept-Encoding before forwarding to avoid untracked usage 2026-03-09 20:06:34 +08:00
derp Update tailscale to v1.92.4 2026-01-17 05:48:28 +08:00
ocm service/ccm,ocm: Fixes and improvements 2026-02-26 13:36:46 +08:00
oomkiller platform: Improve OOM killer for iOS 2026-02-27 14:58:06 +08:00
resolved Fix DNS transports 2026-01-17 05:48:41 +08:00
ssmapi ssm-api: Fix save cache 2025-11-04 11:00:43 +08:00