anon.tor
Class TorSocksChannel

java.lang.Object
  extended by anon.shared.AbstractChannel
      extended by anon.tor.TorChannel
          extended by anon.tor.TorSocksChannel
All Implemented Interfaces:
AnonChannel

public class TorSocksChannel
extends TorChannel

Author:
stefan

Field Summary
private static int DATA_MODE
           
private  byte[] m_data
           
private  int m_state
           
private  Tor m_Tor
           
private  int m_version
           
private static int SOCKS_4
           
private static int SOCKS_5
           
private static int SOCKS_WAIT_FOR_VERSION
           
private static int SOCKS4_WAIT_FOR_REQUEST
           
private static int SOCKS5_WAIT_FOR_METHODS
           
private static int SOCKS5_WAIT_FOR_REQUEST
           
 
Fields inherited from class anon.tor.TorChannel
m_circuit
 
Fields inherited from class anon.shared.AbstractChannel
m_bIsClosed, m_bIsClosedByPeer, m_id
 
Fields inherited from interface anon.AnonChannel
HTTP, SMTP, SOCKS
 
Constructor Summary
TorSocksChannel(Tor tor)
           
 
Method Summary
protected  void send(byte[] arg0, int len)
          Called if some bytes should be send over this Sock channel
private  void state_WaitForMethods(byte[] arg0, int len)
           
private  void state_WaitForRequest_Socks4(byte[] arg0, int len)
           
private  void state_WaitForRequest_Socks5(byte[] arg0, int len)
           
private  void state_WaitForVersion(byte[] arg0, int len)
           
 
Methods inherited from class anon.tor.TorChannel
close_impl, close, closedByPeer, connect, decreaseSendRelayCellsWaitingForDelivery, dispatchCell, getOutputBlockSize, isClosed, isClosedByPeer, setCircuit, setDoNotCloseChannelOnErrorDuringConnect, setStreamID
 
Methods inherited from class anon.shared.AbstractChannel
finalize, getInputStream, getOutputStream, hashCode, recv
 
Methods inherited from class java.lang.Object
clone, equals, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOCKS_WAIT_FOR_VERSION

private static final int SOCKS_WAIT_FOR_VERSION
See Also:
Constant Field Values

SOCKS5_WAIT_FOR_METHODS

private static final int SOCKS5_WAIT_FOR_METHODS
See Also:
Constant Field Values

SOCKS5_WAIT_FOR_REQUEST

private static final int SOCKS5_WAIT_FOR_REQUEST
See Also:
Constant Field Values

SOCKS4_WAIT_FOR_REQUEST

private static final int SOCKS4_WAIT_FOR_REQUEST
See Also:
Constant Field Values

DATA_MODE

private static final int DATA_MODE
See Also:
Constant Field Values

SOCKS_5

private static final int SOCKS_5
See Also:
Constant Field Values

SOCKS_4

private static final int SOCKS_4
See Also:
Constant Field Values

m_state

private int m_state

m_version

private int m_version

m_data

private byte[] m_data

m_Tor

private Tor m_Tor
Constructor Detail

TorSocksChannel

public TorSocksChannel(Tor tor)
                throws java.io.IOException
Throws:
java.io.IOException
Method Detail

send

protected void send(byte[] arg0,
                    int len)
             throws java.io.IOException
Called if some bytes should be send over this Sock channel

Overrides:
send in class TorChannel
Throws:
java.io.IOException

state_WaitForVersion

private void state_WaitForVersion(byte[] arg0,
                                  int len)
                           throws java.io.IOException
Throws:
java.io.IOException

state_WaitForMethods

private void state_WaitForMethods(byte[] arg0,
                                  int len)
                           throws java.io.IOException
Throws:
java.io.IOException

state_WaitForRequest_Socks4

private void state_WaitForRequest_Socks4(byte[] arg0,
                                         int len)
                                  throws java.io.IOException
Throws:
java.io.IOException

state_WaitForRequest_Socks5

private void state_WaitForRequest_Socks5(byte[] arg0,
                                         int len)
                                  throws java.io.IOException
Throws:
java.io.IOException