config

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Adapter name
	Adapter string
	// List of domains to sniff
	SniffDomains map[string]bool
	// Proxy server port
	ProxyPort string
	// Upstream proxy server URL (http://user:pass@host:port, socks5://user:pass@host:port, etc.)
	ProxyServerURL string
	// contains filtered or unexported fields
}

Config stores application configuration

func GetConfig

func GetConfig() *Config

GetConfig returns the global configuration instance

func (*Config) AddSniffDomain

func (c *Config) AddSniffDomain(domain string)

AddSniffDomain adds a domain to the sniff list

func (*Config) GetProxyPort

func (c *Config) GetProxyPort() string

GetProxyPort gets the proxy port

func (*Config) GetProxyServerURL

func (c *Config) GetProxyServerURL() string

GetProxyServerURL gets the proxy server URL

func (*Config) GetSniffDomains

func (c *Config) GetSniffDomains() []string

GetSniffDomains returns all domains in the sniff list

func (*Config) IsSniffDomain

func (c *Config) IsSniffDomain(domain string) bool

IsSniffDomain checks if a domain should be sniffed

func (*Config) RemoveSniffDomain

func (c *Config) RemoveSniffDomain(domain string)

RemoveSniffDomain removes a domain from the sniff list

func (*Config) SetProxyPort

func (c *Config) SetProxyPort(port string)

SetProxyPort sets the proxy port

func (*Config) SetProxyServerURL

func (c *Config) SetProxyServerURL(url string)

SetProxyServerURL sets the proxy server URL

Jump to

Keyboard shortcuts

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