解决Ubuntu 20.04无法导入Charles证书

之前在Ubuntu 16.04中使用Charles进行抓https的包一切都正常,但是最近在家里那台Ubuntu 20.04却始终装不上证书,会出现下面提示

Screenshot from 2021-12-15 15-10-52

每次导入证书右下角Import都不可点击,在Google找了很多资料都认为是一个Bug,毕竟在16.04上这么导入是没有问题的.

下面记录一下解决方案:

  1. 用命令行安装证书,首先导出Charles证书: Help->SSL Proxying->Save Charles Root Certificate, 再执行以下命令将证书导入系统

    1
    2
    mv charles.pem /usr/local/share/ca-certificates/charles.crt
    sudo update-ca-certificates
  2. 在Charles中开启SSL Proxying: Proxy->SSL Proxying Settings->SSL Proxying->Enable SSL Proxying, 点击Include下的Add按钮HostPort设置为*, 点击确定即可.

Screenshot from 2021-12-15 15-29-57

Donate
  • Copyright: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
  • Copyrights © 2015-2024 Kaisar
  • Visitors: | Views:

请我喝杯咖啡吧~

支付宝
微信