Documentation ¶
Index ¶
- Variables
- type BaseConn
- func (c *BaseConn) Close() error
- func (c *BaseConn) LocalAddr() net.Addr
- func (c *BaseConn) Read(b []byte) (int, error)
- func (c *BaseConn) RemoteAddr() net.Addr
- func (c *BaseConn) SetDeadline(t time.Time) error
- func (c *BaseConn) SetReadDeadline(t time.Time) error
- func (c *BaseConn) SetWriteDeadline(t time.Time) error
- func (c *BaseConn) Write(b []byte) (int, error)
- type ProxyAddr
- func (a *ProxyAddr) GetBoolOption(key string, fallback bool) (bool, error)
- func (a *ProxyAddr) GetIntOption(key string, base int, fallback int) (int, error)
- func (a *ProxyAddr) GetStringOption(key, fallback string) string
- func (a *ProxyAddr) Network() string
- func (a *ProxyAddr) ProxyScheme() ProxyScheme
- func (a *ProxyAddr) String() string
- type ProxyDescription
- func (p *ProxyDescription) Connect(ctx context.Context) (net.Conn, error)
- func (p *ProxyDescription) GetBoolOption(key string) bool
- func (p *ProxyDescription) GetIntOption(key string, base int) int
- func (p *ProxyDescription) GetStringOption(key string) string
- func (ep *ProxyDescription) Help() string
- func (p *ProxyDescription) IsListener() bool
- func (p *ProxyDescription) SetAddr(addr *ProxyAddr) *ProxyDescription
- func (p *ProxyDescription) Target() *ProxyAddr
- func (p *ProxyDescription) TargetHost() string
- type ProxyDialer
- type ProxyListener
- type ProxyOption
- type ProxyOptionType
- type ProxyRegistry
- func (r *ProxyRegistry) Add(desc ProxyDescription)
- func (r *ProxyRegistry) FindAndCreateProxy(addr *ProxyAddr) (*ProxyDescription, error)
- func (r ProxyRegistry) Get(key ProxyScheme) (ProxyDescription, error)
- func (r ProxyRegistry) Keys() []ProxyScheme
- func (r ProxyRegistry) Values() []ProxyDescription
- type ProxyScheme
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotSupported = errors.New("method not supported") ErrProxyBusy = errors.New("proxy is busy") ErrProxyNotInitialized = errors.New("proxy is not initialized") ErrNotImplemented = errors.New("proxy method not implemented") )
View Source
var Registry = ProxyRegistry{/* contains filtered or unexported fields */}
Functions ¶
This section is empty.
Types ¶
type BaseConn ¶
func (*BaseConn) RemoteAddr ¶
type ProxyAddr ¶
func (*ProxyAddr) GetBoolOption ¶
func (*ProxyAddr) GetIntOption ¶
func (*ProxyAddr) GetStringOption ¶
func (*ProxyAddr) ProxyScheme ¶
func (a *ProxyAddr) ProxyScheme() ProxyScheme
type ProxyDescription ¶
type ProxyDescription struct { Scheme ProxyScheme Description string Examples []string SupportsMultiple bool SupportsStreams bool StringOptions []ProxyOption[string] BoolOptions []ProxyOption[bool] IntOptions []ProxyOption[int] Dialer ProxyDialer Listener ProxyListener // contains filtered or unexported fields }
func (*ProxyDescription) GetBoolOption ¶
func (p *ProxyDescription) GetBoolOption(key string) bool
func (*ProxyDescription) GetIntOption ¶
func (p *ProxyDescription) GetIntOption(key string, base int) int
func (*ProxyDescription) GetStringOption ¶
func (p *ProxyDescription) GetStringOption(key string) string
func (*ProxyDescription) Help ¶
func (ep *ProxyDescription) Help() string
func (*ProxyDescription) IsListener ¶
func (p *ProxyDescription) IsListener() bool
func (*ProxyDescription) SetAddr ¶
func (p *ProxyDescription) SetAddr(addr *ProxyAddr) *ProxyDescription
func (*ProxyDescription) Target ¶
func (p *ProxyDescription) Target() *ProxyAddr
func (*ProxyDescription) TargetHost ¶
func (p *ProxyDescription) TargetHost() string
type ProxyDialer ¶
type ProxyListener ¶
type ProxyOption ¶
type ProxyOption[T ProxyOptionType] struct { Name string Description string Default T }
type ProxyOptionType ¶
type ProxyRegistry ¶
type ProxyRegistry struct {
// contains filtered or unexported fields
}
func (*ProxyRegistry) Add ¶
func (r *ProxyRegistry) Add(desc ProxyDescription)
func (*ProxyRegistry) FindAndCreateProxy ¶
func (r *ProxyRegistry) FindAndCreateProxy(addr *ProxyAddr) (*ProxyDescription, error)
func (ProxyRegistry) Get ¶
func (r ProxyRegistry) Get(key ProxyScheme) (ProxyDescription, error)
func (ProxyRegistry) Keys ¶
func (r ProxyRegistry) Keys() []ProxyScheme
func (ProxyRegistry) Values ¶
func (r ProxyRegistry) Values() []ProxyDescription
type ProxyScheme ¶
type ProxyScheme string
func (ProxyScheme) IsListener ¶
func (s ProxyScheme) IsListener() bool
Click to show internal directories.
Click to hide internal directories.