lcproxy

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 2 Imported by: ? 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

View Source
const (
	HttpKey  = "HTTP_PROXY"
	HttpsKey = "HTTPS_PROXY"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalProxy

type LocalProxy struct {
	// HttpProxy host url. eg: http://127.0.0.1:1080
	HttpProxy string `json:"http_proxy"`
	// HttpsProxy host url. eg: http://127.0.0.1:1080
	HttpsProxy string `json:"https_proxy"`
}

LocalProxy local proxy ENV setting.

func NewLocalProxy

func NewLocalProxy() *LocalProxy

NewLocalProxy instance

func (*LocalProxy) Apply

func (lp *LocalProxy) Apply(beforeFn func(lp *LocalProxy))

Apply proxy ENV setting.

func (*LocalProxy) EnvKeys

func (lp *LocalProxy) EnvKeys() []string

EnvKeys for proxy ENV

func (*LocalProxy) IsEmpty

func (lp *LocalProxy) IsEmpty() bool

IsEmpty proxy ENV setting.

func (*LocalProxy) RunFunc

func (lp *LocalProxy) RunFunc(fn func())

RunFunc on open proxy ENV, unset ENV after run.

func (*LocalProxy) Unset

func (lp *LocalProxy) Unset()

Unset proxy ENV

Jump to

Keyboard shortcuts

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