httpproxy

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2025 License: GPL-3.0 Imports: 30 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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) Start

func (s *Http3Server) Start() error

type HttpProxy added in v0.32.2

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
	ErrorAlways    bool
	Magic          *certmagic.Config
	Acme           *certmagic.ACMEIssuer
}

func NewHttpProxy added in v0.32.2

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

func (*HttpProxy) ChangeHostAndHeader added in v0.32.2

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

ChangeHostAndHeader Change headers and host of request

func (*HttpProxy) ChangeRedirectURL added in v0.32.2

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

ChangeRedirectURL Change redirect URL

func (*HttpProxy) ChangeResponseHeader added in v0.32.2

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

ChangeResponseHeader Change headers of response

func (*HttpProxy) Close added in v0.32.2

func (s *HttpProxy) Close() error

func (*HttpProxy) Start added in v0.32.2

func (s *HttpProxy) Start() error

type HttpServer

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

func NewHttpServer added in v0.32.2

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