Linktransfer is a small CLI for sending files, folders, or text from one machine to another with a short code.
By default, it connects to our public linksocks service at ws://l.zetx.tech, deployed on top of Cloudflare, so it works out of the box without requiring you to deploy your own tunnel server.
The transfer path is built on top of linksocks and croc, but the CLI stays intentionally small: lt send on one side, lt recv on the other.
Send from the first machine:
lt send ./path/to/filelinktransfer prints a receive command with a generated code, for example:
lt recv 2f4e8c1d4a9b7c10Run that on the second machine:
lt recv 2f4e8c1d4a9b7c10If you do not pass --url, both sides use the default public linksocks service at ws://l.zetx.tech.
Receive into a specific directory:
lt recv 2f4e8c1d4a9b7c10 --out ./downloadsSend text instead of a file:
lt send --text "hello from linktransfer"linktransfer combines two components:
- A linksocks tunnel is used as the control path between the two peers.
- A local croc relay is started on the sender side and reached through the tunnel by the receiver.
The shared transfer code is used to derive:
- the croc shared secret;
- the default linksocks token;
- a deterministic local relay port range.
This keeps the user-facing workflow simple while preserving compatibility with the underlying transport pieces.
- Go 1.24 or newer to build from source.
- Network access to the configured linksocks server. If
--urlis not provided, the default target is our Cloudflare-backed public server atws://l.zetx.tech. - Two machines that can both run the
ltbinary.
Build the short command name used by the CLI help:
go build -o lt ./cmd/ltRun directly from source:
go run ./cmd/linktransfer --helpSend multiple paths:
lt send ./file-a ./dir-bChoose your own code:
lt send ./archive.tar.gz --code release-2026Use a custom linksocks server on both sides:
lt send ./file --url ws://example.com:8765
lt recv release-2026 --url ws://example.com:8765Provide a custom token explicitly instead of deriving it from the code:
lt send ./file --code release-2026 --token custom-token
lt recv release-2026 --token custom-tokenEnable debug logs for tunnel troubleshooting:
lt send ./file --debugSend files or folders
Usage:
lt send [file-or-dir]... [flags]
Flags:
-c, --code string: code phrase. Random if omitted.--text string: send text instead of files.-u, --url string: linksocks server URL. Default:ws://l.zetx.tech.-t, --token string: linksocks token. Derived from the code if omitted.--debug: enable debug logs.
Receive files
Usage:
lt recv [code] [flags]
Flags:
-c, --code string: code phrase.--out string: output folder. Default: current directory.-u, --url string: linksocks server URL. Default:ws://l.zetx.tech.-t, --token string: linksocks token. Derived from the code if omitted.--debug: enable debug logs.
If the code is omitted, lt recv also checks the CROC_SECRET environment variable.
Run the package tests:
go test ./internal/linktransfer/...Check the CLI help:
go run ./cmd/linktransfer --help
go run ./cmd/linktransfer send --help
go run ./cmd/linktransfer recv --helpThis repository follows the same broad release flow as the in-tree linksocks reference:
- Update the version in internal/linktransfer/version.go with
bump2version. - Push the generated version commit and
v*tag. - GitHub Actions creates a draft release from that tag.
- Publishing the draft release triggers binary builds and Docker image publishing.
Example version bump:
python -m pip install bump2version
bump2version patch
git push --follow-tagsRelease workflows live under .github/workflows/build.yml, .github/workflows/create-draft.yml, and .github/workflows/docker.yml.
Docker publishing expects these repository settings:
DOCKERHUB_USERNAMEandDOCKERHUB_TOKENsecrets for Docker Hub pushes.- Optional
DOCKERHUB_IMAGErepository variable if the Docker Hub image name should differ from${{ github.repository_owner }}/linktransfer. GITHUB_TOKENis used for pushes toghcr.io/<owner>/linktransfer.
cmd/linktransfer: source entrypoint for running from the repository.cmd/lt: build target for theltbinary.internal/linktransfer: CLI commands and transfer logic.ref/: upstream or related reference code kept in-tree for comparison.
- The default linksocks server URL is
ws://l.zetx.tech, which is our public linksocks service deployed on Cloudflare. - The sender starts a local croc relay on
127.0.0.1using a deterministic block of consecutive ports derived from the transfer code. - The receiver starts a local SOCKS5 endpoint and reaches the sender through the linksocks tunnel.
- This repository contains additional container and reference assets, but the verified CLI surface documented here is limited to
sendandrecv.