Documentation
¶
Index ¶
- func ClientHelloServerName(peeker peek.Peeker) (sni string)
- func ClientWebsocketDial(ctx context.Context, uri url.URL, cHeaders http.Header, ...) (net.Conn, http.Header, error)
- func DecodeEd(s string) ([]byte, error)
- func DecodeXray0rtt(requestHeader http.Header) []byte
- func EncodeEd(edBuf []byte) string
- func IsV2rayHttpUpdate(r *http.Request) bool
- func IsWebSocketUpgrade(r *http.Request) bool
- func PrepareXray0rtt(tcp net.Conn, ed uint32) ([]byte, error)
- type CachedConn
- type WebsocketConn
- func (w *WebsocketConn) Close() error
- func (w *WebsocketConn) Read(p []byte) (n int, err error)
- func (w *WebsocketConn) ReaderReplaceable() bool
- func (w *WebsocketConn) ToReader() io.Reader
- func (w *WebsocketConn) ToWriter() io.Writer
- func (w *WebsocketConn) Write(p []byte) (n int, err error)
- func (w *WebsocketConn) WriterReplaceable() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientHelloServerName ¶ added in v0.1.30
ClientHelloServerName returns the SNI server name inside the TLS ClientHello, without consuming any bytes from br. On any error, the empty string is returned.
func ClientWebsocketDial ¶ added in v0.1.35
func DecodeXray0rtt ¶
func IsV2rayHttpUpdate ¶ added in v0.1.35
func IsWebSocketUpgrade ¶ added in v0.1.34
Types ¶
type CachedConn ¶ added in v0.1.35
func NewCachedConn ¶ added in v0.1.35
func NewCachedConn(c net.Conn, data []byte) *CachedConn
func (*CachedConn) ReaderReplaceable ¶ added in v0.1.35
func (c *CachedConn) ReaderReplaceable() bool
func (*CachedConn) ToReader ¶ added in v0.1.35
func (c *CachedConn) ToReader() io.Reader
func (*CachedConn) ToWriter ¶ added in v0.1.35
func (c *CachedConn) ToWriter() io.Writer
func (*CachedConn) WriterReplaceable ¶ added in v0.1.35
func (c *CachedConn) WriterReplaceable() bool
type WebsocketConn ¶ added in v0.1.34
func NewWebsocketConn ¶ added in v0.1.34
func ServerWebsocketUpgrade ¶ added in v0.1.34
func ServerWebsocketUpgrade(w http.ResponseWriter, r *http.Request) (*WebsocketConn, error)
func (*WebsocketConn) Close ¶ added in v0.1.34
func (w *WebsocketConn) Close() error
func (*WebsocketConn) Read ¶ added in v0.1.34
func (w *WebsocketConn) Read(p []byte) (n int, err error)
func (*WebsocketConn) ReaderReplaceable ¶ added in v0.1.35
func (w *WebsocketConn) ReaderReplaceable() bool
func (*WebsocketConn) ToReader ¶ added in v0.1.35
func (w *WebsocketConn) ToReader() io.Reader
func (*WebsocketConn) ToWriter ¶ added in v0.1.35
func (w *WebsocketConn) ToWriter() io.Writer
func (*WebsocketConn) Write ¶ added in v0.1.34
func (w *WebsocketConn) Write(p []byte) (n int, err error)
func (*WebsocketConn) WriterReplaceable ¶ added in v0.1.35
func (w *WebsocketConn) WriterReplaceable() bool
Click to show internal directories.
Click to hide internal directories.