You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by 心藍 Dennis <hk...@gmail.com> on 2005/04/02 07:07:05 UTC

Can I set the HttpClient that allow/deny access specify IP/subnet/host ??

Please help, I am using HttpClient with springframework, and I want to
limit the access of the specify bean.
e.g. I don't want it trying to access anything in intranet / localhost.

I have search for solutions but cannot found any useful information.

My ideas,

1. Set a proxy, and then let the httpClient use the proxy
    but I don't want so much external depends of my system.

2. using *.policy file,
    policy is JVM level, and the configuration file is really bad.
    and I don't like to restart my server when I update the list of hosts.
   
3. delegate a HttpConnectionManager
    and do checking myself in all getConnection

But are there any others useful information or solutions??

Any suggestion please~!


--
Dennis

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Re: Can I set the HttpClient that allow/deny access specify IP/subnet/host ??

Posted by Oleg Kalnichevski <ol...@apache.org>.
Dennis,

Option 3 is definitely the way to go. It may be as simple as extending
the one of the standard connection managers and overriding the
getConnection method.

Oleg


On Sat, Apr 02, 2005 at 01:07:05PM +0800, ???? Dennis wrote:
> Please help, I am using HttpClient with springframework, and I want to
> limit the access of the specify bean.
> e.g. I don't want it trying to access anything in intranet / localhost.
> 
> I have search for solutions but cannot found any useful information.
> 
> My ideas,
> 
> 1. Set a proxy, and then let the httpClient use the proxy
>     but I don't want so much external depends of my system.
> 
> 2. using *.policy file,
>     policy is JVM level, and the configuration file is really bad.
>     and I don't like to restart my server when I update the list of hosts.
>    
> 3. delegate a HttpConnectionManager
>     and do checking myself in all getConnection
> 
> But are there any others useful information or solutions??
> 
> Any suggestion please~!
> 
> 
> --
> Dennis
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org