Private
Public Access
1
0
Files
u-desk/configs/agent.yaml
绝尘 6bee55b96f 新增:SFTP直连+连接池+autoConnect+文件服务器端口自动回退
- SFTP模块:连接/断开/文件CRUD/系统信息采集/base64二进制写入
- 连接池:多服务器同时在线,瞬间切换profile
- autoConnect:启动时自动连接所有非本地服务器
- 端口自动回退:listenWithFallback消除TOCTOU,解决端口冲突崩溃
- 文件服务器URL集中管理:file-server.ts消除8+处硬编码端口
- Sidebar设置面板:添加服务器/自动连接/自动刷新开关
- 修复:validateFilePath越界panic、正则预编译
- 修复:注释准确性(RemoveAll/端口8073/动态端口文档)
2026-05-04 15:33:19 +08:00

30 lines
869 B
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# u-fs-agent 配置文件
# 部署到远端服务器后修改此文件
server:
port: 9876 # 监听端口
host: "0.0.0.0" # 监听地址
auth:
token: "" # API Token留空则不验证生产环境必须设置
# 生成随机 token: openssl rand -hex 32
cors:
allowed_origins:
- "*" # 开发模式允许所有来源
# 生产环境建议限定:
# - "http://localhost:5173"
# - "http://localhost:5174"
log:
level: "info" # debug / info / warn / error
format: "json" # json / text
file_server:
port: 2652 # 内置文件服务器端口(用于媒体预览代理)
max_file_size: 524288000 # 最大文件大小 500MB
security:
allow_symlinks: false # 是否允许符号链接
check_system_paths: true # 检查系统关键目录