Documentation ¶
Index ¶
- type LeafCertSpec
- type Manager
- type Option
- func WithBasicAuth(auth *config.BasicAuth) Option
- func WithCert(cert *tls.Certificate) Option
- func WithDefaultFilter(f string) Option
- func WithDirectHandler(h *http.ServeMux) Option
- func WithHTTPSHosts(hosts ...*config.HijackHost) Option
- func WithMaxConcurrency(con int64) Option
- func WithPeerHost(peerHost *scheduler.PeerHost) Option
- func WithPeerTaskManager(peerTaskManager peer.TaskManager) Option
- func WithRegistryMirror(r *config.RegistryMirror) Option
- func WithRules(rules []*config.Proxy) Option
- func WithWhiteList(whiteList []*config.WhiteList) Option
- type Proxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LeafCertSpec ¶
type LeafCertSpec struct {
// contains filtered or unexported fields
}
type Manager ¶
func NewProxyManager ¶
func NewProxyManager(peerHost *scheduler.PeerHost, peerTaskManager peer.TaskManager, opts *config.ProxyOption) (Manager, error)
type Option ¶
Option is a functional option for configuring the proxy
func WithBasicAuth ¶
WithBasicAuth sets basic auth info for proxy
func WithDefaultFilter ¶
WithDefaultFilter sets default filter for http requests without X-Dragonfly-Filter Header
func WithDirectHandler ¶
WithDirectHandler sets the handler for non-proxy requests
func WithHTTPSHosts ¶
func WithHTTPSHosts(hosts ...*config.HijackHost) Option
WithHTTPSHosts sets the rules for hijacking https requests
func WithMaxConcurrency ¶
WithMaxConcurrency sets max concurrent for process http request
func WithPeerHost ¶
WithPeerHost sets the *scheduler.PeerHost
func WithPeerTaskManager ¶
func WithPeerTaskManager(peerTaskManager peer.TaskManager) Option
WithPeerTaskManager sets the peer.PeerTaskManager
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 dragonfly if any defined proxy rules is matched
func NewProxy ¶
NewProxy returns a new transparent proxy from the given options
func NewProxyWithOptions ¶
NewProxyWithOptions constructs a new instance of a Proxy with additional options.