Documentation ¶
Index ¶
- type Option
- func WithCert(cert *tls.Certificate) Option
- func WithCertFromFile(certFile, keyFile string) Option
- func WithDirectHandler(h *http.ServeMux) Option
- func WithDownloaderFactory(f downloader.Factory) Option
- func WithHTTPSHosts(hosts ...*config.HijackHost) Option
- func WithRegistryMirror(r *config.RegistryMirror) Option
- func WithRules(rules []*config.Proxy) Option
- type Proxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
Option is a functional option for configuring the proxy
func WithCertFromFile ¶
WithCertFromFile is a convenient wrapper for WithCert, to read certificate from the given file
func WithDirectHandler ¶
WithDirectHandler sets the handler for non-proxy requests
func WithDownloaderFactory ¶ added in v0.4.0
func WithDownloaderFactory(f downloader.Factory) Option
WithDownloaderFactory sets the factory function to get a downloader
func WithHTTPSHosts ¶
func WithHTTPSHosts(hosts ...*config.HijackHost) Option
WithHTTPSHosts sets the rules for hijacking https requests
func WithRegistryMirror ¶
func WithRegistryMirror(r *config.RegistryMirror) Option
WithRegistryMirror sets the registry mirror for the proxy
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
Proxy is an http proxy handler. It proxies requests with dfget if any defined proxy rules is matched
func NewFromConfig ¶
func NewFromConfig(c config.Properties) (*Proxy, error)
NewFromConfig returns a new transparent proxy from the given properties
Click to show internal directories.
Click to hide internal directories.