httpproxy

package
v0.33.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 26, 2025 License: GPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Http3Server

type Http3Server struct {
	*HttpsServer
	// contains filtered or unexported fields
}

func NewHttp3Server

func NewHttp3Server(httpsSrv *HttpsServer, udpConn net.PacketConn) *Http3Server

func (*Http3Server) Close

func (s *Http3Server) Close() error

func (*Http3Server) GetConfigForClient

func (s *Http3Server) GetConfigForClient(info *tls.ClientHelloInfo) (*tls.Config, error)

func (*Http3Server) HandleQUIC

func (s *Http3Server) HandleQUIC(qc *quic.Conn, alpn, sni string)

func (*Http3Server) Start

func (s *Http3Server) Start() error

type HttpProxy

type HttpProxy struct {
	*proxy.BaseServer
	HttpServer     *HttpServer
	HttpsServer    *HttpsServer
	Http3Server    *Http3Server
	HttpPort       int
	HttpsPort      int
	Http3Port      int
	HttpProxyCache *index.AnyIntIndex
	HttpOnlyPass   string
	AddOrigin      bool
	HttpPortStr    string
	HttpsPortStr   string
	Http3PortStr   string
	Http3Bridge    bool
	ErrorAlways    bool
	ForceAutoSsl   bool
	Magic          *certmagic.Config
	Acme           *certmagic.ACMEIssuer
}

func NewHttpProxy

func NewHttpProxy(bridge proxy.NetBridge, task *file.Tunnel, httpPort, httpsPort, http3Port int, httpOnlyPass string, addOrigin, allowLocalProxy bool, httpProxyCache *index.AnyIntIndex) *HttpProxy

func (*HttpProxy) ChangeHostAndHeader

func (s *HttpProxy) ChangeHostAndHeader(r *http.Request, host string, header string, httpOnly bool)

ChangeHostAndHeader Change headers and host of request

func (*HttpProxy) ChangeRedirectURL

func (s *HttpProxy) ChangeRedirectURL(r *http.Request, url string) string

ChangeRedirectURL Change redirect URL

func (*HttpProxy) ChangeResponseHeader

func (s *HttpProxy) ChangeResponseHeader(resp *http.Response, header string)

ChangeResponseHeader Change headers of response

func (*HttpProxy) Close

func (s *HttpProxy) Close() error

func (*HttpProxy) Start

func (s *HttpProxy) Start() error

type HttpServer

type HttpServer struct {
	*HttpProxy
	// contains filtered or unexported fields
}

func NewHttpServer

func NewHttpServer(httpProxy *HttpProxy, l net.Listener) *HttpServer

func (*HttpServer) Close

func (s *HttpServer) Close() error

func (*HttpServer) DialContext

func (s *HttpServer) DialContext(ctx context.Context, network, addr string) (net.Conn, error)

func (*HttpServer) DialTlsContext

func (s *HttpServer) DialTlsContext(ctx context.Context, network, addr string) (net.Conn, error)

func (*HttpServer) NewServer

func (s *HttpServer) NewServer(port int, scheme string) *http.Server

func (*HttpServer) Start

func (s *HttpServer) Start() error

type HttpsListener

type HttpsListener struct {
	// contains filtered or unexported fields
}

HttpsListener wraps a parent listener.

func NewHttpsListener

func NewHttpsListener(l net.Listener) *HttpsListener

func (*HttpsListener) Accept

func (l *HttpsListener) Accept() (net.Conn, error)

func (*HttpsListener) Addr

func (l *HttpsListener) Addr() net.Addr

func (*HttpsListener) Close

func (l *HttpsListener) Close() error

type HttpsServer

type HttpsServer struct {
	*HttpServer
	// contains filtered or unexported fields
}

func NewHttpsServer

func NewHttpsServer(httpServer *HttpServer, l net.Listener) *HttpsServer

func (*HttpsServer) Close

func (s *HttpsServer) Close() error

func (*HttpsServer) Start

func (s *HttpsServer) Start() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL