|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object anon.server.impl.MuxSocket
Field Summary | |
private static short |
CHANNEL_CLOSE
|
private static short |
CHANNEL_DATA
|
private static short |
CHANNEL_DUMMY
|
private static short |
CHANNEL_OPEN
|
private static int |
CHANNEL_TYPE_HTTP
|
private static int |
CHANNEL_TYPE_SOCKS
|
static int |
DATA_SIZE
|
static int |
KEY_SIZE
|
private static int |
LOGIN_TIMEOUT
|
private java.util.Vector |
m_anonServiceListener
|
private byte[] |
m_arEmpty
|
private MixParameters[] |
m_arMixParameters
|
private byte[] |
m_arOutBuff
|
private byte[] |
m_arOutBuff2
|
private boolean |
m_bConnectionStoppedManually
|
private boolean |
m_bIsConnected
|
private boolean |
m_bisCrypted
|
private boolean |
m_bMixProtocolWithTimestamp
|
private boolean |
m_bNewFlowControl
|
private boolean |
m_bPaymentRequired
|
private boolean |
m_bRunFlag
|
private java.util.Dictionary |
m_ChannelList
|
private SymCipher |
m_cipherFirstMix
|
private SymCipher |
m_cipherIn
|
private SymCipher |
m_cipherInAI
|
private SymCipher |
m_cipherOut
|
private SymCipher |
m_cipherOutAI
|
private ControlChannelDispatcher |
m_ControlChannelDispatcher
|
private DummyTraffic |
m_DummyTraffic
|
private int |
m_iChainLen
|
private int |
m_iMixProtocolVersion
|
private java.io.DataInputStream |
m_inDataStream
|
private ProxyConnection |
m_ioSocket
|
private KeyPool |
m_KeyPool
|
private int |
m_mixCascadeCertificateLock
Stores the lock on the certificate used by the mixcascade to sign all cascade related messages, like the MixCascade or MixCascadeStatus structures. |
private byte[] |
m_MixPacketRecv
|
private byte[] |
m_MixPacketSend
|
private long |
m_numReceivedPackets
|
private long |
m_numSentPackets
|
private java.io.BufferedOutputStream |
m_outStream
|
private Pay |
m_Pay
|
private ReplayControlChannel |
m_replayControlChannel
|
private java.security.SecureRandom |
m_SecureRandom
|
private long |
m_transferredBytes
|
private int |
m_waitingChannels
|
private static int |
MAX_CHANNELS_PER_CONNECTION
|
private static int |
MIX_PROTOCOL_VERSION_0_2
|
private static int |
MIX_PROTOCOL_VERSION_0_4
|
private static int |
MIX_PROTOCOL_VERSION_0_5
|
private static int |
MIX_PROTOCOL_VERSION_0_7
|
private static int |
MIX_PROTOCOL_VERSION_0_8
|
private static int |
MIX_PROTOCOL_VERSION_0_9
|
private static short |
NEW_FLOW_CONTROL_FLAG
|
private static int |
PACKET_SIZE
|
private static short |
PAYLOAD_LEN_MASK
|
static int |
PAYLOAD_SIZE
|
private static int |
RSA_SIZE
|
private static int |
SECONDS_PER_INTERVAL
|
private java.lang.Thread |
threadRunLoop
|
Constructor Summary | |
private |
MuxSocket()
|
Method Summary | |
void |
addEventListener(AnonServiceEventListener l)
|
private int |
close()
|
int |
close(int channel_id)
|
int |
connectViaFirewall(MixCascade mixCascade,
ImmutableProxyInterface a_proxyInterface)
Try to connect to a given MixCascade. |
static MuxSocket |
create()
|
private void |
fireConnectionError()
|
private void |
fireConnectionEstablished()
|
private void |
firePacketMixed()
|
long |
getAndResetTransferredBytes()
Resets the payload counter to 0 and returns the value as it was before the reset. |
ControlChannelDispatcher |
getControlChannelDispatcher()
|
int |
getNumberOfMixes()
Returns how many Mixes are in the cascade |
Pay |
getPay()
|
private int |
getTimestampForTime(long refTime)
Returns the number of 'intervalls' gone since start of refTime. |
void |
gotTimestamps(ReplayTimestamp[] theTimestamps)
We got some replay timestamps from mixes of the current cascade. |
int |
initialize(ProxyConnection a_proxyConnection)
This method does some initialization and the initial key exchange. |
boolean |
isConnected()
|
Channel |
newChannel(int type)
|
private int |
processXmlKeys(byte[] buff)
Reads the public key from the Mixes and try to initialize the key array |
private void |
removeCascadeCertificateFromCertificateStore()
Releases the lock on the certificate used by the mixcascade to sign all cascade related messages, like the MixCascade or MixCascadeStatus structures. |
void |
removeEventListener(AnonServiceEventListener l)
|
void |
run()
|
private void |
runStopped()
|
void |
send(int channel,
int type,
byte[] buff,
short len_and_flags)
|
protected void |
sendDummy()
|
private void |
sendMixPacket()
|
protected void |
sendRawMixPacket(int channel,
short flags,
byte[] data,
int off,
int data_len)
Sends a 'raw' MixPacket. |
void |
setDummyTraffic(int intervall)
Enables or Disables DummyTraffic. |
private void |
setEnableEncryption(boolean b)
|
private void |
setEncryptionKeys(byte[] keys,
int len)
|
int |
startService(ImmutableProxyInterface a_proxy)
|
void |
stopService()
|
private void |
updateBytesForAccounting()
Updates the transferred bytes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.security.SecureRandom m_SecureRandom
private java.util.Dictionary m_ChannelList
private int m_waitingChannels
private java.io.BufferedOutputStream m_outStream
private java.io.DataInputStream m_inDataStream
private byte[] m_MixPacketSend
private byte[] m_MixPacketRecv
private ProxyConnection m_ioSocket
private byte[] m_arOutBuff
private byte[] m_arOutBuff2
private byte[] m_arEmpty
private MixParameters[] m_arMixParameters
private KeyPool m_KeyPool
private int m_iChainLen
private int m_iMixProtocolVersion
private volatile boolean m_bRunFlag
private boolean m_bIsConnected
private SymCipher m_cipherIn
private SymCipher m_cipherOut
private boolean m_bisCrypted
private SymCipher m_cipherFirstMix
private SymCipher m_cipherInAI
private SymCipher m_cipherOutAI
private volatile long m_transferredBytes
public static final int KEY_SIZE
public static final int DATA_SIZE
public static final int PAYLOAD_SIZE
private static final int PACKET_SIZE
private static final int RSA_SIZE
private static final short CHANNEL_DATA
private static final short CHANNEL_CLOSE
private static final short CHANNEL_OPEN
private static final short CHANNEL_DUMMY
private static final short PAYLOAD_LEN_MASK
private static final short NEW_FLOW_CONTROL_FLAG
private static final int CHANNEL_TYPE_HTTP
private static final int CHANNEL_TYPE_SOCKS
private static final int MAX_CHANNELS_PER_CONNECTION
private static final int MIX_PROTOCOL_VERSION_0_9
private static final int MIX_PROTOCOL_VERSION_0_8
private static final int MIX_PROTOCOL_VERSION_0_7
private static final int MIX_PROTOCOL_VERSION_0_5
private static final int MIX_PROTOCOL_VERSION_0_4
private static final int MIX_PROTOCOL_VERSION_0_2
private static final int LOGIN_TIMEOUT
private java.lang.Thread threadRunLoop
private DummyTraffic m_DummyTraffic
private boolean m_bMixProtocolWithTimestamp
private boolean m_bNewFlowControl
private static final int SECONDS_PER_INTERVAL
private ReplayControlChannel m_replayControlChannel
private ControlChannelDispatcher m_ControlChannelDispatcher
private int m_mixCascadeCertificateLock
private java.util.Vector m_anonServiceListener
private volatile boolean m_bConnectionStoppedManually
private long m_numSentPackets
private long m_numReceivedPackets
private Pay m_Pay
private boolean m_bPaymentRequired
Constructor Detail |
private MuxSocket()
Method Detail |
public static MuxSocket create()
public boolean isConnected()
public int getNumberOfMixes()
public void setDummyTraffic(int intervall)
intervall
- milliseconds of inactivity after which a dummy is send. Set to '-1' to disable Dummy Traffic.public int initialize(ProxyConnection a_proxyConnection)
a_proxyConnection
- A ProxyConnection to the first mix of a cascade.
public int connectViaFirewall(MixCascade mixCascade, ImmutableProxyInterface a_proxyInterface)
mixCascade
- MixCascade to connect toa_proxyInterface
- ImmutableProxyInterface a proxy to use (or null if no proxy should be used)
private void setEnableEncryption(boolean b)
private void setEncryptionKeys(byte[] keys, int len)
private int processXmlKeys(byte[] buff)
public Channel newChannel(int type) throws java.net.ConnectException
java.net.ConnectException
public int close(int channel_id)
protected void sendDummy()
protected void sendRawMixPacket(int channel, short flags, byte[] data, int off, int data_len)
public int startService(ImmutableProxyInterface a_proxy)
public void stopService()
private int close()
public void run()
run
in interface java.lang.Runnable
private void runStopped()
private void sendMixPacket() throws java.lang.Exception
java.lang.Exception
public void send(int channel, int type, byte[] buff, short len_and_flags) throws java.io.IOException
java.io.IOException
private int getTimestampForTime(long refTime)
public ControlChannelDispatcher getControlChannelDispatcher()
public long getAndResetTransferredBytes()
private void updateBytesForAccounting()
private void removeCascadeCertificateFromCertificateStore()
public void addEventListener(AnonServiceEventListener l)
public void removeEventListener(AnonServiceEventListener l)
private void fireConnectionEstablished()
private void fireConnectionError()
private void firePacketMixed()
public void gotTimestamps(ReplayTimestamp[] theTimestamps)
gotTimestamps
in interface IReplayCtrlChannelMsgListener
public Pay getPay()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |