Documentation
¶
Index ¶
- type Client
- func (c *Client) HandleFlow(ctx context.Context, dst net.Destination, rw buf.ReaderWriter) error
- func (c *Client) HandlePacketConn(ctx context.Context, dst net.Destination, pc udp.PacketReaderWriter) error
- func (c *Client) ListenPacket(ctx context.Context, dst net.Destination) (udp.UdpConn, error)
- func (c *Client) ProxyDial(ctx context.Context, dst net.Destination, initialData buf.MultiBuffer) (i.FlowConn, error)
- type ClientSettings
- type Server
- type ServerSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
ClientSettings
}
func NewClient ¶
func NewClient(settings ClientSettings) *Client
NewClient create a new http client based on the given config.
func (*Client) HandleFlow ¶
func (c *Client) HandleFlow(ctx context.Context, dst net.Destination, rw buf.ReaderWriter) error
Process implements proxy.Outbound.Process. We first create a socket tunnel via HTTP CONNECT method, then redirect all inbound traffic to that tunnel.
func (*Client) HandlePacketConn ¶
func (c *Client) HandlePacketConn(ctx context.Context, dst net.Destination, pc udp.PacketReaderWriter) error
func (*Client) ListenPacket ¶
type ClientSettings ¶
type ClientSettings struct {
Address net.Address
PortPicker i.PortSelector
Account *proxyconfig.Account
H1SkipWaitForReply bool
Dialer i.Dialer
}
type Server ¶
type Server struct {
ServerSettings
}
Server is an HTTP proxy server.
func NewServer ¶
func NewServer(settings ServerSettings) *Server
NewServer creates a new HTTP inbound handler.
type ServerSettings ¶
type ServerSettings struct {
PolicyManager i.TimeoutSetting
Handler i.Handler
AllowTransparent bool
}
Click to show internal directories.
Click to hide internal directories.