local_http_proxy_server

package
v0.55.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LocalHttpProxyPort = "19036"
	ProxyAuthHeader    = "Proxy-Authorization"
)

Variables

This section is empty.

Functions

func GetProxyUrl

func GetProxyUrl() string

GetProxyUrl 获取代理地址,同时启动实例

func SetProxyInfo

func SetProxyInfo(UseProxy bool, iInfos []string, iLocalPort string) error

SetProxyInfo 设置代理信息,设置之前会停止现在运行的代理

Types

type LocalHttpProxyServer

type LocalHttpProxyServer struct {
	LocalHttpProxyServerPort string // 本地开启的 Http 代理服务器端口
	LocalHttpProxyUrl        string // 本地开启的 Http 代理服务器地址包含端口
	// contains filtered or unexported fields
}

LocalHttpProxyServer see https://github.com/go-rod/rod/issues/305

func NewLocalHttpProxyServer

func NewLocalHttpProxyServer() *LocalHttpProxyServer

func (*LocalHttpProxyServer) IsRunning

func (l *LocalHttpProxyServer) IsRunning() bool

func (*LocalHttpProxyServer) Start

func (l *LocalHttpProxyServer) Start(settings []string, localHttpProxyServerPort string) (string, error)

Start 传入参数为 [0] protocol [1] Address [2] Port [3] Username [4] Password,如果没得账号密码,则后面两个可以不传入

func (*LocalHttpProxyServer) Stop

func (l *LocalHttpProxyServer) Stop() error

Jump to

Keyboard shortcuts

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