Documentation
¶
Overview ¶
Package app starts the whole daemon (engine + HTTP API + web UI). It is shared by the console daemon and the Windows desktop application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultStateDir ¶ added in v1.0.4
func DefaultStateDir() string
DefaultStateDir returns where Equinox keeps its settings, torrents and downloads by default: the "data" folder next to the executable, so a per-user or portable install carries its data with it. When that folder cannot be created — a machine-wide install to Program Files, where a standard user has no write access there — a per-user folder is used instead, so the app still starts rather than failing with "access is denied".
Types ¶
type App ¶
type App struct {
Manager *core.Manager
Settings *config.Store
// URL opens the web UI with the access key already included.
URL string
// Token is the API access key.
Token string
// StateDir is where settings, state, torrent copies and downloads live.
StateDir string
// contains filtered or unexported fields
}
App is a running daemon.
func Start ¶
Start brings everything up. listen is the preferred HTTP address; if it is taken, a free loopback port is used instead. Only loopback addresses are accepted.
type Options ¶ added in v1.0.24
type Options struct {
// Open is for a server behind a proxy that signs users in (Umbrel): it may listen on any address, and it asks
// for no personal key (see api.Server.SetOpen). Without it only loopback addresses are accepted.
Open bool
// AllowedHosts are host names accepted in open mode besides the usual ones.
AllowedHosts []string
// Downloads is where a first start saves torrents, instead of the user's Downloads folder.
Downloads string
// Completed, if set, is where a first start moves finished torrents (Umbrel: Downloads/Equinox/complete next to
// .../incomplete, so a media server pointed at the first never sees a half-downloaded file).
Completed string
// TorrentPort, if not 0, is the torrent port on every start whatever the settings say, and the page cannot
// change it: a container publishes just this port, so any other one would get no incoming connections.
TorrentPort int
// Places are the folders the server is given, by the names the system around it shows (see api.Server.SetPlaces).
Places []api.Place
// Desktop is set by the desktop program whose window is the user's own browser (Linux, see api.Server.SetBrowserApp).
Desktop api.Desktop
}
Options are the ways a server differs from the desktop application.