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

推荐订阅源

T
Tenable Blog
Last Week in AI
Last Week in AI
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
H
Help Net Security
F
Fortinet All Blogs
MyScale Blog
MyScale Blog
宝玉的分享
宝玉的分享
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 司徒正美
量子位
N
Netflix TechBlog - Medium
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
Recorded Future
Recorded Future
博客园 - 三生石上(FineUI控件)
Vercel News
Vercel News
aimingoo的专栏
aimingoo的专栏
I
InfoQ
Microsoft Security Blog
Microsoft Security Blog
Scott Helme
Scott Helme
The Last Watchdog
The Last Watchdog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
IT之家
IT之家
AI
AI
WordPress大学
WordPress大学
Security Archives - TechRepublic
Security Archives - TechRepublic
Google Online Security Blog
Google Online Security Blog
U
Unit 42
V2EX - 技术
V2EX - 技术
MongoDB | Blog
MongoDB | Blog
Schneier on Security
Schneier on Security
博客园 - Franky
H
Heimdal Security Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Jina AI
Jina AI
W
WeLiveSecurity
P
Privacy & Cybersecurity Law Blog
Cloudbric
Cloudbric
B
Blog RSS Feed
N
News | PayPal Newsroom
S
Securelist
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
I
Intezer
Hacker News - Newest:
Hacker News - Newest: "LLM"
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
博客园_首页
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
雷峰网
雷峰网

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