lcproxy

package
v0.0.0-...-9c55465 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 2 Imported by: 0

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