Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Go Back   Code Forums > Systems > Linux / BSD / OS X
User Name
Password

Reply
 
LinkBack Thread Tools Display Modes
Old 02-04-2005, 01:08 AM   #1 (permalink)
MeOrSo
Registered User
 
Join Date: Feb 2005
Posts: 5
MeOrSo is on a distinguished road
Question Question about squid

Hy you guys
I want to install squid on a server and use it only for specific sites. do you know if this is possible??
thanks for replies...
__________________
MeOrSo is offline   Reply With Quote
Old 02-05-2005, 08:51 AM   #2 (permalink)
idx
Senior Grasshopper
 
idx's Avatar
 
Join Date: Jun 2003
Location: FL
Posts: 317
idx is on a distinguished road
So the connection only goes through the squid proxy for specific IP's/URL's?

This might be possible, but seems like more work than it's worth.
__________________
idx is offline   Reply With Quote
Old 02-06-2005, 09:54 AM   #3 (permalink)
MeOrSo
Registered User
 
Join Date: Feb 2005
Posts: 5
MeOrSo is on a distinguished road
Quote:
Originally Posted by idx
So the connection only goes through the squid proxy for specific IP's/URL's?
Yep
Isn't it possible to say that in the conf-file?? i need it for the company i'm working for....
__________________

Last edited by redhead : 02-06-2005 at 01:00 PM. Reason: Should be [ quote] instead of <quote>
MeOrSo is offline   Reply With Quote
Old 02-06-2005, 01:12 PM   #4 (permalink)
idx
Senior Grasshopper
 
idx's Avatar
 
Join Date: Jun 2003
Location: FL
Posts: 317
idx is on a distinguished road
Offhand I don't remember, but the Configuration guide might be of some help.

So if this ip/url doesn't need to go through squid, what should be done? Will the request be denied, or will the connection be redirected to another server?

-r
__________________
idx is offline   Reply With Quote
Old 02-06-2005, 10:44 PM   #5 (permalink)
MeOrSo
Registered User
 
Join Date: Feb 2005
Posts: 5
MeOrSo is on a distinguished road
The Domains/Ips which are not specified should go out via gateway as usual
i'm reading through this page now....
__________________
MeOrSo is offline   Reply With Quote
Old 02-06-2005, 11:29 PM   #6 (permalink)
MeOrSo
Registered User
 
Join Date: Feb 2005
Posts: 5
MeOrSo is on a distinguished road
I think it is possible in the auto config file for the browser. There you can specify like
if dnsDomainIs(host,".mydomain.example") {
return "DIRECT";
}
__________________
MeOrSo is offline   Reply With Quote
Old 02-07-2005, 05:48 PM   #7 (permalink)
idx
Senior Grasshopper
 
idx's Avatar
 
Join Date: Jun 2003
Location: FL
Posts: 317
idx is on a distinguished road
Ah yes, the autoproxy .pac file config file. I have a few that we toyed with using at work if it helps.

The question then becomes: is it more of a PITA to change IE proxy settings (unless you have an automated way [GPO] of doing this) on all PC's instead of doing something on the server side?

I'd look into the firewall on your OS as that might be easier. eg: Just setup some rules that look for outbound traffic to the target IP's then redirect the requests to your gateway.

-r
__________________
idx is offline   Reply With Quote
Old 02-17-2005, 12:55 AM   #8 (permalink)
MeOrSo
Registered User
 
Join Date: Feb 2005
Posts: 5
MeOrSo is on a distinguished road
Exclamation

i've done it now. for anyone looking for the code:

function FindProxyForURL(url, host)
{
var proxy_yes = "PROXY ProxyIP:Proxyport; DIRECT";
var proxy_no = "DIRECT";
if (shExpMatch(url, "http://www.whatever.com*")) {return proxy_yes;}
else if (shExpMatch(url, "http://en.wikipedia.org*")) {return proxy_yes;}
else if (shExpMatch(url, "http://www.anotherpage.com*")) {return proxy_yes;}
else {return proxy_no;}
}

ProxyIP ist the IP of the proxyserver or the hostname, Proxyport is the port where Squid gets the requests (default is 3128)

thank you idx
__________________
MeOrSo is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Quick question on <table>'s Redline HTML, XML, Javascript, AJAX 3 10-30-2004 08:12 PM
Compiler Question cheawick Standard C, C++ 3 04-30-2004 03:06 AM
Question about getting Arrays metazai PHP 16 04-24-2004 06:27 PM
DB Design Question Part II sde Program Design and Methods 3 05-10-2003 12:24 PM
Nagging question jeffro Lounge 1 03-08-2003 06:46 PM


All times are GMT -8. The time now is 07:39 PM.


Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2006, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
Open Circle