|
1 | | -javaproxycheck |
2 | | -============== |
| 1 | +# Java Proxy Check |
3 | 2 |
|
4 | | -Simple Java command line client to debug the Java HTTP proxy settings in effect. |
| 3 | +Have you ever had the (mis-)fortune to have to run Java code behind an |
| 4 | +HTTP proxy? Or worse, having to have to go through a proxy for certain |
| 5 | +URLs, but not for others? Have you fought the syntax for defining proxy |
| 6 | +exceptions that differ between OSes and Java? |
| 7 | + |
| 8 | +This tool won't help you fix your config, but it helps you to test things |
| 9 | +out quickly. |
| 10 | + |
| 11 | + |
| 12 | +## Building |
| 13 | + |
| 14 | +The project uses gradle, a simple `gradle build` should create the jar in |
| 15 | +`build/libs/javaproxycheck.jar`. |
| 16 | + |
| 17 | + |
| 18 | +## Download |
| 19 | + |
| 20 | +A ready-to-run binary compiled with Java 1.7.0_51 is available here: |
| 21 | +http://www.lassitu.de/software/javaproxycheck/javaproxycheck.jar |
| 22 | + |
| 23 | + |
| 24 | +## Usage |
| 25 | + |
| 26 | +proxycheck.jar can be run like this: |
| 27 | +``` |
| 28 | +$ java -jar proxycheck.jar http://www.example.com https://secure.example.com |
| 29 | +``` |
| 30 | + |
| 31 | +The output will list the URLs and the selection the system ProxySelector.select() method |
| 32 | +returns. You can interactively try out the various system properties like so: |
| 33 | +``` |
| 34 | +$ java -Dhttps.proxyHost=proxy.example.com -Dhttps.proxyPort=3128 -jar build/libs/javaproxycheck.jar http://www.example.com https://secure.example.com |
| 35 | +http://www.example.com [DIRECT] |
| 36 | +https://secure.example.com [HTTP @ proxy.example.com:3128] |
| 37 | +``` |
| 38 | + |
| 39 | + |
| 40 | +## Java Proxy Settings |
| 41 | + |
| 42 | +Java has built-in support for Windows, Mac OS X, and Gnome system proxy settings; on other |
| 43 | +platforms, you have to run Java programs with appropriate system properties specifying |
| 44 | +which proxies to use when. See the following documentation: |
| 45 | + |
| 46 | +http://download.java.net/jdk7/archive/b123/docs/api/java/net/doc-files/net-properties.html#Proxies |
0 commit comments