Skip to content

Commit

Permalink
Image proxy extension: update to wsrv.nl and add German (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
math-GH authored Feb 29, 2024
1 parent 1cee81b commit 4e0155e
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
4 changes: 2 additions & 2 deletions xExtension-ImageProxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion xExtension-ImageProxy/extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
12 changes: 12 additions & 0 deletions xExtension-ImageProxy/i18n/de/ext.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

return array(
'imageproxy' => 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'
),
);
4 changes: 1 addition & 3 deletions xExtension-ImageProxy/i18n/en/ext.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'
),
);
4 changes: 1 addition & 3 deletions xExtension-ImageProxy/i18n/fr/ext.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'
),
);
2 changes: 1 addition & 1 deletion xExtension-ImageProxy/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

0 comments on commit 4e0155e

Please sign in to comment.