使用nginx反向代理的redaer自带webdav作为阅读3.0的备份服务器,在阅读3.0导入远程书籍时显示超时
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 11k
- Forks
- 5.5k
- PR merge metrics
- No merged PRs in 30d
Description
确认 / Assignments
- 搜索现有issues,不存在相似或相关的issue / No similar or related issues
- 最新测试版依然存在此问题 / Latest beta app does not work
- 此问题和Xposed、Lsposed、Magisk、手机主题、浏览器插件等无关 / Make sure your machine is not touched by hook frameworks, plugins etc
问题描述 / Describe Bugs
自己使用docker搭建的reader服务器,使用其自带的webdav作为书库。经过nginx反向代理为子目录访问,访问链接为https://test.com:1122/dav/。可以正常备份和恢复,本地书籍或缓存好的书籍可以正常导入至webdav。在远程书籍中也能够看到目录下的书籍,但是从远程书籍导入时失败,日志显示导入出错,timeout。查看nginx日志,access.log中只有一条记录"PROPFIND /dav/reader3/webdav/legado/books HTTP/1.1" 207 22862 "-" "Chrome/119.0.0.0 Safari/537.36 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)"。error.log中无任何记录。当代理为location /{}时情况一样。
我的nginx设置为:
server {
#添加加ssl和http2协议的要求。
listen 11loca22 ssl ; #ipv4
#修改为自己申请的域名
server_name test.com;
###添加秘钥
Mozilla Intermediate configuration
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
#以下协议需要确认硬件是否支持,如果不支持或者不确定可以直接去除
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
#以下修改为自己申请的域名公钥和私钥文件地址
ssl_certificate ;
ssl_certificate_key ;
##############
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
if ($server_port !~ 1122){
rewrite ^(/.*)$ https://$host$1 permanent;
}
error_page 497 https://$host$request_uri;
location / {
}
location /dav/ {
gzip on; #开启gzip压缩
gzip_min_length 1k; #设置对数据启用压缩的最少字节数
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 6; #设置数据的压缩等级,等级为1-9,压缩比从小到大
gzip_types text/plain text/css text/javascript application/json application/javascript application/x-javascript application/xml; #设置需要压缩的数据格式
gzip_vary on;
client_max_body_size 50m; #允许上传50MB文件,上传本地书籍需要修改此项大小.如nginx主配置文件已添加,删除此行并修改主配置即可
#修改为自己需要代理的局域网ip和端口号
proxy_pass http://112.128.1.21:1122/; #阅读
proxy_http_version 1.1;
proxy_cache_bypass $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}
access_log /var/log/nginx/access.log; #;
error_log /var/log/nginx/error.log; # ;
}
复现步骤 / How to reproduce
每次使用都是如此
确认 / Assignment
- 已经提交复现所需要的附加资料 / Submit additions related with bugs
其他信息 / Additions
No response
日志提交 / Relevant log output
No response
阅读版本 / Legado version
3.23.110211
Android版本 / Android version
HarmonyOS 4.0.0
机型 / Model
HUAWEI Mate 40
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is identified in the report. Reproduce remote-book import through the nginx /dav/ reverse proxy, then inspect the PROPFIND request and client timeout behavior against the provided access and error logs; done means remote books import successfully without timing out under the reported configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, nginx
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100