Connecting through HTTP Proxy

How can I make connection to a port of some remote server when I am connected to internet using HTTP Proxy?

If you are going to use the URL object then set your proxy IP and Port in your system properties before you create your URL object.
For example:
System.getProperties().put( "proxyHost", proxyIp );
System.getProperties().put( "proxyPort", proxyPort );
URL url = new URL("http://www.foo.com" );

Similar Messages

  • Client connecting through a proxy

    hi
    i'm new to RMI programming, i need to clear some things up
    . is RMI a standalone protocol like http or does it require another protocol so
    it can run over it ?
    . how does an RMI connection get through a proxy server, ie. if the client is behind a proxy server and the server is a known public host, can the client still get to the server, or does this have to be done in the proxy configuration?
    Is there certain types of proxy servers RMI can't go through or ( they won't let it pass through ) .
    i need those infos because i've been stuck with an RMI server deployed on the net and a client behind a web proxy, the same box ( IP ) hosting the RMI server also hosts a WEB server from which javaWS starts the application but this application exits at a certain point sayin it cannot find the RMI server.
    i didn't have the chance to test through a direct connection, but have tested
    in an intranet environment and it was workin great,
    thanks for any help

    . is RMI a standalone protocol like http or does it
    require another protocol so
    it can run over it ?The question doesn't make much sense. HTTP runs over TCP, and so does RMI. RMI also uses the Serialization protocol.
    how does an RMI connection get through a proxy
    server, ie. if the client is behind a proxy server
    and the server is a known public host, can the
    client still get to the server, or does this have to
    be done in the proxy configuration?http://java.sun.com/j2se/1.5.0/docs/guide/rmi/faq.html#firewallOut
    s there certain types of proxy servers RMI can't go
    through or ( they won't let it pass through ) .Java supports SOCKS and HTTP proxies.

  • Configure through HTTP Proxy

    Hello People,
    I programmed a mail client and i deployed it to a jar file
    I Then wrapped the jar inside a exe file so that i can run as a native code..
    The program is working fine through direct internet connection.
    I want to use that application through a proxy server.
    Can any one help me out to configure java to use my application through a proxy server.....
    Thanks in advance...

    [http://java.sun.com/products/javamail/FAQ.html#proxy|http://java.sun.com/products/javamail/FAQ.html#proxy]

  • SSL port is enabled, so why can't I connect through HTTPS?

    Hi,
    I'm using Weblogic 9.2.2, Solaris 9 with Java 1.5 We have our created our managed server within a cluster, and although we have enabled the SSL listen port ...
    http://screencast.com/t/t5UN6Exwp
    when I try connecting to our app through HTTPS in a web browser, I get a "Failed to Connect" error. Specifically in Firefox it says http://screencast.com/t/TGl0FIuQ. However, i can connect to our app fine through the HTTP port. How should I start troubleshooting this problem or what other info should I provide here?
    Thanks, - Dave

    I tried everyone's suggestions and wanted to report back the results. Running
    netstat -na | grep LIST | grep 7032produced no data. I did find a reference to the SSL port (7032) in my server log file, but didn't see any errors associated with it (I listed the working HTTP port first to compare) ...
    ####<Mar 12, 2009 10:47:03 AM EDT> <Info> <RJVM> <pacdcbpmdeva01a.cable.myco.com> <mmwcdc311> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1236869223832> <BEA-000570> <Network Configuration for Channel "mmwcdc311"
    Listen Address 24.40.36.101:7031
    Public Address N/A
    Http Enabled true
    Tunneling Enabled false
    Outbound Enabled false
    Admin Traffic Enabled true>
    ####<Mar 12, 2009 10:47:03 AM EDT> <Info> <RJVM> <pacdcbpmdeva01a.cable.myco.com> <mmwcdc311> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1236869223834> <BEA-000570> <Network Configuration for Channel "mmwcdc311"
    Listen Address 24.40.36.101:7032 (SSL)
    Public Address N/A
    Http Enabled true
    Tunneling Enabled false
    Outbound Enabled false
    Admin Traffic Enabled true>
    ####<Mar 12, 2009 10:47:03 AM EDT> <Debug> <RJVM> <pacdcbpmdeva01a.cable.myco.com> <mmwcdc311> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1236869223835> <BEA-000571> <Network Configuration Detail for Channel "mmwcdc311"
    Finally, openssl produced:
    [weblogic@mymachine logs]$ openssl s_client -connect 24.40.36.101:7032
    connect: Connection refused
    connect:errno=29
    Anything else I should be looking for? - Dave

  • Contribute connection problems, http proxy?

    I've been trying to set up a contribute connection on a client machine for a while now without any luck, Adobe support haven't been much help at all.
    We're using CS4 on a vista machine, connecting to a website via normal FTP. The FTP connection itself seems fine.. and we've connected to the site from this machine with normal ftp and downloaded/uploaded without problems. Don't have any problems setting up contribute on other machines for this site either. One symptom is that contribute always has trouble determining the remote path (on this machine only).
    We can connect to the website ok via Internet Explorer on the same machine. However, I noticed that IE is setup to use a proxy server for web connections.
    I'm wondering whether this is the problem - can Contribute use a proxy server for the HTTP part of its operation?
    Pat.

    If you have specified HTTP proxy in IE, Contribute uses it for HTTP part of the operation. If on that machine FTP is also configured to use a proxy server, in Contribute you can specify the same in the Preferences dialog of Contribute. There is FTP proxy setting in the Preferences dialog, where you can specify the address of the FTP proxy server.
    Hope this helps.

  • SSH through http proxy

    Hi,
    Currently I have to pass all traffic through a http proxy that only lets ports 25, 80 and 443 through.
    I'd like to ssh to a machine in our office outside of the above network and using Putty on Windows I can set the proxy details with username and password and it works fine as I have set my listing machine to use port 443.
    How can I achieve the same access through the proxy with ssh on Mac? I have tested that ssh with port 443 works when not using the proxy so it seems the proxy is the issue.

    You could use Corkscrew
    <http://wiki.kartbuilding.net/index.php/Corkscrew-_ssh_overhttps>
    You might also look into Hamachi (VPN)
    <http://www.macupdate.com/app/mac/36286/logmein-hamachi>
    Message was edited by: BobHarris

  • EDonkey Activity ID: 11018 "Through HTTP Proxy"

    Is there a signature to capture edonkey etc. via the proxy server? Id 11018 seams to only trap the connection from the proxy to the internet address. I would like to be able to be able to identify the internal device connection to the proxy. I have modified he signature to include the port of the proxy but this has not helped.

    I have a strange problem here with eDonkey.pdlm
    I am using IOS c1700-k9sy7-mz.122-15.T13.bin, eDonkey.pdlm is the latest to download at the time I write these lines.
    My configuration is:
    class-map match-any P2P
    match protocol kazaa2
    match protocol bittorrent
    match protocol gnutella
    match protocol winmx
    match protocol edonkey
    match protocol http url "\.hash=*"
    match protocol http url "/.hash=*"
    policy-map QOS-WAN
    class P2P
    police cir percent 15
    conform-action transmit
    exceed-action drop
    violate-action drop
    interface ATM0.1 point-to-point
    ip address 10.1.1.1 255.255.255.0
    pvc 0/167
    service-policy output QOS-WAN
    The problem is simple and strange (at least for the momment for me). I can see edonkey/emule traffic if I apply 'ip nbar protocol-discovery' at atm0.1 but the router is unable to match that traffic at the policy-map:
    #sh policy-map int atm0.1
    Service-policy output: QOS-WAN
    Class-map: P2P (match-any)
    0 packets, 0 bytes
    5 minute offered rate 0 bps, drop rate 0 bps
    Match: protocol kazaa2
    0 packets, 0 bytes
    5 minute rate 0 bps
    Match: protocol bittorrent
    0 packets, 0 bytes
    5 minute rate 0 bps
    Match: protocol gnutella
    0 packets, 0 bytes
    5 minute rate 0 bps
    Match: protocol winmx
    0 packets, 0 bytes
    5 minute rate 0 bps
    Match: protocol edonkey
    0 packets, 0 bytes
    5 minute rate 0 bps
    Match: protocol http url "\.hash=*"
    0 packets, 0 bytes
    5 minute rate 0 bps
    Match: protocol http url "/.hash=*"
    0 packets, 0 bytes
    5 minute rate 0 bps
    police:
    cir 15 %
    cir 19000 bps, bc 1500 bytes, be 1500 bytes
    conformed 0 packets, 0 bytes; actions:
    transmit
    exceeded 0 packets, 0 bytes; actions:
    drop
    violated 0 packets, 0 bytes; actions:
    drop
    conformed 0 bps, exceed 0 bps, violate 0 bps
    Any suggestions? Any comments?
    Thanks in advanced.
    Luis Miguel Cruz.

  • AnyConnect on Apple iOS - VPN-Connect via HTTP-Proxy

    Hi,
    is it possible, that the AnyConnect-Client for Apple iOS (i.e. iPAD) automatically uses the configured HTTP-Proxy in the WLAN properties for the establishment of the VPN-Connection (via SSL/TLS)?
    I've tested it, but it does not work. In the documentation is stated, that VPN establishment via HTTP-Proxy works only in Windows (AnyConnect uses the IE Proxy settings to connect to the ASA for VPN establishment).
    Thanks

    As per w2k3 sniffer trace, 2851 requesting with user=vpnfamily and encrypted password. The password "Password1" which is VPN group's key sending to IAS?
    ->I have "vpnfamily" with password "Password1" but no luck
    Event log shows "Fully-Qualified-User-Name = INFRA\vpnfamily". INFRA is AD NetBIOS name. 2851 router's domain name is "family.com"
    ->Is this something wrong?

  • Transparent connections through HTTP proxies

    Hi All,
    I am trying to connect to internet through java application. In my application I had an object for example
    SomeObject obj = new SomeObject("url"); which internally connects to the web application on internet. When I run this application I am getting connection error. Which prevents from internal firewall. How do I solve this problem. Which must be done transparently with out affecting my internal code. How can we by pass from proxy server to connect to the internet. I heard HttpClient from apache can be used. How this can be used. Please provide me some sample to overcome this.
    Thanks.
    Phani.

    See [Java Networking and Proxies|http://java.sun.com/j2se/1.5.0/docs/guide/net/proxies.html].

  • How can i access web when i am connected through a proxy?

    HI,
    I am rakesh from bangalore. I want to know how can i access web when i am connected to internet throug a proxy. are there any classes to handle this in java.net package?
    Thanking you
    Rakesh

    the URL class can also handle a proxyserver.
    URL urlobj = new URL("http", proxyhost, proxyport, url);

  • Connecting to Http Proxy on Lion under parental controls

    Hello.
    Ive been looking for a couple of days for a fix for this. The issue im having is running parental controls on an account (any settings enabled/disabled, even with no web access permissions) and using a proxy (http, https, ftp) to connect to the internet. Connected as a standard/administrator user I can connect to the internet fine, but as soon as parental controls are enabled i cannot. I can't even connect to a local address without an error in the browser.
    I have tried this on multiple lion computers with the same outcome.
    The error im getting is:
    Chrome: is no data received, no server data was sent.Error 324
    Firefox is the default connection was reset error
    And safari dosen't even give an error just a white screen.
    And external programs don't seem to work.
    The computer is 100% uptodate.

    Parental controls use an internal proxy which ignores the proxy set in Network Preference.  By making the internal proxy non-executable to the user with parental controls request can be passed to the external proxy.
    You can run the following command from Apple Remote Desktop as root (or locally with sudo).
    chmod a-x /System/Library/PrivateFrameworks/FamilyControls.framework/Versions/A/Resources/webfilterctl 
    Note: This also works in 10.8 which has the same problem.

  • Problem with socket connections through a proxy server.

    People,
    I set the system properties to use a proxy server so my application can fetch data from servers located outside my local network:
    System.setProperty("socksProxyPort", port);
    System.setProperty("socksProxyHost", proxy_addy);Then, when I attempt to stabilish a connection:
    s = new Socket(this.getHost(), port);It hangs.
    I appreciate any help since my available Java documentation is quite obscure regarding proxy servers.

    Is the proxy on another machine? Try it's IP. If
    not, replace 'proxy' with 'localhost'.
    - SaishYes, it is another machine.
                byte x[] = {(byte)aaa,(byte)bbb,(byte)ccc,(byte)ddd};
                s = new Socket(new Proxy(Proxy.Type.SOCKS, new InetSocketAddress(InetAddress.getByAddress(x), 8080)));
                s.connect(new InetSocketAddress(this.getHost(), port));Again, it hung.

  • Installing an application (adium x 0.89/msn) + connecting through proxy

    hi all. most .dmg files will mount and tell u to drag the .app icon into 'applications folder'
    may i ask, what is the difference if u drag it into MACINTOSH HDD->APPLICATIONS folder, vs dragging it into /user/applications.
    apparently it had an observable effect on my installing of Adium X 0.89 (i use this for msn and i will elaborate why)
    previously when i dragged adium.app into macintosh hdd/applications, the default folder, i experienced several problems. i could not initiate messages to my contacts, it would display an error message of "Could not send; a connection error occurred." however when others msged me (if i get them, that is), i can reply to them, if im fast enough. if say i don't reply within 1/2min, then any msg i type to them will be so-called counted as a new msg, and i cant initiate it again! the same error msg surfaces.
    i checked my connection settings and it's ok. i uninstalled adium.app (search adium on spotlight and deleted everything that had adium), plus emptied trash. then i took a new move in installing in /user/applications folder and it worked fine!
    until now. it crashed all of a sudden for no reason. i uninstalled it again. installed it again in /user/applications folder, and it has the prev problem of not being able to initiate converesations again! (how frustrating!)
    why don't i just use microsoft messenger for mac 5.1 then? you might ask..
    very good question. i want to use that too. but i can't! see, i'm staying at halls, at Monash Uni, Australia. we connect through our uni's http proxy + port. for msn 5.0, i cant enter my username/password (as the textfields are grayed out). for adium, i can enter them. on contacting msn, they told me my msn is corrupt, i shd uninstall it completely and reinstall it with a version i get from them, not other sources. i did that, and still can't. i have a strong feeling it is a problem defunct, they have yet to make it compatible to mac users who want to connect through HTTP PROXY (not socks 5.0) and have to enter their username/password to enter this proxy.
    pls enlighten on the above issues, and hopefully provide a solution.

    oh come on im sure someone knows sth abt this...
    installing any program in /mactintosh hdd/applications
    vs /user/applications
    ........

  • HTTP Proxy setting for SOA server

    Hi,
    my intention is to enable SOA Server to connect through HTTP Proxy to external services. This occurred when I am trying to connect to Yahoo Mail Server, via User Messaging Service but it keep throwing connection time out. One of the possible solution is to make the service to connect via the HTTP Proxy server in our network.
    There are no mention of how to setup HTTP Proxy connection for UMS, as well as SOA Server in any documents.
    Please advice or direct me to the relevant solutions.
    Appreciate any help rendered :)
    yee thian

    I have not worked in SoA server, but since it uses weblogic server underlying (I assume), you can try setting the -Dhttp.proxyHost , -Dhttp.proxyPort system properties ( https for secured URL's) to WLS to specify the proxy details. Also the product might not have the capability to pass user credentials for authentication at the proxy. The version of OSB we are using had this problem. To overcome this you might require to add the URL to the proxy free list in your proxy server. This prevents the proxy from prompting for the user name when you access that URL.

  • How to use Axis to access a web service through Authentication  proxy

    Using axis access internat web service is success,but access a web service through Authentication proxy is failure.But other java classes connect through a proxy to the internet which works very well:
    please help me ,thank you!!!
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import javax.xml.namespace.QName;
    //this is my access webservice faliure   codes
    public class TestClient
       public static void main(String [] args) {
           try {
                System.getProperties().setProperty("http.proxySet", "true");
                System.getProperties().setProperty("http.proxyHost","proxy.com");
                System.getProperties().setProperty("http.proxyPort", "8080");
                System.getProperties().setProperty("http.proxyUser", "username");
                System.getProperties().setProperty("http.proxyPassword","password");
               String endpoint =
                        "http://nagoya.apache.org:5049/axis/services/echo";
               Service  service = new Service();
               Call     call    = (Call) service.createCall();
               call.setTargetEndpointAddress( new java.net.URL(endpoint) );
               call.setOperationName(new QName("http://soapinterop.org/", "echoString") );
               String ret = (String) call.invoke( new Object[] { "Hello!" } );
               System.out.println("Sent 'Hello!', got '" + ret + "'");
           } catch (Exception e) {
               System.err.println(e.toString());
       }I get an "(407)Proxy authorization required" error?

    I am also looking for a solution. Does any one know how to do through code instead of jvm settings?
    Thanks in advance!

Maybe you are looking for

  • New Hard Disc Drive for HP Pavilion dv6 because of 303 and 305 error messages

    Hello My laptop was getting slower and slower so I did a default restore via the recovery partition and when it rebooted to start the reformat and reinstall to factory condition I got a message on the screen telling me to run the hard disc drive test

  • Advice for placing rotated graphics in a table

    In order to help save some space, I would like to place 4 graphs in a 4 row x 2 column table and have the page in a landscape format (see attached PDF for the desired layout diagram).  What type of cell should be used for the figure titles to get the

  • Hyperion Workspace issue - Scrollbar Missing on Workspace 11.1.2.0.00

    Hi EPM Experts, I am having problems with the Workspaces scrollbars. They are vanishing without no reason. Only temporary resolution is to restart the services, but it is recurring issue. Any hints to FIX this issue will be highly appreciated. Thanks

  • GL Ledger view

    Hai SAP Guru I am encountring problem in getting a data in GL ledger veiw of  Civil work, I want  following data to be captured in the view Purchase document Vendor No. Customer No. Qty. through there is  selection option in the CHANGE LAYOUT and if

  • Updating HRP tables

    Can anybody tell me is there any standard FM to update the HR tables : HRP1048, HRP1002,HRP1001,HRP1000 efficiently? I have to delimit and delete the records and I dont want to do direct update on HR tables. thanks Tanisha