Documentation
¶
Index ¶
- func NewHandler(ctx context.Context, config *core.OutboundHandlerConfig) (outbound.Handler, error)
- type Handler
- func (h *Handler) Address() net.Address
- func (h *Handler) Close() error
- func (h *Handler) Dial(ctx context.Context, dest net.Destination) (internet.Connection, error)
- func (h *Handler) Dispatch(ctx context.Context, link *transport.Link)
- func (h *Handler) GetOutbound() proxy.Outbound
- func (h *Handler) Start() error
- func (h *Handler) Tag() string
- type Manager
- func (m *Manager) AddHandler(ctx context.Context, handler outbound.Handler) error
- func (m *Manager) Close() error
- func (m *Manager) GetDefaultHandler() outbound.Handler
- func (m *Manager) GetHandler(tag string) outbound.Handler
- func (m *Manager) RemoveHandler(ctx context.Context, tag string) error
- func (m *Manager) Select(selectors []string) []string
- func (m *Manager) Start() error
- func (m *Manager) Type() interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler(ctx context.Context, config *core.OutboundHandlerConfig) (outbound.Handler, error)
NewHandler create a new Handler based on the given configuration.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is an implements of outbound.Handler.
func (*Handler) Address ¶
func (h *Handler) Address() net.Address
Address implements internet.Dialer.
func (*Handler) Dial ¶
func (h *Handler) Dial(ctx context.Context, dest net.Destination) (internet.Connection, error)
Dial implements internet.Dialer.
func (*Handler) Dispatch ¶
func (h *Handler) Dispatch(ctx context.Context, link *transport.Link)
Dispatch implements proxy.Outbound.Dispatch.
func (*Handler) GetOutbound ¶
func (h *Handler) GetOutbound() proxy.Outbound
GetOutbound implements proxy.GetOutbound.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is to manage all outbound handlers.
func New ¶
func New(ctx context.Context, config *proxyman.OutboundConfig) (*Manager, error)
New creates a new Manager.
func (*Manager) AddHandler ¶
func (m *Manager) AddHandler(ctx context.Context, handler outbound.Handler) error
AddHandler implements outbound.Manager.
func (*Manager) GetDefaultHandler ¶
func (m *Manager) GetDefaultHandler() outbound.Handler
GetDefaultHandler implements outbound.Manager.
func (*Manager) GetHandler ¶
func (m *Manager) GetHandler(tag string) outbound.Handler
GetHandler implements outbound.Manager.
func (*Manager) RemoveHandler ¶
func (m *Manager) RemoveHandler(ctx context.Context, tag string) error
RemoveHandler implements outbound.Manager.
Click to show internal directories.
Click to hide internal directories.