diff --git a/docs/iptv.sh b/docs/iptv.sh index 9ef1017..4df111a 100755 --- a/docs/iptv.sh +++ b/docs/iptv.sh @@ -21083,6 +21083,8 @@ NginxDomainInstallCert() fi fi + AcmeCheck + Println "$info 安装 $domain 证书..." NginxDomainUpdateCrt "$domain" 1 @@ -21466,7 +21468,16 @@ NginxRestart() Println "$error 请检查配置错误\n" exit 1 fi - if systemctl restart $nginx_name + echo + nginx_actions=( '重载配置' '强制重启' ) + inquirer list_input_index "选择操作" nginx_actions nginx_actions_index + if [ "$nginx_actions_index" -eq 0 ] + then + nginx_action=reload-or-restart + else + nginx_action=restart + fi + if systemctl $nginx_action $nginx_name then Println "$info $nginx_name 重启成功\n" else @@ -21871,6 +21882,7 @@ NginxConfigDomain() NginxConfigDirective level_2 elif [ "$domain_server_options_index" -eq 1 ] then + AcmeCheck NginxDomainServerUpdateCrt elif [ "$domain_server_options_index" -eq 2 ] then @@ -24187,19 +24199,80 @@ NginxConfigBlockAliyun() fi } -NginxDomainUpdateCrt() +AcmeCheck() { - local domain=$1 quiet=${2:-0} - - [ "$quiet" -eq 0 ] && Println "$info 更新 $domain 证书..." + [ -n "${ca_server:-}" ] && return 0 if [ ! -f "$HOME/.acme.sh/acme.sh" ] then DepInstall socat - bash <(curl -s -m 20 https://get.acme.sh) > /dev/null + { curl -s -m 10 https://get.acme.sh || curl -s -m 20 "$FFMPEG_MIRROR_LINK/acme.sh"; } \ + | sed "s+https://raw.githubusercontent.com/acmesh-official+$FFMPEG_MIRROR_LINK/acmesh-content+g" \ + | sed "s+| sh+| sed 's~PROJECT=\"https://github.com/acmesh-official~PROJECT=\"$FFMPEG_MIRROR_LINK/acmesh-project~' | sed 's~https://api.github.com~$FFMPEG_MIRROR_LINK/acmesh-api~g' | sh+g" | bash + fi + + Println "$tip zerossl 不支持 tls-alpn-01" + ca_options=( letsencrypt zerossl ) + inquirer list_input "选择 CA" ca_options ca_server + + if [ "$ca_server" == "zerossl" ] + then + if [ -e ~/.acme.sh/ca/acme.zerossl.com/ca.conf ] + then + . ~/.acme.sh/ca/acme.zerossl.com/ca.conf + fi + + if [ -n "${CA_EAB_KEY_ID:-}" ] && [ -n "${CA_EAB_HMAC_KEY:-}" ] + then + Println "$tip 请确保已有账号的 EAB 认证信息未过期, 否则请重新设置" + inquirer list_input "是否重新设置 zerossl 账号" ny_options yn_option + if [ "$yn_option" == "$i18n_no" ] + then + return 0 + fi + fi + + echo + zerossl_options=( '注册新账号' '输入已有账号的 EAB 认证信息' ) + inquirer list_input_index "未发现 zerossl 账号" zerossl_options zerossl_options_index + + if [ "$zerossl_options_index" -eq 0 ] + then + echo + inquirer text_input "输入邮箱: " zerossl_email "$i18n_cancel" + ExitOnCancel zerossl_email + + if ! ~/.acme.sh/acme.sh --register-account -m "$zerossl_email" --server zerossl + then + Println "$error 注册账号失败, 请稍后再试或前往官网注册 https://app.zerossl.com/signup?fpr=iptv-sh \n" + exit 1 + fi + else + Println "$tip 可以在 https://app.zerossl.com/developer?fpr=iptv-sh 页面获取" + inquirer text_input "输入 EAB KID: " zerossl_eab_kid "$i18n_cancel" + ExitOnCancel zerossl_eab_kid + echo + inquirer text_input "输入 EAB HMAC Key: " zerossl_eab_hmac_key "$i18n_cancel" + ExitOnCancel zerossl_eab_hmac_key + + if ! ~/.acme.sh/acme.sh --register-account --server zerossl --eab-kid "$zerossl_eab_kid" --eab-hmac-key "$zerossl_eab_hmac_key" + then + Println "$error 注册账号失败, 请确保输入正确\n" + exit 1 + fi + fi + + Println "$info 账号注册成功\n" fi +} + +NginxDomainUpdateCrt() +{ + local domain=$1 quiet=${2:-0} + + [ "$quiet" -eq 0 ] && Println "$info 更新 $domain 证书..." - if [ -f /etc/systemd/system/mmproxy-acme.service ] && [[ $(systemctl is-active mmproxy-acme) == "active" ]] + if [ "$ca_server" == "letsencrypt" ] && [ -f /etc/systemd/system/mmproxy-acme.service ] && [[ $(systemctl is-active mmproxy-acme) == "active" ]] then if [ -z "${tls_port:-}" ] then @@ -24214,7 +24287,7 @@ NginxDomainUpdateCrt() fi fi - ~/.acme.sh/acme.sh --force --issue --alpn --tlsport "$tls_port" -d "$domain" --standalone -k ec-256 > /dev/null + ~/.acme.sh/acme.sh --force --issue --alpn --tlsport "$tls_port" -d "$domain" --standalone -k ec-256 --server "$ca_server" > /dev/null ~/.acme.sh/acme.sh --force --installcert -d "$domain" --fullchainpath "$nginx_prefix/conf/sites_crt/$domain.crt" --keypath "$nginx_prefix/conf/sites_crt/$domain.key" --ecc > /dev/null else stopped=0 @@ -24227,12 +24300,24 @@ NginxDomainUpdateCrt() sleep 1 - ~/.acme.sh/acme.sh --force --issue -d "$domain" --standalone -k ec-256 > /dev/null + ~/.acme.sh/acme.sh --force --issue -d "$domain" --standalone -k ec-256 --server "$ca_server" > /dev/null ~/.acme.sh/acme.sh --force --installcert -d "$domain" --fullchainpath "$nginx_prefix/conf/sites_crt/$domain.crt" --keypath "$nginx_prefix/conf/sites_crt/$domain.key" --ecc > /dev/null [ "$stopped" -eq 1 ] && systemctl start $nginx_name fi + if [ -e "/usr/local/share/v2ray/$domain.crt" ] + then + cp -f "$nginx_prefix/conf/sites_crt/$domain.crt" "/usr/local/share/v2ray/$domain.crt" + cp -f "$nginx_prefix/conf/sites_crt/$domain.key" "/usr/local/share/v2ray/$domain.key" + fi + + if [ -e "/usr/local/share/xray/$domain.crt" ] + then + cp -f "$nginx_prefix/conf/sites_crt/$domain.crt" "/usr/local/share/xray/$domain.crt" + cp -f "$nginx_prefix/conf/sites_crt/$domain.key" "/usr/local/share/xray/$domain.key" + fi + [ "$quiet" -eq 0 ] && Println "$info $domain 证书更新成功\n" return 0 @@ -25775,7 +25860,7 @@ V2raySetCertificates() fi if [ "$crt_option" == "添加域名" ] then - Println "$tip 如果证书不存在需请求新 CA 证书, 请确保没有程序占用 80 端口" + Println "$tip 如果证书不存在需请求新 CA 证书, 请确保没有程序占用 80 端口或已经设置 mmproxy acme" inquirer text_input "输入域名: " domain "$i18n_cancel" ExitOnCancel domain if [ ! -s "/usr/local/share/$v2ray_name/$domain.crt" ] @@ -25789,11 +25874,13 @@ V2raySetCertificates() cp -f "/usr/local/openresty/nginx/conf/sites_crt/$domain.crt" "/usr/local/share/$v2ray_name/$domain.crt" cp -f "/usr/local/openresty/nginx/conf/sites_crt/$domain.key" "/usr/local/share/$v2ray_name/$domain.key" else - Println "$info 安装证书..." + AcmeCheck + + Println "$info 安装 $domain 证书..." - V2rayDomainUpdateCrt "$domain" 1 + V2rayDomainUpdateCrt "$domain" - Println "$info 证书安装成功" + Println "$info $domain 证书安装成功" fi fi chown $v2ray_name:$v2ray_name /usr/local/share/$v2ray_name/* @@ -30374,17 +30461,9 @@ V2rayListInboundDomains() V2rayDomainUpdateCrt() { - local domain=$1 quiet=${2:-0} - - [ "$quiet" -eq 0 ] && Println "$info 更新 $domain 证书..." - - if [ ! -f "$HOME/.acme.sh/acme.sh" ] - then - DepInstall socat - bash <(curl -s -m 20 https://get.acme.sh) > /dev/null - fi + local domain=$1 - if [ -f /etc/systemd/system/mmproxy-acme.service ] && [[ $(systemctl is-active mmproxy-acme) == "active" ]] + if [ "$ca_server" == "letsencrypt" ] && [ -f /etc/systemd/system/mmproxy-acme.service ] && [[ $(systemctl is-active mmproxy-acme) == "active" ]] then if [ -z "${tls_port:-}" ] then @@ -30399,7 +30478,7 @@ V2rayDomainUpdateCrt() fi fi - ~/.acme.sh/acme.sh --force --issue --alpn --tlsport "$tls_port" -d "$domain" --standalone -k ec-256 > /dev/null + ~/.acme.sh/acme.sh --force --issue --alpn --tlsport "$tls_port" -d "$domain" --standalone -k ec-256 --server "$ca_server" > /dev/null ~/.acme.sh/acme.sh --force --installcert -d "$domain" --fullchainpath "/usr/local/share/$v2ray_name/$domain.crt" --keypath "/usr/local/share/$v2ray_name/$domain.key" --ecc > /dev/null else stopped=0 @@ -30415,13 +30494,23 @@ V2rayDomainUpdateCrt() sleep 1 fi - ~/.acme.sh/acme.sh --force --issue -d "$domain" --standalone -k ec-256 > /dev/null + ~/.acme.sh/acme.sh --force --issue -d "$domain" --standalone -k ec-256 --server "$ca_server" > /dev/null ~/.acme.sh/acme.sh --force --installcert -d "$domain" --fullchainpath "/usr/local/share/$v2ray_name/$domain.crt" --keypath "/usr/local/share/$v2ray_name/$domain.key" --ecc > /dev/null [ "$stopped" -eq 1 ] && systemctl start $nginx_name fi - [ "$quiet" -eq 0 ] && Println "$info $domain 证书更新成功\n" + if [ -e "/usr/local/nginx/conf/sites_crt/$domain.crt" ] + then + cp -f "/usr/local/share/$v2ray_name/$domain.crt" "/usr/local/nginx/conf/sites_crt/$domain.crt" + cp -f "/usr/local/share/$v2ray_name/$domain.key" "/usr/local/nginx/conf/sites_crt/$domain.key" + fi + + if [ -e "/usr/local/openresty/nginx/conf/sites_crt/$domain.crt" ] + then + cp -f "/usr/local/share/$v2ray_name/$domain.crt" "/usr/local/openresty/nginx/conf/sites_crt/$domain.crt" + cp -f "/usr/local/share/$v2ray_name/$domain.key" "/usr/local/openresty/nginx/conf/sites_crt/$domain.key" + fi return 0 } @@ -30593,6 +30682,7 @@ V2rayNginxSelectDomainServerProxy() exit 1 ;; $v2ray_nginx_domain_server_update_crt_number) + AcmeCheck V2rayNginxDomainServerUpdateCrt exit 0 ;; @@ -30994,9 +31084,11 @@ V2rayConfigDomain() echo inquirer text_input "请输入证书域名: " certificate_domain "$certificate_name" + AcmeCheck + Println "$info 更新 $certificate_domain 证书..." - V2rayDomainUpdateCrt "$certificate_domain" 1 + V2rayDomainUpdateCrt "$certificate_domain" jq_path='["inbounds",'"$inbounds_index"',"streamSettings","'"$tls_settings_name"'","certificates",'"$certificates_index"',"certificateFile"]' JQ update "$V2_CONFIG" "/usr/local/share/$v2ray_name/$certificate_domain.crt" @@ -43324,6 +43416,14 @@ then Println "$error v2ray install-release.sh 下载出错, 无法连接 github ?" fi + Println "$info 下载 acme.sh ..." + if curl -s -L https://get.acme.sh -o "$FFMPEG_MIRROR_ROOT/acme.sh_tmp" + then + mv "$FFMPEG_MIRROR_ROOT/acme.sh_tmp" "$FFMPEG_MIRROR_ROOT/acme.sh" + else + Println "$error acme.sh 下载出错, 无法连接 github ?" + fi + locale_options=( en ) mkdir -p "$FFMPEG_MIRROR_ROOT/locale/po/" diff --git a/i18n/iptv.sh.pot b/i18n/iptv.sh.pot index 5522cb8..49e7ccc 100644 --- a/i18n/iptv.sh.pot +++ b/i18n/iptv.sh.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: iptv.sh 1.80.9\n" "Report-Msgid-Bugs-To: tg @woniuzfb\n" -"POT-Creation-Date: 2021-06-15 10:11+0000\n" +"POT-Creation-Date: 2021-06-15 17:57+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -568,14 +568,14 @@ msgstr "" msgid "Please input stream link( mpegts / hls / flv / youtube ...): " msgstr "" -#: ../docs/iptv.sh:6992 ../docs/iptv.sh:16589 ../docs/iptv.sh:21833 -#: ../docs/iptv.sh:22155 ../docs/iptv.sh:24271 ../docs/iptv.sh:24310 -#: ../docs/iptv.sh:24697 ../docs/iptv.sh:28022 ../docs/iptv.sh:29042 -#: ../docs/iptv.sh:30458 ../docs/iptv.sh:30483 ../docs/iptv.sh:30587 -#: ../docs/iptv.sh:32939 ../docs/iptv.sh:35402 ../docs/iptv.sh:38942 -#: ../docs/iptv.sh:38990 ../docs/iptv.sh:39204 ../docs/iptv.sh:39763 -#: ../docs/iptv.sh:39921 ../docs/iptv.sh:40505 ../docs/iptv.sh:40650 -#: ../docs/iptv.sh:40803 ../docs/iptv.sh:41736 +#: ../docs/iptv.sh:6992 ../docs/iptv.sh:16589 ../docs/iptv.sh:21844 +#: ../docs/iptv.sh:22167 ../docs/iptv.sh:24356 ../docs/iptv.sh:24395 +#: ../docs/iptv.sh:24782 ../docs/iptv.sh:28109 ../docs/iptv.sh:29129 +#: ../docs/iptv.sh:30547 ../docs/iptv.sh:30572 ../docs/iptv.sh:30676 +#: ../docs/iptv.sh:33031 ../docs/iptv.sh:35494 ../docs/iptv.sh:39034 +#: ../docs/iptv.sh:39082 ../docs/iptv.sh:39296 ../docs/iptv.sh:39855 +#: ../docs/iptv.sh:40013 ../docs/iptv.sh:40597 ../docs/iptv.sh:40742 +#: ../docs/iptv.sh:40895 ../docs/iptv.sh:41828 msgid "Input No." msgstr "" @@ -589,7 +589,7 @@ msgstr "" msgid "$info Parsing youtube link..." msgstr "" -#: ../docs/iptv.sh:7132 ../docs/iptv.sh:7206 ../docs/iptv.sh:42356 +#: ../docs/iptv.sh:7132 ../docs/iptv.sh:7206 ../docs/iptv.sh:42448 msgid "Installing openssl" msgstr "" @@ -632,584 +632,584 @@ msgstr "" msgid "old link detected. Do you want to replace it with this new link" msgstr "" -#: ../docs/iptv.sh:21403 +#: ../docs/iptv.sh:21405 #, sh-format msgid "Are you sure you want to permanently remove all $nginx_name files" msgstr "" -#: ../docs/iptv.sh:21428 +#: ../docs/iptv.sh:21430 #, sh-format msgid "Recompiling $nginx_name" msgstr "" -#: ../docs/iptv.sh:21450 +#: ../docs/iptv.sh:21452 #, sh-format msgid "$nginx_name is running, stopping now" msgstr "" -#: ../docs/iptv.sh:21455 +#: ../docs/iptv.sh:21457 #, sh-format msgid "$nginx_name is stopped, starting now" msgstr "" -#: ../docs/iptv.sh:25245 ../docs/iptv.sh:31032 +#: ../docs/iptv.sh:25330 ../docs/iptv.sh:31124 msgid "override old installation" msgstr "" -#: ../docs/iptv.sh:27994 +#: ../docs/iptv.sh:28081 msgid "print QR code" msgstr "" -#: ../docs/iptv.sh:30295 +#: ../docs/iptv.sh:30382 msgid "reset all traffic stats" msgstr "" -#: ../docs/iptv.sh:32424 +#: ../docs/iptv.sh:32516 msgid "Deleting this domain anyway. Also remove domain from official website to add this domain again" msgstr "" -#: ../docs/iptv.sh:32472 +#: ../docs/iptv.sh:32564 msgid "Do you want to delete all domains added with this CFP" msgstr "" -#: ../docs/iptv.sh:32730 +#: ../docs/iptv.sh:32822 msgid "Updating this token" msgstr "" -#: ../docs/iptv.sh:33246 +#: ../docs/iptv.sh:33338 msgid "directory already exits, add anyway" msgstr "" -#: ../docs/iptv.sh:37027 +#: ../docs/iptv.sh:37119 msgid "Deleting IBM CF CLI, do you want to continue" msgstr "" -#: ../docs/iptv.sh:38936 ../docs/iptv.sh:38971 +#: ../docs/iptv.sh:39028 ../docs/iptv.sh:39063 msgid "VIP manager" msgstr "" -#: ../docs/iptv.sh:38938 ../docs/iptv.sh:38976 +#: ../docs/iptv.sh:39030 ../docs/iptv.sh:39068 msgid "View VIP channels" msgstr "" -#: ../docs/iptv.sh:38939 +#: ../docs/iptv.sh:39031 msgid "Input VIP auth code" msgstr "" -#: ../docs/iptv.sh:38941 ../docs/iptv.sh:38989 +#: ../docs/iptv.sh:39033 ../docs/iptv.sh:39081 #, sh-format msgid "$tip cmd: h => HLS manager, f => FLV manager" msgstr "" -#: ../docs/iptv.sh:38965 +#: ../docs/iptv.sh:39057 #, sh-format msgid "$error Intall first with cmd: tv" msgstr "" -#: ../docs/iptv.sh:38973 +#: ../docs/iptv.sh:39065 msgid "View VIP user" msgstr "" -#: ../docs/iptv.sh:38974 +#: ../docs/iptv.sh:39066 msgid "Add VIP user" msgstr "" -#: ../docs/iptv.sh:38975 +#: ../docs/iptv.sh:39067 msgid "Config VIP user" msgstr "" -#: ../docs/iptv.sh:38977 +#: ../docs/iptv.sh:39069 msgid "Add VIP channel" msgstr "" -#: ../docs/iptv.sh:38978 +#: ../docs/iptv.sh:39070 msgid "Deploy VIP channel" msgstr "" -#: ../docs/iptv.sh:38979 +#: ../docs/iptv.sh:39071 msgid "Config VIP channel" msgstr "" -#: ../docs/iptv.sh:38980 +#: ../docs/iptv.sh:39072 msgid "View VIP server" msgstr "" -#: ../docs/iptv.sh:38981 +#: ../docs/iptv.sh:39073 msgid "Add VIP server" msgstr "" -#: ../docs/iptv.sh:38982 +#: ../docs/iptv.sh:39074 msgid "Config VIP server" msgstr "" -#: ../docs/iptv.sh:38983 +#: ../docs/iptv.sh:39075 msgid "Delete VIP user" msgstr "" -#: ../docs/iptv.sh:38984 +#: ../docs/iptv.sh:39076 msgid "Delete VIP channel" msgstr "" -#: ../docs/iptv.sh:38985 +#: ../docs/iptv.sh:39077 msgid "Delete VIP server" msgstr "" -#: ../docs/iptv.sh:38986 +#: ../docs/iptv.sh:39078 msgid "Enable VIP" msgstr "" -#: ../docs/iptv.sh:38987 +#: ../docs/iptv.sh:39079 msgid "Disable VIP" msgstr "" -#: ../docs/iptv.sh:39074 +#: ../docs/iptv.sh:39166 msgid "Installing vim-plug and overriding ~/.vimrc, do you want to continue" msgstr "" -#: ../docs/iptv.sh:39178 +#: ../docs/iptv.sh:39270 msgid "cmd: f => FLV manager, v => VIP manager" msgstr "" -#: ../docs/iptv.sh:39182 +#: ../docs/iptv.sh:39274 msgid "cmd: h => HLS manager, v => VIP manager" msgstr "" -#: ../docs/iptv.sh:39187 +#: ../docs/iptv.sh:39279 msgid "IPTV manager" msgstr "" -#: ../docs/iptv.sh:39189 +#: ../docs/iptv.sh:39281 msgid "Install" msgstr "" -#: ../docs/iptv.sh:39190 +#: ../docs/iptv.sh:39282 msgid "Uninstall" msgstr "" -#: ../docs/iptv.sh:39191 +#: ../docs/iptv.sh:39283 msgid "Update" msgstr "" -#: ../docs/iptv.sh:39193 +#: ../docs/iptv.sh:39285 msgid "View channel" msgstr "" -#: ../docs/iptv.sh:39194 +#: ../docs/iptv.sh:39286 msgid "Add channel" msgstr "" -#: ../docs/iptv.sh:39195 +#: ../docs/iptv.sh:39287 msgid "Config channel" msgstr "" -#: ../docs/iptv.sh:39196 +#: ../docs/iptv.sh:39288 msgid "Toggle channel" msgstr "" -#: ../docs/iptv.sh:39197 +#: ../docs/iptv.sh:39289 msgid "Restart channel" msgstr "" -#: ../docs/iptv.sh:39198 +#: ../docs/iptv.sh:39290 msgid "View logs" msgstr "" -#: ../docs/iptv.sh:39199 +#: ../docs/iptv.sh:39291 msgid "Delete channel" msgstr "" -#: ../docs/iptv.sh:39200 +#: ../docs/iptv.sh:39292 msgid "Config default" msgstr "" -#: ../docs/iptv.sh:39202 +#: ../docs/iptv.sh:39294 #, sh-format msgid "$tip now: ${green}$title${normal} manager" msgstr "" -#: ../docs/iptv.sh:39248 +#: ../docs/iptv.sh:39340 msgid "Usage: tv -i [input stream] [-s segment length(s)] [-o output directory name] [-c segments count] [-b bitrates] [-p HLS playlist name] [-C] [-l] [-P http proxy]" msgstr "" -#: ../docs/iptv.sh:39249 +#: ../docs/iptv.sh:39341 msgid " -i input stream(support mpegts / hls / flv / youtube ...)" msgstr "" -#: ../docs/iptv.sh:39250 +#: ../docs/iptv.sh:39342 msgid "can be path to local video" msgstr "" -#: ../docs/iptv.sh:39251 +#: ../docs/iptv.sh:39343 msgid "you can input multiple stream links, separate with space" msgstr "" -#: ../docs/iptv.sh:39252 +#: ../docs/iptv.sh:39344 msgid " -s segment length(s)(default: 6)" msgstr "" -#: ../docs/iptv.sh:39253 +#: ../docs/iptv.sh:39345 msgid " -o output directory name(default: random)" msgstr "" -#: ../docs/iptv.sh:39255 +#: ../docs/iptv.sh:39347 msgid " -l not live stream, in this case it can't be monitored nor set segments number(default: no)" msgstr "" -#: ../docs/iptv.sh:39256 +#: ../docs/iptv.sh:39348 msgid " -P http proxy for FFmpeg, apply to http input stream(default: no)" msgstr "" -#: ../docs/iptv.sh:39258 +#: ../docs/iptv.sh:39350 msgid " -p HLS playlist name(default: random)" msgstr "" -#: ../docs/iptv.sh:39259 +#: ../docs/iptv.sh:39351 msgid " -c segments number in HLS playlist(default: 5)" msgstr "" -#: ../docs/iptv.sh:39260 +#: ../docs/iptv.sh:39352 msgid " -S sub directory for segments(default: no)" msgstr "" -#: ../docs/iptv.sh:39261 +#: ../docs/iptv.sh:39353 msgid " -t segments name(prefix)(default: same as playlist name)" msgstr "" -#: ../docs/iptv.sh:39262 +#: ../docs/iptv.sh:39354 msgid " -a audio codec(default: aac) (e.g. copy)" msgstr "" -#: ../docs/iptv.sh:39263 +#: ../docs/iptv.sh:39355 msgid " -v video codec(default: libx264) (e.g. copy)" msgstr "" -#: ../docs/iptv.sh:39264 +#: ../docs/iptv.sh:39356 msgid " -f video or audio delay(e.g. v_3 video delay 3 seconds, a_2 audio delay 2 seconds)" msgstr "" -#: ../docs/iptv.sh:39265 +#: ../docs/iptv.sh:39357 msgid " -d convert dvb teletext, options: text,ass (default: no)" msgstr "" -#: ../docs/iptv.sh:39266 +#: ../docs/iptv.sh:39358 msgid " -q crf value(precedence over bitrates)(0-63 greater number worse video qualit), multiple crf can be separated by comma" msgstr "" -#: ../docs/iptv.sh:39267 +#: ../docs/iptv.sh:39359 msgid "(default: crf not set)" msgstr "" -#: ../docs/iptv.sh:39268 +#: ../docs/iptv.sh:39360 msgid " -b bitrates of the output video(kb/s)(default: 900-1280x720)" msgstr "" -#: ../docs/iptv.sh:39269 +#: ../docs/iptv.sh:39361 msgid "If crf is set, bitrates value apply to -maxrate -bufsize" msgstr "" -#: ../docs/iptv.sh:39270 +#: ../docs/iptv.sh:39362 msgid "If crf is not set you can continue to set const option of FFmpeg" msgstr "" -#: ../docs/iptv.sh:39271 +#: ../docs/iptv.sh:39363 msgid "multiple bitrates can be separated by comma(in this case adaptive stream will be created)" msgstr "" -#: ../docs/iptv.sh:39272 +#: ../docs/iptv.sh:39364 msgid "you can set video dimensions(e.g. -b 800-640x360,1000-960x540,1500-1280x720)" msgstr "" -#: ../docs/iptv.sh:39273 +#: ../docs/iptv.sh:39365 msgid "input omit to skip this option" msgstr "" -#: ../docs/iptv.sh:39274 +#: ../docs/iptv.sh:39366 msgid " -C constant bitrates(only work if crf not set)(default: no)" msgstr "" -#: ../docs/iptv.sh:39275 +#: ../docs/iptv.sh:39367 msgid " -e encrypt segments(default: no)" msgstr "" -#: ../docs/iptv.sh:39276 +#: ../docs/iptv.sh:39368 msgid " -K Key name(default: random)" msgstr "" -#: ../docs/iptv.sh:39277 +#: ../docs/iptv.sh:39369 msgid " -z channel name(default: same as playlist name)" msgstr "" -#: ../docs/iptv.sh:39278 +#: ../docs/iptv.sh:39370 msgid "push FLV stream instead of HLS" msgstr "" -#: ../docs/iptv.sh:39279 +#: ../docs/iptv.sh:39371 msgid " -k push stream kind, e.g. -k flv" msgstr "" -#: ../docs/iptv.sh:39280 +#: ../docs/iptv.sh:39372 msgid " -H push h265 stream(default: no)" msgstr "" -#: ../docs/iptv.sh:39281 +#: ../docs/iptv.sh:39373 msgid " -T push address, e.g. rtmp://127.0.0.1/flv/xxx" msgstr "" -#: ../docs/iptv.sh:39282 +#: ../docs/iptv.sh:39374 msgid " -L pull(play) address(default: omit). e.g. http://domain.com/flv?app=flv&stream=xxx" msgstr "" -#: ../docs/iptv.sh:39283 +#: ../docs/iptv.sh:39375 msgid " -m more input flags for FFmpeg" msgstr "" -#: ../docs/iptv.sh:39284 ../docs/iptv.sh:39290 +#: ../docs/iptv.sh:39376 ../docs/iptv.sh:39382 msgid "default:" msgstr "" -#: ../docs/iptv.sh:39287 +#: ../docs/iptv.sh:39379 msgid "If it's HLS input stream, remove -reconnect_at_eof 1" msgstr "" -#: ../docs/iptv.sh:39288 +#: ../docs/iptv.sh:39380 msgid "If it's rtmp or local video, remove -reconnect 1 -reconnect_at_eof 1 -reconnect_streamed 1 -reconnect_delay_max 2000" msgstr "" -#: ../docs/iptv.sh:39289 +#: ../docs/iptv.sh:39381 msgid " -n output flags for FFmpeg, input omit to skip this option" msgstr "" -#: ../docs/iptv.sh:39292 +#: ../docs/iptv.sh:39384 msgid "Examples:" msgstr "" -#: ../docs/iptv.sh:39293 +#: ../docs/iptv.sh:39385 msgid "Use crf to control video quality:" msgstr "" -#: ../docs/iptv.sh:39294 +#: ../docs/iptv.sh:39386 msgid "tv -i http://xxx.com/xxx.ts -s 6 -o hbo1 -p hbo1 -q 15 -b 1500-1280x720 -z 'hbo stream 1'" msgstr "" -#: ../docs/iptv.sh:39295 +#: ../docs/iptv.sh:39387 msgid "Use bitrates to control video quality[default]:" msgstr "" -#: ../docs/iptv.sh:39296 +#: ../docs/iptv.sh:39388 msgid "tv -i http://xxx.com/xxx.ts -s 6 -o hbo2 -p hbo2 -b 900-1280x720 -z 'hbo stream 2'" msgstr "" -#: ../docs/iptv.sh:39297 +#: ../docs/iptv.sh:39389 msgid "If no need converting:" msgstr "" -#: ../docs/iptv.sh:39298 +#: ../docs/iptv.sh:39390 msgid "Push FLV instead of HLS:" msgstr "" -#: ../docs/iptv.sh:39301 +#: ../docs/iptv.sh:39393 msgid "Shortcuts:" msgstr "" -#: ../docs/iptv.sh:39302 +#: ../docs/iptv.sh:39394 msgid "tv # open HLS manager" msgstr "" -#: ../docs/iptv.sh:39303 +#: ../docs/iptv.sh:39395 msgid "tv l # list all running channels" msgstr "" -#: ../docs/iptv.sh:39304 +#: ../docs/iptv.sh:39396 msgid "tv d # add demo channels" msgstr "" -#: ../docs/iptv.sh:39305 +#: ../docs/iptv.sh:39397 msgid "tv e # mannual editing channels.json" msgstr "" -#: ../docs/iptv.sh:39306 +#: ../docs/iptv.sh:39398 msgid "tv ee # mannual editing sync_file" msgstr "" -#: ../docs/iptv.sh:39307 +#: ../docs/iptv.sh:39399 msgid "tv f # open FLV manager" msgstr "" -#: ../docs/iptv.sh:39308 +#: ../docs/iptv.sh:39400 msgid "tv v # open VIP manager" msgstr "" -#: ../docs/iptv.sh:39309 +#: ../docs/iptv.sh:39401 msgid "tv m # start monitoring" msgstr "" -#: ../docs/iptv.sh:39310 +#: ../docs/iptv.sh:39402 msgid "tv m l [lines count] # view monitoring log" msgstr "" -#: ../docs/iptv.sh:39311 +#: ../docs/iptv.sh:39403 msgid "tv m s # stop monitoring" msgstr "" -#: ../docs/iptv.sh:39312 +#: ../docs/iptv.sh:39404 msgid "tv s # tv guide manager" msgstr "" -#: ../docs/iptv.sh:39313 +#: ../docs/iptv.sh:39405 msgid "tv 4g # 4gtv manager" msgstr "" -#: ../docs/iptv.sh:39314 +#: ../docs/iptv.sh:39406 msgid "tv FFmpeg # create mirror for FFmpeg" msgstr "" -#: ../docs/iptv.sh:39315 +#: ../docs/iptv.sh:39407 msgid "tv debug 1/0 # enable/disable debug" msgstr "" -#: ../docs/iptv.sh:39317 +#: ../docs/iptv.sh:39409 msgid "cx # open xtream codes accoutns/channels manager" msgstr "" -#: ../docs/iptv.sh:39319 +#: ../docs/iptv.sh:39411 msgid "v2 # open v2ray manager" msgstr "" -#: ../docs/iptv.sh:39320 +#: ../docs/iptv.sh:39412 msgid "v2 e # mannual editing config.json" msgstr "" -#: ../docs/iptv.sh:39322 +#: ../docs/iptv.sh:39414 msgid "x # open xray manager" msgstr "" -#: ../docs/iptv.sh:39323 +#: ../docs/iptv.sh:39415 msgid "x e # mannual editing config.json" msgstr "" -#: ../docs/iptv.sh:39325 +#: ../docs/iptv.sh:39417 msgid "nx # open nginx manager" msgstr "" -#: ../docs/iptv.sh:39327 +#: ../docs/iptv.sh:39419 msgid "or # open openresty manager" msgstr "" -#: ../docs/iptv.sh:39329 +#: ../docs/iptv.sh:39421 msgid "cf # open cloudflare partner / workers manager" msgstr "" -#: ../docs/iptv.sh:39330 +#: ../docs/iptv.sh:39422 msgid "cf w # open cloudflare workers manager" msgstr "" -#: ../docs/iptv.sh:39332 +#: ../docs/iptv.sh:39424 msgid "ibm # open IBM Cloud Foundry manager" msgstr "" -#: ../docs/iptv.sh:39333 +#: ../docs/iptv.sh:39425 msgid "ibm v2 # open ibm v2ray app manager" msgstr "" -#: ../docs/iptv.sh:39334 +#: ../docs/iptv.sh:39426 msgid "ibm x # open ibm xray app manager" msgstr "" -#: ../docs/iptv.sh:39336 +#: ../docs/iptv.sh:39428 msgid "arm # open Armbian manager" msgstr "" -#: ../docs/iptv.sh:39338 +#: ../docs/iptv.sh:39430 msgid "pve # open Proxmox VE manager" msgstr "" -#: ../docs/iptv.sh:39340 +#: ../docs/iptv.sh:39432 msgid "tv ed # choose default editor" msgstr "" -#: ../docs/iptv.sh:39342 +#: ../docs/iptv.sh:39434 msgid "tv a # creating custom commands" msgstr "" -#: ../docs/iptv.sh:39344 +#: ../docs/iptv.sh:39436 msgid "tv c change/update language" msgstr "" -#: ../docs/iptv.sh:39354 +#: ../docs/iptv.sh:39446 msgid "Installation was not completed, do you want to reinstall" msgstr "" -#: ../docs/iptv.sh:39772 +#: ../docs/iptv.sh:39864 msgid "Compiling openresty, it takes awhile. Do you want to continue" msgstr "" -#: ../docs/iptv.sh:39930 +#: ../docs/iptv.sh:40022 msgid "Compiling nginx, it takes awhile. Do you want to continue" msgstr "" -#: ../docs/iptv.sh:39996 +#: ../docs/iptv.sh:40088 msgid "postfix exits. Do you want to reconfig smtp" msgstr "" -#: ../docs/iptv.sh:40203 ../docs/iptv.sh:41645 ../docs/iptv.sh:42290 +#: ../docs/iptv.sh:40295 ../docs/iptv.sh:41737 ../docs/iptv.sh:42382 msgid "Disable edns0" msgstr "" -#: ../docs/iptv.sh:40210 ../docs/iptv.sh:41653 ../docs/iptv.sh:42297 +#: ../docs/iptv.sh:40302 ../docs/iptv.sh:41745 ../docs/iptv.sh:42389 msgid "Enable edns0" msgstr "" -#: ../docs/iptv.sh:40363 +#: ../docs/iptv.sh:40455 msgid "Compiling pdf2htmlEX, it takes awhile. Do you want to continue" msgstr "" -#: ../docs/iptv.sh:40610 +#: ../docs/iptv.sh:40702 #, sh-format msgid "$v2ray_name is running, stopping now" msgstr "" -#: ../docs/iptv.sh:40615 +#: ../docs/iptv.sh:40707 #, sh-format msgid "$v2ray_name is stopped, starting now" msgstr "" -#: ../docs/iptv.sh:40664 +#: ../docs/iptv.sh:40756 msgid "It takes awhile. Do you want to continue" msgstr "" -#: ../docs/iptv.sh:40811 +#: ../docs/iptv.sh:40903 msgid "This is for PHICOMM n1. It need to be run after apt upgrade. Do you want to continue" msgstr "" -#: ../docs/iptv.sh:40862 ../docs/iptv.sh:40994 ../docs/iptv.sh:41126 -#: ../docs/iptv.sh:41688 +#: ../docs/iptv.sh:40954 ../docs/iptv.sh:41086 ../docs/iptv.sh:41218 +#: ../docs/iptv.sh:41780 msgid "Do you want to continue" msgstr "" -#: ../docs/iptv.sh:41823 +#: ../docs/iptv.sh:41915 msgid "Installing mono, it takes awhile. Do you want to continue" msgstr "" -#: ../docs/iptv.sh:43583 +#: ../docs/iptv.sh:43683 msgid "Not installed, start installing now" msgstr "" -#: ../docs/iptv.sh:43599 +#: ../docs/iptv.sh:43699 #, sh-format msgid "Use proxy $d_proxy: " msgstr "" -#: ../docs/iptv.sh:43625 +#: ../docs/iptv.sh:43725 #, sh-format msgid "Use xtream codes proxy $d_xc_proxy: " msgstr "" -#: ../docs/iptv.sh:43803 +#: ../docs/iptv.sh:43903 #, sh-format msgid "$error push link not set..." msgstr "" -#: ../docs/iptv.sh:43824 +#: ../docs/iptv.sh:43924 #, sh-format msgid "$info channel added successfully" msgstr "" diff --git a/iptv.sh b/iptv.sh index 9ef1017..4df111a 100755 --- a/iptv.sh +++ b/iptv.sh @@ -21083,6 +21083,8 @@ NginxDomainInstallCert() fi fi + AcmeCheck + Println "$info 安装 $domain 证书..." NginxDomainUpdateCrt "$domain" 1 @@ -21466,7 +21468,16 @@ NginxRestart() Println "$error 请检查配置错误\n" exit 1 fi - if systemctl restart $nginx_name + echo + nginx_actions=( '重载配置' '强制重启' ) + inquirer list_input_index "选择操作" nginx_actions nginx_actions_index + if [ "$nginx_actions_index" -eq 0 ] + then + nginx_action=reload-or-restart + else + nginx_action=restart + fi + if systemctl $nginx_action $nginx_name then Println "$info $nginx_name 重启成功\n" else @@ -21871,6 +21882,7 @@ NginxConfigDomain() NginxConfigDirective level_2 elif [ "$domain_server_options_index" -eq 1 ] then + AcmeCheck NginxDomainServerUpdateCrt elif [ "$domain_server_options_index" -eq 2 ] then @@ -24187,19 +24199,80 @@ NginxConfigBlockAliyun() fi } -NginxDomainUpdateCrt() +AcmeCheck() { - local domain=$1 quiet=${2:-0} - - [ "$quiet" -eq 0 ] && Println "$info 更新 $domain 证书..." + [ -n "${ca_server:-}" ] && return 0 if [ ! -f "$HOME/.acme.sh/acme.sh" ] then DepInstall socat - bash <(curl -s -m 20 https://get.acme.sh) > /dev/null + { curl -s -m 10 https://get.acme.sh || curl -s -m 20 "$FFMPEG_MIRROR_LINK/acme.sh"; } \ + | sed "s+https://raw.githubusercontent.com/acmesh-official+$FFMPEG_MIRROR_LINK/acmesh-content+g" \ + | sed "s+| sh+| sed 's~PROJECT=\"https://github.com/acmesh-official~PROJECT=\"$FFMPEG_MIRROR_LINK/acmesh-project~' | sed 's~https://api.github.com~$FFMPEG_MIRROR_LINK/acmesh-api~g' | sh+g" | bash + fi + + Println "$tip zerossl 不支持 tls-alpn-01" + ca_options=( letsencrypt zerossl ) + inquirer list_input "选择 CA" ca_options ca_server + + if [ "$ca_server" == "zerossl" ] + then + if [ -e ~/.acme.sh/ca/acme.zerossl.com/ca.conf ] + then + . ~/.acme.sh/ca/acme.zerossl.com/ca.conf + fi + + if [ -n "${CA_EAB_KEY_ID:-}" ] && [ -n "${CA_EAB_HMAC_KEY:-}" ] + then + Println "$tip 请确保已有账号的 EAB 认证信息未过期, 否则请重新设置" + inquirer list_input "是否重新设置 zerossl 账号" ny_options yn_option + if [ "$yn_option" == "$i18n_no" ] + then + return 0 + fi + fi + + echo + zerossl_options=( '注册新账号' '输入已有账号的 EAB 认证信息' ) + inquirer list_input_index "未发现 zerossl 账号" zerossl_options zerossl_options_index + + if [ "$zerossl_options_index" -eq 0 ] + then + echo + inquirer text_input "输入邮箱: " zerossl_email "$i18n_cancel" + ExitOnCancel zerossl_email + + if ! ~/.acme.sh/acme.sh --register-account -m "$zerossl_email" --server zerossl + then + Println "$error 注册账号失败, 请稍后再试或前往官网注册 https://app.zerossl.com/signup?fpr=iptv-sh \n" + exit 1 + fi + else + Println "$tip 可以在 https://app.zerossl.com/developer?fpr=iptv-sh 页面获取" + inquirer text_input "输入 EAB KID: " zerossl_eab_kid "$i18n_cancel" + ExitOnCancel zerossl_eab_kid + echo + inquirer text_input "输入 EAB HMAC Key: " zerossl_eab_hmac_key "$i18n_cancel" + ExitOnCancel zerossl_eab_hmac_key + + if ! ~/.acme.sh/acme.sh --register-account --server zerossl --eab-kid "$zerossl_eab_kid" --eab-hmac-key "$zerossl_eab_hmac_key" + then + Println "$error 注册账号失败, 请确保输入正确\n" + exit 1 + fi + fi + + Println "$info 账号注册成功\n" fi +} + +NginxDomainUpdateCrt() +{ + local domain=$1 quiet=${2:-0} + + [ "$quiet" -eq 0 ] && Println "$info 更新 $domain 证书..." - if [ -f /etc/systemd/system/mmproxy-acme.service ] && [[ $(systemctl is-active mmproxy-acme) == "active" ]] + if [ "$ca_server" == "letsencrypt" ] && [ -f /etc/systemd/system/mmproxy-acme.service ] && [[ $(systemctl is-active mmproxy-acme) == "active" ]] then if [ -z "${tls_port:-}" ] then @@ -24214,7 +24287,7 @@ NginxDomainUpdateCrt() fi fi - ~/.acme.sh/acme.sh --force --issue --alpn --tlsport "$tls_port" -d "$domain" --standalone -k ec-256 > /dev/null + ~/.acme.sh/acme.sh --force --issue --alpn --tlsport "$tls_port" -d "$domain" --standalone -k ec-256 --server "$ca_server" > /dev/null ~/.acme.sh/acme.sh --force --installcert -d "$domain" --fullchainpath "$nginx_prefix/conf/sites_crt/$domain.crt" --keypath "$nginx_prefix/conf/sites_crt/$domain.key" --ecc > /dev/null else stopped=0 @@ -24227,12 +24300,24 @@ NginxDomainUpdateCrt() sleep 1 - ~/.acme.sh/acme.sh --force --issue -d "$domain" --standalone -k ec-256 > /dev/null + ~/.acme.sh/acme.sh --force --issue -d "$domain" --standalone -k ec-256 --server "$ca_server" > /dev/null ~/.acme.sh/acme.sh --force --installcert -d "$domain" --fullchainpath "$nginx_prefix/conf/sites_crt/$domain.crt" --keypath "$nginx_prefix/conf/sites_crt/$domain.key" --ecc > /dev/null [ "$stopped" -eq 1 ] && systemctl start $nginx_name fi + if [ -e "/usr/local/share/v2ray/$domain.crt" ] + then + cp -f "$nginx_prefix/conf/sites_crt/$domain.crt" "/usr/local/share/v2ray/$domain.crt" + cp -f "$nginx_prefix/conf/sites_crt/$domain.key" "/usr/local/share/v2ray/$domain.key" + fi + + if [ -e "/usr/local/share/xray/$domain.crt" ] + then + cp -f "$nginx_prefix/conf/sites_crt/$domain.crt" "/usr/local/share/xray/$domain.crt" + cp -f "$nginx_prefix/conf/sites_crt/$domain.key" "/usr/local/share/xray/$domain.key" + fi + [ "$quiet" -eq 0 ] && Println "$info $domain 证书更新成功\n" return 0 @@ -25775,7 +25860,7 @@ V2raySetCertificates() fi if [ "$crt_option" == "添加域名" ] then - Println "$tip 如果证书不存在需请求新 CA 证书, 请确保没有程序占用 80 端口" + Println "$tip 如果证书不存在需请求新 CA 证书, 请确保没有程序占用 80 端口或已经设置 mmproxy acme" inquirer text_input "输入域名: " domain "$i18n_cancel" ExitOnCancel domain if [ ! -s "/usr/local/share/$v2ray_name/$domain.crt" ] @@ -25789,11 +25874,13 @@ V2raySetCertificates() cp -f "/usr/local/openresty/nginx/conf/sites_crt/$domain.crt" "/usr/local/share/$v2ray_name/$domain.crt" cp -f "/usr/local/openresty/nginx/conf/sites_crt/$domain.key" "/usr/local/share/$v2ray_name/$domain.key" else - Println "$info 安装证书..." + AcmeCheck + + Println "$info 安装 $domain 证书..." - V2rayDomainUpdateCrt "$domain" 1 + V2rayDomainUpdateCrt "$domain" - Println "$info 证书安装成功" + Println "$info $domain 证书安装成功" fi fi chown $v2ray_name:$v2ray_name /usr/local/share/$v2ray_name/* @@ -30374,17 +30461,9 @@ V2rayListInboundDomains() V2rayDomainUpdateCrt() { - local domain=$1 quiet=${2:-0} - - [ "$quiet" -eq 0 ] && Println "$info 更新 $domain 证书..." - - if [ ! -f "$HOME/.acme.sh/acme.sh" ] - then - DepInstall socat - bash <(curl -s -m 20 https://get.acme.sh) > /dev/null - fi + local domain=$1 - if [ -f /etc/systemd/system/mmproxy-acme.service ] && [[ $(systemctl is-active mmproxy-acme) == "active" ]] + if [ "$ca_server" == "letsencrypt" ] && [ -f /etc/systemd/system/mmproxy-acme.service ] && [[ $(systemctl is-active mmproxy-acme) == "active" ]] then if [ -z "${tls_port:-}" ] then @@ -30399,7 +30478,7 @@ V2rayDomainUpdateCrt() fi fi - ~/.acme.sh/acme.sh --force --issue --alpn --tlsport "$tls_port" -d "$domain" --standalone -k ec-256 > /dev/null + ~/.acme.sh/acme.sh --force --issue --alpn --tlsport "$tls_port" -d "$domain" --standalone -k ec-256 --server "$ca_server" > /dev/null ~/.acme.sh/acme.sh --force --installcert -d "$domain" --fullchainpath "/usr/local/share/$v2ray_name/$domain.crt" --keypath "/usr/local/share/$v2ray_name/$domain.key" --ecc > /dev/null else stopped=0 @@ -30415,13 +30494,23 @@ V2rayDomainUpdateCrt() sleep 1 fi - ~/.acme.sh/acme.sh --force --issue -d "$domain" --standalone -k ec-256 > /dev/null + ~/.acme.sh/acme.sh --force --issue -d "$domain" --standalone -k ec-256 --server "$ca_server" > /dev/null ~/.acme.sh/acme.sh --force --installcert -d "$domain" --fullchainpath "/usr/local/share/$v2ray_name/$domain.crt" --keypath "/usr/local/share/$v2ray_name/$domain.key" --ecc > /dev/null [ "$stopped" -eq 1 ] && systemctl start $nginx_name fi - [ "$quiet" -eq 0 ] && Println "$info $domain 证书更新成功\n" + if [ -e "/usr/local/nginx/conf/sites_crt/$domain.crt" ] + then + cp -f "/usr/local/share/$v2ray_name/$domain.crt" "/usr/local/nginx/conf/sites_crt/$domain.crt" + cp -f "/usr/local/share/$v2ray_name/$domain.key" "/usr/local/nginx/conf/sites_crt/$domain.key" + fi + + if [ -e "/usr/local/openresty/nginx/conf/sites_crt/$domain.crt" ] + then + cp -f "/usr/local/share/$v2ray_name/$domain.crt" "/usr/local/openresty/nginx/conf/sites_crt/$domain.crt" + cp -f "/usr/local/share/$v2ray_name/$domain.key" "/usr/local/openresty/nginx/conf/sites_crt/$domain.key" + fi return 0 } @@ -30593,6 +30682,7 @@ V2rayNginxSelectDomainServerProxy() exit 1 ;; $v2ray_nginx_domain_server_update_crt_number) + AcmeCheck V2rayNginxDomainServerUpdateCrt exit 0 ;; @@ -30994,9 +31084,11 @@ V2rayConfigDomain() echo inquirer text_input "请输入证书域名: " certificate_domain "$certificate_name" + AcmeCheck + Println "$info 更新 $certificate_domain 证书..." - V2rayDomainUpdateCrt "$certificate_domain" 1 + V2rayDomainUpdateCrt "$certificate_domain" jq_path='["inbounds",'"$inbounds_index"',"streamSettings","'"$tls_settings_name"'","certificates",'"$certificates_index"',"certificateFile"]' JQ update "$V2_CONFIG" "/usr/local/share/$v2ray_name/$certificate_domain.crt" @@ -43324,6 +43416,14 @@ then Println "$error v2ray install-release.sh 下载出错, 无法连接 github ?" fi + Println "$info 下载 acme.sh ..." + if curl -s -L https://get.acme.sh -o "$FFMPEG_MIRROR_ROOT/acme.sh_tmp" + then + mv "$FFMPEG_MIRROR_ROOT/acme.sh_tmp" "$FFMPEG_MIRROR_ROOT/acme.sh" + else + Println "$error acme.sh 下载出错, 无法连接 github ?" + fi + locale_options=( en ) mkdir -p "$FFMPEG_MIRROR_ROOT/locale/po/"