Documentation ¶
Index ¶
- func NewClient(ctx context.Context, dialer N.Dialer, serverAddr M.Socksaddr, ...) adapter.V2RayClientTransport
- type Client
- type EarlyWebsocketConn
- func (c *EarlyWebsocketConn) Close() error
- func (c *EarlyWebsocketConn) LazyHeadroom() bool
- func (c *EarlyWebsocketConn) LocalAddr() net.Addr
- func (c *EarlyWebsocketConn) Read(b []byte) (n int, err error)
- func (c *EarlyWebsocketConn) RemoteAddr() net.Addr
- func (c *EarlyWebsocketConn) SetDeadline(t time.Time) error
- func (c *EarlyWebsocketConn) SetReadDeadline(t time.Time) error
- func (c *EarlyWebsocketConn) SetWriteDeadline(t time.Time) error
- func (c *EarlyWebsocketConn) Upstream() any
- func (c *EarlyWebsocketConn) Write(b []byte) (n int, err error)
- func (c *EarlyWebsocketConn) WriteBuffer(buffer *buf.Buffer) error
- type Server
- type WebsocketConn
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EarlyWebsocketConn ¶
type EarlyWebsocketConn struct { *Client // contains filtered or unexported fields }
func (*EarlyWebsocketConn) Close ¶
func (c *EarlyWebsocketConn) Close() error
func (*EarlyWebsocketConn) LazyHeadroom ¶ added in v1.1.0
func (c *EarlyWebsocketConn) LazyHeadroom() bool
func (*EarlyWebsocketConn) LocalAddr ¶
func (c *EarlyWebsocketConn) LocalAddr() net.Addr
func (*EarlyWebsocketConn) RemoteAddr ¶
func (c *EarlyWebsocketConn) RemoteAddr() net.Addr
func (*EarlyWebsocketConn) SetDeadline ¶
func (c *EarlyWebsocketConn) SetDeadline(t time.Time) error
func (*EarlyWebsocketConn) SetReadDeadline ¶
func (c *EarlyWebsocketConn) SetReadDeadline(t time.Time) error
func (*EarlyWebsocketConn) SetWriteDeadline ¶
func (c *EarlyWebsocketConn) SetWriteDeadline(t time.Time) error
func (*EarlyWebsocketConn) Upstream ¶ added in v1.1.0
func (c *EarlyWebsocketConn) Upstream() any
func (*EarlyWebsocketConn) WriteBuffer ¶ added in v1.1.0
func (c *EarlyWebsocketConn) WriteBuffer(buffer *buf.Buffer) error
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(ctx context.Context, options option.V2RayWebsocketOptions, tlsConfig tls.ServerConfig, handler N.TCPConnectionHandler, errorHandler E.Handler) (*Server, error)
func (*Server) ServeHTTP ¶
func (s *Server) ServeHTTP(writer http.ResponseWriter, request *http.Request)
func (*Server) ServePacket ¶
func (s *Server) ServePacket(listener net.PacketConn) error
type WebsocketConn ¶
func NewServerConn ¶ added in v1.1.0
func NewServerConn(wsConn *websocket.Conn, remoteAddr net.Addr) *WebsocketConn
func (*WebsocketConn) Close ¶
func (c *WebsocketConn) Close() error
func (*WebsocketConn) RemoteAddr ¶
func (c *WebsocketConn) RemoteAddr() net.Addr
func (*WebsocketConn) SetDeadline ¶
func (c *WebsocketConn) SetDeadline(t time.Time) error
func (*WebsocketConn) Upstream ¶ added in v1.1.0
func (c *WebsocketConn) Upstream() any
func (*WebsocketConn) UpstreamWriter ¶ added in v1.1.0
func (c *WebsocketConn) UpstreamWriter() any
type Writer ¶ added in v1.1.0
func (*Writer) FrontHeadroom ¶ added in v1.1.0
Click to show internal directories.
Click to hide internal directories.