Creating a socket behind a proxy server

How can I create a socket to a server if the client is behind a proxy server? I know java.net's HTTP-related classes have built-in proxy server support but this is not for a HTTP-based application.

Hi,
I also need to do this but not found any way yet. Somewhere I read that we can set the socket proxies (because mine was an application which tries to open socket connection over the network) through command line or by setting the system properties "socksProxyHost=<proxy_host_address>" and "socksPoxyPort=<proxy_port>". I tried to solve my proxy issue this way but all invain. While setting these system properties it is required that your proxy server is using the SOCKS service which I think is mostly the case but it still didn't work for me. You people try and c if it works for you. If anyhow you manage to get this issue resolved then please tell me also by posting a message.
regards

Similar Messages

  • Creating java sockets behind proxy servers.

    Hi,
    I am trying to create a socket to an external server(i.e. a public server) from behind a proxy firewall, but the socket creation statement throws an IO exception. Can someone please let me know how to create sockets using proxy servers.
    TIA
    Shishir

    I tried using java.net.Proxy for the connection. But the socket to the proxy itself is not getting created. It throws the IllegalArgumentException.
    import java.io.*;
    import java.net.*;
    import java.net.Proxy.Type;
    public class Client {
    static Socket proxSocket = null;
    static PrintWriter out = null;
    static BufferedReader in = null;
    public static void main(String[] args) throws IOException {    
    try {
    System.out.println("Trying to create socket");
    InetSocketAddress proxyadd = new InetSocketAddress(InetAddress.getByName("148.87.19.20"),80);
    Proxy ps = new Proxy(Proxy.Type.HTTP,proxyadd);
    Socket proxSocket = new Socket(ps);
    out = new PrintWriter(proxSocket.getOutputStream(), true);
    in = new BufferedReader(new InputStreamReader(
    proxSocket.getInputStream()));
    } catch (UnknownHostException e) {
    System.err.println("Don't know about host: ...");
    System.exit(1);
    } catch (IOException e) {
    System.err.println("Couldn't get I/O for "
    + "the connection to: ...");
    System.exit(1);
    catch(IllegalArgumentException e)
    System.err.println("Unable to describe the proxy.");
    System.exit(1);
    }

  • Can Air application connect behind a proxy server

    Can Air application connect behind a proxy server using HTTP
    or SOCKS.
    thanks

    I tried it but its not working. I am using XMLSocket
    var socket:XMLSocket = new XMLSocket();
    socket.connect( server, 5000 );
    It returns "no response from server", It works fine if i
    directly connected to internet.
    My browser is able to connect to internet means all
    configurations are fine.

  • Web service client behind a proxy server connecting to web service over SSL

    Hi Friends,
    A web service is exposed by an external system over SSL. We are behind a proxy server and are trying to get connected to web service over SSL. <p>
    We are getting the following error on the test browser of workshop<p><p>
    External Service Failure: FATAL Alert:HANDSHAKE_FAILURE - The handshake handler was unable to negotiate an acceptable set of security parameters.<p><p>
    the whole trace is <p>
    <p>JDIProxy attached
    <Sep 24, 2005 9:27:25 AM EDT> <Warning> <WLW> <000000> <Id=creditCheckCtrl:salesExpertServiceControl; Method=creditcheckcontr
    ol.SalesExpertServiceControl.doCreditVerification(); Failure=com.bea.control.ServiceControlException: SERVICE FAULT:
    Code:javax.net.ssl.SSLHandshakeException
    String:FATAL Alert:HANDSHAKE_FAILURE - The handshake handler was unable to negotiate an acceptable set of security parameters
    Detail:
    END SERVICE FAULT>
    <Sep 24, 2005 9:27:26 AM EDT> <Warning> <WLW> <000000> <Id=creditCheckCtrl; Method=creditcheckcontrol.CreditCheck.testCreditC
    heck(); Failure=com.bea.control.ServiceControlException: SERVICE FAULT:
    Code:javax.net.ssl.SSLHandshakeException
    String:FATAL Alert:HANDSHAKE_FAILURE - The handshake handler was unable to negotiate an acceptable set of security parameters
    Detail:
    END SERVICE FAULT [ServiceException]>
    <Sep 24, 2005 9:27:26 AM EDT> <Warning> <WLW> <000000> <Id=top-level; Method=processes.CreditCheck_wf.$__clientRequest(); Fai
    lure=com.bea.wli.bpm.runtime.UnhandledProcessException: Unhandled process exception [ServiceException]>
    <Sep 24, 2005 9:27:26 AM EDT> <Error> <WLW> <000000> <Failure=com.bea.wli.bpm.runtime.UnhandledProcessException: Unhandled pr
    ocess exception [ServiceException]><p>
    I am not able to make out what could be possibly wrong. Please let me know if you guys have any ideas about how to resolve it.
    Thanks
    Sridhar

    did you resolve this problem. I am looking at the same issue. If you did I would really appreciate your response.
    Thanks.

  • Places look-up crashes iPhoto '09 8.1.2 when behind a proxy server

    Places in iPhoto was always a problem for those imprisoned behind a proxy server, however since the 8.1.2 update this has caused iPhoto to hang forever when iPhoto tries to add new places automatically, E.G. when you plug your iPhone in.
    As a work-around I deleted com.apple.iPhoto.plist from my Username > Library >Preferences folder and then told it not to look up locations automatically when it asked about it on startup.
    Not ideal but it does work without hanging now!
    Ideally Apple would fix the Proxy support in iPhoto...

    Welcome to the Apple Discussions.
    Ideally Apple would fix the Proxy support in iPhoto...
    You'll have to ask Apple directly at http://www.apple.com/feedback/iphoto.html

  • Calling WS from WebLogic server 8.1 that is behind a Proxy server

    Hi,
    I have a web application deployed on WebLogic server 8.1 sp1. And my server is
    behind a http proxy server. Now one of the components in the application makes
    a web service call to a service located external to the system, and it always
    throws "java.net.UnknownHostException". I have set the Java system properties
    http.proxyHost = my proxy server, http.proxySet = true and http.proxyPort = 80
    and it still does not help.
    If I try to evaluate the web service component as a stand alone client using WebLogic's
    webserviceclient.jar, everything works fine. I can't figure what I have to do
    to get this component working from within the WebLogic server. Can anybody provide
    me with inputs, comments or suggestions.
    Naveen.

    Found solution. Followed Part 2 of the solution as explained in http://support.bea.com/application?namespace=askbea&origin=ask_bea_answer.jsp&event=link.view_answer_page_solution&answerpage=solution&page=wlw/S-19283.htm
    What surprises me is that this solution to a common problem is hidden and hard
    to find. If I am correct, no part of WLS 8.1 documentation suggests this. Rather
    the doc says, set the system properties for the standard JDK 1.4 network properties
    and it should work fine. If it is actually supposed to work like this, is it a
    bug then?
    "Naveen Kumar" <[email protected]> wrote:
    >
    Hi,
    I have a web application deployed on WebLogic server 8.1 sp1. And my
    server is
    behind a http proxy server. Now one of the components in the application
    makes
    a web service call to a service located external to the system, and it
    always
    throws "java.net.UnknownHostException". I have set the Java system properties
    http.proxyHost = my proxy server, http.proxySet = true and http.proxyPort
    = 80
    and it still does not help.
    If I try to evaluate the web service component as a stand alone client
    using WebLogic's
    webserviceclient.jar, everything works fine. I can't figure what I have
    to do
    to get this component working from within the WebLogic server. Can anybody
    provide
    me with inputs, comments or suggestions.
    Naveen.

  • Messages with Server 3.1.2 behind a proxy server

    Help ...
    I am familiar with earlier iterations of the Mac OS X server software and set up a largish 16TB system in a UK hospital before I retired.  I am now working for a charity in a remote location and testing the latest version running on a recycled MacBook Pro to see if it could be used in earnest to provide local services to support the volunteer community here.  Access to the internet is very slow and heavily restricted by a Squid proxy server and I find the lack of a comprehensive OS X Server manual frustrating at times (if there is one please point me to it!).
    I have File Sharing running fine, but I am struggling to find the workable settings for a cross platform local messaging service.  I am trying AIM initially, but whatever settings at the user end I select I keep getting either 'server refusing connections' or 'unidentified AIM socket error' messages.
    Any assistance would be really appreciated ... especially as this is my foray into the world of Messages!
    Thanks in anticipation,
    Ian
    Test system: Server: MacBook Pro running Server 3.1.2 on Mac OS X 10.9.4    Client: MacBook Air running Mac OS X 10.9.4

    Since posting this I have been able to download more information and also search the ASC threads - and see I should be using Jabber.
    So - I may still need some advice but I am working towards the solution ... hopefully!

  • Rich-client Java application that is client to WLS6.1 but behind corporate proxy server

    We have a rich-client Java application that is a client to WLS6.1 that can't
    connect to the WLS6.1 server when the client is behind a corporate proxy
    server. What is a remedy for this?
    Thanks,
    Jim Weavere

    Found solution. Followed Part 2 of the solution as explained in http://support.bea.com/application?namespace=askbea&origin=ask_bea_answer.jsp&event=link.view_answer_page_solution&answerpage=solution&page=wlw/S-19283.htm
    What surprises me is that this solution to a common problem is hidden and hard
    to find. If I am correct, no part of WLS 8.1 documentation suggests this. Rather
    the doc says, set the system properties for the standard JDK 1.4 network properties
    and it should work fine. If it is actually supposed to work like this, is it a
    bug then?
    "Naveen Kumar" <[email protected]> wrote:
    >
    Hi,
    I have a web application deployed on WebLogic server 8.1 sp1. And my
    server is
    behind a http proxy server. Now one of the components in the application
    makes
    a web service call to a service located external to the system, and it
    always
    throws "java.net.UnknownHostException". I have set the Java system properties
    http.proxyHost = my proxy server, http.proxySet = true and http.proxyPort
    = 80
    and it still does not help.
    If I try to evaluate the web service component as a stand alone client
    using WebLogic's
    webserviceclient.jar, everything works fine. I can't figure what I have
    to do
    to get this component working from within the WebLogic server. Can anybody
    provide
    me with inputs, comments or suggestions.
    Naveen.

  • ATA 186 behind windows Proxy Server

    Hi Friends, i have been using Cisco ATA boxex behind Cisco routers and they work really fine. Is it possible to configure this box behind a Windows Proxy Server with a Dial-ip configuration? I know the configuration will be difficult due to NAT and H323 issue.. but any of you Experts can guide me Technically I will really appreciate..
    Thank You.
    Sandeep

    I feel now it's possible. Please refer the following link for more information.
    http://www.cisco.com/en/US/products/hw/gatecont/ps514/prod_release_note09186a0080109764.html#47964

  • Front Row trailers behind a Proxy server

    Hi there
    Im currently at University and my internet connection is provided through a proxy server.
    When i try to watch trailers in Front row it hangs and i have to reset the computer
    Therefore my question is,
    Is Front row aware of network settings or does it have to have a dirrect connection to the Net.
    Thanks

    Can you watch the trailers by going to Apple's Web site with Safari inside your network? QuickTime streams like that are specifically blocked by my work's proxy server.
    http://www.apple.com/trailers/
    -Doug

  • Finesse Fail over behind a proxy server

    As per the following link
    https://developer.cisco.com/site/collaboration/contact-center/finesse/overview/technical.gsp
    summary :- The gadget includes JavaScript and references to various web services. Browser can't have connections to servers in multiple domains due to security considerations so Cisco Finesse functions as web proxy so all requests from the browser use a single domain.
    How does the Side A and Side B concept works when Finesse is configured behind proxy?
    As per the following link
    https://developer.cisco.com/site/collaboration/contact-center/finesse/overview/technical.gsp
    summary :- The gadget includes JavaScript and references to various web services. Browser can't have connections to servers in multiple domains due to security considerations so Cisco Finesse functions as web proxy so all requests from the browser use a single domain.
    How does the Side A and Side B concept works when Finesse is configured behind proxy?

    Contact your ISP for instructions on how to obtain a direct connection.

  • c:redirect behind a proxy server

    I have a two servers and a browser:
    Browser A --------FW 1 ---------- Apache HTTP B ----- FW 2-------- Tomcat C
    24.150.4.10 192.168.1.16 128.1.1.3
    On tomcat, I'm using a <c:redirect url="relative.jsp" /> to forward a user to a relative URL.
    The problem is when the redirect occurs, it's providing the browser with the IP Address of the Apache server as seen inside the Firewall instead of the IP Address of the firewall that is portmapped to the Apache Server (which is the IP Address that the Browser originally issued the request to.
    I think this is because the redirect is not honoring the x-forwarded-host header that contains the hostname given by fw2?
    Has anyone elxe experienced with this? I found this post: http://lists.fourthought.com/pipermail/4suite-dev/2003-June/001418.html which sounds like an exact match.

    Contact your ISP for instructions on how to obtain a direct connection.

  • Applet using socket connection always go through proxy server

    Socket connection with socks always go through proxy server
    We have two applets in different codebases using socket to talk to each other, until now nothing new, but the problem is that we are behind a proxy server with socks and because of that, the connection always go through the proxy server even with proxy override point to the applet machine. We have tried a lof of things and until now nothing worked, it looks like the socket is ignoring proxy override configuration. We would like to know if there is a way to solve this problem making the applets comunicate to each other ignoring the proxy server. It should happen when we set the plug-in option to "no proxy host", but it doesn't. Maybe it can be a bug of JVM, I don't know, just maybe, and if it's true, any other good idea would be welcome as well.
    Thanks in advance.

    Hi,
    I am not very much sure if I can help you. In my previous experience, once you set the system property to use the proxy, then the jvm uses the proxy. If you want disable, in your code, you have to disable it.
    like System.setProperty("socksProxyHost","someHost"), Properties props = System.getProperties(); props.remove(("socksProxyHost");

  • IOS5 software update behind proxy server

    Hi there.
    Have updated both iPhone and iPad to version 5.0.1 (using itunes) and have noticed the new software update feature inluded wiht v5.
    this works on the iphone when connected using a 3g connection, and on both when they are connected to my home wireless network, but on both devices it will not work when connected to my work network which uses a proxy server to connect to internet - comes up with "unable to check for update. An error occurred while checking for a software update."
    please advise how to get software update working behind a proxy server.
    David

    You're right.
    The position of the IT service of my customer is to say that the iPad is a very high quality product for personal use but it's a nightmare for using in enterprise. It has to work with their proxy as it is now. The idea is to integrate with the existing, not modify things to deal with iPad. At least at a pilot stage. In the same way, it's not possible to define exceptions in the proxy... That makes laughing the staff.

  • NIO through proxy server

    I have an Apache web server that is configured to proxy a URL to a java server that I have behind the proxy server. My clients send data through a URLConnection to a specific URL in which redirects it to my java server behind the proxy. My java server has a ServerSocket that gets the request from the proxy and then uses the PrintStream to send data back through the proxy to my clients (Which is an applet). I would like to use the NIO non blocking but the problem is when I create a Channel the only thing that can be written on that Socket Chanel is a ByteBuffer. Because it is a ByteBuffer gets passed the proxy server can not handle the request and thus will not forward it on to my clients. PrintStream currently does this for me and allows this to work. Any ideas how I can use NIO channels to write data that a proxy server will be able to understand? I was thinking of using the ftp proxy instead of http proxy and have not tried that yet but then I would have to have my java server understand ftp protocol......Would really just like to do sockets connections with NIO. Any help would be greatfully appreciated.

    Here is a good question that I found fixed my problem. Within my application I have a SocketChannel. When writing through a proxy with an HTTP Header in the front of all my data it doesn't seem to go through the proxy server at all. However, when getting a Socket object from my SocketChannel and then using the OutputStream of the Socket (PrintStream api) will end up pushing the data out through the proxy. What isthe difference between using the write method from the SocketChannel compared to getting a Socket object from the SocketChannel and using its OutputStream to write data?

Maybe you are looking for

  • XSLT Mapping on ABAP Engine

    Hi All, I am trying to implement an XSLT mapping on the ABAP Engine. I went to the Transformation Workbench(SE80).I have created 4 levels of packages (Structure->Main->then 2 more levels) and  included Package Interface SAI_TOOLS in 'Use Accesses' ta

  • Runtime Error in enhanced DPR_Approval form in xRPM 4.5

    Hi , I'm working on an enhancement for the DPR approval Adobe Form to display phases and tasks in a Project. I have created a form based on the standard DPR_ARPPOVAL form and did the configuration on the SPRO. Everything is mapped correctly but when

  • GNOME "Save as"-dialog appears hidden at the edges

    Hi, whenever the "Save as"-dialog of GNOME appears, pieces of it are hidden by the desktop edges/border. I cannot click the OK or Cancel-buttons not until I move it out of the edges. I'm using GNOME with pekwm as a WM, but I've experienced my problem

  • CA-Signed certificate: Received fatal alert: bad_certificate

    Hello. I am still trying to get rmi ssl to work in the way I want (see my post http://forums.sun.com/thread.jspa?threadID=5351278&tstart=15 ). I read that CA signed certificates are preferred to self signed certificates due to several reasons. Due to

  • Connecting a Cingular 8525 via bluetooth

    Has anyone been able to get the Mac OS to connect with the Cingular 8525 via bluetooth. My Motorola connects fine but this one is never discovered.