Introducing a new way to review your PRs.

Read the announcement

transmission-remote-gui / transgui

🧲 A feature rich cross platform Transmission BitTorrent client. Faster and has more functionality than the built-in web GUI.

View on GitHub

19 documents · Updated Sep 25, 2026

docs / daemon-connection-configuration

Daemon connection configuration

Daemon connection configuration gives the desktop client a named set of choices for reaching a Transmission daemon. It combines the daemon endpoint, transport and authentication rules, optional network routing, and daemon session settings so the RPC client can open the right remote session and keep the UI aligned with it. For the wider RPC boundary, see Transmission RPC integration; for request and session exchange, see RPC protocol and session flow.

Connection profiles

A connection profile is a named set of values for one Transmission daemon. The client lets an engineer or user create, rename, remove, select, and edit profiles without changing the main window or the RPC protocol used by the application.

Profile editing

The connection editor groups choices by their role in the remote session. Basic editing covers the host and port. Advanced editing exposes the RPC path, certificate choices, proxy routing, path mapping, and local connection helpers such as speed presets.

The editor validates the minimum information before it saves a profile. A host is required. If a proxy is enabled, its host is also required. Renaming a profile keeps its related settings together and makes the edited profile the active choice when appropriate.

Profile choicePurpose
NameIdentifies the daemon in menus and the saved profile list.
Host and portSelect the network endpoint for the daemon.
RPC pathSelects a non-default Transmission RPC route.
TLS and certificate valuesProtect the HTTP connection and, where supported, identify the client certificate.
Proxy valuesRoute HTTP or SOCKS5 traffic through an intermediary.
Authentication valuesSupply a daemon user name and either a saved password or a prompt rule.
Path mappingRelate daemon paths to local paths when the same torrent data is viewed from both systems.

References: connoptions.pas• L153-248 connoptions.pas• L250-320 connoptions.pas• L427-507 connoptions.pas• L535-592

Profile persistence

The profile list and each profile's values persist in the application settings file. The active profile name is stored separately from the profile values, so startup can restore the last selected daemon and rebuild the connection menu. A profile that has no dedicated section can use the legacy single-connection settings as a fallback.

Saving a profile also records settings that affect the local client view, such as path mappings and speed lists. These values travel with the daemon choice because they are useful only when the client works with that daemon.

References: connoptions.pas• L509-520 connoptions.pas• L594-674 main.pas• L1784-1804 main.pas• L8158-8192

Endpoint and transport choices

The endpoint choices turn a profile into the URL and transport state used by the shared RPC client. Transmission normally accepts HTTP POST requests at port 9091 and path /transmission/rpc, but a profile can select a different port or path for a mapped or hosted daemon.

Transport selection

The client chooses HTTP or HTTPS from the profile. HTTPS requires the SSL support available to the running application and can use a certificate file with its key password. Proxy settings are cleared before each connection and then applied as either an HTTP proxy or a SOCKS5 proxy, so stale routing values from another profile do not leak into the active session.

ChoiceEffect on the remote client
HTTPSends RPC requests without TLS.
HTTPSLoads SSL support and uses the configured certificate settings.
HTTP proxyRoutes the HTTP request through the configured proxy.
SOCKS5 proxyRoutes the socket through the configured SOCKS5 service.
Custom RPC pathAppends the selected path to the host URL.

References: connoptions.pas• L189-196 connoptions.pas• L309-313 connoptions.pas• L642-664 main.pas• L5350-5391 rpc.pas• L1287-1316

Authentication prompts

Daemon authentication is optional. When enabled, the profile supplies a user name and either a stored password or a request to ask at connect time. A prompt keeps the password out of the saved profile while still allowing the RPC client to receive it before the first request.

The prompt is tied to the named profile. After a successful authenticated connection, the main window keeps the password in a session cache for that profile. The cache avoids repeated prompts during the current application run, but it is not part of the saved profile and does not persist after the application ends.

Proxy authentication follows the proxy choice and uses its own user name and password. It does not replace daemon authentication because the two credentials serve different network boundaries.

References: connoptions.pas• L178-187 connoptions.pas• L535-585 connoptions.pas• L594-664 main.pas• L5310-5348 main.pas• L5364-5387 main.pas• L7399-7443 passwcon.pas• L69-94

Reconnection behavior

Changing the active profile or changing a setting that affects the active profile causes the main window to stop the current session before it starts the new one. The reconnect choice is profile-specific. When automatic reconnect is enabled, a fatal connection error opens the reconnect path instead of ending the application; otherwise the error is shown without an automatic retry.

This separation lets the application keep its window and local view while the remote session changes. The RPC client receives a fresh endpoint and session state for each new connection.

References: connoptions.pas• L602-605 main.pas• L5611-5627 main.pas• L5736-5772 main.pas• L7399-7435 main.pas• L8194-8208

Daemon session settings

Daemon settings describe the behavior of the remote Transmission session rather than the local desktop view. The daemon options form reads the current session from the connected daemon, presents only settings supported by that daemon's RPC version, and sends accepted changes back through session-set.

Session setting groups

The options form brings common Transmission session controls into one user flow. These controls affect where the daemon stores data, how it uses peer and network resources, and when it starts or stops work.

Setting groupRemote behavior
Download locationsSet the normal and, when supported, incomplete-data directories.
BandwidthSet global upload and download limits plus alternate speed limits.
Peer networkSet peer limits, peer port, port forwarding, discovery, and encryption preferences.
Torrent defaultsSet seed ratio rules and partial-file naming behavior.
Blocklist and cacheControl blocklist use, blocklist source, and disk cache size where supported.
Queue rulesLimit active downloads or seeds and define stalled-torrent handling.

The form enables a value only when its controlling feature is enabled. It also checks required paths and scheduled times before it sends a change. These checks protect the daemon from incomplete values while leaving the daemon as the source of the applied state.

References: daemonoptions.pas• L41-134 daemonoptions.pas• L142-255 daemonoptions.pas• L257-284 main.pas• L3503-3625

RPC capability matching

Transmission RPC versions add settings over time and rename some older fields. The client reads the daemon's RPC version during session setup, then hides or translates options that the connected daemon cannot support. Older daemons use older names for peer port, peer exchange, and peer limits; newer daemons expose extra controls such as incomplete directories, alternate speeds, queues, and uTP.

This capability match keeps one settings flow usable across daemon versions. It also prevents the client from sending a setting that the remote API does not understand.

References: main.pas• L3510-3613 main.pas• L3647-3723 rpc.pas• L452-504 rpc-spec.txt• L509-515 rpc-spec.txt• L624-767

Session setting application

The daemon options flow reads remote values before editing and refreshes session state after a successful write. A failed read or write leaves the current remote state in place and reports the connection status through the main window.

The flow has four stages:

flowchart LR
    A[Connected daemon] --> B[session-get]
    B --> C[Daemon options]
    C --> D[Validate choices]
    D --> E[session-set]
    E --> F[Request session refresh]
    F --> G[Updated daemon state]

References: main.pas• L3497-3639 main.pas• L3642-3734 daemonoptions.pas• L199-231 rpc-spec.txt• L444-530

Connection assembly

The connection flow combines the selected profile with the RPC client's shared HTTP session. It resolves credentials and transport first, builds the endpoint next, and starts the background RPC session last. The first session request then confirms that the choices reach a Transmission daemon with a usable RPC interface.

Profile-to-client flow

The diagram shows how a named profile becomes an active remote client connection.

sequenceDiagram
    participant U as User
    participant M as Main window
    participant P as Profile settings
    participant R as RPC client
    participant D as Transmission daemon

    U->>M: Select or save profile
    M->>P: Load endpoint and connection choices
    alt Password prompt required
        M->>U: Request daemon password
        U-->>M: Enter password
    end
    M->>R: Apply URL, path, auth, TLS, and proxy
    M->>R: Start connection
    R->>D: session-get
    D-->>R: Session state and RPC version
    R-->>M: Connected status and daemon data

The profile does not send RPC commands by itself. It supplies the conditions under which the shared RPC client sends them. Once session-get succeeds, the RPC layer owns session negotiation and refresh, while the main window presents the resulting state.

References: main.pas• L5310-5424 rpc.pas• L818-840 rpc.pas• L1478-1500 rpc.pas• L452-504

Connection state boundary

The main window treats connection state as a boundary around daemon-backed views. A disconnect stops refresh work and clears torrent, detail, filter, search, and statistics state. A later successful connection can fill the same views again without recreating the window.

This boundary matters when a profile changes during use. The old daemon's data is removed before the new profile is allowed to populate the UI, which avoids presenting data from one daemon under another daemon's name.

References: main.pas• L5426-5469 main.pas• L5611-5627 main.pas• L5637-5647 rpc.pas• L1464-1500

Change checklist

When these files or sections are changed, remember to consider these:

  • When a profile value changes, check both the editor's load and save paths and the code that applies the value to the RPC client.
  • When authentication behavior changes, preserve the difference between a saved password, a prompt rule, the per-session password cache, and proxy credentials.
  • When endpoint defaults change, keep the default RPC path and the URL assembly path aligned with the HTTP request path.
  • When a transport option changes, clear values from the previous profile before applying the new HTTP, TLS, or SOCKS5 mode.
  • When a daemon setting changes, keep the session-get display, RPC-version gate, session-set payload, and post-write session refresh in agreement.
  • When profile changes trigger reconnects, preserve the order that disconnects old daemon state before starting the new profile.
  • When profile names change, keep the profile list, saved profile sections, active-profile marker, and connection menus synchronized.

Important failure modes

TriggerConsequenceGuard
A profile has no host name.The profile cannot identify a daemon and the editor refuses to save it.Require a non-empty host during validation.
A configured proxy has no proxy host.The connection cannot route through the selected proxy.Validate the proxy host when proxy use is enabled.
A prompt-based password is cancelled.The connection attempt stops without sending the RPC session request.Treat the prompt cancel result as a failed connection and leave the client disconnected.
A new profile leaves old proxy or TLS values in the shared HTTP client.Requests can use the wrong route or certificate for the selected daemon.Clear shared transport fields before applying the active profile.
A setting is sent to a daemon that does not support its RPC version.session-set can fail or the daemon can ignore the intended change.Hide unsupported controls and send version-appropriate field names.
A session write succeeds but no refresh follows.The daemon uses the new setting while the form or status view shows old values.Request a session refresh after a successful session-set.
A profile changes while old daemon data remains visible.The UI can show one daemon's torrents under another profile.Disconnect and clear daemon-backed views before reconnecting.

Key files

FileWhy to read it
connoptions.pasDefines the profile editor, validation, profile list behavior, saved connection choices, and authentication modes.
main.pasConnects profile choices to the RPC client, handles password prompts, switches profiles, manages reconnects, and opens daemon settings.
rpc.pasDefines the shared remote client that receives the assembled endpoint and starts the Transmission session.
daemonoptions.pasDefines validation and control behavior for the daemon session settings form.
passwcon.pasDefines the password prompt used when a profile requests input at connection time.
rpc-spec.txtDescribes Transmission transport defaults, session methods, session settings, and RPC version changes.
docs/transmission-rpc-integration.mdParent page for the full client boundary between the desktop application and the Transmission daemon.
docs/rpc-protocol-and-session-flow.mdRelated page for request handling, session-ID negotiation, refresh, and command dispatch after connection assembly.