[3.2][3.3][BETA] Image Redirect

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: [3.2][BETA] Image Redirect

Post by </Solidjeuh> »

Installing nodejs needs one more thing before yum install nodejs

Code: Select all

# yum install -y gcc-c++ make
# curl -sL https://rpm.nodesource.com/setup_13.x | sudo -E bash -
First of all, You need to enable node.js yum repository in your system provided by the Node.js official website. You also need development tools to build native add-ons to be installed on your system.
v12mike
Registered User
Posts: 492
Joined: Thu Jul 09, 2015 5:03 pm

Re: [3.2][BETA] Image Redirect

Post by v12mike »

post deleted.
Last edited by v12mike on Tue Jan 14, 2020 10:58 pm, edited 2 times in total.
v12mike
Registered User
Posts: 492
Joined: Thu Jul 09, 2015 5:03 pm

Re: [3.2][BETA] Image Redirect

Post by v12mike »

</Solidjeuh> wrote:
Tue Jan 14, 2020 12:01 am
Installing nodejs needs one more thing before yum install nodejs
Thanks, I have updated the installation post.
v12mike
Registered User
Posts: 492
Joined: Thu Jul 09, 2015 5:03 pm

Re: [3.2][BETA] Image Redirect

Post by v12mike »

Oops, a merge error crept in.

I have now labelled v2.0.1-b5 https://github.com/v12mike/imageredirec ... 0.1-b5.zip
Havym
Registered User
Posts: 62
Joined: Sun Jan 29, 2017 3:50 pm
Location: Netherlands
Name: Marco

Re: [3.2][BETA] Image Redirect

Post by Havym »

KYPREO wrote:
Tue Oct 08, 2019 11:35 am
I seem to be having trouble getting the extension to display my images from harvested store.

As noted elsewhere, scripts ran beautifully and I have harvested almost 80,000 images to date (just from Photobucket). I have also harvested all avatars and signature images and moved them to the images/ext/ directory.

Extension was able to be installed and enabled from the ACP correctly.

Local Image Store Path is set to enabled.

The local image store path is set to "images/ext/".

The permissions in http://www.host.com/images/ext/ appear to be correct. For example, I can manually access the local store by calling up by the MD5 filename and accessing the expected URL of the replacement image from within any browser. Looking at the settings in IIS, they look right and all the correct MIME types are configured and take inheritance from other image folders which work normally.

However, images within the forum are being served from their original location.

For example, taking the following post: http://www.ausrotary.com/viewtopic.php? ... 0#p2763190

This post remote links the image at http://i654.photobucket.com/albums/uu26 ... 3f0fe1.jpg

The expected local file should be at http://www.ausrotary.com/images/ext/f83 ... ae5a49.jpg

Lo and behold, it displays correctly, embedded below:

Forum v. 3.2.2
PHP v. 7.1.7

I have also tried purging the cache.

Any tips much appreciated.
I have the same problem trying to install a newer version. My current version is still 1.0.0.
I even tried this version:
v12mike wrote:
Wed Oct 09, 2019 4:24 am
I just realised what the problem is.

I fairly recently updated the harvesting scripts to add the original filename extension to the harvested files (which helps browsers understand some files) and I updated the extension at the same time, but I forgot the label and release the new version of the extension, and you have downloaded the previous version.

Try installing: https://github.com/v12mike/imageredirec ... 0.1-b1.zip
It doenst matter what version i installed, i have the same problem as written above.

Im on phpBB 3.2.8 and php 7.2.27
Capture.jpg
v12mike
Registered User
Posts: 492
Joined: Thu Jul 09, 2015 5:03 pm

Re: [3.2][BETA] Image Redirect

Post by v12mike »

Did you try the current beta version 2.0.1-b5? https://github.com/v12mike/imageredirec ... 0.1-b5.zip
Havym
Registered User
Posts: 62
Joined: Sun Jan 29, 2017 3:50 pm
Location: Netherlands
Name: Marco

Re: [3.2][BETA] Image Redirect

Post by Havym »

Yes, i tried that one first. But after this issue i tried older versions. Only version 1.0.0 works and redirects to the images stored at the server /images/ext/

Edit:
I tried your link again and still i see the photbucket images again with the watermark and not the stored images on the host.
In the extension overview the version is something else then 2.0.1-b5, its 2.0.1-b4 :oops:
v12mike
Registered User
Posts: 492
Joined: Thu Jul 09, 2015 5:03 pm

Re: [3.2][3.3][BETA] Image Redirect

Post by v12mike »

I re-tested the code and found that there was a bug that affected boards running recent versions of the extension but which had not updated the saved files by re-running (a recent version of) the extraction and download scripts.

I have fixed this bug and labelled a new version: https://github.com/v12mike/imageredirec ... 0.1-b6.zip

Thank you for your feedback.
Havym
Registered User
Posts: 62
Joined: Sun Jan 29, 2017 3:50 pm
Location: Netherlands
Name: Marco

Re: [3.2][3.3][BETA] Image Redirect

Post by Havym »

Yes! Thank you for your support. It works now :D
KYPREO
Jr. Extension Validator
Posts: 392
Joined: Fri Feb 02, 2018 9:56 am
Contact:

Re: [3.2][3.3][BETA] Image Redirect

Post by KYPREO »

I have been using this extension for local image caching and it has been a godsend.

I am testing out SSL proxying as I experiment with switching over my board to HTTPS. In doing so, I have found a bug in listener.php that is preventing simple proxy mode from working.

Line 88 should be changed from this:

Code: Select all

				if ($this->config['imageredirect_proxysimplemode'])
to this:

Code: Select all

				if ($this->config['imageredirect_simplemode'] > 0)
With this change, working great using weserv.nl.

Now I need to figure out how to get Camo Proxy working on IIS10 in Windows Server #don'tjudgeme :D I actually have Node.js and Camo running and there are plenty of wrappers to run Node.js apps as a service with automatic startup and recovery etc. It's just a matter of getting the reverse proxy part of the equation working.
phpBB user since 2002
www.AusRotary.com
v12mike
Registered User
Posts: 492
Joined: Thu Jul 09, 2015 5:03 pm

Re: [3.2][3.3][BETA] Image Redirect

Post by v12mike »

Thanks for the report. I have updated the code and also done some minor refactoring to improve the code layout (which has been on my list for a while).

If you come up with a recipe for IIS installation, please share it here.
KYPREO
Jr. Extension Validator
Posts: 392
Joined: Fri Feb 02, 2018 9:56 am
Contact:

Re: [3.2][3.3][BETA] Image Redirect

Post by KYPREO »

Great, thanks. I will definitely report back with a solution. I'm very close.
phpBB user since 2002
www.AusRotary.com
User avatar
3Di
Former Team Member
Posts: 15508
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [3.2][3.3][BETA] Image Redirect

Post by 3Di »

v12mike wrote:
Thu Feb 13, 2020 4:34 am
...I have updated the code and also done some minor refactoring to improve the code layout (which has been on my list for a while).
Hi Mike, the issue lies elsewhere see my comment:
https://github.com/v12mike/imageredirec ... #r37267007

Regards.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
:studio_microphone: Premium extensions @ The Studio
KYPREO
Jr. Extension Validator
Posts: 392
Joined: Fri Feb 02, 2018 9:56 am
Contact:

Re: [3.2][3.3][BETA] Image Redirect

Post by KYPREO »

Update on running this on IIS:

* Installing Node.JS - easy. This now comes in a win64 binaries package with a script to install all the necessary dependencies, build tools etc.
* Installing Atmos Camo - easy once Node.JS is installed (same as Linux: "npm install")
* Installing Atmos Camo as a service with auto restart, shutdown management, crash-handling etc - easy. This can be done either through PM2 or an application called NSSM (Non-sucking Service Manager)
* Setting up reverse proxy to serve proxied content from Atmos Camo server through a subdomain via HTTPS - easy with IIS10 as there is a built in feature for reverse proxy URL rewrites.

I set up a subdomain for the server at proxy.example.com and navigating in the browser displayed the ready test ("hwhat"). Great up until this point.

However, no matter image I throw at it, it just says "not found". Looking through the github repo, Atmos Camo is very fussy about security certificates and will display the "not found" error when the content is there but there was some sort of SSL failure.

I took a rest at this point but started looking at alternatives because building a Node.JS app on Windows requires Visual Studio Build Tools and other add-ons and a lot of other stuff that seems excessive to have to install and run on a production server just to execute a basic JS script.

I then came across this fork of Atmos Camo which includes pre-compiled binaries for Windows, Linux and Darwin: https://github.com/arachnys/go-camo

It has 2 self-contained executables: the Go-Camo server and a utility to create test URLs. To get it up and running, you just extract the file to your chosen directory, then run go-camo.exe with necessary command line options and you have a server! No need for Node or anything else. I have quickly tested this and it serves images properly. The interface is exactly the same as Atmos Camo (eg the way URLs are constructed etc), so there shouldn't be any issue using this as the backend camo proxy server with the extension needing any changes.

I will have go at deploying this on my test server this then report back if it works, then provide some more detailed setup instructions.

This and the project from which it is forked, Cactus Go-Camo (https://github.com/cactus/go-camo/releases), might be a more accessible option for some people. I also note that Atmos Camo has not been updated in 3 years whereas the Go Camo projects have been regularly updated and carry some additional features (including HTTP keep alive and HTTP/2 support).
phpBB user since 2002
www.AusRotary.com
User avatar
AmigoJack
Registered User
Posts: 5715
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: [3.2][3.3][BETA] Image Redirect

Post by AmigoJack »

KYPREO wrote:
Thu Feb 13, 2020 10:29 pm
pre-compiled binaries
To everyone (not you in particular) who is concerned about security and HTTPS: downloading over HTTP yourself just to present it on your own website via HTTPS has nothing to do with security. And doing it with an executable that you didn't compile yourself is just adding a man in the middle blackbox to that process from which you only assume what it does. If "avoiding mixed content" was all you ever wanted then this approach reveals a questionable understanding of security.
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.
Post Reply

Return to “Extensions in Development”