Categorygithub.com/saucelabs/forwarder
modulepackage
1.3.2
Repository: https://github.com/saucelabs/forwarder.git
Documentation: pkg.go.dev

# README

Forwarder Proxy Build Status Go Report Card GitHub release

Forwarder is a production-ready, fast MITM proxy with PAC support. It's suitable for debugging, intercepting and manipulating HTTP traffic. It's used as a core component of Sauce Labs Sauce Connect Proxy. It is a forward proxy, which means it proxies traffic from clients to servers (e.g. browsers to websites), and supports CONNECT requests. It can proxy:

  • HTTP/HTTPS/HTTP2 requests
  • WebSockets (both HTTP and HTTPS)
  • Server Sent Events (SSE)
  • TCP traffic (e.g. SMTP, IMAP, etc.)

Documentation

The documentation is available at forwarder-proxy.io.

Development

Quick Start

  • Install Docker or Podman, for Podman configuration see this guide
  • Install Docker Compose
  • Install make
  • Run make install-dependencies

Linting

  • Run make fmt to auto format code
  • Run make lint to lint code
  • Edit .golangci.yml to change linting rules

Building Devel Images

Run make update-devel-image to build the devel docker image.

Testing

  • Run make test to run Go unit tests
  • Run make -C e2e run-e2e to run e2e tests, more details in e2e/README.md

Updating tools versions

All tools versions are defined in .version file. To update a version, edit the file and create a merge request. CI will run and update the CI image with the new version.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package pac provides a PAC file parser and evaluator.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Listen creates a listener for the provided network and address and configures OS-specific keep-alive parameters.
No description provided by the author
No description provided by the author
No description provided by the author
NewHTTPProxy creates a new HTTP proxy.
NewHTTPProxyHandler is like NewHTTPProxy but returns http.Handler instead of *HTTPProxy.
NewHTTPServer creates a new HTTP server.
No description provided by the author
OpenFileParser returns a parser that calls os.OpenFile.
No description provided by the author
ParseHostPortUser parses a user:password@host:port string into HostUser.
No description provided by the author
No description provided by the author
ParseUserinfo parses a user:password string into *url.Userinfo.
No description provided by the author
ReadURL can read base64 encoded data, local file, http or https URL or stdin.
ReadURLString can read base64 encoded data, local file, http or https URL or stdin and return it as a string.
No description provided by the author
UnmarshalJSONFlag unmarshals a JSON input for a flag.

# Constants

No description provided by the author
APIUnixSocket is the path to the Unix socket for the API server.
No description provided by the author
No description provided by the author
ErrorHeader is the header that is set on error responses with the error message.
Common multipliers for SizeSuffix.
Common multipliers for SizeSuffix.
No description provided by the author
No description provided by the author
No description provided by the author
Common multipliers for SizeSuffix.
Common multipliers for SizeSuffix.
Common multipliers for SizeSuffix.
Common multipliers for SizeSuffix.
SizeSuffixMax is the largest SizeSuffix multiplier.
SizeSuffixMaxValue is the largest value that can be used to create SizeSuffix.
SizeSuffixMinValue is the smallest value that can be used to create SizeSuffix.
Common multipliers for SizeSuffix.

# Variables

ErrConnectFallback is returned by a ConnectFunc to indicate that the CONNECT request should be handled by martian.
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
APIHandler serves API endpoints.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PromConfig is a configuration for Prometheus metrics.
No description provided by the author
No description provided by the author
TrackedConn is a net.Conn that tracks the number of bytes read and written.

# Interfaces

No description provided by the author
No description provided by the author

# Type aliases

Alias all martian types to avoid exposing them.
No description provided by the author
No description provided by the author
No description provided by the author
Alias all martian types to avoid exposing them.
Alias all martian types to avoid exposing them.
Alias all martian types to avoid exposing them.
Alias all martian types to avoid exposing them.
Alias all martian types to avoid exposing them.
No description provided by the author
SizeSuffix is an int64 with a friendly way of printing setting.
SizeSuffixList is a slice SizeSuffix values.