From 4e0155e5629d0e2108e462c2a7f168c944daed80 Mon Sep 17 00:00:00 2001 From: maTh <1645099+math-GH@users.noreply.github.com> Date: Thu, 29 Feb 2024 20:50:52 +0100 Subject: [PATCH] Image proxy extension: update to wsrv.nl and add German (#208) --- xExtension-ImageProxy/README.md | 4 ++-- xExtension-ImageProxy/extension.php | 2 +- xExtension-ImageProxy/i18n/de/ext.php | 12 ++++++++++++ xExtension-ImageProxy/i18n/en/ext.php | 4 +--- xExtension-ImageProxy/i18n/fr/ext.php | 4 +--- xExtension-ImageProxy/metadata.json | 2 +- 6 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 xExtension-ImageProxy/i18n/de/ext.php diff --git a/xExtension-ImageProxy/README.md b/xExtension-ImageProxy/README.md index f1fa3b0..6277b80 100644 --- a/xExtension-ImageProxy/README.md +++ b/xExtension-ImageProxy/README.md @@ -21,11 +21,11 @@ To use it, upload this entire directory to the FreshRSS `./extensions` directory ## Proxy Settings -By default this extension will use the [images.weserv.nl](https://images.weserv.nl) image caching and resizing proxy, but instead you can supply your own proxy URL in the settings. An example URL would look like ``https://images.example.com/?url=``. +By default this extension will use the [wsrv.nl](https://wsrv.nl) image caching and resizing proxy, but instead you can supply your own proxy URL in the settings. An example URL would look like ``https://images.example.com/?url=``. By ticking the `scheme_https` checkbox, you can also force the use of the proxy, even for images coming through an encrypted channel. This makes the server that hosts your FreshRSS instance the only point of entry for images, preventing your client from connecting directly to the RSS sources to recover them (which could be a privacy concern in extreme cases). -The source code for the images.weserv.nl proxy can be found at [github.com/andrieslouw/imagesweserv](https://github.com/andrieslouw/imagesweserv), but of course other methods are available. For example, in Apache you could [use `mod_rewrite` to set up a simple proxy](#apache-configuration) and similar methods are available in nginx and lighttpd. Alternatively you could use a simple PHP script, [along these lines](https://github.com/Alexxz/Simple-php-proxy-script). Keep in mind that too simple a proxy could introduce security risks, which is why the default proxy processes the images. +The source code for the wsrv.nl proxy can be found at [github.com/weserv/images](https://github.com/weserv/images), but of course other methods are available. For example, in Apache you could [use `mod_rewrite` to set up a simple proxy](#apache-configuration) and similar methods are available in nginx and lighttpd. Alternatively you could use a simple PHP script, [along these lines](https://github.com/Alexxz/Simple-php-proxy-script). Keep in mind that too simple a proxy could introduce security risks, which is why the default proxy processes the images. ### Apache configuration diff --git a/xExtension-ImageProxy/extension.php b/xExtension-ImageProxy/extension.php index f2c50b8..b5f1b4c 100644 --- a/xExtension-ImageProxy/extension.php +++ b/xExtension-ImageProxy/extension.php @@ -4,7 +4,7 @@ final class ImageProxyExtension extends Minz_Extension { // Defaults - private const PROXY_URL = 'https://images.weserv.nl/?url='; + private const PROXY_URL = 'https://wsrv.nl/?url='; private const SCHEME_HTTP = '1'; private const SCHEME_HTTPS = ''; private const SCHEME_DEFAULT = 'auto'; diff --git a/xExtension-ImageProxy/i18n/de/ext.php b/xExtension-ImageProxy/i18n/de/ext.php new file mode 100644 index 0000000..a3337bc --- /dev/null +++ b/xExtension-ImageProxy/i18n/de/ext.php @@ -0,0 +1,12 @@ + array( + 'proxy_url' => 'Proxy-URL', + 'scheme_http' => 'HTTP-Proxy', + 'scheme_https' => 'HTTPS-Proxy', + 'scheme_default' => 'Proxy unspezifiziert', + 'scheme_include' => 'http*:// in die URL einfügen', + 'url_encode' => 'URL-Prozentkodierung' + ), +); diff --git a/xExtension-ImageProxy/i18n/en/ext.php b/xExtension-ImageProxy/i18n/en/ext.php index 1b7b041..30720f7 100644 --- a/xExtension-ImageProxy/i18n/en/ext.php +++ b/xExtension-ImageProxy/i18n/en/ext.php @@ -7,8 +7,6 @@ 'scheme_https' => 'Proxy HTTPS', 'scheme_default' => 'Proxy unspecified', 'scheme_include' => 'Include http*:// in URL', - 'url_encode' => 'Encode the URL', - 'true' => 'On', - 'false' => 'Off', + 'url_encode' => 'Encode the URL' ), ); diff --git a/xExtension-ImageProxy/i18n/fr/ext.php b/xExtension-ImageProxy/i18n/fr/ext.php index 9e7c879..67325e5 100644 --- a/xExtension-ImageProxy/i18n/fr/ext.php +++ b/xExtension-ImageProxy/i18n/fr/ext.php @@ -7,8 +7,6 @@ 'scheme_https' => 'Proxy HTTPS', 'scheme_default' => 'Proxy indéterminé', 'scheme_include' => 'Inclure http*:// dans l\'URL', - 'url_encode' => 'Encoder l\'URL', - 'true' => 'Oui', - 'false' => 'Non', + 'url_encode' => 'Encoder l\'URL' ), ); diff --git a/xExtension-ImageProxy/metadata.json b/xExtension-ImageProxy/metadata.json index 687423e..621caa8 100644 --- a/xExtension-ImageProxy/metadata.json +++ b/xExtension-ImageProxy/metadata.json @@ -2,7 +2,7 @@ "name": "Image Proxy", "author": "Frans de Jonge", "description": "No insecure content warnings or disappearing images.", - "version": "0.6", + "version": "0.7", "entrypoint": "ImageProxy", "type": "user" }