Extensions icon indicating copy to clipboard operation
Extensions copied to clipboard

Image proxy guide

Open prysme01 opened this issue 9 years ago • 12 comments

Hello I would like to setup an image proxy cache that could be user by freshrss image proxy extension, but I don't know how to do it. Is it possible to have a guide that explain what to do ? thanks in advance.

prysme01 avatar Nov 24 '16 09:11 prysme01

Hello @prysme01 Sorry for the delay - I somehow overlooked the notification. There is a brief explanation on https://github.com/FreshRSS/Extensions/blob/master/xExtension-ImageProxy/README.md . Maybe @Frenzie could point to additional resources if needed?

Alkarex avatar Dec 04 '16 19:12 Alkarex

The script simply sticks a URL processed with rawurlencode at the end of whatever you set up as the proxy.

https://github.com/FreshRSS/Extensions/blob/e820c338b2a37a4ac01a578722644b32ba927aea/xExtension-ImageProxy/extension.php#L32

I suppose you could add an option for other URL encoding schemes than RFC 3986 (e.g., you could use Base64), but unless there's a ready-made proxy that uses a different encoding scheme I don't see why you would. :-)

Frenzie avatar Dec 05 '16 07:12 Frenzie

@Alkarex I've already seen this documentation, but it is really not clear on how to setup an image proxy. I would like to do it because my company is filtering a lot of URL and I would like freshrss to keep the content and also the image.

prysme01 avatar Dec 05 '16 08:12 prysme01

@prysme01 Is your problem related to installing a proxy (if yes, which one have you picked?), or configuring FreshRSS to use it? See also Frenzie's comment just above.

Alkarex avatar Dec 05 '16 08:12 Alkarex

I've set this URL https://images.weserv.nl/i but I doesn't work The image is not displayed src is https://images.weserv.nl/images.neozone.org%2F2016%2F12%2FWorld-View-Entreprise-ballon-espace-003.jpg

prysme01 avatar Dec 05 '16 09:12 prysme01

Try https://images.weserv.nl/?url=images.neozone.org%2F2016%2F12%2FWorld-View-Entreprise-ballon-espace-003.jpg

Alkarex avatar Dec 05 '16 09:12 Alkarex

Good this works. Why don't set this up by default with the extension and add a small documentation to advise to change it if the users want to use his own proxy ?

prysme01 avatar Dec 05 '16 09:12 prysme01

That is in fact exactly the way it works. :-P

On Mon, Dec 5, 2016 at 10:22 AM, prysme01 [email protected] wrote:

Good this works. Why don't set this up by default with the extension and add a small documentation to advise to change it if the users want to use his own proxy ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/FreshRSS/Extensions/issues/10#issuecomment-264803971, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMYBUbznag2GmS6Brrfa6n5GiCzqhDAks5rE9e-gaJpZM4K7adh .

Frenzie avatar Dec 05 '16 09:12 Frenzie

@Frenzie by default without any URL in the configuration it doesn't work. On my setup I had to put https://images.weserv.nl/?url= So there is no default configuration.

prysme01 avatar Dec 05 '16 10:12 prysme01

By default any extension you add is disabled.

Frenzie avatar Dec 05 '16 11:12 Frenzie

Yeah this work for me without configuration.

In your readme you say : " For example, in Apache you could use mod_rewrite to set up a simple proxy "

Do you have an example ? I don't understant how you can do this with just with a rewrite rule. thx 👍

EDIT; when i use a custom imagesweserv i can't change the config option, i have this error :

[Mon Dec 05 20:41:03.624504 2016] [:error] [pid 22320] [client 192.168.1.101:62179] PHP Notice:  Trying to get property of non-object in /var/www/freshrss_test/exten
sions/xExtension-ImageProxy/extension.php on line 8

but it's work when i change extensions/xExtension-ImageProxy/extension.php like that :

#       public static $proxy_url = 'https://images.weserv.nl/?url=';
        public static $proxy_url = 'https://x********.***/proxy_image/?url=';

cyprienflx avatar Dec 05 '16 18:12 cyprienflx

I've never done so myself, but a quick peek at ( https://duckduckgo.com/?q=apache+reverse+proxy&t=ffsb&ia=web)[the top search results for "Apache reverse proxy"] suggests it shouldn't be too hard with mod_proxy.

On Mon, Dec 5, 2016 at 7:30 PM, obyy [email protected] wrote:

Yeah this work for me without configuration.

In your readme you say : " For example, in Apache you could use mod_rewrite to set up a simple proxy "

Do you have an example ? I don't understant how you can do this with just a rewrite rule. thx 👍

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/FreshRSS/Extensions/issues/10#issuecomment-264935482, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMYBZTQ_9Y8BH3sqFvbk6OxWBPmZPa0ks5rFFgsgaJpZM4K7adh .

Frenzie avatar Dec 05 '16 20:12 Frenzie