Browse Source

update setproxy doc with xdocs changes

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275819 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 21 years ago
parent
commit
0c6eb91424
2 changed files with 34 additions and 62 deletions
  1. +31
    -59
      docs/manual/OptionalTasks/setproxy.html
  2. +3
    -3
      src/main/org/apache/tools/ant/taskdefs/optional/net/SetProxy.java

+ 31
- 59
docs/manual/OptionalTasks/setproxy.html View File

@@ -46,40 +46,24 @@
</td></tr> </td></tr>


<tr><td><blockquote> <tr><td><blockquote>
Sets Java's web proxy properties, so that tasks and code run in
the same JVM can have through-the-firewall access to remote web sites,
and remote ftp sites.
You can nominate an http and ftp proxy, or a socks server, reset the server
settings, or do nothing at all.
<p>
Examples
<pre>&lt;setproxy/&gt;</pre>
do nothing
<pre>&lt;setproxy proxyhost="firewall"/&gt;</pre>
set the proxy to firewall:80
<pre>&lt;setproxy proxyhost="firewall" proxyport="81"/&gt;</pre>
set the proxy to firewall:81
<pre>&lt;setproxy proxyhost=""/&gt;</pre>
stop using the http proxy; don't change the socks settings
<pre>&lt;setproxy socksproxyhost="socksy"/&gt;</pre>
use socks via socksy:1080
<pre>&lt;setproxy socksproxyhost=""/&gt;</pre>
stop using the socks server
Sets Java's web proxy properties, so that tasks and code run in the same JVM can have through-the-firewall access to remote web sites, and remote ftp sites. You can nominate an http and ftp proxy, or a socks server, reset the server settings, or do nothing at all. <p> Examples <pre>&lt;setproxy/&gt;</pre> do nothing <pre>&lt;setproxy proxyhost="firewall"/&gt;</pre> set the proxy to firewall:80 <pre>&lt;setproxy proxyhost="firewall" proxyport="81"/&gt;</pre> set the proxy to firewall:81 <pre>&lt;setproxy proxyhost=""/&gt;</pre> stop using the http proxy; don't change the socks settings <pre>&lt;setproxy socksproxyhost="socksy"/&gt;</pre> use socks via socksy:1080 <pre>&lt;setproxy socksproxyhost=""/&gt;</pre> stop using the socks server. <p> You can set a username and password for http with the <tt>proxyHost</tt> and <tt>proxyPassword</tt> attributes. On Java1.4 and above these can also be used against SOCKS5 servers. </p>
</blockquote></td></tr> </blockquote></td></tr>


</table> </table>
<!-- End Description --> <!-- End Description -->


<!-- Ignore -->



<!-- Start Attributes --> <!-- Start Attributes -->
<table border="0" cellspacing="0" cellpadding="2" width="100%"> <table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td>&nbsp;</td></tr> <tr><td>&nbsp;</td></tr>

<tr><td bgcolor="#525D76"> <tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica.sanserif"> <font color="#ffffff" face="arial,helvetica.sanserif">
<a name="attributes"> <a name="attributes">
<strong>Parameters</strong></a></font> <strong>Parameters</strong></a></font>
</td></tr> </td></tr>

<tr><td><blockquote> <tr><td><blockquote>
<table> <table>
<tr> <tr>
@@ -91,35 +75,36 @@
</td> </td>
<td bgcolor="#cccccc" valign="top" align="left"> <td bgcolor="#cccccc" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Type</b></font> <font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Type</b></font>
</td>
<td bgcolor="#cccccc" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Requirement</b></font>
</td> </td>
</tr> </tr>
<!-- Attribute -->
<!-- Attribute Group -->
<!-- Attribute Group -->
<!-- Attribute -->
<tr> <tr>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">nonProxyHosts</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">nonproxyhosts</font>
</td> </td>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
A list of hosts to bypass the proxy on. These should be separated
with the vertical bar character '|'. Only in Java 1.4 does ftp use
this list.
e.g. fozbot.corp.sun.com|*.eng.sun.com.
</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">A list of hosts to bypass the proxy on. These should be separated with the vertical bar character '|'. Only in Java 1.4 does ftp use this list. e.g. fozbot.corp.sun.com|*.eng.sun.com</font>
</td> </td>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font> <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
</td> </td>
<td bgcolor="#eeeeee" valign="top" align="left" rowspan="7">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">Optional</font>
</td>
</tr> </tr>
<!-- Attribute --> <!-- Attribute -->
<tr> <tr>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">proxyHost</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">proxyhost</font>
</td> </td>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
the HTTP/ftp proxy host. Set this to "" for the http proxy
option to be disabled
</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">the HTTP/ftp proxy host. Set this to "" for the http proxy option to be disabled</font>
</td> </td>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font> <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
@@ -128,13 +113,10 @@
<!-- Attribute --> <!-- Attribute -->
<tr> <tr>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">proxyPassword</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">proxypassword</font>
</td> </td>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
Set the password for the proxy. Used only if the proxyUser is set.<br>
<em>since Ant 1.6</em>
</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">Set the password for the proxy. Used only if the proxyUser is set.</font>
</td> </td>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font> <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
@@ -143,12 +125,10 @@
<!-- Attribute --> <!-- Attribute -->
<tr> <tr>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">proxyPort</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">proxyport</font>
</td> </td>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
the HTTP/ftp proxy port number; default is 80
</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">the HTTP/ftp proxy port number; default is 80</font>
</td> </td>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">int</font> <font color="#000000" size="-1" face="arial,helvetica,sanserif">int</font>
@@ -157,14 +137,10 @@
<!-- Attribute --> <!-- Attribute -->
<tr> <tr>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">proxyUser</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">proxyuser</font>
</td> </td>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
set the proxy user. Probably requires a password to accompany this
setting. Default=""<br>
<em>since Ant 1.6</em>
</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">set the proxy user. Probably requires a password to accompany this setting. Default=""</font>
</td> </td>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font> <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
@@ -173,13 +149,10 @@
<!-- Attribute --> <!-- Attribute -->
<tr> <tr>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">socksProxyHost</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">socksproxyhost</font>
</td> </td>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
The name of a Socks server. Set to "" to turn socks
proxying off.
</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">The name of a Socks server. Set to "" to turn socks proxying off.</font>
</td> </td>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font> <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
@@ -188,18 +161,17 @@
<!-- Attribute --> <!-- Attribute -->
<tr> <tr>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">socksProxyPort</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">socksproxyport</font>
</td> </td>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
Set the ProxyPort for socks connections. The default value is 1080
</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">Set the ProxyPort for socks connections. The default value is 1080</font>
</td> </td>
<td bgcolor="#eeeeee" valign="top" align="left"> <td bgcolor="#eeeeee" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">int</font> <font color="#000000" size="-1" face="arial,helvetica,sanserif">int</font>
</td> </td>
</tr> </tr>



</table> </table>
</blockquote></td></tr> </blockquote></td></tr>


@@ -239,7 +211,7 @@
<tr> <tr>
<td> <td>
<div align="center"><font color="#525D76" size="-1"><em> <div align="center"><font color="#525D76" size="-1"><em>
Copyright &#169; 2002-2003, Apache Software Foundation
Copyright &#169; 2000-2003, Apache Software Foundation
</em></font></div> </em></font></div>
</td> </td>
</tr> </tr>


+ 3
- 3
src/main/org/apache/tools/ant/taskdefs/optional/net/SetProxy.java View File

@@ -80,12 +80,12 @@ import org.apache.tools.ant.util.JavaEnvUtils;
* <pre>&lt;setproxy socksproxyhost="socksy"/&gt;</pre> * <pre>&lt;setproxy socksproxyhost="socksy"/&gt;</pre>
* use socks via socksy:1080 * use socks via socksy:1080
* <pre>&lt;setproxy socksproxyhost=""/&gt;</pre> * <pre>&lt;setproxy socksproxyhost=""/&gt;</pre>
* stop using the socks server
* stop using the socks server.
* <p>
* You can set a username and password for http with the <tt>proxyHost</tt> * You can set a username and password for http with the <tt>proxyHost</tt>
* and <tt>proxyPassword</tt> attributes. On Java1.4 and above these can also be * and <tt>proxyPassword</tt> attributes. On Java1.4 and above these can also be
* used against SOCKS5 servers. * used against SOCKS5 servers.


* </p>
* @see <a href="http://java.sun.com/j2se/1.4/docs/guide/net/properties.html"> * @see <a href="http://java.sun.com/j2se/1.4/docs/guide/net/properties.html">
* java 1.4 network property list</a> * java 1.4 network property list</a>
* @author Steve Loughran * @author Steve Loughran


Loading…
Cancel
Save