system

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigPath

func GetConfigPath() (string, error)

GetConfigPath returns the path to store application configuration

func SetSystemProxy

func SetSystemProxy(host string, port int, pacURL string, pacPort int, mode string) error

SetSystemProxy configures the system to use the specified proxy

Types

type PacServer

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

PacServer represents a PAC (Proxy Auto-Configuration) server

func NewPacServer

func NewPacServer(port int) *PacServer

NewPacServer creates a new PAC server

func (*PacServer) Start

func (p *PacServer) Start() error

Start starts the PAC server

func (*PacServer) Stop

func (p *PacServer) Stop() error

Stop stops the PAC server

type SysTray

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

SysTray represents the system tray integration

func NewSysTray

func NewSysTray(handler SysTrayHandler) (*SysTray, error)

NewSysTray creates a new system tray integration

func (*SysTray) Close

func (s *SysTray) Close()

Close closes the system tray

type SysTrayHandler

type SysTrayHandler interface {
	ShowWindow()
	HideWindow()
	Quit()
	IsProxyRunning() bool
	StartProxyByName(name string) error
	StopProxy() error
	GetProfiles() interface{} // This should match the actual ProxyProfile struct
	SetSystemProxyMode(mode string) error
	GetAppSettings() interface{} // This should match the actual AppConfig struct
}

SysTrayHandler defines the interface for handling system tray events

Jump to

Keyboard shortcuts

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