kindle接入legado书源

背景

  • 阅读app自带的web服务不支持kindle,无法网页浏览,可以通过legado_kindle_bookshelf项目转发一下。和微信读书不一样,这个只是中转,真正的数据源是你的手机阅读app。

环境

  • kpw6
  • 公网ip

步骤

1
2
3
4
5
6
# 1.克隆仓库
git clone https://github.com/eastcukt/legado_kindle_bookshelf

# 2.添加nginx配置,参考下面的示例,将项目作为静态页面用nginx反代即可
sudo nano /etc/nginx/conf.d/book.conf

注意:不要给页面上https,保持http使用。

nginx配置参考

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
server {
listen 80;
# 改成你的服务器公网 IP
server_name your_ip_address;

# 网站根目录,也就是你上面克隆仓库的地址
root /path/to/your/project;
index index.html;

# 静态资源访问
location / {
# 按请求文件或目录查找,找不到则返回 404
try_files $uri $uri/ =404;
}

# 可选:如果你有 API 或后端,需要反向代理,可在此添加
# location /api/ {
# proxy_pass http://127.0.0.1:5000/;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# }
}