gopproxy

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InterceptMode bool
	InterceptChan chan bool
)

Functions

func ClearAllGUIViews

func ClearAllGUIViews()

func ClearGUIView

func ClearGUIView(g *gocui.Gui, view string) *gocui.View

func GenerateCA

func GenerateCA() (*x509.Certificate, *rsa.PrivateKey)

func PrintGUIRequest

func PrintGUIRequest(r *http.Request)

func PrintGUIResponse

func PrintGUIResponse(r http.Response)

func PrintRequest

func PrintRequest(v *gocui.View, r *http.Request)

func PrintResponse

func PrintResponse(v *gocui.View, r http.Response)

func RunGUI

func RunGUI() error

func RunGUI(server *http.Server) error {

func RunHTTPProxyCmd

func RunHTTPProxyCmd(options *Options)

func RunNetProxyCmd

func RunNetProxyCmd(options *Options)

func RunProxyCmd

func RunProxyCmd(options *Options)

Types

type CertManager

type CertManager struct {
	CaCRT     *x509.Certificate
	CaCertPEM *bytes.Buffer

	CaPrivKey    *rsa.PrivateKey
	CaPrivKeyPem *bytes.Buffer

	CertPrivKey    *rsa.PrivateKey
	CertPrivKeyPEM *bytes.Buffer

	CertStore map[string]tls.Certificate
}

func InitCertManager

func InitCertManager(caFile string, caPrivKeyFile string) (CertManager, error)

func (CertManager) CreateCertificate

func (certManager CertManager) CreateCertificate(host string) (tls.Certificate, error)

func (CertManager) SaveKeysToDisk

func (certManager CertManager) SaveKeysToDisk() error

type Options

type Options struct {
	Host string
	Port string

	VerboseOption   bool
	InterceptOption bool
	// contains filtered or unexported fields
}

func InitOptions

func InitOptions(host string, port string, verboseOption bool, interceptOption bool, caFileOption string, caPrivKeyFileOption string) Options

type Proxy

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

func (Proxy) ServeHTTP

func (p Proxy) ServeHTTP(w http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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