You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

setproxy.html 3.4 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <!--
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. -->
  15. <html>
  16. <head>
  17. <meta http-equiv="Content-Language" content="en-us">
  18. <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
  19. <title>Setproxy Task</title>
  20. </head>
  21. <body>
  22. <h2>Setproxy Task</h2>
  23. <h3 id="description">Description</h3>
  24. <p>Sets Java's web proxy properties, so that tasks and code run in the same JVM can have
  25. through-the-firewall access to remote web sites, and remote FTP sites. You can nominate an HTTP and
  26. FTP proxy, or a SOCKS server, reset the server settings, or do nothing at all.</p>
  27. <h3 id="attributes">Parameters</h3>
  28. <table class="attr">
  29. <tr>
  30. <th>Attribute</th>
  31. <th>Description</th>
  32. <th>Type</th>
  33. <th>Required</th>
  34. </tr>
  35. <tr>
  36. <td>nonproxyhosts</td>
  37. <td>A list of hosts to bypass the proxy on. These should be separated with the vertical bar
  38. character <q>|</q>. Only in Java 1.4 does FTP use this
  39. list. e.g. <samp>fozbot.corp.sun.com|*.eng.sun.com</samp></td>
  40. <td>String</td>
  41. <td>No</td>
  42. </tr>
  43. <tr>
  44. <td>proxyhost</td>
  45. <td>the HTTP/FTP proxy host. Set this to <q></q> for the HTTP proxy option to be disabled.</td>
  46. <td>String</td>
  47. <td>No</td>
  48. </tr>
  49. <tr>
  50. <td>proxypassword</td>
  51. <td>Set the password for the proxy. Used only if the <var>proxyUser</var> is set.</td>
  52. <td>String</td>
  53. <td>No</td>
  54. </tr>
  55. <tr>
  56. <td>proxyport</td>
  57. <td>the HTTP/FTP proxy port number</td>
  58. <td>int</td>
  59. <td>No; default is <q>80</q></td>
  60. </tr>
  61. <tr>
  62. <td>proxyuser</td>
  63. <td>set the proxy user. Probably requires a password to accompany this setting.</td>
  64. <td>String</td>
  65. <td>No; default is <q></q></td>
  66. </tr>
  67. <tr>
  68. <td>socksproxyhost</td>
  69. <td>The name of a SOCKS server. Set to <q></q> to turn SOCKS proxying off.</td>
  70. <td>String</td>
  71. <td>No</td>
  72. </tr>
  73. <tr>
  74. <td>socksproxyport</td>
  75. <td>Set the ProxyPort for SOCKS connections.</td>
  76. <td>int</td>
  77. <td>No; default is <q>1080</q></td>
  78. </tr>
  79. </table>
  80. <h3>Examples</h3>
  81. <pre>&lt;setproxy/&gt;</pre> do nothing
  82. <pre>&lt;setproxy proxyhost="firewall"/&gt;</pre> set the proxy to firewall:80
  83. <pre>&lt;setproxy proxyhost="firewall" proxyport="81"/&gt;</pre> set the proxy to <samp>firewall:81</samp>
  84. <pre>&lt;setproxy proxyhost=""/&gt;</pre> stop using HTTP proxy; don't change SOCKS settings
  85. <pre>&lt;setproxy socksproxyhost="socksy"/&gt;</pre> use SOCKS via socksy:1080
  86. <pre>&lt;setproxy socksproxyhost=""/&gt;</pre> stop using the SOCKS server.
  87. <p>You can set a username and password for http with the <var>proxyHost</var>
  88. and <var>proxyPassword</var> attributes. On Java 1.4 and above these can also be used against SOCKS
  89. 5 servers.</p>
  90. </body>
  91. </html>