惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
D
DataBreaches.Net
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
Docker
N
Netflix TechBlog - Medium
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
Check Point Blog
腾讯CDC
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
IT之家
IT之家
月光博客
月光博客
U
Unit 42
K
Kaspersky official blog
T
Threatpost
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
GbyAI
GbyAI
P
Proofpoint News Feed
Last Week in AI
Last Week in AI
云风的 BLOG
云风的 BLOG
酷 壳 – CoolShell
酷 壳 – CoolShell
I
InfoQ
Engineering at Meta
Engineering at Meta
Recorded Future
Recorded Future
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Security @ Cisco Blogs
MyScale Blog
MyScale Blog
大猫的无限游戏
大猫的无限游戏
Security Archives - TechRepublic
Security Archives - TechRepublic
Webroot Blog
Webroot Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
Schneier on Security
S
Secure Thoughts
The Register - Security
The Register - Security
B
Blog RSS Feed
The Last Watchdog
The Last Watchdog
P
Palo Alto Networks Blog
爱范儿
爱范儿
B
Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
N
News and Events Feed by Topic
阮一峰的网络日志
阮一峰的网络日志
L
LINUX DO - 热门话题
C
Cisco Blogs
Spread Privacy
Spread Privacy
F
Full Disclosure
博客园 - 聂微东
T
The Blog of Author Tim Ferriss

ncc的个人网站

MCSManager 数据备份与迁移实践 Goland Update Delve 1panel安装的Mysql版本从5.7升级到8.4.5 备份mc服务器脚本 威联通使用screen报错 Cannot find terminfo entry for 'screen.linux' Brew No Available Formula Gitea迁移和SSH容器直通 QQ邮箱文件夹重新开启通知 Act_runner 使用 supervisor 启动无法正常识别到 asdf 设置的环境问题(二) 将博客从Typecho迁移到Hugo
frp反向代理群晖WebDAV服务器
FGHWETT · 2025-06-16 · via ncc的个人网站

通过使用frp反向代理群晖webdav服务,实现外网连接局域网内的群晖文件夹,并实现实时更改同步。

购买大带宽服务器,目前腾讯和阿里云都推出了200M峰值的服务器,可以大幅提升穿透体验。

系统我选择的是debian 12.x。

服务器基础环境

域名解析

*.yourdomain.com解析到服务器的ip

需要备案的域名,否则会被拦截

安装1panel

1
bash -c "$(curl -sSL https://resource.fit2cloud.com/1panel/package/v2/quick_start.sh)"

端口开放

默认开放:80、443、22
增加开放:7000、自定义的1panel控制面板端口

安装Supervisor

  1. 1panel后台计划任务脚本库安装Supervisor
  2. 工具箱进程守护初始化

申请证书 绑定域名

  1. 1panel后台应用商店OpenResty安装
  2. 证书Acme账户申请DNS账户申请申请证书(*.yourdomain.com)
  3. 网站创建网站反向代理(webdav.youdomain.com127.0.0.1:7001)
  4. 网站配置HTTPS启用https

群晖配置

  1. 安装webdav-server套件,并启动服务
  2. 添加三方套件源https://spk.imnks.com/
  3. 安装frpc服务

服务器端配置

1
2
3
4
5
6
7
# frps.toml
bindPort = 7000
vhostHTTPPort = 7001
vhostHTTPSPort = 7002

auth.method = "token"
auth.token = "yourself-rand-token"

客户端配置

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# frpc.toml
serverAddr = "domain"
serverPort = 7000

auth.token = "youself-rand-token"

[[proxies]]
name = "synology-webdav-http"
type = "http"
localPort = 5002 # webdav-server中设置的http端口
customDomains = ["webdav.yourdomain.com"]

webdav地址就是 https://webdav.yourdomain.com 用户名和密码为群晖账户的用户名以及密码

问题处理

没有已备案的域名

  1. 忽略openresty下载、证书申请、添加网站的步骤
  2. frpc配置该用tcp代理方式
  3. 开放对应的frpc反代端口
  4. webdav地址改为http://server-ip:port
1
2
3
4
5
6
7
# frpc.toml tcp代理
[[proxies]]
name = "synology-webdav-http"
type = "tcp"
localIP = "127.0.0.1"
localPort = 5002 # webdav-server http端口
remotePort = 7003 # 服务器需要开放端口

windows连接http协议的webdav服务器时重复让输入密码

启用HTTP支持

  1. Win+R输入regedit
  2. 定位路径\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters
  3. 双击BasicAuthLevel,将值改为2(允许HTTP)

重启客户端

  1. Win+R输入services.msc
  2. 找到WebClient服务
  3. 修改为自动重启
  4. 重启服务

后续处理

安装fail2ban

阻止恶意IP破解SSH密码

1panel后台计划任务安装Fail2Ban,然后观察日志查看是否安装成功。
可能会有如下报错

1
2
ERROR   Failed during configuration: Have not found any log file f>
ERROR   Async configuration of server failed
  1. Debian 12 及以上的版本需要手动安装 rsyslog sudo apt-get install rsyslog
  2. 重启sshd服务 systemctl restart sshd
  3. 重启fail2ban服务 systemctl restart fail2ban

最后

大部分设备都是支持webdav连接的,适合不想要装DS Drive套件的用户。如果有版本管理、多人同时操作、强制下线清空客户端数据的需求建议还是直接使用DS Drive