You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Richard Langly <ri...@gmail.com> on 2009/03/20 04:28:15 UTC

help building a proxy

Hey all,


I'm searching for a way to make a proxy server to:

    - receive a request from a web-browser.

    - allows me to grab the URL and build a web page.

    - then forward the request to the destination.

    - and then allows me to store and access the response when the
destination returns the page from this same proxy server.


If Tomcat would allow me to do this, can I get a short desc of what I need
to do?


Thanks,

Re: help building a proxy

Posted by Gregor Schneider <rc...@googlemail.com>.
On Sat, Mar 21, 2009 at 1:06 AM, Richard Langly
<ri...@gmail.com> wrote:
> If you mean that there are no modifications to the original request or even
> the response, then yes. It's to be a transparent proxy.
>

So why do you try do build your own proxy?

I've a similar setup using TinyProxy - that's just perfect.

You can even make TinyProxy listen to localhost only, then, on your
client-machine, setup Putty with port-forwarding, connect via putty to
your proxy-machine and enter localhost:<forwarded TinyProxyPort> as a
proxy within your web-browser and you're all set.

Might be that I misunderstood your intentions, but if it's about
circumventing some censorship, then this is an almost perfect setup ;)

Rgds

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: help building a proxy

Posted by Richard Langly <ri...@gmail.com>.
If you mean that there are no modifications to the original request or even
the response, then yes. It's to be a transparent proxy.
On Fri, Mar 20, 2009 at 4:18 AM, Gregor Schneider <rc...@googlemail.com>wrote:

> Richard:
>
> Are you looking for a transparent proxy? I.e., circumvent some censorship?
>
> Rgds
>
> Gregor
> --
> just because your paranoid, doesn't mean they're not after you...
> gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
> gpgp-key available @ http://pgpkeys.pca.dfn.de:11371
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: help building a proxy

Posted by Gregor Schneider <rc...@googlemail.com>.
Richard:

Are you looking for a transparent proxy? I.e., circumvent some censorship?

Rgds

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: help building a proxy

Posted by Richard Langly <ri...@gmail.com>.
> Allright.  I still don't really see what the point is, but at least the
> description is clearer.  You may want to repost it like that on the
> httpd list too.
>
> Taking the above at face value and just giving a generic answer :
> You could probably do that in Apache httpd or in Tomcat, but in both
> cases I don't think you'll find a standard module to do that.  You will
> have to write your own code.

That's fine, whatever it takes. I'm just looking for the right tools
to start off with.

> HTTP proxy requests arrive to the HTTP server in a format slightly
> different from normal requests :
> a normal request arrives like
> GET /path/to/document HTTP/1.1
> while a proxy request arrives like
> GET http://hostname_desired/path/to/document HTTP/1.1
>
> All the "normal" machinery of a webserver is designed to handle the
> first format, so I imagine that module like mod_proxy in Apache httpd
> have to do something special to handle the second one.
>
> I am not going to say more, because I don't really know this works, but
> maybe someone more knowledgeable in "forward proxies" could step in at
> this point.
>
> ----
>
> Separately, I am still curious about a couple of points :
> - if your proxy server composes a web page as a result of a request, on
> which base does it create it ?  I mean, it gets a request like
> "http://www.bbc.co.uk/africa/current.html". What does it create itself
> in response to that ?

I know that sounds pretty weird and useless, but I've got an idea that
requires info from just the URL itself.

> - you say that you want to store this page for later use.  Which later
> use ? what do you return to the client now, and to which request would
> you return this same page later ?

I don't return anything to the client now. 'Later use' means the user
can get online and view that page which is now cached on the local
proxy server and not get on the internet ... so, a few hours later the
page can be viewed (when the proxy is not online). The users intent
here is to not receive the request at the time the request is made.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: help building a proxy

Posted by André Warnier <aw...@ice-sa.com>.
Richard Langly wrote:
> Well, that's exactly what I want to do, build a web page from within the
> proxy server that will be viewed at a later time, and also further pass on
> the request and expect to get a page back which will also be viewed at a
> later time. This all happens from the proxy server.
> 
> 
> 1) receive URL from user request and store/build a web page to be viewed at
> a later time (from within this proxy).
> 
> 2) pass on URL to web server and store the response html page in this proxy
> to also be viewed at a later time.
> 
Allright.  I still don't really see what the point is, but at least the
description is clearer.  You may want to repost it like that on the
httpd list too.

Taking the above at face value and just giving a generic answer :
You could probably do that in Apache httpd or in Tomcat, but in both
cases I don't think you'll find a standard module to do that.  You will
have to write your own code.
HTTP proxy requests arrive to the HTTP server in a format slightly
different from normal requests :
a normal request arrives like
GET /path/to/document HTTP/1.1
while a proxy request arrives like
GET http://hostname_desired/path/to/document HTTP/1.1

All the "normal" machinery of a webserver is designed to handle the
first format, so I imagine that module like mod_proxy in Apache httpd
have to do something special to handle the second one.

I am not going to say more, because I don't really know this works, but
maybe someone more knowledgeable in "forward proxies" could step in at
this point.

----

Separately, I am still curious about a couple of points :
- if your proxy server composes a web page as a result of a request, on
which base does it create it ?  I mean, it gets a request like
"http://www.bbc.co.uk/africa/current.html". What does it create itself
in response to that ?
- you say that you want to store this page for later use.  Which later
use ? what do you return to the client now, and to which request would
you return this same page later ?
- the same question for the real page that you retrieve from the real
server for "http://www.bbc.co.uk/africa/current.html" ?



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: help building a proxy

Posted by Richard Langly <ri...@gmail.com>.
Well, that's exactly what I want to do, build a web page from within the
proxy server that will be viewed at a later time, and also further pass on
the request and expect to get a page back which will also be viewed at a
later time. This all happens from the proxy server.


1) receive URL from user request and store/build a web page to be viewed at
a later time (from within this proxy).

2) pass on URL to web server and store the response html page in this proxy
to also be viewed at a later time.


I did send to httpd, but I didn't see that apache was going to do what I was
looking for, at least w/ mods only. I'm still looking into that also.


Hope that helps clarify.


On Fri, Mar 20, 2009 at 3:22 AM, André Warnier <aw...@ice-sa.com> wrote:

> Richard Langly wrote:
>
>> Hey all,
>>
>>
>> I'm searching for a way to make a proxy server to:
>>
>>    - receive a request from a web-browser.
>>
>>    - allows me to grab the URL and build a web page.
>>
>>    - then forward the request to the destination.
>>
>>    - and then allows me to store and access the response when the
>> destination returns the page from this same proxy server.
>>
>>
>> If Tomcat would allow me to do this, can I get a short desc of what I need
>> to do?
>>
>>  I think I have seen this question before, maybe on another list (Apache
> httpd?).
> And you are probably not getting the answer you want, because the way you
> write the question above does not seem to make a lot of sense.
>
> For example, these two lines appear to be contradictory :
> >     - allows me to grab the URL and build a web page.
> >     - then forward the request to the destination.
> Because in the server who gets the request, you normally /either/ build a
> response html page and return it to the browser, /or/ you pass the request
> further to another server, but not both at the same time.
>
> Can you try and rephrase your question in another way, or give an example
> of what you would really like to do ?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: help building a proxy

Posted by André Warnier <aw...@ice-sa.com>.
Richard Langly wrote:
> Hey all,
> 
> 
> I'm searching for a way to make a proxy server to:
> 
>     - receive a request from a web-browser.
> 
>     - allows me to grab the URL and build a web page.
> 
>     - then forward the request to the destination.
> 
>     - and then allows me to store and access the response when the
> destination returns the page from this same proxy server.
> 
> 
> If Tomcat would allow me to do this, can I get a short desc of what I need
> to do?
> 
I think I have seen this question before, maybe on another list (Apache 
httpd?).
And you are probably not getting the answer you want, because the way 
you write the question above does not seem to make a lot of sense.

For example, these two lines appear to be contradictory :
 >     - allows me to grab the URL and build a web page.
 >     - then forward the request to the destination.
Because in the server who gets the request, you normally /either/ build 
a response html page and return it to the browser, /or/ you pass the 
request further to another server, but not both at the same time.

Can you try and rephrase your question in another way, or give an 
example of what you would really like to do ?



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: incorrect time in the catalina.out logging

Posted by Ghufran <gh...@vopium.com>.
Got it here
http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg145602.html 

 

  _____  

From: Ghufran [mailto:ghufran.a@vopium.com] 
Sent: Friday, March 20, 2009 11:07 AM
To: 'Tomcat Users List'
Subject: incorrect time in the catalina.out logging

 

Hi All

 

 

I am using tomcat 6.0.18 on RHEL 5.

 

The problem is that the time that is printed in the logging of catalina.out
is one hour ahead of the server time.

 

For example, when the command line date command said Fri Mar 20 05:57:46 GMT
2009  

The time printed in the catalina.out was 2009-03-20 06:57:03

 



 

Please advice how to fix the issue.

 

 

Regards,

 

Ghufran

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.0.238 / Virus Database: 270.11.19/2010 - Release Date: 03/19/09
19:03:00



incorrect time in the catalina.out logging

Posted by Ghufran <gh...@vopium.com>.
Hi All

 

 

I am using tomcat 6.0.18 on RHEL 5.

 

The problem is that the time that is printed in the logging of catalina.out
is one hour ahead of the server time.

 

For example, when the command line date command said Fri Mar 20 05:57:46 GMT
2009  

The time printed in the catalina.out was 2009-03-20 06:57:03

 



 

Please advice how to fix the issue.

 

 

Regards,

 

Ghufran