proxy

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: MIT Imports: 44 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XeapiSessionSourceStateFile   = "state-file"
	XeapiSessionSourceCommandLine = "command-line"
)

Variables

This section is empty.

Functions

func DefaultDomains

func DefaultDomains() []string

DefaultDomains returns the NetEase domains intercepted by the proxy.

func Run

func Run(ctx context.Context, rawConfig *Config) error

Run starts the proxy and blocks until the context is canceled or the server fails.

Types

type Config

type Config struct {
	ListenAddr string
	CACertPath string
	CAKeyPath  string
	// RequirePrivateCAPath applies the managed-CA directory policy to the
	// configured certificate and key paths. It is set for ncmctl's default CA.
	RequirePrivateCAPath bool
	MaxBodyBytes         int64
	ShowSensitive        bool
	Debug                bool
	Domains              []string
	Out                  io.Writer
	ErrOut               io.Writer
	ShutdownTimeout      time.Duration
	XeapiSessions        []XeapiSessionSeed
}

Config controls the local HTTP(S) monitoring proxy.

type XeapiSessionSeed

type XeapiSessionSeed struct {
	ID     string
	Key    string
	Source string
}

XeapiSessionSeed supplies one startup session without granting the proxy permission to persist later sessions.

func (XeapiSessionSeed) Validate

func (seed XeapiSessionSeed) Validate() error

Validate ensures a startup seed has a supported source and raw ASCII AES key.

Jump to

Keyboard shortcuts

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