Skip to content

在局域网连接S3后端无法使用自签TLS证书,提示: x509: certificate signed by unknown authority #1323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
xinjiajuan opened this issue Jul 10, 2022 · 2 comments
Labels
bug Something isn't working stale No activity for more than 30 days

Comments

@xinjiajuan
Copy link

Please make sure of the following things

  • I have read the documentation.
  • I'm sure there are no duplicate issues or discussions.
  • I'm sure it's due to alist and not something else(such as Dependencies or Operational).

Alist Version / Alist 版本

v2.6.1-0-geb15bce

Driver used / 使用的存储驱动

S3(minio)

Describe the bug / 问题描述

后端minio存储和alist运行在docker容器中,minio启用了自签证书,alist后端S3账号写的是本地局域网192.168.2.x,指向docker映射的 9000 S3api端口。且api端口强制启用https,如何才能使得alist信任该自签证书?
image

Reproduction / 复现链接

https://rescloud.itpours.com

此网站是本地网站的公网映射,使用frp穿透到公网服务器,再套用又拍云cdn。
本地访问192.168.2.x的效果和直接访问域名效果一致

Logs / 日志

[GIN] 2022/07/10 - 02:35:42 | 200 |      22.787µs |    192.168.2.95 | POST     "/api/admin/login"
[GIN] 2022/07/10 - 02:35:42 | 200 |      29.651µs |    192.168.2.95 | POST     "/api/admin/login"
[GIN] 2022/07/10 - 02:35:42 | 200 |     1.17422ms |    192.168.2.95 | GET      "/api/admin/settings?group=0"
[GIN] 2022/07/10 - 02:35:44 | 200 |      18.431µs |    192.168.2.95 | POST     "/api/admin/login"
[GIN] 2022/07/10 - 02:35:44 | 200 |     497.709µs |    192.168.2.95 | GET      "/api/admin/metas"
[GIN] 2022/07/10 - 02:35:46 | 200 |      39.921µs |    192.168.2.95 | POST     "/api/admin/login"
[GIN] 2022/07/10 - 02:35:46 | 200 |    1.480543ms |    192.168.2.95 | GET      "/api/admin/drivers"
[GIN] 2022/07/10 - 02:35:46 | 200 |    1.989941ms |    192.168.2.95 | GET      "/api/admin/accounts"
[GIN] 2022/07/10 - 02:36:08 | 200 |   12.196135ms |    192.168.2.95 | POST     "/api/admin/account/save"
[GIN] 2022/07/10 - 02:36:08 | 200 |    1.163221ms |    192.168.2.95 | GET      "/api/admin/accounts"
[GIN] 2022/07/10 - 02:36:16 | 200 |   12.655161ms |    192.168.2.95 | POST     "/api/admin/account/save"
[GIN] 2022/07/10 - 02:36:16 | 200 |    1.371472ms |    192.168.2.95 | GET      "/api/admin/accounts"
[GIN] 2022/07/10 - 02:36:22 | 200 |    5.998347ms |    192.168.2.95 | POST     "/api/admin/account/save"
[GIN] 2022/07/10 - 02:36:22 | 200 |    1.178601ms |    192.168.2.95 | GET      "/api/admin/accounts"
[GIN] 2022/07/10 - 02:36:59 | 200 |     155.393µs |    192.168.2.95 | GET      "/"
[GIN] 2022/07/10 - 02:36:59 | 200 |      23.398µs |    192.168.2.95 | GET      "/api/admin/login"
[GIN] 2022/07/10 - 02:36:59 | 200 |    1.389853ms |    192.168.2.95 | GET      "/api/public/settings"
[GIN] 2022/07/10 - 02:36:59 | 200 |     736.521µs |    192.168.2.95 | GET      "/api/admin/settings?group=1"
[GIN] 2022/07/10 - 02:37:00 | 200 |     431.596µs |    192.168.2.95 | POST     "/api/public/path"
[GIN] 2022/07/10 - 02:37:01 | 200 |   471.41448ms |    192.168.2.95 | POST     "/api/public/path"
ERRO[2022-07-10 02:37:01] RequestError: send request failed
caused by: Get "https://192.168.2.220:9000/mydata?delimiter=%2F&marker=&prefix=": x509: certificate signed by unknown authority
[GIN] 2022/07/10 - 02:37:50 | 200 |      34.018µs |    192.168.2.95 | POST     "/api/admin/login"
[GIN] 2022/07/10 - 02:37:50 | 200 |     902.257µs |    192.168.2.95 | GET      "/api/admin/settings?group=1"
[GIN] 2022/07/10 - 02:37:56 | 200 |      23.107µs |    192.168.2.95 | POST     "/api/admin/login"
[GIN] 2022/07/10 - 02:37:56 | 200 |     1.10031ms |    192.168.2.95 | GET      "/api/admin/settings?group=0"
[GIN] 2022/07/10 - 02:38:09 | 200 |      31.647µs |    192.168.2.95 | POST     "/api/admin/login"
[GIN] 2022/07/10 - 02:38:09 | 200 |    1.427621ms |    192.168.2.95 | GET      "/api/admin/accounts"
[GIN] 2022/07/10 - 02:38:09 | 200 |    2.524908ms |    192.168.2.95 | GET      "/api/admin/drivers"
[GIN] 2022/07/10 - 02:38:14 | 200 |     561.005µs | 183.216.235.205 | POST     "/api/public/path"
ERRO[2022-07-10 02:38:16] RequestError: send request failed
caused by: Get "https://192.168.2.220:9000/mydata?delimiter=%2F&marker=&prefix=": x509: certificate signed by unknown authority
[GIN] 2022/07/10 - 02:38:16 | 200 |  310.518653ms | 183.216.235.205 | POST     "/api/public/path"
[GIN] 2022/07/10 - 02:38:23 | 200 |     401.922µs | 183.216.235.205 | POST     "/api/public/path"
ERRO[2022-07-10 02:38:26] RequestError: send request failed
caused by: Get "https://192.168.2.220:9000/alist?delimiter=%2F&marker=&prefix=cloud%2F": x509: certificate signed by unknown authority
[GIN] 2022/07/10 - 02:38:26 | 200 |  424.838766ms | 183.216.235.205 | POST     "/api/public/path"
[GIN] 2022/07/10 - 02:38:42 | 200 |     7.19028ms |    192.168.2.95 | POST     "/api/admin/account/save"
[GIN] 2022/07/10 - 02:38:42 | 200 |     585.607µs |    192.168.2.95 | GET      "/api/admin/accounts"
[GIN] 2022/07/10 - 02:38:47 | 200 |   11.564744ms |    192.168.2.95 | POST     "/api/admin/account/save"
[GIN] 2022/07/10 - 02:38:47 | 200 |    1.104089ms |    192.168.2.95 | GET      "/api/admin/accounts"
[GIN] 2022/07/10 - 02:38:50 | 200 |   13.393194ms |    192.168.2.95 | POST     "/api/admin/account/save"
[GIN] 2022/07/10 - 02:38:50 | 200 |    1.198887ms |    192.168.2.95 | GET      "/api/admin/accounts"
[GIN] 2022/07/10 - 02:38:53 | 200 |     135.231µs |    192.168.2.95 | GET      "/学习资料"
[GIN] 2022/07/10 - 02:38:54 | 200 |        8.86µs |    192.168.2.95 | GET      "/api/admin/login"
[GIN] 2022/07/10 - 02:38:54 | 200 |     634.824µs |    192.168.2.95 | GET      "/api/public/settings"
[GIN] 2022/07/10 - 02:38:54 | 200 |     767.106µs |    192.168.2.95 | GET      "/api/admin/settings?group=1"
ERRO[2022-07-10 02:38:54] BadRequest: Bad Request
        status code: 400, request id: , host id:
[GIN] 2022/07/10 - 02:38:54 | 200 |    2.071571ms |    192.168.2.95 | POST     "/api/public/path"
[GIN] 2022/07/10 - 02:39:02 | 200 |     159.922µs |    192.168.2.95 | GET      "/学习资料"
[GIN] 2022/07/10 - 02:39:03 | 200 |    1.259912ms |    192.168.2.95 | GET      "/api/public/settings"
[GIN] 2022/07/10 - 02:39:03 | 200 |      32.227µs |    192.168.2.95 | GET      "/api/admin/login"
[GIN] 2022/07/10 - 02:39:03 | 200 |      681.14µs |    192.168.2.95 | GET      "/api/admin/settings?group=1"
ERRO[2022-07-10 02:39:03] BadRequest: Bad Request
[GIN] 2022/07/10 - 02:39:03 | 200 |    2.213423ms |    192.168.2.95 | POST     "/api/public/path"
        status code: 400, request id: , host id:
[GIN] 2022/07/10 - 02:39:05 | 200 |     410.229µs |    192.168.2.95 | POST     "/api/public/path"
ERRO[2022-07-10 02:39:07] BadRequest: Bad Request
        status code: 400, request id: , host id:
[GIN] 2022/07/10 - 02:39:07 | 200 |    2.027545ms |    192.168.2.95 | POST     "/api/public/path"
[GIN] 2022/07/10 - 02:42:06 | 200 |     300.185µs | 117.136.124.187 | GET      "/"
[GIN] 2022/07/10 - 02:42:09 | 200 |     1.50532ms | 117.136.124.187 | GET      "/api/public/settings"
[GIN] 2022/07/10 - 02:42:09 | 200 |     128.345µs | 117.136.124.187 | GET      "/api/admin/settings?group=1"
ERRO[2022-07-10 02:42:09] Invalid token
[GIN] 2022/07/10 - 02:42:10 | 200 |     713.659µs | 117.136.124.187 | POST     "/api/public/path"
ERRO[2022-07-10 02:42:13] BadRequest: Bad Request
        status code: 400, request id: , host id:
[GIN] 2022/07/10 - 02:42:13 | 200 |    2.739203ms | 117.136.124.187 | POST     "/api/public/path"
[GIN] 2022/07/10 - 02:42:16 | 200 |     579.113µs | 117.136.124.187 | POST     "/api/public/path"
ERRO[2022-07-10 02:42:19] Wrong password
[GIN] 2022/07/10 - 02:42:19 | 200 |       492.2µs | 117.136.124.187 | POST     "/api/public/path"
ERRO[2022-07-10 02:42:29] BadRequest: Bad Request
        status code: 400, request id: , host id:
[GIN] 2022/07/10 - 02:42:29 | 200 |    2.227856ms | 117.136.124.187 | POST     "/api/public/path"
[GIN] 2022/07/10 - 02:44:37 | 200 |   12.656064ms |    192.168.2.95 | POST     "/api/admin/account/save"
[GIN] 2022/07/10 - 02:44:37 | 200 |    1.353998ms |    192.168.2.95 | GET      "/api/admin/accounts"
[GIN] 2022/07/10 - 02:44:40 | 200 |     133.943µs |    192.168.2.95 | GET      "/常用备份"
[GIN] 2022/07/10 - 02:44:41 | 200 |    1.327671ms |    192.168.2.95 | GET      "/api/public/settings"
[GIN] 2022/07/10 - 02:44:41 | 200 |      63.092µs |    192.168.2.95 | GET      "/api/admin/login"
[GIN] 2022/07/10 - 02:44:41 | 200 |     686.313µs |    192.168.2.95 | GET      "/api/admin/settings?group=1"
ERRO[2022-07-10 02:44:41] BadRequest: Bad Request
        status code: 400, request id: , host id:
[GIN] 2022/07/10 - 02:44:41 | 200 |     2.43917ms |    192.168.2.95 | POST     "/api/public/path"
[GIN] 2022/07/10 - 02:44:41 | 200 |     366.826µs |    192.168.2.95 | POST     "/api/public/path"
ERRO[2022-07-10 02:44:43] RequestError: send request failed
caused by: Get "https://192.168.2.220:9000/mydata?delimiter=%2F&marker=&prefix=": x509: certificate signed by unknown authority
[GIN] 2022/07/10 - 02:44:43 | 200 |  304.950091ms |    192.168.2.95 | POST     "/api/public/path"
[GIN] 2022/07/10 - 02:46:58 | 200 |     193.331µs |    36.150.60.24 | GET      "/"
[GIN] 2022/07/10 - 02:47:00 | 200 |     182.834µs |    36.150.60.24 | GET      "/"
[GIN] 2022/07/10 - 02:47:39 | 302 |       91.79µs |    36.150.60.24 | GET      "/favicon.ico"
[GIN] 2022/07/10 - 02:47:44 | 200 |     213.869µs |    36.150.60.24 | GET      "/"
[GIN] 2022/07/10 - 02:47:51 | 200 |      51.702µs |    192.168.2.95 | POST     "/api/admin/login"
[GIN] 2022/07/10 - 02:47:51 | 200 |    1.354033ms |    192.168.2.95 | GET      "/api/admin/settings?group=0"
[GIN] 2022/07/10 - 02:47:54 | 200 |      31.366µs |    192.168.2.95 | POST     "/api/admin/login"
[GIN] 2022/07/10 - 02:47:54 | 200 |     685.806µs |    192.168.2.95 | GET      "/api/admin/settings?group=1"
[GIN] 2022/07/10 - 02:47:54 | 200 |      24.049µs |    192.168.2.95 | POST     "/api/admin/login"
[GIN] 2022/07/10 - 02:47:54 | 200 |    1.121491ms |    192.168.2.95 | GET      "/api/admin/settings?group=0"
[GIN] 2022/07/10 - 02:53:17 | 200 |      592.44µs | 183.216.235.205 | POST     "/api/public/path"
ERRO[2022-07-10 02:53:19] RequestError: send request failed
caused by: Get "https://192.168.2.220:9000/mydata?delimiter=%2F&marker=&prefix=": x509: certificate signed by unknown authority
[GIN] 2022/07/10 - 02:53:19 | 200 |  366.006719ms | 183.216.235.205 | POST     "/api/public/path"
[GIN] 2022/07/10 - 02:53:24 | 200 |     142.976µs |    192.168.2.95 | GET      "/学习资料"
[GIN] 2022/07/10 - 02:53:24 | 200 |      51.127µs |    192.168.2.95 | GET      "/api/admin/login"
[GIN] 2022/07/10 - 02:53:24 | 200 |    1.156343ms |    192.168.2.95 | GET      "/api/public/settings"
[GIN] 2022/07/10 - 02:53:24 | 200 |     712.323µs |    192.168.2.95 | GET      "/api/admin/settings?group=1"
ERRO[2022-07-10 02:53:25] RequestError: send request failed
caused by: Get "https://192.168.2.220:9000/mydata?delimiter=%2F&marker=&prefix=": x509: certificate signed by unknown authority
[GIN] 2022/07/10 - 02:53:25 | 200 |  389.753016ms |    192.168.2.95 | POST     "/api/public/path"
@xinjiajuan xinjiajuan added the bug Something isn't working label Jul 10, 2022
@welcome
Copy link

welcome bot commented Jul 10, 2022

Thanks for opening your first issue here! Be sure to follow the issue template!

@github-actions github-actions bot added the stale No activity for more than 30 days label Sep 1, 2022
@github-actions
Copy link

github-actions bot commented Oct 1, 2022

Hello @, this issue was closed due to inactive more than 60 days. You can reopen or recreate it if you think it should continue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale No activity for more than 30 days
Projects
None yet
Development

No branches or pull requests

1 participant