Solved

Proxy Problem

Posted on 1998-08-16
2
286 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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
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 will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to implement Singleton Design Pattern in Java.

770 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