Documentation
¶
Overview ¶
Package system provides OS-level proxy configuration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetSystemProxy ¶
SetSystemProxy is a convenience function to set the system proxy.
func UninstallCA ¶
UninstallCA is a convenience function to uninstall a CA certificate.
func UnsetSystemProxy ¶
func UnsetSystemProxy() error
UnsetSystemProxy is a convenience function to unset the system proxy.
Types ¶
type ProxyConfig ¶
ProxyConfig represents proxy configuration settings.
type SystemProxy ¶
type SystemProxy interface {
// Name returns the OS name
Name() string
// SetProxy configures the system to use a proxy
SetProxy(host string, port int) error
// UnsetProxy removes the system proxy configuration
UnsetProxy() error
// GetProxy returns the current proxy configuration
GetProxy() (*ProxyConfig, error)
// InstallCA installs a CA certificate into the system trust store
InstallCA(certPath string, certName string) error
// UninstallCA removes a CA certificate from the system trust store
UninstallCA(certName string) error
// IsCAInstalled checks if a CA certificate is installed
IsCAInstalled(certName string) (bool, error)
}
SystemProxy provides an interface for OS-level proxy configuration.
func New ¶
func New() (SystemProxy, error)
New returns a SystemProxy implementation for the current OS.
Click to show internal directories.
Click to hide internal directories.