Solved

Proxy Problem

Posted on 1998-08-16
2
285 Views
Last Modified: 2010-03-30
My computer is behind a firewall, how do I write a Java program to access (http, ftp etc) the "outside world" through a proxy? (We have a proxy server with port number 1080.)
0
Comment
Question by:regina081698
2 Comments
 
LVL 7

Accepted Solution

by:
yoren earned 100 total points
ID: 1220053
You can set both HTTP and SOCKS proxies:

Properties sysprops = System.getProperties();

sysprops.put("socksProxySet", "true");
sysprops.put("socksProxyHost", "socks.whitehouse.gov");
sysprops.put("socksProxyPort", "1080");

sysprops.put("proxySet", "true");
sysprops.put("proxyHost", "httpproxy.server.com");
sysprops.put("proxyPort", "80");

0
 

Author Comment

by:regina081698
ID: 1220054
thanks!!! :-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now