From fc873653b2590d1a1dc44d154ec81f670acf3e78 Mon Sep 17 00:00:00 2001 From: Michael Campagnaro Date: Wed, 29 Jul 2020 22:22:33 -0400 Subject: [PATCH] Update aliases & add dnscrypt-proxy config --- aliases | 97 ++++++++++++++++++++++--------------- configs/dnscrypt-proxy.toml | 71 +++++++++++++++++++++++++++ 2 files changed, 130 insertions(+), 38 deletions(-) create mode 100644 configs/dnscrypt-proxy.toml diff --git a/aliases b/aliases index ab1215e..f56cfe7 100644 --- a/aliases +++ b/aliases @@ -102,6 +102,12 @@ dl_youtube_vid() { local url="$2" shift 2 local opts="$@" + + if [[ $url == "" ]]; then + error "Format: cmd \n" + return + fi + opts+=" --all-subs --embed-subs" make_vid_dir_and_cd_into $url @@ -128,6 +134,12 @@ dl_youtube_vid_and_hflip() { local url="$2" shift 2 local opts="$@" + + if [[ $url == "" ]]; then + error "Format: cmd \n" + return + fi + opts+=" --all-subs --embed-subs" make_vid_dir_and_cd_into $url @@ -156,12 +168,14 @@ dl_youtube_playlist() { local format="$1" local url="$2" local dir_name="$3" - if [[ $url == "" || $dir_name == "" ]]; then - error "Format: cmd \n" - return - fi shift 3 local opts="$@" + + if [[ $url == "" || $dir_name == "" ]]; then + error "Format: cmd \n" + return + fi + opts+=" --all-subs --embed-subs" make_vid_dir_and_cd_into $url "$dir_name" @@ -191,6 +205,11 @@ dl_twitch_vid() { shift 4 local opts="$@" + if [[ $url == "" ]]; then + error "Format: cmd \n" + return + fi + if [[ $compression_level -eq 0 ]]; then printf "${BOLD}Downloading Twitch vid with no compression.${NORMAL}\n" else @@ -239,6 +258,11 @@ dl_twitch_vid() { dl_twitch_chat() { local url="$1" + if [[ $url == "" ]]; then + error "Format: cmd \n" + return + fi + make_vid_dir_and_cd_into $url if [[ $? -ne 0 ]]; then return @@ -484,48 +508,45 @@ alias vu='vagrant up' alias vimrc='vim ~/.vimrc' alias weather='curl wttr.in/toronto' -alias yt-download='dl_youtube_vid ""' -alias yt-download-1080='dl_youtube_vid "137+140"' -alias yt-download-720='dl_youtube_vid "136+140"' -alias yt-download-playlist='dl_youtube_playlist ""' -alias yt-download-playlist-1080='dl_youtube_playlist "137+140"' -alias yt-download-playlist-720='dl_youtube_playlist "136+140"' -alias yt-download-playlist-tiny='dl_youtube_playlist "160+140"' -alias yt-download-audio='youtube-dl.exe -f "140"' +alias yt='dl_youtube_vid ""' +alias yt-1080='dl_youtube_vid "137+140"' +alias yt-720='dl_youtube_vid "136+140"' +alias yt-playlist='dl_youtube_playlist ""' +alias yt-playlist-1080='dl_youtube_playlist "137+140"' +alias yt-playlist-720='dl_youtube_playlist "136+140"' +alias yt-playlist-tiny='dl_youtube_playlist "160+140"' +alias yt-audio='youtube-dl.exe -f "140"' -alias yt-download-and-hflip='dl_youtube_vid_and_hflip "137+140"' # 1080p +alias yt-and-hflip='dl_youtube_vid_and_hflip "137+140"' # 1080p alias ig-download-and-hflip='dl_instagram_vid_and_hflip ' alias download-mp4='dl_mp4' -alias tw-download-chat='dl_twitch_chat' -alias tw-dl='youtube-dl.exe -f "1080" -o "%(upload_date)s-%(title)s-twitch-%(id)s.%(ext)s"' -alias tw-dl2='youtube-dl.exe -o "%(upload_date)s-%(title)s-twitch-%(id)s.%(ext)s"' -alias tw-download-custom='dl_twitch_vid ' +alias tw='dl_twitch_vid "1080p" 0 0' +alias tw-compressed='dl_twitch_vid "1080p" 0 25' +alias tw-shortname='dl_twitch_vid "1080p" 1 0' +alias tw-shortname-compressed='dl_twitch_vid "1080p" 1 25' +alias tw-custom='dl_twitch_vid ' +alias tw-chat='dl_twitch_chat' -alias tw-download='dl_twitch_vid "1080p" 0 0' -alias tw-download-compressed='dl_twitch_vid "1080p" 0 25' -alias tw-download-shortname='dl_twitch_vid "1080p" 1 0' -alias tw-download-shortname-compressed='dl_twitch_vid "1080p" 1 25' +alias tw-1080='dl_twitch_vid "1080" 0 0' +alias tw-1080-compressed='dl_twitch_vid "1080" 0 25' +alias tw-1080-shortname='dl_twitch_vid "1080" 1 0' +alias tw-1080-shortname-compressed='dl_twitch_vid "1080" 1 25' -alias tw-download-1080='dl_twitch_vid "1080" 0 0' -alias tw-download-1080-compressed='dl_twitch_vid "1080" 0 25' -alias tw-download-1080-shortname='dl_twitch_vid "1080" 1 0' -alias tw-download-1080-shortname-compressed='dl_twitch_vid "1080" 1 25' +alias tw-60='dl_twitch_vid "1080p60" 0 0' +alias tw-60-compressed='dl_twitch_vid "1080p60" 0 25' +alias tw-60-shortname='dl_twitch_vid "1080p60" 1 0' +alias tw-60-shortname-compressed='dl_twitch_vid "1080p60" 1 25' -alias tw-download-60='dl_twitch_vid "1080p60" 0 0' -alias tw-download-60-compressed='dl_twitch_vid "1080p60" 0 25' -alias tw-download-60-shortname='dl_twitch_vid "1080p60" 1 0' -alias tw-download-60-shortname-compressed='dl_twitch_vid "1080p60" 1 25' +alias tw-720='dl_twitch_vid "720p-1" 0 0' +alias tw-720-shortname='dl_twitch_vid "720p-1" 1 0' +alias tw-720-60='dl_twitch_vid "720p60" 0 0' +alias tw-720-60-shortname='dl_twitch_vid "720p60" 1 0' -alias tw-download-720='dl_twitch_vid "720p-1" 0 0' -alias tw-download-720-shortname='dl_twitch_vid "720p-1" 1 0' -alias tw-download-720-60='dl_twitch_vid "720p60" 0 0' -alias tw-download-720-60-shortname='dl_twitch_vid "720p60" 1 0' - -alias tw-download-4k='dl_twitch_vid "2160p" 0 0' -alias tw-download-4k-compressed='dl_twitch_vid "2160p" 0 25' -alias tw-download-4k-shortname='dl_twitch_vid "2160p" 1 0' -alias tw-download-4k-shortname-compressed='dl_twitch_vid "2160p" 1 25' +alias tw-4k='dl_twitch_vid "2160p" 0 0' +alias tw-4k-compressed='dl_twitch_vid "2160p" 0 25' +alias tw-4k-shortname='dl_twitch_vid "2160p" 1 0' +alias tw-4k-shortname-compressed='dl_twitch_vid "2160p" 1 25' #################################################################################################### # Git diff --git a/configs/dnscrypt-proxy.toml b/configs/dnscrypt-proxy.toml new file mode 100644 index 0000000..3ba1a4d --- /dev/null +++ b/configs/dnscrypt-proxy.toml @@ -0,0 +1,71 @@ +server_names = ["cloudflare", "cloudflare-ipv6"] +listen_addresses = ["127.0.0.1:53", "[::1]:53"] +max_clients = 250 +ipv4_servers = true +ipv6_servers = true +disabled_server_names = [] +dnscrypt_servers = true +doh_servers = true +require_dnssec = true +require_nolog = true +require_nofilter = true +daemonize = false +force_tcp = false +dnscrypt_ephemeral_keys = false +tls_disable_session_tickets = false +offline_mode = false +timeout = 5000 +keepalive = 30 +lb_estimator = false +netprobe_timeout = 60 +netprobe_address = "9.9.9.9:53" +log_level = 0 +use_syslog = false +cert_refresh_delay = 240 +fallback_resolvers = ["9.9.9.9:53", "8.8.8.8:53"] +ignore_system_dns = true +log_files_max_size = 10 +log_files_max_age = 7 +log_files_max_backups = 1 +block_ipv6 = false +block_unqualified = true +block_undelegated = true +reject_ttl = 600 +cache = true +cache_size = 4096 +cache_min_ttl = 2400 +cache_max_ttl = 86400 +cache_neg_min_ttl = 60 +cache_neg_max_ttl = 600 + +[query_log] +format = "ltsv" + +[nx_log] +format = "ltsv" + +[blacklist] + +[ip_blacklist] + +[anonymized_dns] +skip_incompatible = false + +[broken_implementations] +fragments_blocked = ["cisco", "cisco-ipv6", "cisco-familyshield", "cisco-familyshield-ipv6", "quad9-dnscrypt-ip4-filter-alt", "quad9-dnscrypt-ip4-filter-pri", "quad9-dnscrypt-ip4-nofilter-alt", "quad9-dnscrypt-ip4-nofilter-pri", "quad9-dnscrypt-ip6-filter-alt", "quad9-dnscrypt-ip6-filter-pri", "quad9-dnscrypt-ip6-nofilter-alt", "quad9-dnscrypt-ip6-nofilter-pri", "cleanbrowsing-adult", "cleanbrowsing-family-ipv6", "cleanbrowsing-family", "cleanbrowsing-security"] + +[sources] + +[sources.public-resolvers] +urls = ["https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v2/public-resolvers.md", "https://download.dnscrypt.info/resolvers-list/v2/public-resolvers.md"] +minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3" +cache_file = "public-resolvers.md" +refresh_delay = 0 +prefix = "" + +[sources.relays] +urls = ["https://github.com/DNSCrypt/dnscrypt-resolvers/raw/master/v2/relays.md", "https://download.dnscrypt.info/resolvers-list/v2/relays.md"] +minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3" +cache_file = "relays.md" +refresh_delay = 72 +prefix = ""