返回顶部
f

ftp-client-phpFTP文件管理器

FTP/FTPS file manager via PHP proxy. Supports list, upload, download, delete, move, copy, mkdir, read, write. Works behind NAT/firewalls (e.g. HuggingFace) by routing FTP operations through an HTTP PHP proxy.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.0
安全检测
已通过
234
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

ftp-client-php

FTP 客户端 (PHP 代理)

适用于 OpenClaw 的全功能 FTP/FTPS 客户端技能。通过 HTTP PHP 代理服务器路由所有 FTP 操作,因此即使在直接 FTP 连接被阻止的环境中(例如 HuggingFace Spaces、无服务器环境)也能正常工作。点击部署 ftp-php-proxy

架构

OpenClaw ──HTTP──▶ PHP 代理服务器 (api.php) ──FTP──▶ FTP 服务器

环境变量

在 OpenClaw 技能管理面板中设置 FTPPHPCONFIG。JSON 格式

json
{ftpphpdomain:https://your-server.com/api.php,ftpphpapikey:,ftpclienthost:ftp.example.com,ftpclientport:21,ftpclientusername:user,ftpclientpassword:pass,ftpclientconnectmode:passive,ftpclientprotocol:ftps,ftpclientencryptmode:explicit}

字段说明:

  • - ftpphpdomain(必填):PHP 代理 api.php 端点的完整 URL
  • ftpphpapikey(可选):PHP 代理的 API 密钥,空字符串表示无需认证
  • ftpclienthost(必填):FTP 服务器主机名
  • ftpclientport(可选):FTP 服务器端口,默认 21
  • ftpclientusername(必填):FTP 登录用户名
  • ftpclientpassword(必填):FTP 登录密码
  • ftpclientconnectmode(可选):active 或 passive,默认 passive
  • ftpclientprotocol(可选):ftp 或 ftps,默认 ftp
  • ftpclientencryptmode(可选):explicit 或 implicit,仅在协议为 ftps 时有效

示例(alwaysdata FTPS):
json
{ftpphpdomain:https://your-server.com/api.php,ftpphpapikey:,ftpclienthost:ftp.example.com,ftpclientport:21,ftpclientusername:user,ftpclientpassword:pass,ftpclientconnectmode:passive,ftpclientprotocol:ftps,ftpclientencryptmode:explicit}

列出目录

bash
node {baseDir}/scripts/list.mjs
node {baseDir}/scripts/list.mjs /remote/path
node {baseDir}/scripts/list.mjs / --detailed

选项:

  • - --detailed 或 -l:显示详细文件信息(大小、日期、权限、类型)

下载文件

bash
node {baseDir}/scripts/download.mjs /remote/file.txt
node {baseDir}/scripts/download.mjs /remote/file.txt --out /local/save/path.txt

选项:

  • - --out <路径> 或 -o <路径>:本地保存路径(默认:系统临时目录)

上传文件

bash
node {baseDir}/scripts/upload.mjs /local/file.txt --to /remote/path/file.txt

选项:

  • - --to <路径> 或 -t <路径>:远程目标路径(必填)

将文本内容写入远程文件

bash
node {baseDir}/scripts/write.mjs /remote/file.txt file content here
node {baseDir}/scripts/write.mjs /remote/file.txt --stdin < local_file.txt

读取文件内容

bash
node {baseDir}/scripts/read.mjs /remote/file.txt

删除文件或目录

bash
node {baseDir}/scripts/delete.mjs /remote/file.txt
node {baseDir}/scripts/delete.mjs /remote/dir --dir

选项:

  • - --dir 或 -d:递归删除目录

移动/重命名

bash
node {baseDir}/scripts/move.mjs /remote/old.txt /remote/new.txt

复制文件

bash
node {baseDir}/scripts/copy.mjs /remote/source.txt /remote/dest.txt

创建目录

bash
node {baseDir}/scripts/mkdir.mjs /remote/new-dir

文件信息

bash
node {baseDir}/scripts/info.mjs /remote/file.txt

注意事项

  • - 所有 FTP 操作均通过 HTTP 经由您的 PHP 服务器代理。
  • 上传通过将文件以 base64 格式发送到 PHP 代理实现。
  • 下载从 PHP 代理获取 base64 内容并保存到本地。
  • 支持大文件,但受 PHP 服务器的 uploadmaxfilesize 和 memorylimit 限制。
  • 将 FTPPHP_CONFIG 环境变量设置为单行 JSON 字符串。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 ftp-client-php-1776373443 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 ftp-client-php-1776373443 技能

通过命令行安装

skillhub install ftp-client-php-1776373443

下载

⬇ 下载 ftp-client-php v0.1.0(免费)

文件大小: 11.61 KB | 发布时间: 2026-4-17 14:53

v0.1.0 最新 2026-4-17 14:53
Initial release of ftp-client-php – an FTP/FTPS manager via a PHP HTTP proxy.

- List, upload, download, delete, move, copy, mkdir, read, and write files and directories on remote FTP/FTPS servers.
- Operates behind NAT/firewalls by routing all operations through a PHP proxy.
- Supports both FTP and FTPS (explicit/implicit) connections and passive/active modes.
- Easy CLI commands for all major file operations.
- Requires FTP connection info in a JSON environment variable (`FTP_PHP_CONFIG`).
- Works where direct FTP is blocked (e.g. HuggingFace, serverless).

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部