An Emacs minor mode that proxies download commands (git clone, wget, curl) from local eshell to a remote server via TRAMP, syncing results back automatically.
When your remote server has better bandwidth or network access than your local machine, tramp-proxy lets you leverage it for downloads while keeping your local directory structure intact.
Add this directory to your load-path and require the package:
(add-to-list 'load-path "/path/to/tramp-proxy")
(require 'tramp-proxy)(setq tramp-proxy-host "my-remote-server")The host must be accessible via TRAMP (e.g., configured in ~/.ssh/config).
(setq tramp-proxy-remote-root "/tmp/tramp-proxy") ; Remote working directory
(setq tramp-proxy-cleanup-remote t) ; Clean up remote files after sync
(setq tramp-proxy-transfer-method 'tramp) ; Or 'rsync for large files
(setq tramp-proxy-fallback-on-error t) ; Fall back to local execution on errorEnable tramp-proxy-mode in an eshell buffer. Supported commands are automatically intercepted:
$ tramp-proxy-mode
$ git clone https://github.com/user/repo.git
$ wget https://example.com/file.zip
$ curl -O https://example.com/file.zipUse explicit proxy-* commands without enabling the minor mode:
$ proxy-git clone https://github.com/user/repo.git
$ proxy-wget https://example.com/file.zip
$ proxy-curl -O https://example.com/file.zip- Path Mapping: Your local directory (
~/projects/) is mapped to a deterministic remote path (/tmp/tramp-proxy/home_user_projects/) - Pre-Sync: Local context (e.g.,
~/.gitconfig) is pushed to the remote - Execution: The command runs on the remote via TRAMP with PTY allocation for progress bars
- Monitoring: Output streams back to a local
term-modebuffer in real time - Post-Sync: Results are copied from remote to local directory
- Cleanup: Remote working files are removed (configurable)
tramp-proxy.el Core engine, minor mode, eshell integration
tramp-proxy-utils.el Path encoding, sync helpers, configuration
tramp-proxy-git.el Git clone handler
tramp-proxy-download.el Wget and curl handlers
- Transfer cost: Results must be pulled back from the remote; large repos incur double network usage (remote download + sync back)
- SSH keys:
git cloneover SSH requires agent forwarding or deploy keys on the remote - Progress bar rendering:
git cloneprogress output uses\r(carriage return) to overwrite lines in place. The currentterm-mode+term-line-modedisplay does not fully clear old characters when the new progress text is shorter, so the log buffer may show overlapping fragments (e.g.,ResolvResolving deltas: ...). This is a cosmetic issue in the display buffer — the download and sync work correctly
GPL-3.0+