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 4.2 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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. 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.
  25. <h3>Examples</h3>
  26. <pre>&lt;setproxy/&gt;</pre> do nothing
  27. <pre>&lt;setproxy proxyhost="firewall"/&gt;</pre> set the proxy to firewall:80
  28. <pre>&lt;setproxy proxyhost="firewall" proxyport="81"/&gt;</pre> set the proxy to firewall:81
  29. <pre>&lt;setproxy proxyhost=""/&gt;</pre> stop using the http proxy; don't change the socks settings
  30. <pre>&lt;setproxy socksproxyhost="socksy"/&gt;</pre> use socks via socksy:1080
  31. <pre>&lt;setproxy socksproxyhost=""/&gt;</pre> stop using the socks server.
  32. <p>
  33. You can set a username and password for http with the <tt>proxyHost</tt> and <tt>proxyPassword</tt> attributes. On Java 1.4 and above these can also be used against SOCKS5 servers.
  34. </p>
  35. <h3 id="attributes">Parameters</h3>
  36. <table>
  37. <tr>
  38. <td valign="top" align="left">
  39. <b>Attribute</b>
  40. </td>
  41. <td valign="top" align="left">
  42. <b>Description</b>
  43. </td>
  44. <td valign="top" align="left">
  45. <b>Type</b>
  46. </td>
  47. <td valign="top" align="left">
  48. <b>Requirement</b>
  49. </td>
  50. </tr>
  51. <tr>
  52. <td valign="top" align="left">
  53. nonproxyhosts
  54. </td>
  55. <td valign="top" align="left">
  56. 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
  57. </td>
  58. <td valign="top" align="left">
  59. String
  60. </td>
  61. <td valign="top" align="left" rowspan="7">
  62. Optional
  63. </td>
  64. </tr>
  65. <tr>
  66. <td valign="top" align="left">
  67. proxyhost
  68. </td>
  69. <td valign="top" align="left">
  70. the HTTP/ftp proxy host. Set this to "" for the http proxy option to be disabled
  71. </td>
  72. <td valign="top" align="left">
  73. String
  74. </td>
  75. </tr>
  76. <tr>
  77. <td valign="top" align="left">
  78. proxypassword
  79. </td>
  80. <td valign="top" align="left">
  81. Set the password for the proxy. Used only if the proxyUser is set.
  82. </td>
  83. <td valign="top" align="left">
  84. String
  85. </td>
  86. </tr>
  87. <tr>
  88. <td valign="top" align="left">
  89. proxyport
  90. </td>
  91. <td valign="top" align="left">
  92. the HTTP/ftp proxy port number; default is 80
  93. </td>
  94. <td valign="top" align="left">
  95. int
  96. </td>
  97. </tr>
  98. <tr>
  99. <td valign="top" align="left">
  100. proxyuser
  101. </td>
  102. <td valign="top" align="left">
  103. set the proxy user. Probably requires a password to accompany this setting. Default=""
  104. </td>
  105. <td valign="top" align="left">
  106. String
  107. </td>
  108. </tr>
  109. <tr>
  110. <td valign="top" align="left">
  111. socksproxyhost
  112. </td>
  113. <td valign="top" align="left">
  114. The name of a Socks server. Set to "" to turn socks proxying off.
  115. </td>
  116. <td valign="top" align="left">
  117. String
  118. </td>
  119. </tr>
  120. <tr>
  121. <td valign="top" align="left">
  122. socksproxyport
  123. </td>
  124. <td valign="top" align="left">
  125. Set the ProxyPort for socks connections. The default value is 1080
  126. </td>
  127. <td valign="top" align="left">
  128. int
  129. </td>
  130. </tr>
  131. </table>
  132. </body>
  133. </html>