From a1781d53826c8595f4ea39c8262ed472c8adaa46 Mon Sep 17 00:00:00 2001 From: woniuzfb <47843848+woniuzfb@users.noreply.github.com> Date: Fri, 3 Dec 2021 16:02:50 +0800 Subject: [PATCH] fix: alidns, add dnspod-doh --- docs/iptv.sh | 79 +++++++----- i18n/iptv.sh.pot | 312 +++++++++++++++++++++++------------------------ iptv.sh | 79 +++++++----- 3 files changed, 248 insertions(+), 222 deletions(-) diff --git a/docs/iptv.sh b/docs/iptv.sh index 13fabab..42bd1de 100755 --- a/docs/iptv.sh +++ b/docs/iptv.sh @@ -6156,7 +6156,7 @@ HlsStreamCreatorPlus() hls_master_list="$hls_master_list#EXT-X-STREAM-INF:BANDWIDTH=${stream_urls_bitrate[stream_urls_index]},AVERAGE-BANDWIDTH=${stream_urls_bitrate[stream_urls_index]},RESOLUTION=${stream_urls_resolution[stream_urls_index]}" - if [ -n "${stream_urls_audio[stream_urls_index]}" ] + if [ -n "${stream_urls_audio[stream_urls_index]:-}" ] then if [ "${stream_url_audio_count:-0}" -gt 0 ] then @@ -6174,7 +6174,7 @@ HlsStreamCreatorPlus() var_stream_map="$var_stream_map,a:$i" fi - if [ -n "${stream_urls_subtitles[stream_urls_index]}" ] && [ "${stream_url_subtitles_count:-0}" -gt 0 ] + if [ -n "${stream_urls_subtitles[stream_urls_index]:-}" ] && [ "${stream_url_subtitles_count:-0}" -gt 0 ] then for stream_url_subtitles_index in "${stream_url_subtitles_indices[@]}" do @@ -6908,7 +6908,7 @@ HlsStreamCreatorPlus() chnl_hls_master_list="$chnl_hls_master_list#EXT-X-STREAM-INF:BANDWIDTH=${chnl_stream_urls_bitrate[chnl_stream_urls_index]},AVERAGE-BANDWIDTH=${chnl_stream_urls_bitrate[chnl_stream_urls_index]},RESOLUTION=${chnl_stream_urls_resolution[chnl_stream_urls_index]}" - if [ -n "${chnl_stream_urls_audio[chnl_stream_urls_index]}" ] + if [ -n "${chnl_stream_urls_audio[chnl_stream_urls_index]:-}" ] then if [ "${chnl_stream_url_audio_count:-0}" -gt 0 ] then @@ -6926,7 +6926,7 @@ HlsStreamCreatorPlus() chnl_var_stream_map="$chnl_var_stream_map,a:$i" fi - if [ -n "${chnl_stream_urls_subtitles[chnl_stream_urls_index]}" ] && [ "${chnl_stream_url_subtitles_count:-0}" -gt 0 ] + if [ -n "${chnl_stream_urls_subtitles[chnl_stream_urls_index]:-}" ] && [ "${chnl_stream_url_subtitles_count:-0}" -gt 0 ] then for chnl_stream_url_subtitles_index in "${chnl_stream_url_subtitles_indices[@]}" do @@ -8393,7 +8393,7 @@ ParseHlsStreamLink() if [[ $stream_link =~ \.m3u8 ]] then is_hls=true - elif [[ $stream_link =~ \.flv ]] || [[ $stream_link =~ \.ts ]] + elif [[ $stream_link =~ \.flv ]] || [[ $stream_link =~ \.ts ]] || [[ $stream_link == *"4gtv.tv/"* ]] then is_hls=false else @@ -28278,6 +28278,14 @@ AcmeCheck() { 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 + else + echo + inquirer list_input_index "更新 acme.sh" ny_options ny_options_index + + if [ "$ny_options_index" -eq 1 ] + then + ~/.acme.sh/acme.sh --upgrade + fi fi Println "$tip zerossl 不支持 tls-alpn-01" @@ -44966,6 +44974,17 @@ PveSelectVM() done } +DNSCryptConfig() +{ + sed -i "0,/.*\[static\..*/s//\[static\.\'alidns-doh-fix\'\]/" dnscrypt-proxy.toml + sed -i "0,/.*stamp = .*/s//stamp = \'sdns:\/\/AgAAAAAAAAAACTIyMy41LjUuNSCY49XlNq8pWM0vfxT3BO9KJ20l4zzWXy5l9eTycnwTMA5kbnMuYWxpZG5zLmNvbQovZG5zLXF1ZXJ5\'/" dnscrypt-proxy.toml + sed -i "0,/.*server_names = \[.*/s//server_names = ['dnspod-doh','alidns-doh-fix']/" dnscrypt-proxy.toml + sed -i "0,/^listen_addresses = .*/s//listen_addresses = ['[::]:${listen_port:-53}']/" dnscrypt-proxy.toml + sed -i "0,/.*require_dnssec = .*/s//require_dnssec = true/" dnscrypt-proxy.toml + sed -i "0,/.*bootstrap_resolvers =.*/s//bootstrap_resolvers = ['114.114.114.114:53', '8.8.8.8:53']/" dnscrypt-proxy.toml + sed -i "0,/.*netprobe_address =.*/s//netprobe_address = '114.114.114.114:53'/" dnscrypt-proxy.toml +} + Menu() { color=${color:-${green}} @@ -46311,10 +46330,7 @@ $HOME/ip.sh" > /etc/rc.local if [ "$ny_option" == "$i18n_yes" ] then - sed -i "0,/.*server_names = \[.*/s//server_names = ['alidns-doh']/" dnscrypt-proxy.toml - sed -i "0,/.*require_dnssec = .*/s//require_dnssec = true/" dnscrypt-proxy.toml - sed -i "0,/.*bootstrap_resolvers =.*/s//bootstrap_resolvers = ['114.114.114.114:53', '8.8.8.8:53']/" dnscrypt-proxy.toml - sed -i "0,/.*netprobe_address =.*/s//netprobe_address = '114.114.114.114:53'/" dnscrypt-proxy.toml + DNSCryptConfig else sed -i "0,/.*server_names = \[.*/s//server_names = ['google', 'cloudflare']/" dnscrypt-proxy.toml fi @@ -46371,6 +46387,7 @@ $HOME/ip.sh" > /etc/rc.local rm -f /etc/resolv.conf echo "$etc_resolv" > /etc/resolv.conf fi + cd ~/dnscrypt-$dnscrypt_version_old ./dnscrypt-proxy -service stop > /dev/null ./dnscrypt-proxy -service uninstall > /dev/null @@ -46380,15 +46397,14 @@ $HOME/ip.sh" > /etc/rc.local mv linux-$arch dnscrypt-$dnscrypt_version cd dnscrypt-$dnscrypt_version cp -f example-dnscrypt-proxy.toml dnscrypt-proxy.toml + if [ "$ny_option" == "$i18n_yes" ] then - sed -i "0,/.*server_names = \[.*/s//server_names = ['alidns-doh']/" dnscrypt-proxy.toml - sed -i "0,/.*require_dnssec = .*/s//require_dnssec = true/" dnscrypt-proxy.toml - sed -i "0,/.*bootstrap_resolvers =.*/s//bootstrap_resolvers = ['114.114.114.114:53', '8.8.8.8:53']/" dnscrypt-proxy.toml - sed -i "0,/.*netprobe_address =.*/s//netprobe_address = '114.114.114.114:53'/" dnscrypt-proxy.toml + DNSCryptConfig else sed -i "0,/.*server_names = \[.*/s//server_names = ['google', 'cloudflare']/" dnscrypt-proxy.toml fi + ./dnscrypt-proxy -service install > /dev/null ./dnscrypt-proxy -service start > /dev/null Println "$info dnscrypt proxy 升级成功\n" @@ -46887,6 +46903,7 @@ then then Spinner "编译安装 JQ, 耗时可能会很长" JQInstall fi + if dnscrypt_version=$(curl -s -Lm 10 "$FFMPEG_MIRROR_LINK/dnscrypt.json" | $JQ_FILE -r '.tag_name') then DNSCRYPT_ROOT=$(dirname ~/dnscrypt-*/dnscrypt-proxy | sort | tail -1) @@ -46972,11 +46989,7 @@ addr-gen-mode=stable-privacy dns-search= method=ignore" > /etc/NetworkManager/system-connections/armbian.nmconnection - sed -i "0,/.*server_names = \[.*/s//server_names = ['alidns-doh']/" dnscrypt-proxy.toml - sed -i "0,/^listen_addresses = .*/s//listen_addresses = ['[::]:$listen_port']/" dnscrypt-proxy.toml - sed -i "0,/.*require_dnssec = .*/s//require_dnssec = true/" dnscrypt-proxy.toml - sed -i "0,/.*bootstrap_resolvers =.*/s//bootstrap_resolvers = ['114.114.114.114:53', '8.8.8.8:53']/" dnscrypt-proxy.toml - sed -i "0,/.*netprobe_address =.*/s//netprobe_address = '114.114.114.114:53'/" dnscrypt-proxy.toml + DNSCryptConfig for((i=0;i<3;i++)); do @@ -47060,11 +47073,9 @@ method=ignore" > /etc/NetworkManager/system-connections/armbian.nmconnection mv linux-arm64 dnscrypt-$dnscrypt_version cd dnscrypt-$dnscrypt_version cp -f example-dnscrypt-proxy.toml dnscrypt-proxy.toml - sed -i "0,/.*server_names = \[.*/s//server_names = ['alidns-doh']/" dnscrypt-proxy.toml - sed -i "0,/^listen_addresses = .*/s//listen_addresses = ['[::]:$listen_port']/" dnscrypt-proxy.toml - sed -i "0,/.*require_dnssec = .*/s//require_dnssec = true/" dnscrypt-proxy.toml - sed -i "0,/.*bootstrap_resolvers =.*/s//bootstrap_resolvers = ['114.114.114.114:53', '8.8.8.8:53']/" dnscrypt-proxy.toml - sed -i "0,/.*netprobe_address =.*/s//netprobe_address = '114.114.114.114:53'/" dnscrypt-proxy.toml + + DNSCryptConfig + ./dnscrypt-proxy -service install > /dev/null ./dnscrypt-proxy -service start > /dev/null @@ -47711,6 +47722,13 @@ fi' > /etc/NetworkManager/dispatcher.d/90-promisc.sh echo "$ip" >> /etc/v2ray/directlist.txt fi done + for ip in $(resolveip doh.pub) + do + if ! grep -q "$ip" < /etc/v2ray/directlist.txt + then + echo "$ip" >> /etc/v2ray/directlist.txt + fi + done ' Println "$info 配置切换成功\n" fi @@ -48198,11 +48216,7 @@ then cd dnscrypt-$dnscrypt_version cp -f example-dnscrypt-proxy.toml dnscrypt-proxy.toml - sed -i "0,/.*server_names = \[.*/s//server_names = ['alidns-doh']/" dnscrypt-proxy.toml - sed -i "0,/^listen_addresses = .*/s//listen_addresses = ['[::]:$listen_port']/" dnscrypt-proxy.toml - sed -i "0,/.*require_dnssec = .*/s//require_dnssec = true/" dnscrypt-proxy.toml - sed -i "0,/.*bootstrap_resolvers =.*/s//bootstrap_resolvers = ['114.114.114.114:53', '8.8.8.8:53']/" dnscrypt-proxy.toml - sed -i "0,/.*netprobe_address =.*/s//netprobe_address = '114.114.114.114:53'/" dnscrypt-proxy.toml + DNSCryptConfig for((i=0;i<3;i++)); do @@ -48254,6 +48268,7 @@ then rm -f /etc/resolv.conf echo "$etc_resolv" > /etc/resolv.conf fi + cd ~/dnscrypt-$dnscrypt_version_old ./dnscrypt-proxy -service stop > /dev/null ./dnscrypt-proxy -service uninstall > /dev/null @@ -48263,11 +48278,9 @@ then mv linux-x86_64 dnscrypt-$dnscrypt_version cd dnscrypt-$dnscrypt_version cp -f example-dnscrypt-proxy.toml dnscrypt-proxy.toml - sed -i "0,/.*server_names = \[.*/s//server_names = ['alidns-doh']/" dnscrypt-proxy.toml - sed -i "0,/^listen_addresses = .*/s//listen_addresses = ['[::]:$listen_port']/" dnscrypt-proxy.toml - sed -i "0,/.*require_dnssec = .*/s//require_dnssec = true/" dnscrypt-proxy.toml - sed -i "0,/.*bootstrap_resolvers =.*/s//bootstrap_resolvers = ['114.114.114.114:53', '8.8.8.8:53']/" dnscrypt-proxy.toml - sed -i "0,/.*netprobe_address =.*/s//netprobe_address = '114.114.114.114:53'/" dnscrypt-proxy.toml + + DNSCryptConfig + ./dnscrypt-proxy -service install > /dev/null ./dnscrypt-proxy -service start > /dev/null Println "$info dnscrypt proxy 升级成功\n" diff --git a/i18n/iptv.sh.pot b/i18n/iptv.sh.pot index 4afc033..46af2ff 100644 --- a/i18n/iptv.sh.pot +++ b/i18n/iptv.sh.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: iptv.sh 1.87.1\n" "Report-Msgid-Bugs-To: tg @woniuzfb\n" -"POT-Creation-Date: 2021-11-28 12:20+0000\n" +"POT-Creation-Date: 2021-12-03 10:28+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -742,13 +742,13 @@ msgid "old link detected. Do you want to replace it with this new link" msgstr "" #: ../docs/iptv.sh:20070 ../docs/iptv.sh:25922 ../docs/iptv.sh:26245 -#: ../docs/iptv.sh:28426 ../docs/iptv.sh:28465 ../docs/iptv.sh:28852 -#: ../docs/iptv.sh:33199 ../docs/iptv.sh:34641 ../docs/iptv.sh:36173 -#: ../docs/iptv.sh:36198 ../docs/iptv.sh:36300 ../docs/iptv.sh:38665 -#: ../docs/iptv.sh:41139 ../docs/iptv.sh:44724 ../docs/iptv.sh:44772 -#: ../docs/iptv.sh:45004 ../docs/iptv.sh:45839 ../docs/iptv.sh:45977 -#: ../docs/iptv.sh:46527 ../docs/iptv.sh:46672 ../docs/iptv.sh:46828 -#: ../docs/iptv.sh:47856 +#: ../docs/iptv.sh:28434 ../docs/iptv.sh:28473 ../docs/iptv.sh:28860 +#: ../docs/iptv.sh:33207 ../docs/iptv.sh:34649 ../docs/iptv.sh:36181 +#: ../docs/iptv.sh:36206 ../docs/iptv.sh:36308 ../docs/iptv.sh:38673 +#: ../docs/iptv.sh:41147 ../docs/iptv.sh:44732 ../docs/iptv.sh:44780 +#: ../docs/iptv.sh:45023 ../docs/iptv.sh:45858 ../docs/iptv.sh:45996 +#: ../docs/iptv.sh:46543 ../docs/iptv.sh:46688 ../docs/iptv.sh:46844 +#: ../docs/iptv.sh:47874 msgid "Input No." msgstr "" @@ -772,600 +772,600 @@ msgstr "" msgid "$nginx_name is stopped, starting now" msgstr "" -#: ../docs/iptv.sh:29529 ../docs/iptv.sh:36752 +#: ../docs/iptv.sh:29537 ../docs/iptv.sh:36760 msgid "override old installation" msgstr "" -#: ../docs/iptv.sh:33171 +#: ../docs/iptv.sh:33179 msgid "print QR code" msgstr "" -#: ../docs/iptv.sh:36003 +#: ../docs/iptv.sh:36011 msgid "reset all traffic stats" msgstr "" -#: ../docs/iptv.sh:38148 +#: ../docs/iptv.sh:38156 msgid "Deleting this domain anyway. Also remove domain from official website to add this domain again" msgstr "" -#: ../docs/iptv.sh:38196 +#: ../docs/iptv.sh:38204 msgid "Do you want to delete all domains added with this CFP" msgstr "" -#: ../docs/iptv.sh:38455 +#: ../docs/iptv.sh:38463 msgid "Updating this token" msgstr "" -#: ../docs/iptv.sh:38971 +#: ../docs/iptv.sh:38979 msgid "directory already exits, add anyway" msgstr "" -#: ../docs/iptv.sh:42770 +#: ../docs/iptv.sh:42778 msgid "Deleting IBM CF CLI, do you want to continue" msgstr "" -#: ../docs/iptv.sh:44718 ../docs/iptv.sh:44753 +#: ../docs/iptv.sh:44726 ../docs/iptv.sh:44761 msgid "VIP manager" msgstr "" -#: ../docs/iptv.sh:44720 ../docs/iptv.sh:44758 +#: ../docs/iptv.sh:44728 ../docs/iptv.sh:44766 msgid "View VIP channels" msgstr "" -#: ../docs/iptv.sh:44721 +#: ../docs/iptv.sh:44729 msgid "Input VIP auth code" msgstr "" -#: ../docs/iptv.sh:44723 ../docs/iptv.sh:44771 +#: ../docs/iptv.sh:44731 ../docs/iptv.sh:44779 #, sh-format msgid "$tip cmd: h => HLS manager, f => FLV manager" msgstr "" -#: ../docs/iptv.sh:44747 +#: ../docs/iptv.sh:44755 #, sh-format msgid "$error Intall first with cmd: tv" msgstr "" -#: ../docs/iptv.sh:44755 +#: ../docs/iptv.sh:44763 msgid "View VIP user" msgstr "" -#: ../docs/iptv.sh:44756 +#: ../docs/iptv.sh:44764 msgid "Add VIP user" msgstr "" -#: ../docs/iptv.sh:44757 +#: ../docs/iptv.sh:44765 msgid "Config VIP user" msgstr "" -#: ../docs/iptv.sh:44759 +#: ../docs/iptv.sh:44767 msgid "Add VIP channel" msgstr "" -#: ../docs/iptv.sh:44760 +#: ../docs/iptv.sh:44768 msgid "Deploy VIP channel" msgstr "" -#: ../docs/iptv.sh:44761 +#: ../docs/iptv.sh:44769 msgid "Config VIP channel" msgstr "" -#: ../docs/iptv.sh:44762 +#: ../docs/iptv.sh:44770 msgid "View VIP server" msgstr "" -#: ../docs/iptv.sh:44763 +#: ../docs/iptv.sh:44771 msgid "Add VIP server" msgstr "" -#: ../docs/iptv.sh:44764 +#: ../docs/iptv.sh:44772 msgid "Config VIP server" msgstr "" -#: ../docs/iptv.sh:44765 +#: ../docs/iptv.sh:44773 msgid "Delete VIP user" msgstr "" -#: ../docs/iptv.sh:44766 +#: ../docs/iptv.sh:44774 msgid "Delete VIP channel" msgstr "" -#: ../docs/iptv.sh:44767 +#: ../docs/iptv.sh:44775 msgid "Delete VIP server" msgstr "" -#: ../docs/iptv.sh:44768 +#: ../docs/iptv.sh:44776 msgid "Enable VIP" msgstr "" -#: ../docs/iptv.sh:44769 +#: ../docs/iptv.sh:44777 msgid "Disable VIP" msgstr "" -#: ../docs/iptv.sh:44871 +#: ../docs/iptv.sh:44879 msgid "Installing vim-plug and overriding ~/.vimrc, do you want to continue" msgstr "" -#: ../docs/iptv.sh:44976 +#: ../docs/iptv.sh:44995 msgid "cmd: f => FLV manager, v => VIP manager" msgstr "" -#: ../docs/iptv.sh:44980 +#: ../docs/iptv.sh:44999 msgid "cmd: h => HLS manager, v => VIP manager" msgstr "" -#: ../docs/iptv.sh:44985 +#: ../docs/iptv.sh:45004 msgid "IPTV manager" msgstr "" -#: ../docs/iptv.sh:44987 +#: ../docs/iptv.sh:45006 msgid "Install" msgstr "" -#: ../docs/iptv.sh:44988 +#: ../docs/iptv.sh:45007 msgid "Uninstall" msgstr "" -#: ../docs/iptv.sh:44989 +#: ../docs/iptv.sh:45008 msgid "Update" msgstr "" -#: ../docs/iptv.sh:44991 +#: ../docs/iptv.sh:45010 msgid "View channel" msgstr "" -#: ../docs/iptv.sh:44992 +#: ../docs/iptv.sh:45011 msgid "Add channel" msgstr "" -#: ../docs/iptv.sh:44993 +#: ../docs/iptv.sh:45012 msgid "Config channel" msgstr "" -#: ../docs/iptv.sh:44994 +#: ../docs/iptv.sh:45013 msgid "Toggle channel" msgstr "" -#: ../docs/iptv.sh:44995 +#: ../docs/iptv.sh:45014 msgid "Restart channel" msgstr "" -#: ../docs/iptv.sh:44996 +#: ../docs/iptv.sh:45015 msgid "View logs" msgstr "" -#: ../docs/iptv.sh:44997 +#: ../docs/iptv.sh:45016 msgid "Delete channel" msgstr "" -#: ../docs/iptv.sh:44998 +#: ../docs/iptv.sh:45017 msgid "Config schedule" msgstr "" -#: ../docs/iptv.sh:44999 +#: ../docs/iptv.sh:45018 msgid "Config monitor" msgstr "" -#: ../docs/iptv.sh:45000 +#: ../docs/iptv.sh:45019 msgid "Config default" msgstr "" -#: ../docs/iptv.sh:45002 +#: ../docs/iptv.sh:45021 #, sh-format msgid "$tip now: ${green}$title${normal} manager" msgstr "" -#: ../docs/iptv.sh:45052 +#: ../docs/iptv.sh:45071 msgid "Usage: tv -i [input stream] [-s segment length(s)] [-o output directory name] [-c segments count] [-b bitrate] [-r resolution] [-p HLS playlist name] [-C] [-R] [-l] [-P http_proxy]" msgstr "" -#: ../docs/iptv.sh:45053 +#: ../docs/iptv.sh:45072 msgid " -i input stream(support mpegts / hls / flv / youtube ...)" msgstr "" -#: ../docs/iptv.sh:45054 +#: ../docs/iptv.sh:45073 msgid "can be path to local video" msgstr "" -#: ../docs/iptv.sh:45055 +#: ../docs/iptv.sh:45074 msgid "you can input multiple stream links, separate with space" msgstr "" -#: ../docs/iptv.sh:45056 +#: ../docs/iptv.sh:45075 msgid " -s segment length(s)(default: 6)" msgstr "" -#: ../docs/iptv.sh:45057 +#: ../docs/iptv.sh:45076 msgid " -o output directory name(default: random)" msgstr "" -#: ../docs/iptv.sh:45059 +#: ../docs/iptv.sh:45078 msgid " -l not live stream, in this case it can't be monitored nor set segments number(default: no)" msgstr "" -#: ../docs/iptv.sh:45060 +#: ../docs/iptv.sh:45079 msgid " -P http proxy for FFmpeg, apply to http input stream(default: no)" msgstr "" -#: ../docs/iptv.sh:45062 +#: ../docs/iptv.sh:45081 msgid " -p HLS playlist name(default: random)" msgstr "" -#: ../docs/iptv.sh:45063 +#: ../docs/iptv.sh:45082 msgid " -c segments number in HLS playlist(default: 5)" msgstr "" -#: ../docs/iptv.sh:45064 +#: ../docs/iptv.sh:45083 msgid " -S sub directory for segments(default: no)" msgstr "" -#: ../docs/iptv.sh:45065 +#: ../docs/iptv.sh:45084 msgid " -t segments name(prefix)(default: same as playlist name)" msgstr "" -#: ../docs/iptv.sh:45066 +#: ../docs/iptv.sh:45085 msgid " -a audio codec(default: aac) (e.g. copy)" msgstr "" -#: ../docs/iptv.sh:45067 +#: ../docs/iptv.sh:45086 msgid " -v video codec(default: libx264) (e.g. copy)" msgstr "" -#: ../docs/iptv.sh:45068 +#: ../docs/iptv.sh:45087 msgid " -f video or audio delay(e.g. v_3 video delay 3 seconds, a_2 audio delay 2 seconds)" msgstr "" -#: ../docs/iptv.sh:45069 +#: ../docs/iptv.sh:45088 msgid " -d convert dvb teletext, options: text,ass (default: no)" msgstr "" -#: ../docs/iptv.sh:45070 +#: ../docs/iptv.sh:45089 msgid " -q Constant Quality Factor. Multiple CRF can be separated by comma" msgstr "" -#: ../docs/iptv.sh:45071 +#: ../docs/iptv.sh:45090 msgid "If bitrate also set, use CRF" msgstr "" -#: ../docs/iptv.sh:45072 +#: ../docs/iptv.sh:45091 msgid "Values of ±6 will result in about half or twice the original bitrate" msgstr "" -#: ../docs/iptv.sh:45073 +#: ../docs/iptv.sh:45092 msgid "In H.264 and H.265, CRF ranges from 0 to 51" msgstr "" -#: ../docs/iptv.sh:45074 +#: ../docs/iptv.sh:45093 msgid "23 is the default for x264. 18 should be visually transparent" msgstr "" -#: ../docs/iptv.sh:45075 +#: ../docs/iptv.sh:45094 msgid "28 is the default for x265. 24 should be visually transparent" msgstr "" -#: ../docs/iptv.sh:45076 +#: ../docs/iptv.sh:45095 msgid "VP9 range from 0 to 63. Recommended values are from 15–35" msgstr "" -#: ../docs/iptv.sh:45077 +#: ../docs/iptv.sh:45096 msgid " -b bitrate(k)(multiple bitrates can be separated by comma, for example: 800,1000,1500)(default: 900)" msgstr "" -#: ../docs/iptv.sh:45078 +#: ../docs/iptv.sh:45097 msgid "If Constant Quality Factor (CRF) is set, use capped CRF" msgstr "" -#: ../docs/iptv.sh:45079 +#: ../docs/iptv.sh:45098 msgid "If Constant Quality Factor (CRF) not set, use ABR or CBR" msgstr "" -#: ../docs/iptv.sh:45080 +#: ../docs/iptv.sh:45099 msgid "input omit to skip this option" msgstr "" -#: ../docs/iptv.sh:45081 +#: ../docs/iptv.sh:45100 msgid " -r set video dimensions (for example: -b 800-640x360,1000-960x540,1500-1280x720)(default: 1280x720)" msgstr "" -#: ../docs/iptv.sh:45082 +#: ../docs/iptv.sh:45101 msgid " -C Contrained Encoding(if bitrate is set)(default: no)" msgstr "" -#: ../docs/iptv.sh:45083 +#: ../docs/iptv.sh:45102 msgid "If Constant Quality Factor (CRF) is set, use Contrained Encoding (capped CRF)" msgstr "" -#: ../docs/iptv.sh:45084 +#: ../docs/iptv.sh:45103 msgid "If Constant Quality Factor (CRF) is set, use Contrained Encoding (ABR)" msgstr "" -#: ../docs/iptv.sh:45085 +#: ../docs/iptv.sh:45104 msgid " -R Constant Bitrate (if -C is set)(default: no)" msgstr "" -#: ../docs/iptv.sh:45086 +#: ../docs/iptv.sh:45105 msgid " -e encrypt segments(default: no)" msgstr "" -#: ../docs/iptv.sh:45087 +#: ../docs/iptv.sh:45106 msgid " -K Key name(default: random)" msgstr "" -#: ../docs/iptv.sh:45088 +#: ../docs/iptv.sh:45107 msgid " -z channel name(default: same as playlist name)" msgstr "" -#: ../docs/iptv.sh:45089 +#: ../docs/iptv.sh:45108 msgid "push FLV stream instead of HLS" msgstr "" -#: ../docs/iptv.sh:45090 +#: ../docs/iptv.sh:45109 msgid " -k push stream kind, e.g. -k flv" msgstr "" -#: ../docs/iptv.sh:45091 +#: ../docs/iptv.sh:45110 msgid " -H push h265 stream(default: no)" msgstr "" -#: ../docs/iptv.sh:45092 +#: ../docs/iptv.sh:45111 msgid " -T push address, e.g. rtmp://127.0.0.1/flv/xxx" msgstr "" -#: ../docs/iptv.sh:45093 +#: ../docs/iptv.sh:45112 msgid " -L pull(play) address(default: omit). e.g. http://domain.com/flv?app=flv&stream=xxx" msgstr "" -#: ../docs/iptv.sh:45094 +#: ../docs/iptv.sh:45113 msgid " -m more input flags for FFmpeg" msgstr "" -#: ../docs/iptv.sh:45095 ../docs/iptv.sh:45101 +#: ../docs/iptv.sh:45114 ../docs/iptv.sh:45120 msgid "default:" msgstr "" -#: ../docs/iptv.sh:45098 +#: ../docs/iptv.sh:45117 msgid "If it's HLS input stream, remove -reconnect_at_eof 1" msgstr "" -#: ../docs/iptv.sh:45099 +#: ../docs/iptv.sh:45118 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:45100 +#: ../docs/iptv.sh:45119 msgid " -n output flags for FFmpeg, input omit to skip this option" msgstr "" -#: ../docs/iptv.sh:45103 +#: ../docs/iptv.sh:45122 msgid "Examples:" msgstr "" -#: ../docs/iptv.sh:45104 +#: ../docs/iptv.sh:45123 msgid "Use CRF to control video quality:" msgstr "" -#: ../docs/iptv.sh:45105 +#: ../docs/iptv.sh:45124 msgid "tv -i http://xxx.com/xxx.ts -s 6 -o hbo1 -p hbo1 -q 15 -b 1500 -r 1280x720 -z 'hbo stream 1'" msgstr "" -#: ../docs/iptv.sh:45106 +#: ../docs/iptv.sh:45125 msgid "Use bitrates to control video quality[default]:" msgstr "" -#: ../docs/iptv.sh:45107 +#: ../docs/iptv.sh:45126 msgid "tv -i http://xxx.com/xxx.ts -s 6 -o hbo2 -p hbo2 -b 900 -r 1280x720 -z 'hbo stream 2'" msgstr "" -#: ../docs/iptv.sh:45108 +#: ../docs/iptv.sh:45127 msgid "If no need converting:" msgstr "" -#: ../docs/iptv.sh:45109 +#: ../docs/iptv.sh:45128 msgid "Push FLV instead of HLS:" msgstr "" -#: ../docs/iptv.sh:45112 +#: ../docs/iptv.sh:45131 msgid "Shortcuts:" msgstr "" -#: ../docs/iptv.sh:45113 +#: ../docs/iptv.sh:45132 msgid "tv # open HLS manager" msgstr "" -#: ../docs/iptv.sh:45114 +#: ../docs/iptv.sh:45133 msgid "tv l # list all running channels" msgstr "" -#: ../docs/iptv.sh:45115 +#: ../docs/iptv.sh:45134 msgid "tv d # add demo channels" msgstr "" -#: ../docs/iptv.sh:45116 +#: ../docs/iptv.sh:45135 msgid "tv e # mannual editing channels.json" msgstr "" -#: ../docs/iptv.sh:45117 +#: ../docs/iptv.sh:45136 msgid "tv ee # mannual editing sync_file" msgstr "" -#: ../docs/iptv.sh:45118 +#: ../docs/iptv.sh:45137 msgid "tv f # open FLV manager" msgstr "" -#: ../docs/iptv.sh:45119 +#: ../docs/iptv.sh:45138 msgid "tv v # open VIP manager" msgstr "" -#: ../docs/iptv.sh:45120 +#: ../docs/iptv.sh:45139 msgid "tv m # start monitoring" msgstr "" -#: ../docs/iptv.sh:45121 +#: ../docs/iptv.sh:45140 msgid "tv m l [lines count] # view monitoring log" msgstr "" -#: ../docs/iptv.sh:45122 +#: ../docs/iptv.sh:45141 msgid "tv m s # stop monitoring" msgstr "" -#: ../docs/iptv.sh:45123 +#: ../docs/iptv.sh:45142 msgid "tv s # tv guide manager" msgstr "" -#: ../docs/iptv.sh:45124 +#: ../docs/iptv.sh:45143 msgid "tv 4g # 4gtv manager" msgstr "" -#: ../docs/iptv.sh:45125 +#: ../docs/iptv.sh:45144 msgid "tv FFmpeg # create mirror for FFmpeg" msgstr "" -#: ../docs/iptv.sh:45126 +#: ../docs/iptv.sh:45145 msgid "tv debug 1/0 # enable/disable debug" msgstr "" -#: ../docs/iptv.sh:45128 +#: ../docs/iptv.sh:45147 msgid "cx # open xtream codes accoutns/channels manager" msgstr "" -#: ../docs/iptv.sh:45130 +#: ../docs/iptv.sh:45149 msgid "v2 # open v2ray manager" msgstr "" -#: ../docs/iptv.sh:45131 +#: ../docs/iptv.sh:45150 msgid "v2 e # mannual editing config.json" msgstr "" -#: ../docs/iptv.sh:45133 +#: ../docs/iptv.sh:45152 msgid "x # open xray manager" msgstr "" -#: ../docs/iptv.sh:45134 +#: ../docs/iptv.sh:45153 msgid "x e # mannual editing config.json" msgstr "" -#: ../docs/iptv.sh:45136 +#: ../docs/iptv.sh:45155 msgid "nx # open nginx manager" msgstr "" -#: ../docs/iptv.sh:45138 +#: ../docs/iptv.sh:45157 msgid "or # open openresty manager" msgstr "" -#: ../docs/iptv.sh:45140 +#: ../docs/iptv.sh:45159 msgid "cf # open cloudflare partner / workers manager" msgstr "" -#: ../docs/iptv.sh:45141 +#: ../docs/iptv.sh:45160 msgid "cf w # open cloudflare workers manager" msgstr "" -#: ../docs/iptv.sh:45143 +#: ../docs/iptv.sh:45162 msgid "ibm # open IBM Cloud Foundry manager" msgstr "" -#: ../docs/iptv.sh:45144 +#: ../docs/iptv.sh:45163 msgid "ibm v2 # open ibm v2ray app manager" msgstr "" -#: ../docs/iptv.sh:45145 +#: ../docs/iptv.sh:45164 msgid "ibm x # open ibm xray app manager" msgstr "" -#: ../docs/iptv.sh:45147 +#: ../docs/iptv.sh:45166 msgid "arm # open Armbian manager" msgstr "" -#: ../docs/iptv.sh:45149 +#: ../docs/iptv.sh:45168 msgid "pve # open Proxmox VE manager" msgstr "" -#: ../docs/iptv.sh:45151 +#: ../docs/iptv.sh:45170 msgid "tv ed # choose default editor" msgstr "" -#: ../docs/iptv.sh:45153 +#: ../docs/iptv.sh:45172 msgid "tv a # creating custom commands" msgstr "" -#: ../docs/iptv.sh:45155 +#: ../docs/iptv.sh:45174 msgid "tv color # custom text and background color" msgstr "" -#: ../docs/iptv.sh:45157 +#: ../docs/iptv.sh:45176 msgid "tv c change/update language" msgstr "" -#: ../docs/iptv.sh:45167 +#: ../docs/iptv.sh:45186 msgid "Installation was not completed, do you want to reinstall" msgstr "" -#: ../docs/iptv.sh:45848 +#: ../docs/iptv.sh:45867 msgid "Compiling openresty, it takes awhile. Do you want to continue" msgstr "" -#: ../docs/iptv.sh:45986 +#: ../docs/iptv.sh:46005 msgid "Compiling nginx, it takes awhile. Do you want to continue" msgstr "" -#: ../docs/iptv.sh:46040 +#: ../docs/iptv.sh:46059 msgid "postfix exits. Do you want to reconfig smtp" msgstr "" -#: ../docs/iptv.sh:46248 ../docs/iptv.sh:47758 ../docs/iptv.sh:48589 +#: ../docs/iptv.sh:46267 ../docs/iptv.sh:47776 ../docs/iptv.sh:48602 msgid "Disable edns0" msgstr "" -#: ../docs/iptv.sh:46255 ../docs/iptv.sh:47766 ../docs/iptv.sh:48596 +#: ../docs/iptv.sh:46274 ../docs/iptv.sh:47784 ../docs/iptv.sh:48609 msgid "Enable edns0" msgstr "" -#: ../docs/iptv.sh:46632 +#: ../docs/iptv.sh:46648 #, sh-format msgid "$v2ray_name is running, stopping now" msgstr "" -#: ../docs/iptv.sh:46637 +#: ../docs/iptv.sh:46653 #, sh-format msgid "$v2ray_name is stopped, starting now" msgstr "" -#: ../docs/iptv.sh:46686 +#: ../docs/iptv.sh:46702 msgid "It takes awhile. Do you want to continue" msgstr "" -#: ../docs/iptv.sh:46836 +#: ../docs/iptv.sh:46852 msgid "This is for PHICOMM n1. Do you want to continue ?" msgstr "" -#: ../docs/iptv.sh:46901 ../docs/iptv.sh:47038 ../docs/iptv.sh:47213 -#: ../docs/iptv.sh:47807 +#: ../docs/iptv.sh:46918 ../docs/iptv.sh:47051 ../docs/iptv.sh:47224 +#: ../docs/iptv.sh:47825 msgid "Do you want to continue" msgstr "" -#: ../docs/iptv.sh:48062 +#: ../docs/iptv.sh:48080 msgid "Installing mono, it takes awhile. Do you want to continue" msgstr "" -#: ../docs/iptv.sh:49887 +#: ../docs/iptv.sh:49900 msgid "Not installed, start installing now" msgstr "" -#: ../docs/iptv.sh:49903 +#: ../docs/iptv.sh:49916 #, sh-format msgid "Use proxy $d_proxy: " msgstr "" -#: ../docs/iptv.sh:49929 +#: ../docs/iptv.sh:49942 #, sh-format msgid "Use xtream codes proxy $d_xc_proxy: " msgstr "" -#: ../docs/iptv.sh:50121 +#: ../docs/iptv.sh:50134 #, sh-format msgid "$error push link not set..." msgstr "" -#: ../docs/iptv.sh:50142 +#: ../docs/iptv.sh:50155 #, sh-format msgid "$info channel added successfully" msgstr "" diff --git a/iptv.sh b/iptv.sh index 13fabab..42bd1de 100755 --- a/iptv.sh +++ b/iptv.sh @@ -6156,7 +6156,7 @@ HlsStreamCreatorPlus() hls_master_list="$hls_master_list#EXT-X-STREAM-INF:BANDWIDTH=${stream_urls_bitrate[stream_urls_index]},AVERAGE-BANDWIDTH=${stream_urls_bitrate[stream_urls_index]},RESOLUTION=${stream_urls_resolution[stream_urls_index]}" - if [ -n "${stream_urls_audio[stream_urls_index]}" ] + if [ -n "${stream_urls_audio[stream_urls_index]:-}" ] then if [ "${stream_url_audio_count:-0}" -gt 0 ] then @@ -6174,7 +6174,7 @@ HlsStreamCreatorPlus() var_stream_map="$var_stream_map,a:$i" fi - if [ -n "${stream_urls_subtitles[stream_urls_index]}" ] && [ "${stream_url_subtitles_count:-0}" -gt 0 ] + if [ -n "${stream_urls_subtitles[stream_urls_index]:-}" ] && [ "${stream_url_subtitles_count:-0}" -gt 0 ] then for stream_url_subtitles_index in "${stream_url_subtitles_indices[@]}" do @@ -6908,7 +6908,7 @@ HlsStreamCreatorPlus() chnl_hls_master_list="$chnl_hls_master_list#EXT-X-STREAM-INF:BANDWIDTH=${chnl_stream_urls_bitrate[chnl_stream_urls_index]},AVERAGE-BANDWIDTH=${chnl_stream_urls_bitrate[chnl_stream_urls_index]},RESOLUTION=${chnl_stream_urls_resolution[chnl_stream_urls_index]}" - if [ -n "${chnl_stream_urls_audio[chnl_stream_urls_index]}" ] + if [ -n "${chnl_stream_urls_audio[chnl_stream_urls_index]:-}" ] then if [ "${chnl_stream_url_audio_count:-0}" -gt 0 ] then @@ -6926,7 +6926,7 @@ HlsStreamCreatorPlus() chnl_var_stream_map="$chnl_var_stream_map,a:$i" fi - if [ -n "${chnl_stream_urls_subtitles[chnl_stream_urls_index]}" ] && [ "${chnl_stream_url_subtitles_count:-0}" -gt 0 ] + if [ -n "${chnl_stream_urls_subtitles[chnl_stream_urls_index]:-}" ] && [ "${chnl_stream_url_subtitles_count:-0}" -gt 0 ] then for chnl_stream_url_subtitles_index in "${chnl_stream_url_subtitles_indices[@]}" do @@ -8393,7 +8393,7 @@ ParseHlsStreamLink() if [[ $stream_link =~ \.m3u8 ]] then is_hls=true - elif [[ $stream_link =~ \.flv ]] || [[ $stream_link =~ \.ts ]] + elif [[ $stream_link =~ \.flv ]] || [[ $stream_link =~ \.ts ]] || [[ $stream_link == *"4gtv.tv/"* ]] then is_hls=false else @@ -28278,6 +28278,14 @@ AcmeCheck() { 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 + else + echo + inquirer list_input_index "更新 acme.sh" ny_options ny_options_index + + if [ "$ny_options_index" -eq 1 ] + then + ~/.acme.sh/acme.sh --upgrade + fi fi Println "$tip zerossl 不支持 tls-alpn-01" @@ -44966,6 +44974,17 @@ PveSelectVM() done } +DNSCryptConfig() +{ + sed -i "0,/.*\[static\..*/s//\[static\.\'alidns-doh-fix\'\]/" dnscrypt-proxy.toml + sed -i "0,/.*stamp = .*/s//stamp = \'sdns:\/\/AgAAAAAAAAAACTIyMy41LjUuNSCY49XlNq8pWM0vfxT3BO9KJ20l4zzWXy5l9eTycnwTMA5kbnMuYWxpZG5zLmNvbQovZG5zLXF1ZXJ5\'/" dnscrypt-proxy.toml + sed -i "0,/.*server_names = \[.*/s//server_names = ['dnspod-doh','alidns-doh-fix']/" dnscrypt-proxy.toml + sed -i "0,/^listen_addresses = .*/s//listen_addresses = ['[::]:${listen_port:-53}']/" dnscrypt-proxy.toml + sed -i "0,/.*require_dnssec = .*/s//require_dnssec = true/" dnscrypt-proxy.toml + sed -i "0,/.*bootstrap_resolvers =.*/s//bootstrap_resolvers = ['114.114.114.114:53', '8.8.8.8:53']/" dnscrypt-proxy.toml + sed -i "0,/.*netprobe_address =.*/s//netprobe_address = '114.114.114.114:53'/" dnscrypt-proxy.toml +} + Menu() { color=${color:-${green}} @@ -46311,10 +46330,7 @@ $HOME/ip.sh" > /etc/rc.local if [ "$ny_option" == "$i18n_yes" ] then - sed -i "0,/.*server_names = \[.*/s//server_names = ['alidns-doh']/" dnscrypt-proxy.toml - sed -i "0,/.*require_dnssec = .*/s//require_dnssec = true/" dnscrypt-proxy.toml - sed -i "0,/.*bootstrap_resolvers =.*/s//bootstrap_resolvers = ['114.114.114.114:53', '8.8.8.8:53']/" dnscrypt-proxy.toml - sed -i "0,/.*netprobe_address =.*/s//netprobe_address = '114.114.114.114:53'/" dnscrypt-proxy.toml + DNSCryptConfig else sed -i "0,/.*server_names = \[.*/s//server_names = ['google', 'cloudflare']/" dnscrypt-proxy.toml fi @@ -46371,6 +46387,7 @@ $HOME/ip.sh" > /etc/rc.local rm -f /etc/resolv.conf echo "$etc_resolv" > /etc/resolv.conf fi + cd ~/dnscrypt-$dnscrypt_version_old ./dnscrypt-proxy -service stop > /dev/null ./dnscrypt-proxy -service uninstall > /dev/null @@ -46380,15 +46397,14 @@ $HOME/ip.sh" > /etc/rc.local mv linux-$arch dnscrypt-$dnscrypt_version cd dnscrypt-$dnscrypt_version cp -f example-dnscrypt-proxy.toml dnscrypt-proxy.toml + if [ "$ny_option" == "$i18n_yes" ] then - sed -i "0,/.*server_names = \[.*/s//server_names = ['alidns-doh']/" dnscrypt-proxy.toml - sed -i "0,/.*require_dnssec = .*/s//require_dnssec = true/" dnscrypt-proxy.toml - sed -i "0,/.*bootstrap_resolvers =.*/s//bootstrap_resolvers = ['114.114.114.114:53', '8.8.8.8:53']/" dnscrypt-proxy.toml - sed -i "0,/.*netprobe_address =.*/s//netprobe_address = '114.114.114.114:53'/" dnscrypt-proxy.toml + DNSCryptConfig else sed -i "0,/.*server_names = \[.*/s//server_names = ['google', 'cloudflare']/" dnscrypt-proxy.toml fi + ./dnscrypt-proxy -service install > /dev/null ./dnscrypt-proxy -service start > /dev/null Println "$info dnscrypt proxy 升级成功\n" @@ -46887,6 +46903,7 @@ then then Spinner "编译安装 JQ, 耗时可能会很长" JQInstall fi + if dnscrypt_version=$(curl -s -Lm 10 "$FFMPEG_MIRROR_LINK/dnscrypt.json" | $JQ_FILE -r '.tag_name') then DNSCRYPT_ROOT=$(dirname ~/dnscrypt-*/dnscrypt-proxy | sort | tail -1) @@ -46972,11 +46989,7 @@ addr-gen-mode=stable-privacy dns-search= method=ignore" > /etc/NetworkManager/system-connections/armbian.nmconnection - sed -i "0,/.*server_names = \[.*/s//server_names = ['alidns-doh']/" dnscrypt-proxy.toml - sed -i "0,/^listen_addresses = .*/s//listen_addresses = ['[::]:$listen_port']/" dnscrypt-proxy.toml - sed -i "0,/.*require_dnssec = .*/s//require_dnssec = true/" dnscrypt-proxy.toml - sed -i "0,/.*bootstrap_resolvers =.*/s//bootstrap_resolvers = ['114.114.114.114:53', '8.8.8.8:53']/" dnscrypt-proxy.toml - sed -i "0,/.*netprobe_address =.*/s//netprobe_address = '114.114.114.114:53'/" dnscrypt-proxy.toml + DNSCryptConfig for((i=0;i<3;i++)); do @@ -47060,11 +47073,9 @@ method=ignore" > /etc/NetworkManager/system-connections/armbian.nmconnection mv linux-arm64 dnscrypt-$dnscrypt_version cd dnscrypt-$dnscrypt_version cp -f example-dnscrypt-proxy.toml dnscrypt-proxy.toml - sed -i "0,/.*server_names = \[.*/s//server_names = ['alidns-doh']/" dnscrypt-proxy.toml - sed -i "0,/^listen_addresses = .*/s//listen_addresses = ['[::]:$listen_port']/" dnscrypt-proxy.toml - sed -i "0,/.*require_dnssec = .*/s//require_dnssec = true/" dnscrypt-proxy.toml - sed -i "0,/.*bootstrap_resolvers =.*/s//bootstrap_resolvers = ['114.114.114.114:53', '8.8.8.8:53']/" dnscrypt-proxy.toml - sed -i "0,/.*netprobe_address =.*/s//netprobe_address = '114.114.114.114:53'/" dnscrypt-proxy.toml + + DNSCryptConfig + ./dnscrypt-proxy -service install > /dev/null ./dnscrypt-proxy -service start > /dev/null @@ -47711,6 +47722,13 @@ fi' > /etc/NetworkManager/dispatcher.d/90-promisc.sh echo "$ip" >> /etc/v2ray/directlist.txt fi done + for ip in $(resolveip doh.pub) + do + if ! grep -q "$ip" < /etc/v2ray/directlist.txt + then + echo "$ip" >> /etc/v2ray/directlist.txt + fi + done ' Println "$info 配置切换成功\n" fi @@ -48198,11 +48216,7 @@ then cd dnscrypt-$dnscrypt_version cp -f example-dnscrypt-proxy.toml dnscrypt-proxy.toml - sed -i "0,/.*server_names = \[.*/s//server_names = ['alidns-doh']/" dnscrypt-proxy.toml - sed -i "0,/^listen_addresses = .*/s//listen_addresses = ['[::]:$listen_port']/" dnscrypt-proxy.toml - sed -i "0,/.*require_dnssec = .*/s//require_dnssec = true/" dnscrypt-proxy.toml - sed -i "0,/.*bootstrap_resolvers =.*/s//bootstrap_resolvers = ['114.114.114.114:53', '8.8.8.8:53']/" dnscrypt-proxy.toml - sed -i "0,/.*netprobe_address =.*/s//netprobe_address = '114.114.114.114:53'/" dnscrypt-proxy.toml + DNSCryptConfig for((i=0;i<3;i++)); do @@ -48254,6 +48268,7 @@ then rm -f /etc/resolv.conf echo "$etc_resolv" > /etc/resolv.conf fi + cd ~/dnscrypt-$dnscrypt_version_old ./dnscrypt-proxy -service stop > /dev/null ./dnscrypt-proxy -service uninstall > /dev/null @@ -48263,11 +48278,9 @@ then mv linux-x86_64 dnscrypt-$dnscrypt_version cd dnscrypt-$dnscrypt_version cp -f example-dnscrypt-proxy.toml dnscrypt-proxy.toml - sed -i "0,/.*server_names = \[.*/s//server_names = ['alidns-doh']/" dnscrypt-proxy.toml - sed -i "0,/^listen_addresses = .*/s//listen_addresses = ['[::]:$listen_port']/" dnscrypt-proxy.toml - sed -i "0,/.*require_dnssec = .*/s//require_dnssec = true/" dnscrypt-proxy.toml - sed -i "0,/.*bootstrap_resolvers =.*/s//bootstrap_resolvers = ['114.114.114.114:53', '8.8.8.8:53']/" dnscrypt-proxy.toml - sed -i "0,/.*netprobe_address =.*/s//netprobe_address = '114.114.114.114:53'/" dnscrypt-proxy.toml + + DNSCryptConfig + ./dnscrypt-proxy -service install > /dev/null ./dnscrypt-proxy -service start > /dev/null Println "$info dnscrypt proxy 升级成功\n"