Serious problem! Setting per-request proxy server
Hello all,
I wrote the usual code for setting a proxy server for my application:
System.setProperty( "proxySet", "true" );
System.setProperty( "http.proxyHost", "xxx" );
System.setProperty( "http.proxyPort", "xxx" );
System.setProperty("http.proxyUser", "xxx");
System.setProperty("http.proxyPassword", "xxx"); but now I need to set these properties only for my own requests, because many different application run in my same JVM and they don't have to use a proxy for their connections.
I'll be grateful if you'll hellp me.
Andrea
Have you tried new sun.net.www.protocol.http.HttpUrlConnection(URL, hostname, port);
Similar Messages
-
Problems setting up an NFS server
Hi everybody,
I just completed my first arch install. :-)
I have a desktop and a laptop, and I installed Arch on the desktop (the laptop runs Ubuntu 9.10). I had a few difficulties here and there, but I now have the system up and running, and I'm very happy.
I have a problem setting up an NFS server. With Ubuntu everything was working, so I'm assuming that the Ubuntu machine (client) is set-up correctly. I'm trying to troubleshoot the arch box (server) now.
I followed this wiki article: http://wiki.archlinux.org/index.php/Nfs
Now, I have these problems:
- when I start the daemons, I get:
[root@myhost ~]# /etc/rc.d/rpcbind start
:: Starting rpcbind [FAIL]
[root@myhost ~]# /etc/rc.d/nfs-common start
:: Starting rpc.statd daemon [FAIL]
[root@myhost ~]# /etc/rc.d/nfs-server start
:: Mounting nfsd filesystem [DONE]
:: Exporting all directories [BUSY] exportfs: /etc/exports [3]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.1.1/24:/home".
Assuming default behaviour ('no_subtree_check').
NOTE: this default has changed since nfs-utils version 1.0.x
[DONE]
:: Starting rpc.nfsd daemon [FAIL]
- If I mount the share on the client with "sudo mount 192.168.1.20:/home /media/desktop", IT IS mounted but I can't browse it because I have no privileges to access the home directory for the user.
my /etc/exports looks like this:
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
/home 192.168.1.1/24(rw,sync,all_squash,anonuid=99,anongid=99))
/etc/conf.d/nfs-common.conf:
# Parameters to be passed to nfs-common (nfs clients & server) init script.
# If you do not set values for the NEED_ options, they will be attempted
# autodetected; this should be sufficient for most people. Valid alternatives
# for the NEED_ options are "yes" and "no".
# Do you want to start the statd daemon? It is not needed for NFSv4.
NEED_STATD=
# Options to pass to rpc.statd.
# See rpc.statd(8) for more details.
# N.B. statd normally runs on both client and server, and run-time
# options should be specified accordingly. Specifically, the Arch
# NFS init scripts require the --no-notify flag on the server,
# but not on the client e.g.
# STATD_OPTS="--no-notify -p 32765 -o 32766" -> server
# STATD_OPTS="-p 32765 -o 32766" -> client
STATD_OPTS="--no-notify"
# Options to pass to sm-notify
# e.g. SMNOTIFY_OPTS="-p 32764"
SMNOTIFY_OPTS=""
# Do you want to start the idmapd daemon? It is only needed for NFSv4.
NEED_IDMAPD=
# Options to pass to rpc.idmapd.
# See rpc.idmapd(8) for more details.
IDMAPD_OPTS=
# Do you want to start the gssd daemon? It is required for Kerberos mounts.
NEED_GSSD=
# Options to pass to rpc.gssd.
# See rpc.gssd(8) for more details.
GSSD_OPTS=
# Where to mount rpc_pipefs filesystem; the default is "/var/lib/nfs/rpc_pipefs".
PIPEFS_MOUNTPOINT=
# Options used to mount rpc_pipefs filesystem; the default is "defaults".
PIPEFS_MOUNTOPTS=
/etc/hosts.allow:
nfsd: 192.168.1.0/255.255.255.0
rpcbind: 192.168.1.0/255.255.255.0
mountd: 192.168.1.0/255.255.255.0
Any help would be very appreciated!Thanks, I finally got it working.
I realized that even though both machines had the same group, my Ubuntu machine (client) group has GID 1000, while the Arch one has GID 1001. I created a group that has GID 1001 on the client, and now everything is working.
I'm wondering why my Arch username and group both have 1001 rather than 1000 (which I suppose would be the default number for the first user created).
Anyway, thanks again for your inputs. -
The best way of Setting up a proxy server
Hi all, im a student and i got asked to help set up a proxy server. The campus gave me an v20z server and now i am wondering whats the best sortware to use as an os and what other apps i should load onto it?
Please adviseYou are right, company should provide the access to the webmail iNotes, then you can use the instruction at www.nokialotusnotes.com. However, Setting up Lotus Notes on Nokia Messaging is not easy like others email account! And in most cases your will get your iNotes on the mobile but out of Nokia Messaging, whcih means out of synchronization.
-
"Setting up ISA Proxy Server" White Paper
Hello
I'd like to receive this white paper "Setting up ISA Proxy Server" as mentionned in "SAP_BPC_70_SP03_M_Install.pdf" guide.
Can someone send it to me ?
ThanksYou can find the Microsoft ISA Server whitepapers here:
[http://www.microsoft.com/forefront/edgesecurity/isaserver/en/us/white-papers.aspx|http://www.microsoft.com/forefront/edgesecurity/isaserver/en/us/white-papers.aspx]
SAP also has a blog on ISA Servers here:
[/people/kishor.gopinathan/blog/2008/07/12/isa-server-as-reverse-proxy-for-sap-applications|/people/kishor.gopinathan/blog/2008/07/12/isa-server-as-reverse-proxy-for-sap-applications] -
I want to have minimal if no downtime at all when moving the message store. iPlanet support hinted at an "unsupported" proxy server solution, and would give no further information. I am running the MMP with 5.1 and that supports IMAP and POP migration, but I need support for webmail services as well to complete the migration from NT to UNIX with minimal distruption of thousands of users. I am using the MoveUser utility to move the message store in hopes that will clear up some store corruption we have been seeing.
To get this in a 'supported' fashion you might want to wait until the iMS 5.2 release. iPlanet has said this release would include a webmail proxy/mmp server to do exactly what you desire.
A proxy server would not be a solution to your problem as it would have to have access and knowledge to the users mailhost attribute to determine to which host to route the webmail connection. The webmail proxy/mmp will have this functionality.
You might want to contact your iPlanet rep about this product and maybe you could get a copy of it as part of a beta program. I know iPlanet is always looking for oppourtunities for feedback like this.
-Chris -
Problem in installing Directory Proxy server
Hi all! Recently downloaded the trial version of sun one directory proxy server. After installing the sun one DS 5.2 . I tried to install sun one proxy server..when it asks for configuration server information i have given the admin id and password ....
but it gave me following error message
"The given Administrator Id/password combination was not accepted by the
Configuration Directory Server.
The Sun ONE configuration directory administrator is the ID typically used to
log in to the console."
I did used the same id and password to login to console & i am able to log in.
Please advice.Two quick hints.
First off, instead of hitting <Enter> to accept the default for the username [admin], type "admin" (without the quotes) as if you were giving different credentials. There's a known issue during the installation where the default text doesn't work.
Additionally, I had to change my admin password in the configuration directory to cleartext in order to get it to work. For some reason the password encryption during the bind was never successful. To do that:
dn: uid=admin,ou=Administrators,ou=TopologyManagement,o=NetscapeRoot
changetype: modify
replace: userPassword
userPassword: {CLEAR}password
I have no idea if this addresses the problem itself or just a symptom, but it did allow me to install DPS. You might want to give it a shot. -
Problem: Protect Sun Web Proxy Server 4.0.5 with Policy Agent 2.2
We are trying to protect the Sun Web proxy Server 4.0.5 with policy agent 2.2 on solaris 10 machine.
We are using Access Manager 7.1 along with directory server 6.2
We are trying to protect the web proxy console url http://domain.example.com with that policy agent so that when we hit web proxy console url
it should through us access manager login page ie http://abc.com/amserver.
How can we achieve this.What all changes required in the AMAgent.properties file.Please suggest.Hi subho,
problem is fixed. i have unistalled the policy agent and reinstalled it again. the problem i found is we didnt stop the webproxy instance when installing policy agent. Thanks for the reply -
How can I set a different proxy server for different networks in user.js
I need to automatically set the proxy configuration depending on the network I am connected to. Can this be done through the user.js?
Simple logic would be:-
if IP=10.20.30.0 use proxy A
if IP=172.18.19.0 use proxy B
else DIRECT
Thanks
LeonNo, you can't do it that way.<br />
You could create a set of files user.js and use a bat or cmd file to copy the file with the proxy setting that you want to use to user.js and then start Firefox.
<pre><nowiki>cd <path to profile folder>
delete user.js
copy user-proxy1.js user.js
start "" "C:\Program Files\Mozilla Firefox\firefox.exe"
</nowiki></pre>
You can also use an extension.
*FoxyProxy: https://addons.mozilla.org/firefox/addon/2464
*QuickProxy: https://addons.mozilla.org/firefox/addon/1557
*SwitchProxy: https://addons.mozilla.org/firefox/addon/125 -
Problems setting up 2014 SQL Server Express advanced
I use windows 8.1. After I install 2014 Server Express I cant find Management
studio. I then try to connect from Visual studio using SQLExpress as the
server name, but get a message that the name is not correct. I then try
SQLEXPRESS as the name but that name is not accepted. How do I know
what the name of the server is.
Also, I am unable to access the server through the management studio because I can't find it. I can I get a shortcut on my desktop to access Management studio.
As you can tell I am a novice. My programing has been limited to VBA.
ThanksHi,
I guess you just installed Database engine services of Express edition and you did not installed SSMS. You can go to
This link and click on download go down and you would see below file
MgmtStudio 64BIT\SQLManagementStudio_x64_ENU.exe
Assuming you have 64 edition. Download and install it
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
My Technet Wiki Article
MVP -
Set Up Proxy Server on OSX Mountain Lion Server.app
Hi,
Can anyone help me on how to set up a proxy server or forward proxy on OS X Mountain Lion Server.app? without using Squid
a step by step instruction would be helpfull
Thank you
Regards
a.wThere is no way to set up a proxy server in Server.app. For generic instructions, see, for example, this:
mod_proxy - Apache HTTP Server -
Is there a fix yet for the lack of ability to add a Proxy Server to the AppleTV 2?
This is a serious limitation, and if not fixed, I'll be selling my AppleTV's (3 of them)to someone who doesn't care about the security of their network, or the security of keeping their kids safe online.
I am setting up a proxy server so I can limit the time my children are on the internet. This will also assist in keeping below our monthly allowed internet usage. Unlike Apple, we Alaskans don't have unlimited bandwidth and can't keep 110% of our personal files and media online. A proxy server will assist in preventing over utilization of Apple's persistent synching.
Either that, Or I'll be jailbreaking my AppleTv so I can use it the way I need to.
Thanks
JonI don't use a proxy server, but I would not imagine it's high on the feature list needed by most users.
No harm requesting an enhancement here however:
http://www.apple.com/feedback/appletv.html -
Unable to make SSL connection from Proxy Server to Directory Server
I have recently installed Directory Proxy Server 5.2 Patch 3 on Solaris 9 server. Backend directories are Sun Directory Server 5.2sp3 using Thawte signed certificates.
I can't get the Proxy Server to make a successful SSL connection to the Directory Servers. The proxy server can make the non-ssl connection without problem. When the Proxy Server attempts the SSL connection it gives SEC_ERROR_UNTRUSTED_ISSUER error. The SSL certificates on the Directory Servers are signed by Thawte and have just recently been updated. The certificate for the Proxy Server is also signed by Thawte. The CA certificate is loaded in both the Proxy Server and the Directory Server.
I also have an iPlanet Directory Access Router (iDAR) 5.0 Server that is our current production server that serves these same directories and I haven't had a problem with SSL connection with it. So, the certificates are good.
I've encluded an exerpt from the Proxy Server log below for one of SSL connection attempts.
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [STAT/CONN] [ 560
307] Connection from secured listen port. New connection is on socket 37.
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [STAT/CONN] [ 560
305] Number of open connections is 1.
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [STAT/CONN] [ 171
211] [client( 152.3.100.30, 37)] Accepting connection via dukenet-group
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [NOTICE] [ 302
023] Failure with CERT_VerifyCertNow (checking signature, usage: "certUsageSSLSe
rver").
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [NOTICE] [ 302
023] SEC_ERROR_BASE + 20, NSPR error: -8172 (0xffffe014). Native errno is: 11
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [NOTICE] [ 385
729] Rejected certificate on socket 38
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [NOTICE] [ 385
729] SEC_ERROR_BASE + 20, NSPR error: -8172 (0xffffe014). Native errno is: 11
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [NOTICE] [ 385
728] Certificate rejected on socket 38
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [NOTICE] [ 385
728] SEC_ERROR_BASE + 20, NSPR error: -8172 (0xffffe014). Native errno is: 11
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [NOTICE] [ 385
721] Read on socket 38 failed.
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [NOTICE] [ 385
721] SEC_ERROR_BASE + 20, NSPR error: -8172 (0xffffe014). Native errno is: 11
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [EXCEPTION] [ 301
006] Unexpected error on socket 38. (Error: -8172).
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [NOTICE] [ 171
002] [client( 152.3.100.30, 37)] [server( 152.3.101.110+ 636, 38)] L
ost connection to server, trying to failover to another
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [NOTICE] [ 302
023] Failure with CERT_VerifyCertNow (checking signature, usage: "certUsageSSLSe
rver").
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [NOTICE] [ 302
023] SEC_ERROR_BASE + 20, NSPR error: -8172 (0xffffe014). Native errno is: 11
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [NOTICE] [ 385
729] Rejected certificate on socket 38
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [NOTICE] [ 385
729] SEC_ERROR_BASE + 20, NSPR error: -8172 (0xffffe014). Native errno is: 11
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [NOTICE] [ 385
728] Certificate rejected on socket 38
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [NOTICE] [ 385
728] SEC_ERROR_BASE + 20, NSPR error: -8172 (0xffffe014). Native errno is: 11
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [EXCEPTION] [ 385
717] ber_flush unexpected error on socket 38
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [EXCEPTION] [ 385
717] SEC_ERROR_BASE + 20, NSPR error: -8172 (0xffffe014). Native errno is: 11
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [EXCEPTION] [ 385
717] ber_flush unexpected error on socket 38
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [EXCEPTION] [ 385
717] NSPR error: -5938 (0xffffe8ce). Native errno is: 11
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [NOTICE] [ 385
721] Read on socket 38 failed.
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [NOTICE] [ 385
721] NSPR error: -5938 (0xffffe8ce). Native errno is: 11
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [EXCEPTION] [ 301
006] Unexpected error on socket 38. (Error: -5938).
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [NOTICE] [ 171
002] [client( 152.3.100.30, 37)] [server( 152.3.232.3+ 636, 38)] L
ost connection to server, trying to failover to another
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [EXCEPTION] [ 385
717] ber_flush unexpected error on socket 38
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [EXCEPTION] [ 385
717] NSPR error: -5938 (0xffffe8ce). Native errno is: 11
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [EXCEPTION] [ 190
102] [client( 152.3.100.30, 37)] Rejecting request The server is tempor
arily busy
Aug 30 2005 16:12:12 king.oit.duke.edu SunONEDPS[ 17471]: [OP/CONN] [ 170
904] [client( 152.3.100.30, 37)] [server( 152.3.101.110+ 636, 38)] C
onnection unbound by clientNo, that was on 5.1. For 6.0, my classpath has just:
%JAVA_HOME%\lib\tools.jar;%WL_HOME%\lib\weblogic_sp.jar;%WL_HOME%\lib\weblogic.jar;
%CLASSPATH%
This works fine. -
Installing a Proxy server?
Ok.
I have come a bit further then last time.
I have managed to get both my internal mailserver and my external mail gateway up and running. They are talking together and mail is flowing as intended.
On the mail gateway in the DMZ local delivery is turned off.
On the internal mail server I now have IMAP running and I'm using Squirrel mail for web based mail.
Web mail is delivered from the internal gateway address through NAT.
I'm running the external web service on the mail gateway in the DMZ.
I'm running internal webservices on the internal server.
VPN connects directly to the internal router.
Wireless services connect directly to the internal network
I have bought a second router to put between the ISP and my DMZ. Once I have installed this router I will start to restrict the flow of information.
Now I would like to take a look at how to set up a proxy server.
I know what it is for, and where to put it but I don't know how to configure such a device.
Could you please point me to some reading material on this issue?
Perhaps something of similar quality as the documentation on postfix.org.
TIA
HansJust wondering...
Should I be asking this question on another forum?
If so, on which forum?
Hans -
Concurrency in urlconnection using multiple proxy server
hi,
I am working on a web application project and need to set up different proxy server for different organization. I know that System.getProperties() will make proxy server work in urlconnection. However, since users from different organization may access our website concurrently, I think System.getProperties() needs to be synchronized through whole setting-proxy-properties----making-urlconnection----removing-proxy-properties working flow. so it will affect scalability of our website,right? any better solutions?
Thanks,
DeanI just found a solution by subclassing sun package classes so that you can create url connection without affecting system.properties.
URL url =
new URL(null, urlSpec,
new ConcurrentProxyHandler(proxyHost,proxyPort));
//File: ConcurrentProxyHandler.java
//override connection of sun.net.www.protocol.http.HttpURLConnection import java.io.PrintStream;
import java.io.IOException;
import java.net.URL;
/** open an http input stream given a URL */
public class ConcurrentProxyHttpURLConnection extends
sun.net.www.protocol.http.HttpURLConnection {
protected ConcurrentProxyHttpURLConnection(URL u,
ConcurrentProxyHandler handler)
throws IOException {
super(u, handler);
public void connect() throws IOException {
if (connected) {
return;
try {
http = new sun.net.www.http.HttpClient(url,
((ConcurrentProxyHandler)handler).getProxy(),
((ConcurrentProxyHandler)handler).getProxyPort());
ps = (PrintStream)http.getOutputStream();
} catch (IOException e) {
throw e;
// constructor to HTTP client calls openserver
connected = true;
//File: ConcurrentProxyHandler.java
//override openConnection of sun.net.www.protocol.http.Handler and provide accessor for proxyHost
//and proxyPort
import java.io.IOException;
import java.net.URL;
public class ConcurrentProxyHandler extends sun.net.www.protocol.http.Handler {
public ConcurrentProxyHandler (String proxy, int port) {
super(proxy, port);
protected java.net.URLConnection openConnection(URL u)
throws IOException {
return new ConcurrentProxyHttpURLConnection(u, this);
protected String getProxy() {
return proxy;
protected int getProxyPort() {
return proxyPort; -
I have installed Fiddler software but it seems it changes proxy server settings beside tracking all browser activity due to statistics.
When I uninstalled Fiddler I noticed error in Mozilla as all browsing was refused:
The proxy server is refusing connections
Firefox is configured to use a proxy server that is refusing connections.
Check the proxy settings to make sure that they are correct.
Contact your network administrator to make sure the proxy server is working.
I have seen that login as another user will work but the same settings will not work under user where is installed Fiddler.
There is AUTO detecting proxy and use a proxy server.
How to manage that it will be set use a proxy server but solve browsing when I uninstall Fiddler?
Is there some Windows 8 configuration as Mozilla is hit by Fiddler.Hi,
I have checked previous posts. I understand it is default Use proxy system and I can use NO proxy. It is an issue that software hits Mozilla settings for the user as Use proxy system and browsing will not work anymore. Fiddler should warn users that even if you use uninstall it will not bring back settings.
This is time consuming as Mozilla is not responsible.
Is there system data inside Windows 8 to bring back working Use proxy system in Mozilla for user where is installed Fiddler? I like to use default due to security.
Maybe you are looking for
-
Call an Startup-Plug from another WDA
Hello. How can I call a Startup-Plug from another WDApplication with a table-Parameters. I get the URL from the Method cl_wd_utilities=>constuct_wd_url. thanks for helping Edited by: Marcus Ventur on Dec 2, 2008 11:33 AM
-
System error when calling a servlet
Hi All I have a servlet deployed in sap j2ee engine. The servlet actually reads a SOAP message , extracts a file attached with the SOAP message and forwards the file to a RFC. Now from a java class I am attaching a file with the SOAP message and call
-
TS1630 Sound issues with the new 5c?
I've today just gotten the iPhone 5c, and when my boyfriend called me he said he could barely hear me and the volume was going from loud to quiet. I've only just got this phone and it seems to be defective already. Anyone else with this issue?
-
Hi , I need help because the ASR not functioning correctly how vpn " concentrator". Someone, does ASR use for closing the VPN on the central site ? I've this error in logging *Dec 15 10:29:53.732: %CRYPTO-6-IKMP_MODE_FAILURE: Processing of Informati
-
*.dng in Photoshop CS 8.0
How does Photoshop CS 8.0 learn do handle *.dng?