|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object anon.proxy.AnonProxy
public final class AnonProxy
This calls implements a proxy one can use for convienient access to the
provided anonymous communication primitives. 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();
Nested Class Summary | |
---|---|
private class |
AnonProxy.DummyMixCascadeContainer
|
private class |
AnonProxy.EncapsulatedMixCascadeContainer
|
private class |
AnonProxy.OpenSocketRequester
|
Constructor Summary | |
---|---|
AnonProxy(java.net.ServerSocket a_listener,
IMutableProxyInterface a_proxyInterface,
TermsAndConditionConfirmation termsConfirmation)
Creates a new AnonProxy. |
|
AnonProxy(java.net.ServerSocket a_listener,
IStreamConnection a_proxyConnection,
int a_maxDummyTrafficInterval,
TermsAndConditionConfirmation termsConfirmation)
Creates a new AnonProxy with an already active mix connection. |
|
AnonProxy(java.net.ServerSocket a_listener,
TermsAndConditionConfirmation termsConfirmation)
Creates a new AnonProxy. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int UNLIMITED_REQUESTS
public static final int MIN_REQUESTS
public static final int E_BIND
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
private static final int RECONNECT_INTERVAL
private int m_maxRequests
private AnonService m_Anon
private AnonService m_Tor
private AnonService m_Mixminion
private java.util.Vector m_anonServiceListener
private java.lang.Thread threadRun
private java.net.ServerSocket m_socketListener
private IMutableProxyInterface m_proxyInterface
private IProxyListener m_ProxyListener
private volatile int m_numChannels
private boolean m_bReconnecting
private final java.lang.Object THREAD_SYNC
private final java.lang.Object SHUTDOWN_SYNC
private boolean bShuttingDown
private final ProxyCallbackHandler m_callbackHandler
private HTTPProxyCallback m_httpProxyCallback
private DecompressionProxyCallback m_decompressionProxyCallback
private TermsAndConditionConfirmation termsConfirmation
private AbstractMixCascadeContainer m_currentMixCascade
private TorAnonServerDescription m_currentTorParams
private MixminionServiceDescription m_currentMixminionParams
private boolean m_forwardedConnection
private int m_maxDummyTrafficInterval
Constructor Detail |
---|
public AnonProxy(java.net.ServerSocket a_listener, TermsAndConditionConfirmation termsConfirmation)
a_listener
- A ServerSocket, where the AnonProxy listens for new requests (e.g.
from a web browser).setTorParams()
,
setMixminionParams()
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(java.net.ServerSocket a_listener, IStreamConnection a_proxyConnection, int a_maxDummyTrafficInterval, TermsAndConditionConfirmation termsConfirmation)
a_listener
- A ServerSocket, where the AnonProxy listens for new requests (e.g.
from a web browser).a_proxyConnection
- An already open connection to a mix (but not initialized, like
keys exchanged, ...).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.Method Detail |
---|
public void enableProxyCallback(ProxyCallback callback)
public void disableProxyCallback(ProxyCallback callback)
public void setHTTPHeaderProcessingEnabled(boolean enable)
public void setHTTPDecompressionEnabled(boolean enable)
public void removeHTTPConnectionListener(AbstractHTTPConnectionListener listener)
public void addHTTPConnectionListener(AbstractHTTPConnectionListener listener)
public MixCascade getMixCascade()
public void setTorParams(TorAnonServerDescription newTorParams)
newTorParams
- The new parameters for TOR.TorAnonServerDescription
public TorAnonServerDescription getTorParams()
public void setMixminionParams(MixminionServiceDescription newMixminionParams)
newMixminionParams
- The new parameters for Mixminion. If NULL the Mixminion proxy is
disabled.MixminionServiceDescription
public 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 stop()
public void run()
run
in interface java.lang.Runnable
AnonChannel createChannel(int type) throws NotConnectedToMixException, java.lang.Exception
NotConnectedToMixException
java.lang.Exception
void reconnect()
public void setProxyListener(IProxyListener l)
public int start(AbstractMixCascadeContainer a_newMixCascade)
protected void decNumChannels()
protected void incNumChannels()
protected void transferredBytes(long bytes, int protocolType)
private void fireDisconnected()
private void fireConnecting(AnonServerDescription a_serverDescription)
private void fireConnectionEstablished(AnonServerDescription a_serverDescription)
private void fireConnectionError()
public void connecting(AnonServerDescription a_serverDescription)
connecting
in interface AnonServiceEventListener
public void connectionEstablished(AnonServerDescription a_serverDescription)
connectionEstablished
in interface AnonServiceEventListener
public void disconnected()
disconnected
in interface AnonServiceEventListener
public void connectionError()
connectionError
in interface AnonServiceEventListener
public void addEventListener(AnonServiceEventListener l)
public void removeEventListener(AnonServiceEventListener l)
public boolean isConnected()
public void packetMixed(long a_totalBytes)
packetMixed
in interface AnonServiceEventListener
public void dataChainErrorSignaled()
dataChainErrorSignaled
in interface AnonServiceEventListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |