-
v0.5.0
Stablereleased this
2026-10-26 23:04:14 +00:00 | 0 commits to main since this releaseAdded
headers.Rule.SetFunccomputes headers per request; an error answers the request with 502 Bad Gateway instead of forwarding it.handlers.ConnectAcceptorlets a ResponseWriter answer an acceptedCONNECTin its own protocol;TunnelandMITMHandleruse it where present, behindUnwraptoo.issuer.Cachekeeps the certificates another Issuer issues, per common name, and issues again pastNotAfter.- The
proxypackage assembles a complete proxy from host patterns, an Issuer, middleware and loggers withproxy.New. router.Router.HandleConnectHosttakes*as the fallback for hosts no other pattern matches.-upstream-catrusts a private CA for intercepted upstreams, and-upstream-insecureaccepts any upstream certificate.proxy.Config.Transportsets the transport for upstream requests.
Changed
- Breaking:
socks5.Serverno longer offersHijackon its ResponseWriter; a handler accepts the connection withAcceptConnectinstead of hijacking it and writing200 OK. - Breaking:
MITMHandler.CertCacheSizeis removed andMITMHandlerkeeps no certificates itself; an Issuer you set is called on everyCONNECTunless you wrap it inissuer.Cache. - Breaking: intercepted upstreams must present a certificate that verifies against the system roots, or
502 Bad Gatewayis answered;handlers.DefaultTransportverifies. Add-upstream-cafor a private CA, or-upstream-insecurefor the old behaviour. - Breaking:
issuernames the proxy CA a CA instead of a root:NewRootisNewCA,RootTemplateisCATemplate,SelfSignedCA.RootBitSizeandRootTmplareCABitSizeandCATmpl, andDefaultIssuerRootBitSizeandDefaultIssuerRootTmplareDefaultIssuerCABitSizeandDefaultIssuerCATmpl. - A proxy CA that multiproxy creates is named
multiproxy CA, of organizationmultiproxy, instead ofroot.example.orgofMultiproxy Root Org; a CA read from-ca-certkeeps its name. - The default templates carry no placeholder DNS name, OCSP server or issuer name on the proxy CA, and no country on leaf certificates.
Fixed
- Responses to intercepted requests stream to the client instead of reaching it only once complete.
- Every request pipelined on an intercepted connection is answered, where requests after the first could be lost.
- A client that starts its TLS handshake before reading the
CONNECTresponse is intercepted instead of stalling. - A certificate that cannot be issued refuses the
CONNECTrequest with 500, where the client was told the connection was established first. - Access records carry the status and byte count of every response, including errors multiproxy answers itself and refused
CONNECTrequests.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
v0.4.0
Stablereleased this
2026-10-26 21:32:24 +00:00 | 24 commits to main since this releaseAdded
-leaf-keyselects RSA or ECDSA P-256 keys for MITM certificates, andSelfSignedCA.KeyAlgorithmdoes the same in the library.-leaf-validityandSelfSignedCA.Validityset how long MITM certificates stay valid.-ca-certand-ca-keyread the CA from PEM files, and create both when neither exists.-ca-nameand-ca-orgset the subject of a generated CA.-print-caprints the CA certificate as PEM and exits.issuer.RootTemplate,issuer.NewRoot,issuer.LoadOrCreateandissuer.WriteFilescreate, read and write a CA.-set-headerand-del-headerset and strip headers on plain-HTTP and MITM requests to matching hosts.- The
headersmiddleware package rewrites request headers per host pattern. router.MatchHostmatches a hostname against a host pattern.-socksopens a SOCKS5 listener routed by the same-mitmand-tunnelrules asCONNECTrequests.- The
socks5package serves SOCKS5 connections asCONNECTrequests to anhttp.Handler. - Traces, metrics and logs are exported through the OpenTelemetry SDK, configured by the standard
OTEL_*environment variables and exporting over OTLP to localhost by default. - Log records written while a request is traced carry
trace_idandspan_id, andlog.TraceHandleradds them to anyslog.Handler. - The command stops on SIGINT and SIGTERM, flushing telemetry before it exits.
Changed
- Breaking: the module path is
sarak.sh/mikluko/multiproxy; imports ofgithub.com/akabos/multiproxychange to it. - Breaking: building requires Go 1.26 or later.
- Breaking:
router.Routeranswers a plain-HTTP request with 403 unless a host pattern matches its host orConnectis set, so-mitmand-tunnelrestrict plain HTTP as well asCONNECT. - Breaking: the
logmiddleware package is built onlog/slog:log.Middlewaretakes an access and a server*slog.Logger, and the helpers takeslogkey-value arguments instead ofzap.Field. - Logs are written by
log/slog: JSON records carrytimeinstead ofts, and server records carry upper-case levels. - With telemetry enabled, an upstream request carries the proxy's span in its
traceparentheader in place of the client's.
Removed
- The Docker image is no longer published.
- Breaking:
log.DefaultAccessLogEncoderConfig,log.DefaultServerLogEncoderConfigandlog.Fatal; the zap dependency is gone.
Fixed
- MITM certificates name the requested hostname as a subject alternative name, so Go clients accept them.
- MITM certificate keys honour
SelfSignedCA.BitSize, which defaults to 2048 bits instead of 1024. - MITM certificates are valid for 30 days by default instead of 10 years, and are issued again once expired.
- MITM certificates carry random serial numbers instead of all sharing serial 1.
- A generated CA is signed with SHA-256 instead of SHA-1, and carries a random serial number.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads