proxyconfig

package
v0.0.0-...-a9ed6da Latest Latest
Warning

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

Go to latest
Published: May 7, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Rendered for windows/amd64

Overview

Package proxy config to handle set/get functions of the Windows proxy settings

Index

Constants

This section is empty.

Variables

View Source
var ProxyEnvVariables = [3]string{
	"https_proxy",
	"http_proxy",
	"no_proxy",
}

HTTP Proxy environment variables possible values

Functions

func SetProxySettings

func SetProxySettings(log log.T)

func StringFromUTF16Ptr

func StringFromUTF16Ptr(s *uint16) string

StringFromUTF16Ptr converts a *uint16 C string to a Go String https://github.com/mattn/go-ieproxy/blob/master/utils.go

func ValidateHost

func ValidateHost(s string) (*url.URL, error)

ValidateHost tries to parse the http_proxy and https_proxy addresses

Types

type HttpDefaultProxyConfig

type HttpDefaultProxyConfig struct {
	// contains filtered or unexported fields
}

HttpDefaultProxyConfig represents the WinHTTP machine proxy configuration.

proxy: specifies the proxy addresses to use.
bypass: specifies addresses that should be excluded from proxy

func GetDefaultProxySettings

func GetDefaultProxySettings(log log.T) (p HttpDefaultProxyConfig, err error)

GetDefaultProxySettings returns the machine WinHTTP proxy configuration

type HttpIEProxyConfig

type HttpIEProxyConfig struct {
	// contains filtered or unexported fields
}

HttpIEProxyConfig represents the Internet Explorer proxy configuration.

auto: indicates if the 'Automatically detect settings' option in IE is enabled
enabled: indicates if the 'Use proxy settings for your LAN' option in IE is enabled
proxy: specifies the proxy addresses to use.
bypass: specifies addresses that should be excluded from proxy

func GetIEProxySettings

func GetIEProxySettings(log log.T) (p HttpIEProxyConfig, err error)

GetIEProxySettings returns the Internet Explorer proxy configuration for the current user

type ProxySettings

type ProxySettings struct {
	// contains filtered or unexported fields
}

ProxySettings represents the proxy settings for https_proxy and http_proxy

func ParseProxySettings

func ParseProxySettings(log log.T, proxy string) ProxySettings

ParseProxySettings parses the proxy-list string The Windows proxy server list contains one or more of the following strings ([<scheme>=][<scheme>"://"]<server>[":"<port>]) Internet Explorer and WinHTTP support 4 proxy types for [<scheme>=]: http=, https=, ftp=, or socks=

type WinHttpIEProxyConfig

type WinHttpIEProxyConfig struct {
	// contains filtered or unexported fields
}

WinHttpIEProxyConfig represents the Internet Explorer proxy configuration information

fAutoDetect: If TRUE, indicates that the Internet Explorer proxy configuration for the current user specifies "automatically detect settings".
lpszAutoConfigUrl: Pointer to a null-terminated Unicode string that contains the auto-configuration URL if the Internet Explorer proxy configuration for the current user specifies "Use automatic proxy configuration".
lpszProxy: Pointer to a null-terminated Unicode string that contains the proxy URL if the Internet Explorer proxy configuration for the current user specifies "use a proxy server".
lpszProxyBypass: Pointer to a null-terminated Unicode string that contains the optional proxy by-pass server list.

type WinHttpProxyInfo

type WinHttpProxyInfo struct {
	// contains filtered or unexported fields
}

WinHttpProxyInfo represents the WinHTTP machine proxy configuration.

lpszProxy: Pointer to a string value that contains the proxy server list.
lpszProxyBypass: Pointer to a string value that contains the proxy bypass list.

Jump to

Keyboard shortcuts

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