commit c23e314f83be1d74937fecee87360876d0222d53 Author: Aeris Date: Sat Dec 12 00:48:38 2020 +0100 example diff --git a/README.md b/README.md new file mode 100644 index 0000000..491c9a1 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# Tumblr-GDPR + +Needed for accessing [Tumblr](https://washingtonpost.com) RSS feeds from the European Union: +bypass the [GPDR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation) check, implying consent. diff --git a/extension.php b/extension.php new file mode 100644 index 0000000..b602336 --- /dev/null +++ b/extension.php @@ -0,0 +1,26 @@ +registerHook('simplepie_before_init', array('WpGdprExtension', 'curlHook')); + } + + public static function curlHook($simplePie, $feed) { + #if (preg_match('#^https?://[a-zA-Z]*.washingtonpost.com/#i', $feed->url())) { + # $simplePie->set_curl_options(array(CURLOPT_HTTPHEADER => "X-Forwarded-For: 91.132.137.222")); + #} + if (preg_match('#^https?://[a-zA-Z]*.washingtonpost.com/#i', $feed->url())) { + $simplePie->set_curl_options(array(CURLOPT_PROXYTYPE => CURLPROXY_SOCKS5,CURLOPT_PROXY => "192.168.5.27:1081")); + } + if (preg_match('#^https?://ddl-warez.to/#i', $feed->url())) { + $simplePie->set_curl_options(array(CURLOPT_PROXYTYPE => CURLPROXY_SOCKS5,CURLOPT_PROXY => "192.168.5.28:1081")); + } + if (preg_match('#^https?://[a-zA-Z]*.movie-blog.org/#i', $feed->url())) { + $simplePie->set_curl_options(array(CURLOPT_PROXYTYPE => CURLPROXY_SOCKS5,CURLOPT_PROXY => "192.168.5.28:1081")); + } + if (preg_match('#^https?://ddl-music.to/#i', $feed->url())) { + $simplePie->set_curl_options(array(CURLOPT_PROXYTYPE => CURLPROXY_SOCKS5,CURLOPT_PROXY => "192.168.5.28:1081")); + } + } +} + diff --git a/metadata.json b/metadata.json new file mode 100644 index 0000000..c5cf921 --- /dev/null +++ b/metadata.json @@ -0,0 +1,8 @@ +{ + "name": "WP-GDPR", + "author": "KyanuReaps", + "description": "Bypass WP’ GPDR check (implying consent) for the European Union", + "version": 1.0, + "entrypoint": "WpGdpr", + "type": "system" +}