Skip to content

v1.1.0 — egress proxy support (http/https/socks5)

Choose a tag to compare

@codewith-aditya codewith-aditya released this 18 Nov 09:07
· 7 commits to master since this release

v1.1.0 — egress proxy support

Requests can now leave through a proxy instead of the host's own IP. This covers the
gateway, token refresh and the auth subcommands — the GitHub → WorkOS hops, which
is what you want when GitHub rate-limits your IP on /login/oauth/authorize.

Added

  • -proxy / METAPHOR_PROXY for http://, https:// and socks5:// proxies.
  • -proxy-insecure / METAPHOR_PROXY_INSECURE=1 to accept a self-signed certificate on
    the proxy itself (the target's TLS is still verified).
  • GET /debug/ip — returns the egress IP, protocol and active proxy, so you can confirm
    the tunnel without guessing.
  • version in /healthz.
  • -h now prints the direct and proxied invocation examples.

Fixed

  • Tokens minted by a second process (auth gh, auth refresh) are picked up by a
    running bridge without a restart — the store reloads on tokens.json mtime change.
    Previously a rotated refresh token in the live process could go stale.

Verified

Test Result
HTTPS proxy with self-signed cert egress changes, HTTP/2 preserved, chat OK
SOCKS5 connects, HTTP/2 preserved, chat OK
Dead proxy 502 with proxy dial: … connection refused in <1 ms, no hang
Unknown scheme rejected at startup
auth gh through the proxy full GitHub → WorkOS → token mint, no GitHub 429
External auth refresh while serving new expiry live without restart

Install

tar -xzf metaphor-go_1.1.0_linux_amd64.tar.gz
./metaphor-go auth start      # then: auth finish "<code>"
./metaphor-go serve           # http://127.0.0.1:8190/v1

With a proxy:

METAPHOR_PROXY='https://user:pass@gw.example.com:443' METAPHOR_PROXY_INSECURE=1 ./metaphor-go serve

Checksums in checksums.txt.