< prev index next >

src/java.base/share/classes/java/net/doc-files/net-properties.html

Print this page




 132                 <LI><P><B>socksProxyHost</B> (default: &lt;none&gt;)<BR>
 133                 The hostname, or address, of the proxy server.</P>
 134                 <LI><P><B>socksProxyPort</B> (default: 1080)<BR>
 135                 The port number of the proxy server.</P>
 136                 <LI><P><B>socksProxyVersion</B> (default: 5)<BR>
 137                 The version of the SOCKS protocol supported by the server. The
 138                 default is <code>5</code> indicating SOCKS V5, alternatively
 139                 <code>4</code> can be specified for SOCKS V4. Setting the property
 140                 to values other than these leads to unspecified behavior.</P>
 141                 <LI><P><B>java.net.socks.username</B> (default: &lt;none&gt;)<BR>
 142                 Username to use if the SOCKSv5 server asks for authentication
 143                 and no java.net.Authenticator instance was found.</P>
 144                 <LI><P><B>java.net.socks.password</B> (default: &lt;none&gt;)<BR>
 145                 Password to use if the SOCKSv5 server asks for authentication
 146                 and no java.net.Authenticator instance was found.</P>
 147                 <P>Note that if no authentication is provided with either the above
 148                 properties or an Authenticator, and the proxy requires one, then
 149                 the <B>user.name</B> property will be used with no password.</P>
 150         </UL>
 151         <LI><P><B>java.net.useSystemProxies</B> (default: false)<BR>
 152         On Windows systems, macOS systems and on Gnome 2.x systems it is possible to
 153         tell the java.net stack, setting this property to <B>true</B>, to use
 154         the system proxy settings (both these systems let you set proxies
 155         globally through their user interface). Note that this property is
 156         checked only once at startup.</P>
 157 </UL>
 158 <a name="MiscHTTP"></a>
 159 <H2>Misc HTTP properties</H2>
 160 <UL>
 161         <LI><P><B>http.agent</B> (default: &ldquo;Java/&lt;version&gt;&rdquo;)<BR>
 162         Defines the string sent in the User-Agent request header in http
 163         requests. Note that the string &ldquo;Java/&lt;version&gt;&rdquo; will
 164         be appended to the one provided in the property (e.g. if
 165         -Dhttp.agent=&rdquo;foobar&rdquo; is used, the User-Agent header will
 166         contain &ldquo;foobar Java/1.5.0&rdquo; if the version of the VM is
 167         1.5.0). This property is checked only once at startup.</P>
 168         <LI><P><B>http.keepalive</B> (default: true)<BR>
 169         Indicates if persistent connections should be supported. They improve
 170         performance by allowing the underlying socket connection to be reused
 171         for multiple http requests. If this is set to true then persistent
 172         connections will be requested with HTTP 1.1 servers.</P>




 132                 <LI><P><B>socksProxyHost</B> (default: &lt;none&gt;)<BR>
 133                 The hostname, or address, of the proxy server.</P>
 134                 <LI><P><B>socksProxyPort</B> (default: 1080)<BR>
 135                 The port number of the proxy server.</P>
 136                 <LI><P><B>socksProxyVersion</B> (default: 5)<BR>
 137                 The version of the SOCKS protocol supported by the server. The
 138                 default is <code>5</code> indicating SOCKS V5, alternatively
 139                 <code>4</code> can be specified for SOCKS V4. Setting the property
 140                 to values other than these leads to unspecified behavior.</P>
 141                 <LI><P><B>java.net.socks.username</B> (default: &lt;none&gt;)<BR>
 142                 Username to use if the SOCKSv5 server asks for authentication
 143                 and no java.net.Authenticator instance was found.</P>
 144                 <LI><P><B>java.net.socks.password</B> (default: &lt;none&gt;)<BR>
 145                 Password to use if the SOCKSv5 server asks for authentication
 146                 and no java.net.Authenticator instance was found.</P>
 147                 <P>Note that if no authentication is provided with either the above
 148                 properties or an Authenticator, and the proxy requires one, then
 149                 the <B>user.name</B> property will be used with no password.</P>
 150         </UL>
 151         <LI><P><B>java.net.useSystemProxies</B> (default: false)<BR>
 152         On Windows systems, macOS systems and on Gnome systems it is possible to
 153         tell the java.net stack, setting this property to <B>true</B>, to use
 154         the system proxy settings (both these systems let you set proxies
 155         globally through their user interface). Note that this property is
 156         checked only once at startup.</P>
 157 </UL>
 158 <a name="MiscHTTP"></a>
 159 <H2>Misc HTTP properties</H2>
 160 <UL>
 161         <LI><P><B>http.agent</B> (default: &ldquo;Java/&lt;version&gt;&rdquo;)<BR>
 162         Defines the string sent in the User-Agent request header in http
 163         requests. Note that the string &ldquo;Java/&lt;version&gt;&rdquo; will
 164         be appended to the one provided in the property (e.g. if
 165         -Dhttp.agent=&rdquo;foobar&rdquo; is used, the User-Agent header will
 166         contain &ldquo;foobar Java/1.5.0&rdquo; if the version of the VM is
 167         1.5.0). This property is checked only once at startup.</P>
 168         <LI><P><B>http.keepalive</B> (default: true)<BR>
 169         Indicates if persistent connections should be supported. They improve
 170         performance by allowing the underlying socket connection to be reused
 171         for multiple http requests. If this is set to true then persistent
 172         connections will be requested with HTTP 1.1 servers.</P>


< prev index next >