Jump to content

PHP Proxy bypass


AV1611

Recommended Posts

I THINK this is the right place, as I'm trying to write a PHP script...

 

Ok.

 

I have a server farm in my home office. 

server A.

this is a content filter.  All internet comes into this linux box, and using squid/dansguardian, it is the main internet feed for my house. 

 

server B.

this is my LAMP server.  it is NOT part of my LAN above.

 

here is what I am trying to do.

 

When a web request comes in from a LAN client, it goes through the content filter and either displays the site if ok or bounces to a blocked page I wrote that has all the info about the request available to it.

 

What I did was add a small password field and submit button so I can add administrator bypass functionality to the blocked page.

 

My approach so far has been to do

 

file_get_contents() in a request to a script on server B, which is not filtered.

 

this brings up the page fine. 

 

For example, let's say google.com was blocked.  The bypass sends this: http://myserver/bypass.php?url=http://www.google.com&pw=whatever

 

However, I can't click any links on the googe page, as I am still in a "blocked" domain.  I need someone to at least help me see the concept of how to do this.  I tried an IFrame, but the problem is the same... each subsequent request is blocked as a local request on my LAN, so it is filtered.  I guess what I need is to keep the requests on the "bypass" server (server B), and only display the content back to the LAN client.  If this can't be done in just PHP lemme know, as I only know some PHP... but I think it can be. 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.