Documentation ¶
Overview ¶
Package ui provides common functions and interfaces for the sandboxed-tor-browser user interfaces.
Index ¶
- Constants
- Variables
- func ValidateBridgeLines(ls string) (string, error)
- type Common
- func (c *Common) CheckUpdate(async *Async) *installer.UpdateEntry
- func (c *Common) DoInstall(async *Async)
- func (c *Common) DoLaunch(async *Async, checkUpdates bool)
- func (c *Common) FetchUpdate(async *Async, patch *installer.Patch) []byte
- func (c *Common) Init() error
- func (c *Common) NeedsInstall() bool
- func (c *Common) Run() error
- func (c *Common) Term()
- type UI
Constants ¶
const ( // DefaultBridgeTransport is the decault bridge transport when using internal // bridges. DefaultBridgeTransport = "obfs4" )
Variables ¶
var ( // BundleChannels is the map of Tor Browser architectures to channels. BundleChannels map[string][]string // BundleLocales is the map of Tor Browser channels to locales. BundleLocales map[string][]string // Bridges is the map of transports to Bridge lines. Bridges map[string][]string // Version is the version of `sandboxed-tor-browser`. Version string // Revision is the git commit of `sandboxed-tor-browser`. Revision string )
Functions ¶
func ValidateBridgeLines ¶
ValidateBridgeLines validates and sanitizes bridge lines.
Types ¶
type Common ¶
type Common struct { Cfg *config.Config Manif *config.Manifest Sandbox *process.Process PendingUpdate *installer.UpdateEntry ForceInstall bool ForceConfig bool NoKillTor bool AdvancedConfig bool PrintVersion bool WasHardened bool // contains filtered or unexported fields }
Common holds ui implementation agnostic state.
func (*Common) CheckUpdate ¶
func (c *Common) CheckUpdate(async *Async) *installer.UpdateEntry
CheckUpdate queries the update server to see if an update for the current bundle is available.
func (*Common) DoInstall ¶
func (c *Common) DoInstall(async *Async)
DoInstall executes the install step based on the configured parameters. This is blocking and should be run from a go routine, with the appropriate Async structure used to communicate.
func (*Common) DoLaunch ¶
DoLaunch executes the launch step based on the configured parameters. This is blocking and should be run from a go routine, with the appropriate Async structure used to communicate.
func (*Common) FetchUpdate ¶
FetchUpdate downloads the update specified by the patch over tor, and validates it with the hash in the patch datastructure, and the known MAR signing keys.
func (*Common) NeedsInstall ¶
NeedsInstall returns true if the bundle needs to be (re)installed.
Directories ¶
Path | Synopsis |
---|---|
Package async provides an async task struct to allow the UI to run background tasks.
|
Package async provides an async task struct to allow the UI to run background tasks. |
Package config handles the launcher configuration.
|
Package config handles the launcher configuration. |
Package gtk implements a Gtk+ user interface.
|
Package gtk implements a Gtk+ user interface. |
Package notify interfaces with the Destop Notification daemon, as defined by the desktop notifications spec, via the libnotify library.
|
Package notify interfaces with the Destop Notification daemon, as defined by the desktop notifications spec, via the libnotify library. |