Invidious is an alternative front-end to YouTube
Add config option for geo-bypass
Omar Rothf83e9e6eb9b5
diff --git a/config/config.yml b/config/config.ymlindex dac2259f..577968f0 100644--- a/config/config.yml+++ b/config/config.yml@@ -8,4 +8,5 @@ db:port: 5432dbname: invidiousfull_refresh: false-https_only: false\ No newline at end of file+https_only: false+geo_bypass: truediff --git a/src/invidious.cr b/src/invidious.crindex 37a68d20..614b25c0 100644--- a/src/invidious.cr+++ b/src/invidious.cr@@ -106,6 +106,7 @@ spawn doendproxies = {} of String => Array({ip: String, port: Int32})+if CONFIG.geo_bypassspawn dofind_working_proxies(BYPASS_REGIONS) do |region, list|if !list.empty?@@ -113,6 +114,7 @@ spawn doendendend+endbefore_all do |env|env.response.headers["X-XSS-Protection"] = "1; mode=block;"diff --git a/src/invidious/helpers/helpers.cr b/src/invidious/helpers/helpers.crindex ab33c3af..ac48534a 100644--- a/src/invidious/helpers/helpers.cr+++ b/src/invidious/helpers/helpers.cr@@ -14,6 +14,7 @@ class Confighttps_only: Bool?,hmac_key: String?,full_refresh: Bool,+ geo_bypass: Bool,})end