LAN Pair

LAN Pair is a Windows-to-Windows transfer mode for direct local-network pairing without relying on the system SMB stack. It is designed for practical file exchange between trusted machines on the same network.

What LAN Pair is for

What it is not

Discovery and network ports

LAN Pair uses two ports:

PortProtocolPurpose
45845UDP (broadcast)Peer discovery — both machines announce themselves on the local network every 2 seconds
45846TCPPairing handshake and file transfer session

Both ports must be open in Windows Firewall on both machines. If peers do not appear in the discovery list, this is the first thing to check.

Firewall tip: UDP broadcast (port 45845) is blocked between network segments and VLANs by default. LAN Pair discovery works reliably only within the same broadcast domain (same subnet/switch). If your machines are on different VLANs, peers will not be found via auto-discovery.

Password, pairing and encryption

The two computers are paired with a password, the same one on both. It never crosses the network:

  1. Pairing: enter the password on both computers. Each turns it into a pair key (PBKDF2-HMAC-SHA256, 120,000 iterations), and the two prove to each other that they hold the same key with SPAKE2 (RFC 9382). Someone listening learns nothing to guess the password with; someone joining in gets one guess per connection.
  2. Once both sides have proved the key, each stores it encrypted with Windows DPAPI, for that peer.
  3. Later sessions: the stored key is used, so the password field may stay empty.

Everything after the handshake — listings, file names, file contents — travels encrypted and authenticated with AES-256-GCM. A packet altered, repeated or reordered on the way ends the connection instead of reaching a file.

Both computers need version 10.3.1 or later. Earlier versions used a protocol without encryption that let a computer with no key ask for one; a 10.3.1 computer tells an older one to upgrade instead of letting it in. Pairing without a password is no longer possible.

Roles

Which role for which machine? The Donor is the machine that has the files — it runs as server and waits. The Receiver is the machine that connects and browses — it acts as client. Both machines must be running Total Commander with the plugin installed.

Auto mode — pairing wizard

When Auto is selected and you click Pair..., the plugin runs a guided wizard:

  1. The local file server starts listening on TCP 45846 in the background.
  2. A 60-second countdown dialog appears: "Searching for LAN Pair peer on local network...". You can cancel at any time.
  3. As soon as the other machine is detected, the dialog closes and a prompt appears:
  4. If no peer appears within 60 seconds, the local server is stopped automatically and a status message is shown. No ports are left open.
Tip: Both machines should click Pair... at roughly the same time. With a 60-second window and a 2-second broadcast interval, there is no need to rush.

Basic workflow

  1. Create or edit a session and set Transfer = LAN Pair.
  2. Set the session name. This name is also shown as the visible peer label on the other machine.
  3. Choose Auto, Receiver, or Donor in the role dropdown.
  4. Optional: set Session timeout in minutes. 0 means no limit.
  5. Click Pair....
  6. Enter the pairing password — the same on both computers. Pairing does not start without one.
  7. When the peer is found and roles are confirmed, the session opens as a regular TC file panel.

TrustedInstaller — accessing protected system files

Windows protects certain system files and directories by assigning them to the TrustedInstaller service account (e.g. files in C:\Windows\, C:\Program Files\WindowsApps\, Windows Update caches). Even an Administrator account cannot modify these files directly without taking ownership. The Trusted Installer checkbox in the LAN Pair connection settings lets you work around this restriction for incoming connections.

How it works

  1. When a remote peer connects to the local LAN Pair file server and the handshake succeeds, the server thread impersonates the TrustedInstaller service account before handling any commands. The handshake itself runs as you, since your DPAPI holds the pair keys.
  2. While impersonating TrustedInstaller, all file operations (read, write, delete, rename, mkdir) run with TrustedInstaller privileges, bypassing the normal ownership restrictions.
  3. Impersonation is reverted automatically when the remote peer disconnects.

The Trusted Installer checkbox has two independent effects depending on which role this machine plays:

To work with TI-protected files on the remote machine (the Donor), the checkbox must be enabled on the Donor's connection profile, not the Receiver's.

Requirements

Security note: TrustedInstaller impersonation grants write access to core Windows system files. Enable this option only on machines you fully control and only while you actually need it.

Session timeout

Saved settings

LAN Pair session keys in sftpplug.ini:

KeyValuesDescription
transfermode3Fixed value for LAN Pair mode
serverlanpair://peer/PEERNAMEPeer identifier URI
lanpairrole0 / 1 / 20 = Auto, 1 = Receiver, 2 = Donor
lanpairpeerpeer name stringName of the target peer as seen in the discovery list
lanpairtimeoutinteger ≥ 0Session timeout in minutes; 0 = no limit
lanparti0 / 11 = enable TrustedInstaller impersonation for incoming connections on this machine
[MyLAN]
transfermode=3
server=lanpair://peer/WORKSTATION-01
lanpairrole=0
lanpairpeer=WORKSTATION-01
lanpairtimeout=0
lanparti=0

UI behavior

Operational notes

Troubleshooting

ProblemLikely causeFix
Peers not foundWindows Firewall blocking UDP 45845 or machines on different subnetsAllow UDP 45845 inbound in Windows Firewall; verify both machines are on the same network segment
Connection refusedWindows Firewall blocking TCP 45846Allow TCP 45846 inbound on the Receiver machine
"Wrong LAN Pair password, or the stored key no longer matches"The passwords differ, or one computer was paired again with a new passwordPair again with exactly the same password on both computers (case-sensitive)
"No LAN Pair key for this one"The other computer has never been paired with this one, or lost its key (Windows reinstalled, another user account)Pair again with the password; the key is stored again on both sides
"May run a plugin older than 10.3.1"The other computer runs a version without the encrypted protocolUpdate the plugin on both computers
Peers found but classic SMB works — LAN Pair does notUDP broadcast not reaching the other machine (VLAN, managed switch isolation)Check switch/VLAN settings; UDP broadcast must reach port 45845 on both sides
TrustedInstaller files cannot be modifiedTrustedInstaller option not enabled, or TC not running with SeDebugPrivilegeEnable the Trusted Installer checkbox in the connection settings on the machine that owns the files; run Total Commander as Administrator if needed
A stored key cannot be readThe key was saved under a different Windows account or on another installationNothing to delete by hand: an unreadable key in %APPDATA%\GHISLER\sftpplug.secrets is removed, and the next connection made with the password stores it again

Back to index