Documentation ¶
Index ¶
- type ProxyServerOption
- func AdditionalSettings(v map[uint64]uint64) ProxyServerOption
- func Addr(addr string) ProxyServerOption
- func ConnContext(f func(ctx context.Context, c quic.Connection) context.Context) ProxyServerOption
- func EnableDatagrams(v bool) ProxyServerOption
- func Handler(h http.Handler) ProxyServerOption
- func MaxHeaderBytes(v int) ProxyServerOption
- func QUICServerConfig(config *quic.Config) ProxyServerOption
- func TLSConfig(config *tls.Config) ProxyServerOption
- type TProxyServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProxyServerOption ¶
type ProxyServerOption func(*proxyServer) error
func AdditionalSettings ¶
func AdditionalSettings(v map[uint64]uint64) ProxyServerOption
AdditionalSettings specifies additional HTTP/3 settings. It is invalid to specify any settings defined by the HTTP/3 draft and the datagram draft.
func Addr ¶
func Addr(addr string) ProxyServerOption
Addr optionally specifies the UDP address for the server to listen on, in the form "host:port".
When used by ListenAndServe and ListenAndServeTLS methods, if empty, ":https" (port 443) is used. See net.Dial for details of the address format.
func ConnContext ¶
func ConnContext(f func(ctx context.Context, c quic.Connection) context.Context) ProxyServerOption
ConnContext optionally specifies a function that modifies the context used for a new connection c. The provided ctx has a ServerContextKey value.
func EnableDatagrams ¶
func EnableDatagrams(v bool) ProxyServerOption
EnableDatagrams enables support for HTTP/3 datagrams. If set to true, QuicConfig.EnableDatagram will be set. See https://datatracker.ietf.org/doc/html/rfc9297.
func Handler ¶
func Handler(h http.Handler) ProxyServerOption
Handler is the HTTP request handler to use. If not set, defaults to mitmhttp.RoundTripHandler.
func MaxHeaderBytes ¶
func MaxHeaderBytes(v int) ProxyServerOption
MaxHeaderBytes controls the maximum number of bytes the server will read parsing the request HEADERS frame. It does not limit the size of the request body. If zero or negative, http.DefaultMaxHeaderBytes is used.
func QUICServerConfig ¶
func QUICServerConfig(config *quic.Config) ProxyServerOption
QuicConfig provides the parameters for QUIC connection created with Serve. If nil, it uses reasonable default values.
func TLSConfig ¶
func TLSConfig(config *tls.Config) ProxyServerOption
TLSConfig optionally provides a TLS configuration for use by server.
type TProxyServer ¶
type TProxyServer struct {
// contains filtered or unexported fields
}
func NewTProxyServer ¶
func NewTProxyServer(config *mitm.QUICConfig, opts ...ProxyServerOption) TProxyServer
func (*TProxyServer) Serve ¶
func (psrv *TProxyServer) Serve(conn net.PacketConn) (err error)
func (*TProxyServer) ServeListener ¶
func (psrv *TProxyServer) ServeListener(listener mitm.QUICListener) error