public class SSLEepGet extends EepGet
Modifier and Type | Class and Description |
---|---|
static class |
SSLEepGet.ProxyType
Not all may be supported.
|
static class |
SSLEepGet.SSLState
An opaque class for the caller to pass to repeated instantiations of SSLEepGet.
|
EepGet.AUTH_MODE, EepGet.AuthState, EepGet.CLIStatusListener, EepGet.Gunzipper, EepGet.StatusListener
_aborted, _actualURL, _alreadyTransferred, _authState, _bytesRemaining, _bytesTransferred, _contentType, _context, _currentAttempt, _decompressException, _encodingChunked, _etag, _etagOrig, _extraHeaders, _fetchHeaderTimeout, _fetchInactivityTimeout, _fetchTotalTimeout, _isGzippedResponse, _keepFetching, _lastModified, _lastModifiedOrig, _listeners, _log, _notModified, _numRetries, _out, _outputFile, _outputStream, _proxy, _proxyHost, _proxyIn, _proxyOut, _proxyPort, _redirectLocation, _redirects, _responseCode, _responseText, _shouldProxy, _shouldWriteErrorToOutput, _transferFailed, _url, CONNECT_TIMEOUT, INACTIVITY_TIMEOUT, MAX_COMPLETE_FAILS, USER_AGENT
Constructor and Description |
---|
SSLEepGet(I2PAppContext ctx,
OutputStream outputStream,
String url)
A new SSLEepGet with a new SSLState
|
SSLEepGet(I2PAppContext ctx,
OutputStream outputStream,
String url,
long maxSize,
SSLEepGet.SSLState state) |
SSLEepGet(I2PAppContext ctx,
OutputStream outputStream,
String url,
SSLEepGet.SSLState state) |
SSLEepGet(I2PAppContext ctx,
SSLEepGet.ProxyType type,
String proxyHost,
int proxyPort,
OutputStream outputStream,
String url)
Use a proxy.
|
SSLEepGet(I2PAppContext ctx,
SSLEepGet.ProxyType type,
String proxyHost,
int proxyPort,
OutputStream outputStream,
String url,
SSLEepGet.SSLState state)
Use a proxy.
|
SSLEepGet(I2PAppContext ctx,
SSLEepGet.ProxyType type,
String proxyHost,
int proxyPort,
String outputFile,
String url)
Use a proxy.
|
SSLEepGet(I2PAppContext ctx,
SSLEepGet.ProxyType type,
String proxyHost,
int proxyPort,
String outputFile,
String url,
SSLEepGet.SSLState state)
Use a proxy.
|
SSLEepGet(I2PAppContext ctx,
String outputFile,
String url)
A new SSLEepGet with a new SSLState
|
SSLEepGet(I2PAppContext ctx,
String outputFile,
String url,
SSLEepGet.SSLState state) |
Modifier and Type | Method and Description |
---|---|
protected void |
doFetch(SocketTimeout timeout)
This reads the response to a single fetch.
|
void |
forceDNSOverHTTPS(boolean on)
Override the config setting, force DNSoverHTTPS on or off
Call before the fetch.
|
SSLEepGet.SSLState |
getSSLState()
Pass this back to the next SSLEepGet constructor for faster fetches.
|
static void |
main(String[] args)
SSLEepGet https://foo/bar
or to save cert chain:
SSLEepGet -s https://foo/bar
|
protected void |
sendRequest(SocketTimeout timeout) |
addAuthorization, addHeader, addStatusListener, fetch, fetch, fetch, getContentType, getETag, getLastModified, getNotModified, getRequest, getStatusCode, getStatusText, parseAuthArgs, readChunkLength, readHeaders, setWriteErrorToOutput, shouldReadBody, stopFetching, suggestName
public SSLEepGet(I2PAppContext ctx, OutputStream outputStream, String url)
public SSLEepGet(I2PAppContext ctx, OutputStream outputStream, String url, SSLEepGet.SSLState state)
state
- an SSLState retrieved from a previous SSLEepGet with getSSLState(), or null.
This makes repeated fetches from the same host MUCH faster,
and prevents repeated key store loads even for different hosts.public SSLEepGet(I2PAppContext ctx, OutputStream outputStream, String url, long maxSize, SSLEepGet.SSLState state)
maxSize
- The maximum size of the responsestate
- an SSLState retrieved from a previous SSLEepGet with getSSLState(), or null.
This makes repeated fetches from the same host MUCH faster,
and prevents repeated key store loads even for different hosts.public SSLEepGet(I2PAppContext ctx, String outputFile, String url)
public SSLEepGet(I2PAppContext ctx, String outputFile, String url, SSLEepGet.SSLState state)
state
- an SSLState retrieved from a previous SSLEepGet with getSSLState(), or null.
This makes repeated fetches from the same host MUCH faster,
and prevents repeated key store loads even for different hosts.public SSLEepGet(I2PAppContext ctx, SSLEepGet.ProxyType type, String proxyHost, int proxyPort, OutputStream outputStream, String url)
proxyHost
- Must be valid hostname or literal IPv4/v6.
If type is INTERNAL, set to "localhost".proxyPort
- Must be valid, -1 disallowed, no default.
If type is INTERNAL, set to 4444.public SSLEepGet(I2PAppContext ctx, SSLEepGet.ProxyType type, String proxyHost, int proxyPort, OutputStream outputStream, String url, SSLEepGet.SSLState state)
proxyHost
- Must be valid hostname or literal IPv4/v6.
If type is INTERNAL, set to "localhost".proxyPort
- Must be valid, -1 disallowed, no default.
If type is INTERNAL, set to 4444.state
- an SSLState retrieved from a previous SSLEepGet with getSSLState(), or null.
This makes repeated fetches from the same host MUCH faster,
and prevents repeated key store loads even for different hosts.public SSLEepGet(I2PAppContext ctx, SSLEepGet.ProxyType type, String proxyHost, int proxyPort, String outputFile, String url)
proxyHost
- Must be valid hostname or literal IPv4/v6.
If type is INTERNAL, set to "localhost".proxyPort
- Must be valid, -1 disallowed, no default.
If type is INTERNAL, set to 4444.public SSLEepGet(I2PAppContext ctx, SSLEepGet.ProxyType type, String proxyHost, int proxyPort, String outputFile, String url, SSLEepGet.SSLState state)
proxyHost
- Must be valid hostname or literal IPv4/v6.
If type is INTERNAL, set to "localhost".proxyPort
- Must be valid, -1 disallowed, no default.
If type is INTERNAL, set to 4444.state
- an SSLState retrieved from a previous SSLEepGet with getSSLState(), or null.
This makes repeated fetches from the same host MUCH faster,
and prevents repeated key store loads even for different hosts.public static void main(String[] args)
public SSLEepGet.SSLState getSSLState()
public void forceDNSOverHTTPS(boolean on)
protected void doFetch(SocketTimeout timeout) throws IOException
EepGet
doFetch
in class EepGet
timeout
- may be nullIOException
protected void sendRequest(SocketTimeout timeout) throws IOException
sendRequest
in class EepGet
timeout
- may be nullIOException