phlinhng / v2ray-tcp-tls-web

VLESS / Trojan-Go / Shadowsocks 脚本 支持纯 IPv6
https://github.com/phlinhng/v2ray-tcp-tls-web/wiki
Do What The F*ck You Want To Public License
683 stars 328 forks source link

使用的是Ubuntu 20.04LTS,还是会申请失败,从前老的脚本没问题 #71

Closed iSteveyang closed 3 years ago

iSteveyang commented 3 years ago

今天更新的版本已经优化证书申请流程,现在应该不会再申请失败了。
如果想用自己的证书,待脚本成功申请证书后,再将 /etc/ssl/v2ray/key.pem/etc/ssl/v2ray/fullchain.pem 换成自己的证书并停用 acme.sh 自动 renew 即可。停用自动 renew 的指令如下:

~/.acme.sh/acme.sh --remove -d example.com --ecc

之后版本会加入事先指定证书的功能,只要存在证书档案就不会进行申请。

Originally posted by @phlinhng in https://github.com/phlinhng/v2ray-tcp-tls-web/issues/67#issuecomment-728880454

iSteveyang commented 3 years ago

bash <(curl -sL https://raw.githubusercontent.com/phlinhng/v2ray-tcp-tls-web/master/install.sh) && v2script 这个老的就没问题,用现在这个不行,

Issuing certificate
It seems that you are using sudo, please read this link first:
https://github.com/acmesh-official/acme.sh/wiki/sudo
Installing certificate
It seems that you are using sudo, please read this link first:
https://github.com/acmesh-official/acme.sh/wiki/sudo
Issuing certificate
It seems that you are using sudo, please read this link first:
https://github.com/acmesh-official/acme.sh/wiki/sudo
Installing certificate
It seems that you are using sudo, please read this link first:
https://github.com/acmesh-official/acme.sh/wiki/sudo
证书签发失败, 请运行修复证书

之后我用certbot申请成功了Let's Encrypt的证书,但是替换之后让他继续安装是个问题

phlinhng commented 3 years ago

這個報錯很明確了,因為你正在使用 sudo 運行 acme.sh(我猜是 GCP 的機器),去除 acme.sh 的 sudo 要求應該可以解決。(https://github.com/phlinhng/v2ray-tcp-tls-web/commit/2b99b400601c5276cdf436325bff988077d5df06)

申請證書是在組件都安裝完後才進行的,如果你要替換證書,只要將公鑰和私鑰放到 /etc/ssl/v2ray/fullchain.pem/etc/ssl/v2ray/key.pem 後重新啟動 v2ray.service 即可,不需要重新安裝了。

iSteveyang commented 3 years ago

這個報錯很明確了,因為你正在使用 sudo 運行 acme.sh(我猜是 GCP 的機器),去除 acme.sh 的 sudo 要求應該可以解決。(2b99b40)

申請證書是在組件都安裝完後才進行的,如果你要替換證書,只要將公鑰和私鑰放到 /etc/ssl/v2ray/fullchain.pem/etc/ssl/v2ray/key.pem 後重新啟動 v2ray.service 即可,不需要重新安裝了。

您好,想请教您一下,我是aws的机器,并不是root用户也不是sudo,那这是什么情况呢?

phlinhng commented 3 years ago

@iSteveyang 是這個腳本的特性,偵測到非 root 用戶時會自動嘗試 sudo。就算你沒加 sudo,腳本也會自動加上,確保安裝過程不會遇到權限問題。

iSteveyang commented 3 years ago

@phlinhng 好的谢谢您,这个问题能避免吗?还是在acme.sh它提示错误后,我必须通过自己手动替换证书重启服务才可以正常使用?

phlinhng commented 3 years ago

@iSteveyang 我己經修複這個 bug 了(所以才關閉 issue),詳情請見我上面的答覆。

iSteveyang commented 3 years ago

@phlinhng 十分感谢,是我没注意,谢谢解答