Molunerfinn / PicGo

:rocket:A simple & beautiful tool for pictures uploading built by vue-cli-electron-builder
https://molunerfinn.com/PicGo/
MIT License
24.21k stars 2.24k forks source link

[Feature]: 请支持TLSv1.3 #1194

Open Yurzi opened 1 year ago

Yurzi commented 1 year ago

前置阅读 | Pre-reading

PicGo的版本 | PicGo Version

v2.4.0-beta.5

系统信息 | System Information

Linux

功能请求 | Feature request

现有的Picgo最高只能支持TLSv1.2,在某些TLSv1.3 only的图床上无法正常上传(比如咱自建的兰空图床 在图床服务器开启TLSv1.2支持后,PicGo可以正确上传。

使用的插件为picgo-plugin-lankong,已检查不是插件的问题

以下是部分Log

2023-11-03 15:54:19 [PicGo INFO] get builtin shortKey handler for command: [picgo:upload] 
2023-11-03 15:54:19 [PicGo INFO] upload clipboard file 
2023-11-03 15:54:31 [PicGo INFO] Before transform 
2023-11-03 15:54:31 [PicGo INFO] Transforming... Current transformer is [path] 
2023-11-03 15:54:31 [PicGo INFO] Before upload 
2023-11-03 15:54:31 [PicGo INFO] beforeUploadPlugins: renameFn running 
2023-11-03 15:54:31 [PicGo INFO] Uploading... Current uploader is [lankong] 
2023-11-03 15:54:31 [PicGo WARN] failed 
2023-11-03 15:54:31 [PicGo ERROR] {
  "method": "POST",
  "url": "https://xx.yurzi.yy/api/v1/upload",
  "statusCode": 0,
  "message": "write EPROTO 20469856687816:error:1000042e:SSL routines:OPENSSL_internal:TLSV1_ALERT_PROTOCOL_VERSION:../../third_party/boringssl/src/ssl/tls_record.cc:594:SSL alert number 70\n",
  "stack": "Error: write EPROTO 20469856687816:error:1000042e:SSL routines:OPENSSL_internal:TLSV1_ALERT_PROTOCOL_VERSION:../../third_party/boringssl/src/ssl/tls_record.cc:594:SSL alert number 70\n\n    at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:98:16)",
  "response": {
    "status": 0,
    "statusCode": 0,
    "body": ""
  }
} 
2023-11-03 15:54:31 [PicGo ERROR] {
  "method": "POST",
  "url": "https://xx.yurzi.yy/api/v1/upload",
  "statusCode": 0,
  "message": "write EPROTO 20469856687816:error:1000042e:SSL routines:OPENSSL_internal:TLSV1_ALERT_PROTOCOL_VERSION:../../third_party/boringssl/src/ssl/tls_record.cc:594:SSL alert number 70\n",
  "stack": "Error: write EPROTO 20469856687816:error:1000042e:SSL routines:OPENSSL_internal:TLSV1_ALERT_PROTOCOL_VERSION:../../third_party/boringssl/src/ssl/tls_record.cc:594:SSL alert number 70\n\n    at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:98:16)",
  "response": {
    "status": 0,
    "statusCode": 0,
    "body": ""
  }
} 
Molunerfinn commented 1 year ago

看起来需要底层 axios 库支持才行

https://github.com/axios/axios/issues/5618