chromeproxy

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package chromeproxy provides the go binding of chrome.proxy APIs. Its detailed API spec is https://developer.chrome.com/extensions/proxy

Index

Constants

View Source
const (
	// ModeDirect represents "direct" mode.
	ModeDirect Mode = "direct"
	// ModeAutoDetect represents "auto_detect" mode.
	ModeAutoDetect = "auto_detect"
	// ModePacScript represents "pac_script" mode.
	ModePacScript = "pac_script"
	// ModeFixedServers represents "fixed_servers" mode.
	ModeFixedServers = "fixed_servers"
)

Variables

This section is empty.

Functions

func SetSettings

func SetSettings(ctx context.Context, tconn *chrome.TestConn, settings ProxySettings) error

SetSettings invokes chrome.proxy.settings.set with given settings value on tconn.

Types

type Mode

type Mode string

Mode is go binding of chrome.proxy.Mode.

type PacScript

type PacScript struct {
	URL string `json:"url,omitempty"`
}

PacScript is go binding of chrome.proxy.PacScript.

type ProxyConfig

type ProxyConfig struct {
	Rules     *ProxyRules `json:"rules,omitempty"`
	PacScript *PacScript  `json:"pacScript,omitempty"`
	Mode      Mode        `json:"mode"`
}

ProxyConfig is go binding of chrome.proxy.ProxyConfig.

type ProxyRules

type ProxyRules struct {
	SingleProxy *ProxyServer `json:"singleProxy,omitempty"`
	// No support for proxyForHttp, proxyForHttps, proxyForFtp and fallbackProxy, yet.
	BypassList []string `json:"bypassList,omitempty"`
}

ProxyRules is go binding of chrome.proxy.ProxyRules.

type ProxyServer

type ProxyServer struct {
	// No support for scheme, yet.
	Host string `json:"host"`
	Port int    `json:"port,omitempty"`
}

ProxyServer is go binding of chrome.proxy.ProxyServer.

type ProxySettings

type ProxySettings struct {
	Value ProxyConfig `json:"value"`
}

ProxySettings is go binding of the value to be passed to chrome.proxy.settings.set.

Jump to

Keyboard shortcuts

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