Skip to content

Martian Proxy v.2.0.0-beta

Compare
Choose a tag to compare
@bramhaghosh bramhaghosh released this 14 Aug 21:49
· 321 commits to master since this release

Martian v2.0.0 addresses several issues experienced in common usage of the proxy.

Major Changes:

  • Martian Proxy v.2.0.0 requires Go 1.5 for changes to crypto/tls and tls.Config.GetCertificate.
  • RequestModifier and ResponseModifier interface changes.
    ModifyRequest(*martian.Context, *http.Request) error -> ModifyRequest(*http.Request) error
    ModifyResponse(*martian.Context, *http.Response) error -> ModifyResponse(*http.Response) error
  • Contexts have been made "optional" for modifiers, they still exist and can be obtained by calling martian.Context(*http.Request) in the modifier.
  • Contexts now provide per request/response and session storage for modifiers and have been moved to their own package called session.
  • Proxy no longer acts as an http.Handler, it takes a net.Listener directly in Serve(net.Listener). This also means that the martianhttp API has been separated from the proxy and must be run separately.
  • MITM now supports generating certificates from the TLS SNI extension if provided.
  • Auth is now provided by the auth.Context rather than the normal context, it can be retrieved from a normal context using auth.FromContext(*session.Context).