资讯专栏INFORMATION COLUMN

Linux VPS使用命令行通过Firefox Send轻松安全地共享文件

Tecode / 1894人阅读

说明:Firefox Send可能很多人知道,一个很不错的临时文件分享系统,不过都只能通过网页端共享,使用VPS共享就有点不行了,这里就说个工具ffsend,基于官方Firefox Send,使用一个简单的命令,通过安全,专用和加密的链接,从命令行轻松安全地共享文件和目录,可以指定可选密码,最高可达2GB,共享的文件始终在客户端上加密,并且永远不会与远程主机共享密钥。其他人可以使用此工具或通过其Web浏览器下载这些文件。

功能

  • 功能齐全,友好的命令行工具
  • 安全地上传和下载文件和目录
  • 始终在客户端加密
  • 额外的密码保护,生成和可配置的下载限制
  • 文件和目录存档和提取
  • 内置共享URL缩短器和QR代码生成器
  • 支持新旧Firefox Send服务器版本
  • 跟踪文件的历史记录,便于管理
  • 能够使用自定义发送主机
  • 检查或删除共享文件
  • 准确的错误报告
  • 流加密和上传/下载,内存占用非常低
  • 即将推出:Firefox帐户集成(下载次数越多,到期时间越长)

安装

Github地址:https://github.com/timvisee/ffsend

系统要求:LinuxmacOSWindows,这里就只说Linux系统,Windows/macOS直接通过网页上传吧。

提示:编译安装和直接安装随便选一种就行,32位系统只能编译安装。

1、编译安装

安装依赖:

#Debian/Ubuntu系统
apt update
apt install build-essential cmake pkg-config libssl-dev xclip git -y

#CentOS系统
yum install gcc gcc-c++ make cmake openssl-devel xclip git -y

安装Rust和Cargo:

curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env

拉取最新源码并编译:

git clone https://github.com/timvisee/ffsend.git
cd ffsend
cargo install --path . -f
#查看版本
ffsend --version

2、直接安装

除了自己编译外,作者也直接提供了编译好的文件给你使用,文件下载地址:点击进去,然后再根据自己的系统架构下载对应的最新版二进制文件。目前最新版为v0.2.46。

安装依赖:

#Debian/Ubuntu系统
apt update
apt install xclip -y


#CentOS系统
yum install xclip -y

安装ffsend:

下载二进制文件
wget https://github.com/timvisee/ffsend/releases/download/v0.2.46/ffsend-v0.2.46-linux-x64-static
mv ffsend-* ffsend 
chmod a+x ffsend
mv ffsend /usr/local/bin
#查看版本
ffsend --version

使用

#使用命令
ffsend [FLAGS] [OPTIONS] [SUBCOMMAND]

#参数详解,解释看不懂的,直接谷歌翻译
FLAGS:
    -f, --force          
            Force the action, ignore warnings

    -h, --help           
            Prints help information

    -i, --incognito      
            Dont update local history for actions

    -I, --no-interact    
            Not interactive, do not prompt

    -q, --quiet          
            Produce output suitable for logging and automation

    -V, --version        
            Prints version information

    -v, --verbose        
            Enable verbose information and logging

    -y, --yes            
            Assume yes for prompts

OPTIONS:
    -A, --api                  
            Server API version to use, one of:
            2, 3: Firefox Send API versions
            auto, -: probe server to determine [env:FFSEND_API]
        --basic-auth     
            HTTP basic authentication credentials [env:FFSEND_BASIC_AUTH]

    -H, --history                 
            Use the specified history file [env:FFSEND_HISTORY]

    -t, --timeout              
            Request timeout (0 to disable) [env:FFSEND_TIMEOUT]

    -T, --transfer-timeout     
            Transfer timeout (0 to disable) [env:FFSEND_TRANSFER_TIMEOUT]

SUBCOMMANDS:
    upload        Upload files [aliases:u, up]
    download      Download files [aliases:d, down]
    debug         View debug information [aliases:dbg]
    delete        Delete a shared file [aliases:del]
    exists        Check whether a remote file exists [aliases:e]
    generate      Generate assets [aliases:gen]
    help          Prints this message or the help of the given subcommand(s)
    history       View file history [aliases:h]
    info          Fetch info about a shared file [aliases:i]
    parameters    Change parameters of a shared file [aliases:params]
    password      Change the password of a shared file [aliases:pass, p]
    version       Determine the Send server version [aliases:v]

1、上传

#直接上传
ffsend upload ufile.mp4

#设置密码为upass
ffsend upload ufile.mp4 --password upass

2、下载

ffsend download https://send.firefox.com/share-url

3、其它命令

#查看文件信息
ffsend info https://send.firefox.com/share-url
大致输出:
ID:         b23be28f61e720dc  
Name:       ufile.mp4  
Size:       10.70 MiB (11221278 B)  
MIME:       video/mp4  
Downloads:  0 of 1  
Expiry:     23h42m (85357s)

#查看上传历史
ffsend history

#修改上传文件密码
ffsend password https://send.firefox.com/share-url

#删除上传文件
ffsend delete https://send.firefox.com/share-url

这里只说了常用命令,更多的自行研究下,至于下载次数设置和超长保留时长的话,貌似需要登录账号才行,该功能作者以后会更新,目前都是默认1次下载和24小时有效期。

文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。

转载请注明本文地址:https://www.ucloud.cn/yun/125902.html

相关文章

  • Linux VPS文件系统管理教程:传输文件/符号链接/复制移动删除文件

    摘要:本文分享服务器上面文件管理教程,包括文件传输传输到远程服务器或者下载到本地创建文件符号链接基础文件操作删除复制移动文件等。基础文件管理命令复制文件这会将复制到文件夹,并在文件名中添加一个数字。Linux VPS文件系统管理教程:linux文件系统管理起来其实也比较方便,不过不熟悉的朋友们可能不太了解怎么下手而已。不像 Windows 那样有方便的可视化界面,Linux 服务器主要通过命令行来...

    monw3c 评论0 收藏0
  • 原创自动备份Linux服务器数据到七牛云存储Shell脚本程序-用七牛自动备份VPS中的网站数据

    摘要:七牛的,到获取,登录七牛后在七牛的帐号设置密钥中可找到。要备份的网站代码目录。计划任务脚本定时执行时间,默认凌晨分进行备份配置内容结束。 20140211234856 这是我公开发布的第一个Shell脚本程序,这能极大的方便Linux服务器管理员使用它自动备份数据到七牛云存储。 应网友需求发布了Windows版本,详情见:http://wyr.me/330.html 这个Linux...

    KavenFan 评论0 收藏0
  • Linux 30周年:Linux 5.14闪亮登场!添加新硬件和秘密内存区域支持

    摘要:或许,最重要的是和内核调度,两者都是进行清理工作,以缓解英特尔的和漏洞。说到英特尔,增加了对的平台的更多支持,该平台可根据需要优先处理工作负载。另外,还将增加戴尔硬件隐私支持。linux之父Linus Torvald:庆祝完Linux 30 岁了吧,一起来看新的 Linux 5.14。linux5.14晋升为稳定版,在精彩的2021年秋季linux发行版大量出现之前提供最新的功能、硬件支持和...

    NicolasHe 评论0 收藏0

发表评论

0条评论

最新活动
阅读需要支付1元查看
<