Documentation ¶
Overview ¶
Package settings provides the ability to read, write, decode and encode the binary data of DefaultConnectionSettings from the Windows registry.
Index ¶
Constants ¶
const ( FlagDirect = 1 << iota FlagProxy // use an explicitly set proxy server FlagAutoProxyURL // use an automatic configuration script downloaded from a specified URL FlagAutoDetect // automatically detect settings )
const ( RegistryKeyPath = `SOFTWARE\Microsoft\Windows\CurrentVersion\Internet settings\Connections` RegistryValueName = "DefaultConnectionSettings" )
Variables ¶
This section is empty.
Functions ¶
func ReadBinary ¶
ReadBinary reads the binary data of DefaultConnectionSettings from the registry.
func Write ¶
func Write(settings *DefaultConnectionSettings) error
Write encodes and writes the binary data of DefaultConnectionSettings to the registry.
func WriteBinary ¶
WriteBinary writes the binary data of DefaultConnectionSettings to the registry.
Types ¶
type DefaultConnectionSettings ¶
type DefaultConnectionSettings struct { Unknown int32 `json:"unknown"` Version int32 `json:"version"` Flags int32 `json:"flags"` ProxyAddress string `json:"proxy_address"` BypassList string `json:"bypass_list"` ScriptAddress string `json:"script_address"` UnKnown1 [32]byte `json:"unknown1"` }
DefaultConnectionSettings is the struct representation of its registry value.
func New ¶
func New() *DefaultConnectionSettings
New returns a new DefaultConnectionSettings with Unknown set to 70 and Flags set to FlagDirect.
func Read ¶
func Read() (*DefaultConnectionSettings, error)
Read reads and decodes the binary data of DefaultConnectionSettings from the registry.
func (*DefaultConnectionSettings) MarshalBinary ¶
func (settings *DefaultConnectionSettings) MarshalBinary() (data []byte, err error)
MarshalBinary encodes itself into a binary form and returns the result.
func (*DefaultConnectionSettings) UnmarshalBinary ¶
func (settings *DefaultConnectionSettings) UnmarshalBinary(data []byte) (err error)
UnmarshalBinary decodes the binary data from the registry.