Configuration¶
qrtransfer keeps a small amount of persistent state locally. It does not
read environment variables; everything is controlled by command-line flags (see
cli.md) or the config file below.
Config file¶
Settings are stored as JSON via the platformdirs library. The location depends
on your operating system:
| OS | Path |
|---|---|
| Linux | ~/.config/qrtransfer/config.json |
| macOS | ~/Library/Application Support/qrtransfer/config.json |
| Windows | %APPDATA%\qrtransfer\config.json |
The file holds at most two keys:
{
"interface": "wlan0",
"port": 8080
}
interface— the network interface you last picked (either via-ior the interactive picker).port— the port you last requested with--port.
Both are optional. They are written after a run that selected an interface or an
explicit port, and read on the next run. Pass --force to ignore saved values for
that run only.
Legacy config¶
If the config file above does not exist, the tool reads the legacy file
~/.qr-filetransfer.json (from the original qrtransfer.py script) so previous
settings keep working. It is only read, never written.
History¶
Past transfers are stored in a JSON file at the platform data directory
(platformdirs user_data_dir("qrtransfer")), named history.json:
| OS | Path |
|---|---|
| Linux | ~/.local/share/qrtransfer/history.json |
| macOS | ~/Library/Application Support/qrtransfer/history.json |
| Windows | %LOCALAPPDATA%\qrtransfer\history.json |
Only the last 200 entries are kept. View them with:
qrtransfer --history
Each entry records the timestamp, mode (send/receive), file name or
destination, size, download count, port, and IP.
TLS certificate cache¶
When --tls runs without --cert/--key, a self-signed certificate is generated
and cached under the platform cache directory (platformdirs user_cache_dir),
in a tls subdirectory:
| OS | Path |
|---|---|
| Linux | ~/.cache/qrtransfer/tls/server.crt and server.key |
| macOS | ~/Library/Caches/qrtransfer/tls/server.crt and server.key |
| Windows | %LOCALAPPDATA%\qrtransfer\Cache\tls\server.crt and server.key |
The cached certificate is reused on later runs; delete the tls folder to force a
fresh one.