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
Old 02-04-2005, 02: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, 09: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, 10: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 02:00 PM. Reason: Should be [ quote] instead of <quote>
MeOrSo is offline   Reply With Quote
Old 02-06-2005, 02: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, 11: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-07-2005, 12:29 AM   #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, 06: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, 01: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

Bookmarks

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

BB 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
DB Design Question Part II sde Program Design and Methods 10 09-02-2008 12:37 PM
Quick question on <table>'s Redline HTML, XML, Javascript, AJAX 3 10-30-2004 09:12 PM
Compiler Question cheawick Standard C, C++ 3 04-30-2004 04:06 AM
Question about getting Arrays metazai PHP 16 04-24-2004 07:27 PM
Nagging question jeffro Lounge 1 03-08-2003 07:46 PM


All times are GMT -8. The time now is 12:08 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC8 ©2007, Crawlability, Inc.





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting