Trzsz-go - A simple file transfer tools, similar to lrzsz ( rz / sz ), and compatible with tmux

Overview

trzsz-go

trzsz is a simple file transfer tools, similar to lrzsz ( rz / sz ), and compatible with tmux.

The Go version is under development. Please use the Python version instead. GitHub: https://github.com/trzsz/trzsz

Comments
  • 运行 trz 报错

    运行 trz 报错

    illegal base64 data at input byte 36
    goroutine 1 [running]:
    runtime/debug.Stack()
            /usr/lib/go-1.18/src/runtime/debug/stack.go:24 +0x65
    github.com/trzsz/trzsz-go/trzsz.NewTrzszError({0xc00001c240, 0x40}, {0xc0000148cc, 0x4}, 0x1)
            /build/trzsz-z81gqQ/trzsz-0.1.8/trzsz/comm.go:171 +0x272
    github.com/trzsz/trzsz-go/trzsz.(*TrzszTransfer).recvCheck(0xc000039400?, {0x55619b, 0x4}, 0xe0?, 0x7fdc1064d090?)
            /build/trzsz-z81gqQ/trzsz-0.1.8/trzsz/transfer.go:197 +0x152
    github.com/trzsz/trzsz-go/trzsz.(*TrzszTransfer).recvInteger(0x10?, {0x55619b?, 0xc000010bd0?}, 0x0?)
            /build/trzsz-z81gqQ/trzsz-0.1.8/trzsz/transfer.go:208 +0x25
    github.com/trzsz/trzsz-go/trzsz.(*TrzszTransfer).recvFileSize(0xc000010bd0?, {0x0?, 0x0})
            /build/trzsz-z81gqQ/trzsz-0.1.8/trzsz/transfer.go:751 +0x3f
    github.com/trzsz/trzsz-go/trzsz.(*TrzszTransfer).recvFiles(0xc00004c240, {0xc0000163c0, 0x13}, {0x0?, 0x0})
            /build/trzsz-z81gqQ/trzsz-0.1.8/trzsz/transfer.go:829 +0x4ef
    github.com/trzsz/trzsz-go/trzsz.recvFiles(0xc00004c240?, 0xc000062cc0, 0x1e?, 0x3?)
            /build/trzsz-z81gqQ/trzsz-0.1.8/trzsz/trz.go:90 +0x312
    github.com/trzsz/trzsz-go/trzsz.TrzMain()
            /build/trzsz-z81gqQ/trzsz-0.1.8/trzsz/trz.go:172 +0x865
    main.main()
            /build/trzsz-z81gqQ/trzsz-0.1.8/cmd/trz/main.go:33 +0x19
    

    服务端 OS: Ubuntu 20.04.4 LTS (GNU/Linux 5.4.0-77-generic x86_64) 服务端版本: trzsz-go 0.1.8

    客户端 OS: Windows 11 Professional 21H2 客户端版本: trzsz-go 0.1.8

    opened by nep-0 12
  • 从远程win下载文件报错

    从远程win下载文件报错

    tsz .\Whore.flac
    illegal base64 data at input byte 9355
    goroutine 1 [running]:
    runtime/debug.Stack()
            /opt/hostedtoolcache/go/1.18.3/x64/src/runtime/debug/stack.go:24 +0x65
    github.com/trzsz/trzsz-go/trzsz.NewTrzszError({0xc0000160f0, 0x44}, {0xc0004fc05c, 0x4}, 0x1)
            /home/runner/work/trzsz-go/trzsz-go/trzsz/comm.go:171 +0x272
    github.com/trzsz/trzsz-go/trzsz.(*TrzszTransfer).recvCheck(0x2450?, {0x1e310c, 0x4}, 0x49?, 0xc000057ad0?)
            /home/runner/work/trzsz-go/trzsz-go/trzsz/transfer.go:197 +0x16a
    github.com/trzsz/trzsz-go/trzsz.(*TrzszTransfer).recvInteger(0xc000057c40?, {0x1e310c?, 0x2000?}, 0x0?)
            /home/runner/work/trzsz-go/trzsz-go/trzsz/transfer.go:208 +0x25
    github.com/trzsz/trzsz-go/trzsz.(*TrzszTransfer).checkInteger(0xc000057c40?, 0x2000)       [History]
            /home/runner/work/trzsz-go/trzsz-go/trzsz/transfer.go:216 +0x30
    github.com/trzsz/trzsz-go/trzsz.(*TrzszTransfer).sendFiles(0xc00004c120, {0xc0000060b0, 0x1, 0x0?}, {0x0?, 0x0?})
            /home/runner/work/trzsz-go/trzsz-go/trzsz/transfer.go:584 +0x8a6
    github.com/trzsz/trzsz-go/trzsz.sendFiles(0xc00004c120?, {0xc0000060b0, 0x1, 0x1}, 0xc000124c30, 0x21675d20108?, 0x60?)
            /home/runner/work/trzsz-go/trzsz-go/trzsz/tsz.go:88 +0x19f
    github.com/trzsz/trzsz-go/trzsz.TszMain()
            /home/runner/work/trzsz-go/trzsz-go/trzsz/tsz.go:167 +0x7f6
    main.main()
            /home/runner/work/trzsz-go/trzsz-go/cmd/tsz/main.go:33 +0x19
    

    这个文件有30M,试过小文件正常 本地和远程都是win11,PowerShell 7.2.5,安装的时go版的trzsz 另外我ssh是登录远程win11的PowerShell 7.2.5

    opened by brucmao 9
  • 使用过 tsz 或 trz 后,再用vi编辑文件,会导致再弹出一次接收

    使用过 tsz 或 trz 后,再用vi编辑文件,会导致再弹出一次接收

    环境是 windows 10 terminal,远程是 ubuntu 20.04

    tsz xx 接受后 vi xx :q退出就会弹出接收文件, 如果取消,终端会输出一串 #ACT 开头的base64类似的字符 如果接受,文件会正常接收,产生一个.1结尾的新文件,且终端卡住,ctrl+c后,终端输出 #fail开头的base64类似的字符 微信截图_20220808200300

    opened by fengqi 7
  • Windows 下 vim 工作不正常

    Windows 下 vim 工作不正常

    1. 打开 cmd.exe, 并执行 trzsz vim.exe --clean
    2. i 切换到输入模式,随意输入一些字符 期望:符合vim正常功能 实际:vim命令行处错位
    $ vim --version
    VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Jul  3 2022 22:05:02)
    MS-Windows 64-bit console version
    Included patches: 1-32
    Compiled by [email protected]
    
    OS Version:                10.0.19044 N/A Build 19044
    
    opened by hulucc 6
  • [BUG] 从Linux下载文件到Windows失败

    [BUG] 从Linux下载文件到Windows失败

    1. WindowsLinux上安装最新版的0.1.5版本的trzsz
    2. Windows上用cmd或者WindowsTerminal执行trzsz ssh x.x.x.x
    3. Linux主机中执行tsz xxx或者tsz -b xxx
    4. 报错,实际下载到本机的文件只有255KB
    [[email protected] ~]$ tsz -b log.log
    illegal base64 data at input byte 71592
    goroutine 1 [running]:
    runtime/debug.Stack()
            /usr/local/Cellar/go/1.18.2/libexec/src/runtime/debug/stack.go:24 +0x65
    github.com/trzsz/trzsz-go/trzsz.NewTrzszError({0xc0000f4050, 0x44}, {0xc000146090, 0x4}, 0x1)
            /Users/lonnywang/workspace/trzsz-go/trzsz/comm.go:160 +0x272
    github.com/trzsz/trzsz-go/trzsz.(*TrzszTransfer).recvCheck(0x117ac?, {0x5516f3, 0x4}, 0x89?, 0xc000113ab8?)
            /Users/lonnywang/workspace/trzsz-go/trzsz/transfer.go:190 +0x152
    github.com/trzsz/trzsz-go/trzsz.(*TrzszTransfer).recvInteger(0xc000113c18?, {0x5516f3?, 0x40000?}, 0x0?)
            /Users/lonnywang/workspace/trzsz-go/trzsz/transfer.go:201 +0x25
    github.com/trzsz/trzsz-go/trzsz.(*TrzszTransfer).checkInteger(0xc000113c18?, 0x40000)
            /Users/lonnywang/workspace/trzsz-go/trzsz/transfer.go:209 +0x30
    github.com/trzsz/trzsz-go/trzsz.(*TrzszTransfer).sendFiles(0xc00012a1e0, {0xc00011e810, 0x1, 0x0?}, {0x0?, 0x0})
            /Users/lonnywang/workspace/trzsz-go/trzsz/transfer.go:517 +0x100c
    github.com/trzsz/trzsz-go/trzsz.sendFiles(0xc00012a1e0?, 0xc000122a20, 0x1e?, 0x2?)
            /Users/lonnywang/workspace/trzsz-go/trzsz/tsz.go:79 +0x116
    github.com/trzsz/trzsz-go/trzsz.TszMain()
            /Users/lonnywang/workspace/trzsz-go/trzsz/tsz.go:151 +0x756
    main.main()
            /Users/lonnywang/workspace/trzsz-go/cmd/tsz/main.go:33 +0x19
    
    opened by pengtianabc 4
  • Data Race

    Data Race

    在 trz 上传文件时加 --race 出现了 Data Race

          WARNING: DATA RACE
           Read at 0x00c0003a2380 by main goroutine:
              github.com/trzsz/trzsz-go/trzsz.(*TrzszTransfer).cleanInput()
              github.com/trzsz/[email protected]/trzsz/transfer.go:105 +0x69
              github.com/trzsz/trzsz-go/trzsz.(*TrzszTransfer).serverExit()
              github.com/trzsz/[email protected]/trzsz/transfer.go:395 +0x44
              github.com/trzsz/trzsz-go/trzsz.recvFiles()
              github.com/trzsz/[email protected]/trzsz/trz.go:99 +0x6d1
              github.com/trzsz/trzsz-go/trzsz.TrzMain()
              github.com/trzsz/[email protected]/trzsz/trz.go:172 +0xef4
    
           Previous write at 0x00c0003a2380 by goroutine 17:
              github.com/trzsz/trzsz-go/trzsz.(*TrzszTransfer).addReceivedData()
    
    opened by ImSingee 3
  • windows scoop 找不到这个软件

    windows scoop 找不到这个软件

    ❯ scoop bucket add extras WARN The 'extras' bucket already exists. To add this bucket again, first remove it by running 'scoop bucket rm extras'.

    ~ ❯ scoop install trzsz Couldn't find manifest for 'trzsz'.

    opened by brucmao 2
  • Not working on Synology NAS DS220+

    Not working on Synology NAS DS220+

    NAS info:

    • Model: Intel(R) Celeron(R) J4025 CPU @ 2.00GHz
    • Instruction Set: 64-bit
    • ref: https://www.intel.com/content/www/us/en/products/sku/197307/intel-celeron-processor-j4025-4m-cache-up-to-2-90-ghz/specifications.html

    Local machine info:

    • CPU: Intel 10900K
    • OS: Ubuntu 20.04 LTS
    • Terminal app: Terminator
    • Shell: zsh

    Steps to reproduce:

    • download zip from release, copy the bin files to ~/bin/ dir on both local machine and nas.
    • ensure trz|tsz|trzsz are in $PATH and available via which on both sides
    • on local machine, in terminal, run trzsz -d ssh nas
    • on local machine, open file explorer, drag a file to terminal
    • nothing happens

    Maybe it will he helpful to provide a debug option.

    opened by guoqiao 2
  • manjaro konsole下,trz 和 tsz  hanging up

    manjaro konsole下,trz 和 tsz hanging up

    一:环境+工具链

    os:manjaro21.3.5 minimal version kernel:5.15.55 DE:kde plasma 5.24.6 terminal:konsole +fish shell tmux:3.3a tmux 配置方案:https://github.com/gpakosz/.tmux 安装方式:github-release下编译好的trzsz-go的可执行文件,已经配置在fish下的path下了

    换句话说,上面基本上是 manjaro minimal 的最新版(滚动更新)

    二、场景复现

    • 本机测试 trzsz bash,提示缺少zenity 可执行文件,于是正常安装:sudo pacman -S zenity,但是只能弹起zenity窗口,选择文件后,还是hanging up;

    • 使用trzsz-go 的 local模式,也即只在本机安装trzsz-go ,使用trzsz ssh [email protected] 登陆到服务器,但是进入服务器后,trz 和 tsz 都hanging up

    • 最终在目标服务器也安装了trzsz-go,使用服务器上的./trz./tsz可执行文件 能正常使用(使用trzsz ssh [email protected] 登陆到服务器)。

    感觉在我的环境下,local模式不管用,只能local+server模式正常(单纯server模式下,还没来得及测试是否正常),难道不支持konsole吗,那我打算有时间试试alacrity,(当然全部在tmux里)

    最后,非常感谢大佬开发在tmux下支持的上传下载工具,之前一直找类似工具都找不到,一开始trzsz只支持macos的时候,心都死了,后来大佬支持linux了,感动到哭

    需要配合调试啥的,随时提供

    opened by pmzgit 11
Releases(v0.1.9)
Slice and dice your TMUX windows and panes

chaakoo Introduction Configuration Using Chaakoo Examples Download License Introduction Chaakoo is a wrapper over TMUX that can create sessions, windo

Pallav Jha 84 Aug 21, 2022
go program that installs and customizes ohmyzsh tmux vim via various plugins and other nice to haves

Pimp-My-Shell Table of Contents Pimp-My-Shell Install Usage About Resources Tmux Hotkeys VIM Hotkeys Adjusting Custom Aliases Mac Fix Terminal bind ke

null 9 Aug 31, 2022
Plugin which makes tmux work and feel like i3wm

Tmux Tilish This is a plugin that makes tmux behave more like a typical dynamic window manager. It is heavily inspired by i3wm, and most keybindings a

Jabir Ali Ouassou 266 Sep 24, 2022
Portal is a quick and easy command-line file transfer utility from any computer to another 🖥️ 🌌 💻

Portal is a quick and easy command-line file transfer utility from any computer to another ??️ ?? ??

Zino Kader 215 Sep 20, 2022
Command line XML beautifier and content extractor. Similar to jq.

Command line XML beautifier and content extractor. Similar to jq.

Alexei Yuzhakov 86 Sep 24, 2022
GitHub CLI extension to preview your markdown similar to the style of GitHub.

gh markdown-preview GitHub CLI extension to preview your markdown similar to the style of GitHub gh markdown-preview is a GitHub CLI extension to prev

Yusuke Wada 148 Sep 24, 2022
TXQR (Animated QR data transfer) demo reader app for iOS

TXQR Reader for iOS txqr-reader is a demo app in Swift that reads animated QR code and shows file. Currently it expects file to be an JPEG image. Just

Ivan Daniluk 84 Sep 13, 2022
archy is an static binary to determine current kernel and machine architecture, with backwards compatible flags to uname, and offers alternative output format of Go runtime (i.e. GOOS, GOARCH).

archy archy is an simple binary to determine current kernel and machine architecture, which wraps uname and alternatively can read from Go runtime std

xargs-dev 3 Mar 18, 2022
CLI tool to upload object to s3-compatible storage backend and set download policy for it.

typora-s3 CLI tool to upload object to s3-compatible storage backend and set download policy for it. Build $ git clone https://github.com/fengxsong/ty

fengxsong 0 Dec 29, 2021
This is a Go Cli app that receives an string path to a log file, and based on it generates and prints in console an encoded polyline with the locations found in the log file.

GEOENCODE GO CLI APP DESCRIPTION This is a Go Cli app that receives an string path to a log file, and based on it generates and prints in console an e

Jose Luis Ojeda 1 Oct 1, 2021
Inotify-tools is a C library and a set of command-line programs providing a simple interface to inotify.

inotify-tools This is a package of some commandline utilities relating to inotify. The general purpose of this package is to allow inotify's features

null 2.6k Sep 26, 2022
🍫 A customisable, universally compatible terminal status bar

Shox: Terminal Status Bar A customisable terminal status bar with universal shell/terminal compatibility. Currently works on Mac/Linux. Installation N

Liam Galvin 676 Sep 6, 2022
🎨 Terminal color rendering library, support 8/16 colors, 256 colors, RGB color rendering output, support Print/Sprintf methods, compatible with Windows.

?? Terminal color rendering library, support 8/16 colors, 256 colors, RGB color rendering output, support Print/Sprintf methods, compatible with Windows. GO CLI 控制台颜色渲染工具库,支持16色,256色,RGB色彩渲染输出,使用类似于 Print/Sprintf,兼容并支持 Windows 环境的色彩渲染

Gookit 1.2k Sep 26, 2022
A client for managing authzed or any API-compatible system from your command line.

zed A client for managing authzed or any API-compatible system from your command line. Installation zed is currently packaged by as a head-only Homebr

authzed 44 Aug 28, 2022
contaiNERD CTL - Docker-compatible CLI for containerd, with support for Compose, Rootless, eStargz, OCIcrypt, IPFS, ...

contaiNERD CTL - Docker-compatible CLI for containerd, with support for Compose, Rootless, eStargz, OCIcrypt, IPFS, ...

containerd 4.5k Sep 19, 2022
Command-line utility for Postgres-compatible SCRAM-SHA-256 passwords

scram-password -- Command-line utility for Postgres-compatible SCRAM-SHA-256 passwords SCRAM-SHA-256 (see RFC-7677, Salted Challenge Response Authenti

Tv 1 Jan 21, 2022
Go-file-downloader-ftctl - A file downloader cli built using golang. Makes use of cobra for building the cli and go concurrent feature to download files.

ftctl This is a file downloader cli written in Golang which uses the concurrent feature of go to download files. The cli is built using cobra. How to

Dipto Chakrabarty 2 Jan 2, 2022
Soren L. Hansen 1.6k Sep 27, 2022