Squid plug-in

Please post questions about ReadyNAS add-ons here.

Squid plug-in

Postby mnot » Sun Apr 26, 2009 6:18 am

The forums for community plug-ins seem to be locked (?!?) so here we are...

I've been working on a plug-in to package the Squid caching Web proxy for ReadyNAS. It's still rough but should be useable, and I'd love feedback, etc. See:
http://github.com/mnot/squid-readynas/downloads
and
http://squid-cache.org/
for more information about Squid.
mnot
ReadyNAS Newbie
 
Posts: 44
Joined: Fri Sep 19, 2008 8:26 pm
Location: Melbourne, Australia
ReadyNAS: Ultra

Re: Squid plug-in

Postby super-poussin » Sun Apr 26, 2009 11:41 am

great add-on

can you explain it a little bit ?

I think there's unwanted file in the add-on :

r2-d2:/etc/frontview/addons/bin# ls
running.sh SQUID start.sh stop.sh


running.sh , start.sh and stop.sh can be deleted
If you like my add-ons - Si vous aimez mes add-ons :
Image --- -------- Image
User avatar
super-poussin
ReadyNAS Add-ons Expert
 
Posts: 4610
Joined: Fri Jul 13, 2007 1:16 pm
ReadyNAS: Pro

Re: Squid plug-in

Postby mnot » Sun Apr 26, 2009 2:49 pm

super-poussin wrote:great add-on

can you explain it a little bit ?


Running a caching proxy in a home network (for example) can improve performance, both because of the cache itself, and also because of improved connection management. Eventually, if there's interest we could also add a redirector to do things like content filtering, etc...

Using it should be easy; just install and configure your browser to use the nas box port 3128 as a proxy. I do need to work on the docs a bit, as well as exposing more configuration through the panel...

I think there's unwanted file in the add-on :

r2-d2:/etc/frontview/addons/bin# ls
running.sh SQUID start.sh stop.sh

running.sh , start.sh and stop.sh can be deleted


Ah, ok, thanks.

Cheers,
mnot
ReadyNAS Newbie
 
Posts: 44
Joined: Fri Sep 19, 2008 8:26 pm
Location: Melbourne, Australia
ReadyNAS: Ultra

Re: Squid plug-in

Postby mnot » Sun Apr 26, 2009 8:28 pm

Unwanted files fixed in the git repository.

I'll upload a new binary soon, but noticed that installing the plugin creates two new unwanted directories; /Caching and /Proxy. Given that the "friendly name" for my package is "Squid Caching Proxy", it looks like there's a mkdir somewhere with this string in in it.

I can't find anything that would do this in install.sh; is this a known problem with other parts of the install scripts? I notice that some of them are compiled perl modules, so I can't check there... :-/
mnot
ReadyNAS Newbie
 
Posts: 44
Joined: Fri Sep 19, 2008 8:26 pm
Location: Melbourne, Australia
ReadyNAS: Ultra

Re: Squid plug-in

Postby mnot » Tue Apr 28, 2009 1:48 am

2.7_2 fixes the spurious directories (think I used a very old version of the SDK, or possibly messed up init) and the extra files.

http://github.com/mnot/squid-readynas/downloads
mnot
ReadyNAS Newbie
 
Posts: 44
Joined: Fri Sep 19, 2008 8:26 pm
Location: Melbourne, Australia
ReadyNAS: Ultra

Re: Squid plug-in

Postby super-poussin » Tue Apr 28, 2009 4:18 am

will check

I'm currently doing the Squid 3.0 addon for the pro based on your interface
If you like my add-ons - Si vous aimez mes add-ons :
Image --- -------- Image
User avatar
super-poussin
ReadyNAS Add-ons Expert
 
Posts: 4610
Joined: Fri Jul 13, 2007 1:16 pm
ReadyNAS: Pro

Re: Squid plug-in

Postby super-poussin » Tue Apr 28, 2009 4:54 am

you can add at the end of your install.sh :

Code: Select all
/etc/init.d/cron force-reload


for french translation use
Code: Select all
LABEL_SERVICE_SQUID_INFO::::<b>Proxy Cache Squid</b>. Transforme for ReadyNAS en proxy HTTP et FTP sur le proxy port 3128.
PROMPT_SQUID_ALLOWED_HOSTS::::Autoriser l'accès depuis les adresses IP (laisser vide pour le réseau local):


take care that some squid version require libwww0
If you like my add-ons - Si vous aimez mes add-ons :
Image --- -------- Image
User avatar
super-poussin
ReadyNAS Add-ons Expert
 
Posts: 4610
Joined: Fri Jul 13, 2007 1:16 pm
ReadyNAS: Pro

Re: Squid plug-in

Postby super-poussin » Tue Apr 28, 2009 5:57 am

I have compiled the 3.0 for sparc I can send it to you to modify your add-on if you want :)

let me know
If you like my add-ons - Si vous aimez mes add-ons :
Image --- -------- Image
User avatar
super-poussin
ReadyNAS Add-ons Expert
 
Posts: 4610
Joined: Fri Jul 13, 2007 1:16 pm
ReadyNAS: Pro

Re: Squid plug-in

Postby mnot » Tue Apr 28, 2009 4:58 pm

You mean Squid 3.0? That's still not stable, really, and it lacks some of the features of 2.7...
mnot
ReadyNAS Newbie
 
Posts: 44
Joined: Fri Sep 19, 2008 8:26 pm
Location: Melbourne, Australia
ReadyNAS: Ultra

Re: Squid plug-in

Postby mnot » Tue Apr 28, 2009 5:00 pm

super-poussin wrote:you can add at the end of your install.sh :

Code: Select all
/etc/init.d/cron force-reload


will do

super-poussin wrote:for french translation use
Code: Select all
LABEL_SERVICE_SQUID_INFO::::<b>Proxy Cache Squid</b>. Transforme for ReadyNAS en proxy HTTP et FTP sur le proxy port 3128.
PROMPT_SQUID_ALLOWED_HOSTS::::Autoriser l'accès depuis les adresses IP (laisser vide pour le réseau local):



That didn't come through the message board too well.. maybe try to attach it to an issue over on github?

super-poussin wrote:take care that some squid version require libwww0


?? I don't think so.
mnot
ReadyNAS Newbie
 
Posts: 44
Joined: Fri Sep 19, 2008 8:26 pm
Location: Melbourne, Australia
ReadyNAS: Ultra

Re: Squid plug-in

Postby super-poussin » Tue Apr 28, 2009 9:56 pm

mnot wrote:You mean Squid 3.0? That's still not stable, really, and it lacks some of the features of 2.7...



yep the last stable
If you like my add-ons - Si vous aimez mes add-ons :
Image --- -------- Image
User avatar
super-poussin
ReadyNAS Add-ons Expert
 
Posts: 4610
Joined: Fri Jul 13, 2007 1:16 pm
ReadyNAS: Pro

Re: Squid plug-in

Postby mnot » Tue Apr 28, 2009 10:00 pm

super-poussin wrote:
mnot wrote:You mean Squid 3.0? That's still not stable, really, and it lacks some of the features of 2.7...

yep the last stable


Well, it's marked "stable" by the squid3 developers, but it's still a different beast, and not judged production-ready by many (although not all) users.

If you're interested in running it, I'd say a separate package (e.g., squid3) would be best.
mnot
ReadyNAS Newbie
 
Posts: 44
Joined: Fri Sep 19, 2008 8:26 pm
Location: Melbourne, Australia
ReadyNAS: Ultra

Re: Squid plug-in

Postby ptaylor874 » Fri May 22, 2009 7:37 pm

Hi - I've tried installing the 1.0 version of the plugin. I got this during installation: "The Squid Add-on encountered an error during installation". I went to the installed Add-ons page and removed it (since it wasn't running - no green dot). I've tried re-adding it, but it fails each time, only now it doesn't show up in the Add-ons page anymore. Oh - Soon after it fails to install, I get another pop-up that says "ERROR: Could not initialize cache".

And after the 1.0 version failed to install several times, I tried the 2.72 version from git, and it fails similarly... (Does not show up on Add-ons either)

I also tried rebooting, then reinstalling the 1.0 version (since it didn't show up in the Add-ons page after the reboot). Same problem.

Ok - Found more info:
When I go to /usr/local/squid/sbin/ and run squid -D, I get this error:

/squid: error while loading shared libraries: libmd5.so.0: cannot open shared object file: No such file or directory

Sounds like some of the components didn't completely install. Is there a way to manually install them, or perform the same actions that the plug-in installer is supposed to do so I can get more detail about what went wrong?

Edit: More info, running 4.25 on a PRO Pioneer.

Any assistance to get this working would be greatly appreciated.
ptaylor874
ReadyNAS User
 
Posts: 65
Joined: Thu Aug 23, 2007 7:05 pm

Re: Squid plug-in

Postby mnot » Fri May 22, 2009 9:18 pm

ptaylor874 wrote:When I go to /usr/local/squid/sbin/ and run squid -D, I get this error:

/squid: error while loading shared libraries: libmd5.so.0: cannot open shared object file: No such file or directory


My plugin installs in /opt/squid, not /usr/local/squid; have you installed squid separately, perhaps?

Also, IIRC the PRO is an intel box; the binaries on Github are for Sparc (which is probably why it's failing).

What does /opt/squid/sbin/squid -h give you?

Cheers,
mnot
ReadyNAS Newbie
 
Posts: 44
Joined: Fri Sep 19, 2008 8:26 pm
Location: Melbourne, Australia
ReadyNAS: Ultra

Re: Squid plug-in

Postby ptaylor874 » Fri May 22, 2009 9:29 pm

I just realized the ones on git were for Sparc when I figured out how to download your source files and saw sparc-linux in the Makefile.. :)

I've not installed squid separately...

I checked /opt/ and the only thing I have there is "leaf", which I think is for the new remote plug-in that Netgear released. I think the version that Super-Poussin released is in /usr/local/squid/. When I look in the start.sh & stop.sh scripts under /etc/frontview/addons/bin/SQUID, they both reference the /usr/local/squid/sbin location. (If it wasn't for me stumbling upon these files, I may have never even found /usr/local/squid!)

At any rate, it looks like all the dependencies aren't being installed... Any idea how to add them?

Oh - When I try to run squid -h, I just get the same error message I mentioned above about missing the libmd5.so.0 file.
ptaylor874
ReadyNAS User
 
Posts: 65
Joined: Thu Aug 23, 2007 7:05 pm

Next

Return to General Discussion on ReadyNAS Add-ons



Who is online

Users browsing this forum: No registered users and 2 guests