Documentation
¶
Index ¶
- type App
- func (a *App) AddProfile(profile ProxyProfile) error
- func (a *App) GetActiveConfigName() string
- func (a *App) GetAppSettings() AppConfig
- func (a *App) GetProfiles() []ProxyProfile
- func (a *App) HideWindow()
- func (a *App) IsProxyRunning() bool
- func (a *App) LoadConfig(path string) error
- func (a *App) Quit()
- func (a *App) RemoveProfile(name string) error
- func (a *App) SaveConfig() error
- func (a *App) SetContext(ctx *wails.Context)
- func (a *App) SetDefaultProfile(name string) error
- func (a *App) SetSystemProxyMode(mode string) error
- func (a *App) ShowWindow()
- func (a *App) StartProxyByName(name string) error
- func (a *App) StopProxy() error
- func (a *App) UpdateAppSettings(settings AppConfig) error
- type AppConfig
- type ProxyProfile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
App struct
func (*App) AddProfile ¶
func (a *App) AddProfile(profile ProxyProfile) error
AddProfile adds a new profile
func (*App) GetActiveConfigName ¶
GetActiveConfigName returns the name of the currently active config
func (*App) GetAppSettings ¶
GetAppSettings returns the current application settings
func (*App) GetProfiles ¶
func (a *App) GetProfiles() []ProxyProfile
GetProfiles returns all profiles
func (*App) IsProxyRunning ¶
IsProxyRunning returns the current proxy status
func (*App) LoadConfig ¶
LoadConfig loads the app configuration from file
func (*App) RemoveProfile ¶
RemoveProfile removes a profile
func (*App) SaveConfig ¶
SaveConfig saves the app configuration to file
func (*App) SetContext ¶
func (a *App) SetContext(ctx *wails.Context)
SetContext sets the wails context
func (*App) SetDefaultProfile ¶
SetDefaultProfile sets the default profile
func (*App) SetSystemProxyMode ¶
SetSystemProxyMode sets the system proxy mode
func (*App) StartProxyByName ¶
StartProxyByName starts the proxy using the named profile
func (*App) UpdateAppSettings ¶
UpdateAppSettings updates the application settings
type AppConfig ¶
type AppConfig struct {
Profiles []ProxyProfile `json:"profiles"`
DefaultProfile string `json:"defaultProfile"`
AutoStartProxy bool `json:"autoStartProxy"`
EnableSystemTray bool `json:"enableSystemTray"`
SystemProxyMode string `json:"systemProxyMode"` // "pac", "global", "disabled"
PacURL string `json:"pacUrl"`
PacPort int `json:"pacPort"`
SocksPort int `json:"socksPort"`
HttpPort int `json:"httpPort"`
}
AppConfig represents the application configuration