|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectanon.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();
| Field Summary | |
|---|---|
static int |
E_BIND
|
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 Summary | |
|---|---|
AnonProxy(java.net.ServerSocket a_listener,
IMutableProxyInterface a_proxyInterface,
anon.terms.TermsAndConditionConfirmation termsConfirmation)
Creates a new AnonProxy. |
|
AnonProxy(java.net.ServerSocket a_listener,
anon.transport.connection.IStreamConnection a_proxyConnection,
int a_maxDummyTrafficInterval,
anon.terms.TermsAndConditionConfirmation termsConfirmation)
Creates a new AnonProxy with an already active mix connection. |
|
AnonProxy(java.net.ServerSocket a_listener,
anon.terms.TermsAndConditionConfirmation termsConfirmation)
Creates a new AnonProxy. |
|
| Method Summary | |
|---|---|
void |
addEventListener(AnonServiceEventListener l)
|
void |
addHTTPConnectionListener(AbstractHTTPConnectionListener listener)
|
void |
connecting(AnonServerDescription a_serverDescription)
|
void |
connectionError()
|
void |
connectionEstablished(AnonServerDescription a_serverDescription)
|
void |
dataChainErrorSignaled()
|
protected void |
decNumChannels()
|
void |
disableProxyCallback(ProxyCallback callback)
|
void |
disconnected()
|
void |
enableProxyCallback(ProxyCallback callback)
|
int |
getMaxConcurrentRequests()
|
MixCascade |
getMixCascade()
Returns the current Mix cascade |
anon.mixminion.MixminionServiceDescription |
getMixminionParams()
|
anon.tor.TorAnonServerDescription |
getTorParams()
|
protected void |
incNumChannels()
|
boolean |
isConnected()
|
void |
packetMixed(long a_totalBytes)
|
void |
removeEventListener(AnonServiceEventListener l)
|
void |
removeHTTPConnectionListener(AbstractHTTPConnectionListener listener)
|
void |
run()
|
void |
setDummyTraffic(int a_interval)
Changes the dummy traffic interval on the connection to the server. |
void |
setHTTPDecompressionEnabled(boolean enable)
|
void |
setHTTPHeaderProcessingEnabled(boolean enable)
|
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). |
int |
start(AbstractMixCascadeContainer a_newMixCascade)
|
void |
stop()
|
protected void |
transferredBytes(long bytes,
int protocolType)
|
| 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
| Constructor Detail |
|---|
public AnonProxy(java.net.ServerSocket a_listener,
anon.terms.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,
anon.terms.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,
anon.transport.connection.IStreamConnection a_proxyConnection,
int a_maxDummyTrafficInterval,
anon.terms.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(anon.tor.TorAnonServerDescription newTorParams)
newTorParams - The new parameters for TOR.TorAnonServerDescriptionpublic anon.tor.TorAnonServerDescription getTorParams()
public void setMixminionParams(anon.mixminion.MixminionServiceDescription newMixminionParams)
newMixminionParams - The new parameters for Mixminion. If NULL the Mixminion proxy is
disabled.MixminionServiceDescriptionpublic 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 stop()
public void run()
run in interface java.lang.Runnablepublic void setProxyListener(IProxyListener l)
public int start(AbstractMixCascadeContainer a_newMixCascade)
protected void decNumChannels()
protected void incNumChannels()
protected void transferredBytes(long bytes,
int protocolType)
public void connecting(AnonServerDescription a_serverDescription)
connecting in interface AnonServiceEventListenerpublic void connectionEstablished(AnonServerDescription a_serverDescription)
connectionEstablished in interface AnonServiceEventListenerpublic void disconnected()
disconnected in interface AnonServiceEventListenerpublic void connectionError()
connectionError in interface AnonServiceEventListenerpublic void addEventListener(AnonServiceEventListener l)
public void removeEventListener(AnonServiceEventListener l)
public boolean isConnected()
public void packetMixed(long a_totalBytes)
packetMixed in interface AnonServiceEventListenerpublic void dataChainErrorSignaled()
dataChainErrorSignaled in interface AnonServiceEventListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||