Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

EDIT (8-23): For clarity

I'm looking for an alternative to using web proxy scripts (Glype, PHProxy, etc.) by using proxy software like Squid or Privoxy. I want this new method to operate the same way as a web proxy script, where the user types in a URL into a form, my server fetches the site, and sends it to the user.

What I had in mind was to let the user enter the URL, and have my server somehow connect the user to the URL via proxy software running on my server. So it's as if the user configured a browser to use my server IP as a proxy.

Here's a summary:

Is it possible for users to connect to sites through Privoxy or Squid without having to configure a browser to use the server IP? They first connect to my webserver running on the same server. I don't have control over the users' networks.

share|improve this question
1  
Is this intended for anyone to be able to use the proxy without actually setting any proxy settings AND not having the proxy standing on the "way to the internet" (transparent)..? Because a transparent proxy would give you all the control you'd want without the user having to enter urls into a separate form - but you'd have to have control over the network they're on. –  Oskar Duveborn Aug 16 '09 at 19:34
    
It's not clear to me what you're trying to do. Perhaps you're not using appropriate terminology or perhaps you misunderstand what a proxy actually does. Can you please clarify. –  John Gardeniers Aug 16 '09 at 22:21

3 Answers 3

This isn't really a proxy, this is a web site that is an HTTP gateway that proxies a URL in a form. A proxy server typically implies things like transparency. That isn't what is going one here.

This isn't a reverse proxy, because reverse proxy typically implies a site that appears to be one thing, but on the backend is transparently proxying to other hidden sites.

I don't know why this question is heavily minused, maybe people didn't understand the question and couldn't comment to get more info?

share|improve this answer

It's not that clear what you mean. When someone opens your form and enters a URL (presumably in IE or Firefox or whatever) do you want the target web page to open in their browser but appear as if it has come from your web site? If so you could probably use URL rewriting, so in effect your server is a reverse proxy. If you want to do this on Windows you could probably use the new Application Request Routing addon for IIS 7.0.

For example to "proxy" www.google.com you'd set up ARR so http://yourserver/google/whatever got proxied to http://www.google.com/whatever

No programming needed. How reliable it would be in practice I don't know. You'd have to try it out and see.

JR

share|improve this answer
    
Yes, I want it to look like it's coming from my site, and I also want connections to be passed through my server. A reverse proxy sounds like it might work... I'll look into that. But I also run CentOS on my server, so I can't use IIS 7.0. Thanks for the tip. –  Lin Jul 15 '09 at 18:20
    
If you use unix then I'm fairly certain Apache can do this, possibly with the module to do URL rewriting. It's basically the same approach as I described. –  John Rennie Jul 16 '09 at 7:08

Umm... how easy it would be would depend on your level of programming skill, eh?

If you're talking about just returning the HTML of a web page to the user, unmodified, based on a URL entered in an HTML form then it'll be pretty easy.

If you're talking about processing the page that's returned to the user such that all the links / images / etc in the page are altered to redirect through your proxy script, then it's probably going to be a lot of coding. (And you'll never get 100% coverage since embedded Javascript within the page could contain URLs that are encoded... and since Javascript is turing-complete, the only way to "reverse" the encoding would be to run the decoder. Hello halting problem, how are you today? >smile<)

Edit:

So, you're really just looking for a way to allow clients to use your proxy w/o requiring that their browsers have proxy settings set.

Sounds like a job for proxy autoconfiguration scripts!

Assuming that you have enough control of the network infrastructure to distribute a proxy configuration script, you'll really, really like it. Getting the basics down can be a little tough, but once you get it going you'll be pleased.

share|improve this answer
    
I want to process the page with as much information as possible, but it doesn't have to work in all cases. Is there no way of doing that without me having to write a lot of code? I was thinking this: 1. Client connects to webserver 2. Client fills URL into form 3. Some script tells client to connect to proxy server 4. Client accesses URL through proxy server All I want is to avoid forcing a client to enter the proxy IP/port into the web browser settings. :( –  Lin Jul 15 '09 at 18:19
    
As Evan mentioned, getting it so the user can enter a URL in a box and your page then displays the required page, unaltered, is pretty easy, the problem comes when users click on links on this page, these links will take them to the proper URL for the page, so leaving your proxy and coming from the user IP again. To rewrite all of these links to work properly involves alot of coding, and will never work completely. –  Sam Jul 16 '09 at 17:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.