public final class AnonProxy extends java.lang.Object implements AnonServiceEventListener
AnonChannel
objects. Below you find an example which creates a proxy which uses the AN.ON
mix cascade for anonymous web surfing.
AnonProxy theProxy = new AnonProxy(serverSocket, null);
theProxy.setMixCascade( new MixCascade(null, null, hostNameOfMixCascade,
portNumberOfMixCascade) );
theProxy.start();
Modifier and Type | Class and Description |
---|---|
class |
AnonProxy.RoundRobinRequestQueue
This is a queue
|
Modifier and Type | Field and Description |
---|---|
static int |
E_MIX_PROTOCOL_NOT_SUPPORTED |
static int |
E_SIGNATURE_CHECK_FIRSTMIX_FAILED |
static int |
E_SIGNATURE_CHECK_OTHERMIX_FAILED |
static int |
MIN_REQUESTS |
static int |
UNLIMITED_REQUESTS |
Constructor and Description |
---|
AnonProxy(DirectProxy a_directProxy,
IMutableProxyInterface a_proxyInterface,
TermsAndConditionConfirmation termsConfirmation) |
AnonProxy(DirectProxy a_directProxy,
anon.transport.connection.IStreamConnection a_proxyConnection,
MixCascade a_currentService,
int a_maxDummyTrafficInterval,
TermsAndConditionConfirmation termsConfirmation)
Creates a new AnonProxy with an already active mix connection.
|
AnonProxy(java.net.ServerSocket a_listener,
IMutableProxyInterface a_proxyInterface,
TermsAndConditionConfirmation termsConfirmation)
Creates a new AnonProxy.
|
AnonProxy(java.net.ServerSocket a_listener,
TermsAndConditionConfirmation termsConfirmation,
int a_socketTimeout)
Creates a new AnonProxy.
|
Modifier and Type | Method and Description |
---|---|
void |
addEventListener(AnonServiceEventListener l) |
void |
addHTTPConnectionListener(AbstractHTTPConnectionListener listener) |
void |
connecting(AnonServerDescription a_serverDescription,
boolean a_bIsReconnect) |
void |
connectionError(AnonServiceException a_e) |
void |
connectionEstablished(AnonServerDescription a_serverDescription) |
int |
countStartThreads() |
void |
currentServiceChanged(AnonServerDescription a_serverDescription) |
void |
dataChainErrorSignaled(AnonServiceException a_e) |
void |
disconnected() |
int |
getMaxConcurrentRequests() |
MixCascade |
getMixCascade()
Returns the current Mix cascade
|
anon.mixminion.MixminionServiceDescription |
getMixminionParams() |
anon.tor.TorAnonServerDescription |
getTorParams() |
void |
integrityErrorSignaled(AnonServiceException a_e) |
boolean |
isConnected() |
boolean |
isConnecting() |
void |
packetMixed(long a_totalBytes) |
void |
removeEventListener(AnonServiceEventListener l) |
void |
removeHTTPConnectionListener(AbstractHTTPConnectionListener listener) |
void |
setDebug(boolean bDebug) |
void |
setDummyTraffic(int a_interval)
Changes the dummy traffic interval on the connection to the server.
|
void |
setHTTPDecompressionEnabled(boolean enable) |
void |
setHTTPHeaderProcessingEnabled(boolean enable,
boolean b_force_proxy_callback) |
void |
setInterfaceBlockTimeout(long a_msTimeout)
Changes the timeout used for blocking an faulty interface of a Cascade.
|
void |
setMaxConcurrentRequests(int a_maxRequests) |
void |
setMixminionParams(anon.mixminion.MixminionServiceDescription newMixminionParams)
Sets the parameter for Mixminion (anonymous remailer).
|
void |
setProxyListener(IProxyListener l) |
void |
setTorParams(anon.tor.TorAnonServerDescription newTorParams)
Sets the parameter for TOR (anonymous SOCKS).
|
void |
start(AbstractMixCascadeContainer a_newMixCascade) |
void |
stop() |
public static final int UNLIMITED_REQUESTS
public static final int MIN_REQUESTS
public static final int E_MIX_PROTOCOL_NOT_SUPPORTED
public static final int E_SIGNATURE_CHECK_FIRSTMIX_FAILED
public static final int E_SIGNATURE_CHECK_OTHERMIX_FAILED
public AnonProxy(java.net.ServerSocket a_listener, TermsAndConditionConfirmation termsConfirmation, int a_socketTimeout)
a_listener
- A ServerSocket, where the AnonProxy listens for new requests
(e.g. from a web browser).setTorParams()
,
setMixminionParams()
public AnonProxy(DirectProxy a_directProxy, IMutableProxyInterface a_proxyInterface, TermsAndConditionConfirmation termsConfirmation)
public AnonProxy(java.net.ServerSocket a_listener, IMutableProxyInterface a_proxyInterface, TermsAndConditionConfirmation termsConfirmation)
a_listener
- A ServerSocket, where the AnonProxy listens for new requests
(e.g. from a web browser).a_proxyInterface
- describes a proxy the AnonProxy should use to establish
connections to the anon servers (e.g. if you are behind some
firewall etc.)setTorParams()
,
setMixminionParams()
public AnonProxy(DirectProxy a_directProxy, anon.transport.connection.IStreamConnection a_proxyConnection, MixCascade a_currentService, int a_maxDummyTrafficInterval, TermsAndConditionConfirmation termsConfirmation)
a_directProxy
- A DirectProxy
, from which to get the
ServerSocket
objects to listen for requests on.a_proxyConnection
- An already open connection to a mix (but not initialized, like
keys exchanged, ...).a_currentService
- a_maxDummyTrafficInterval
- The minimum dummy traffic rate the connection needs. The value
is the maximum dummy traffic interval in milliseconds. Any call
of setDummyTraffic(), will respect this maximum interval value
-> bigger values set with setDummyTraffic (especially -1) result
in that maximum dummy traffic interval value. If this value is
-1, there is no need for dummy traffic on that connection on the
server side.termsConfirmation
- public void setHTTPHeaderProcessingEnabled(boolean enable, boolean b_force_proxy_callback)
public void setHTTPDecompressionEnabled(boolean enable)
public void removeHTTPConnectionListener(AbstractHTTPConnectionListener listener)
public void addHTTPConnectionListener(AbstractHTTPConnectionListener listener)
public MixCascade getMixCascade()
public void setTorParams(anon.tor.TorAnonServerDescription newTorParams)
newTorParams
- The new parameters for TOR.TorAnonServerDescription
public anon.tor.TorAnonServerDescription getTorParams()
public void setMixminionParams(anon.mixminion.MixminionServiceDescription newMixminionParams)
newMixminionParams
- The new parameters for Mixminion. If NULL the Mixminion proxy is
disabled.MixminionServiceDescription
public anon.mixminion.MixminionServiceDescription getMixminionParams()
public void setMaxConcurrentRequests(int a_maxRequests)
public int getMaxConcurrentRequests()
public void setDummyTraffic(int a_interval)
a_interval
- The interval for dummy traffic on the connection to the server
in milliseconds.public void setInterfaceBlockTimeout(long a_msTimeout)
public void setDebug(boolean bDebug)
public void stop()
public void setProxyListener(IProxyListener l)
public int countStartThreads()
public void start(AbstractMixCascadeContainer a_newMixCascade) throws AnonServiceException
AnonServiceException
public void connecting(AnonServerDescription a_serverDescription, boolean a_bIsReconnect)
connecting
in interface AnonServiceEventListener
public void currentServiceChanged(AnonServerDescription a_serverDescription)
currentServiceChanged
in interface AnonServiceEventListener
public void connectionEstablished(AnonServerDescription a_serverDescription)
connectionEstablished
in interface AnonServiceEventListener
public void disconnected()
disconnected
in interface AnonServiceEventListener
public void connectionError(AnonServiceException a_e)
connectionError
in interface AnonServiceEventListener
public void addEventListener(AnonServiceEventListener l)
public void removeEventListener(AnonServiceEventListener l)
public boolean isConnected()
public boolean isConnecting()
public void packetMixed(long a_totalBytes)
packetMixed
in interface AnonServiceEventListener
public void dataChainErrorSignaled(AnonServiceException a_e)
dataChainErrorSignaled
in interface AnonServiceEventListener
public void integrityErrorSignaled(AnonServiceException a_e)
integrityErrorSignaled
in interface AnonServiceEventListener
Copyright © 2023. All rights reserved.