app

package
v0.0.0-...-e477a49 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

README

依赖 github.com/ouqiang/goproxy

CA证书使用项目内的,需要注意自己可否生成

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProxyHandler *goproxy.Proxy

Functions

func HttpsProxy

func HttpsProxy()

HttpsProxy replaced core.HttpProxy HTTP HTTPS 代理修改,密文解密

Types

type Cache

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

Cache 实现证书缓存接口

func (*Cache) Get

func (c *Cache) Get(host string) *tls.Certificate

func (*Cache) Set

func (c *Cache) Set(host string, cert *tls.Certificate)

type EventHandler

type EventHandler struct{}

func (*EventHandler) Auth

func (e *EventHandler) Auth(ctx *goproxy.Context, rw http.ResponseWriter)

func (*EventHandler) BeforeRequest

func (e *EventHandler) BeforeRequest(ctx *goproxy.Context)

func (*EventHandler) BeforeResponse

func (e *EventHandler) BeforeResponse(ctx *goproxy.Context, resp *http.Response, err error)

func (*EventHandler) Connect

func (e *EventHandler) Connect(ctx *goproxy.Context, rw http.ResponseWriter)

func (*EventHandler) ErrorLog

func (e *EventHandler) ErrorLog(err error)

ErrorLog 记录错误日志

func (*EventHandler) Finish

func (e *EventHandler) Finish(ctx *goproxy.Context)

func (*EventHandler) ParentProxy

func (e *EventHandler) ParentProxy(req *http.Request) (*url.URL, error)

ParentProxy 设置上级代理

func (*EventHandler) WebSocketReceiveMessage

func (e *EventHandler) WebSocketReceiveMessage(ctx *goproxy.Context, messageType *int, p *[]byte)

func (*EventHandler) WebSocketSendMessage

func (e *EventHandler) WebSocketSendMessage(ctx *goproxy.Context, messageType *int, p *[]byte)

type ReqCtx

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

Jump to

Keyboard shortcuts

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