AbstractClientProxyConnector to connect through a SOCKS5 proxy.
| Modifier and Type | Class and Description |
|---|---|
| private static enum | |
| private static enum | Socks5ClientConnector.
Authentication methods for SOCKS5. |
| private class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private AuthenticationHandler | |
| private GSSContext | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private Socks5ClientConnector. |
| Access | Constructor and Description |
|---|---|
| public | Socks5ClientConnector(InetSocketAddress
of the proxy server we're connecting to proxyAddress, InetSocketAddress of the target server to connect to remoteAddress)Creates a new |
| public | Socks5ClientConnector(InetSocketAddress
of the proxy server we're connecting to proxyAddress, InetSocketAddress of the target server to connect to remoteAddress, String to authenticate at the proxy with proxyUser, char[] to authenticate at the proxy with proxyPassword)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private byte[] | |
| private Socks5ClientConnector. | |
| private static GSSContext | |
| private static byte[] | |
| public void | messageReceived(IoSession
to use for writing data session, Readable received data buffer)Implements org. Handle a received message. |
| public void | sendClientProxyMetadata(ClientSession
The sshSession)ClientSession instance - Note: at this stage the client's identification
line is not set yet.Implements org. Invoked once initial connection has been established so that the proxy can open its channel and send the meta-data to its peer. |
| private void | |
| private void | |
| private void |
| authenticationProposals | back to summary |
|---|---|
| private byte[] authenticationProposals | |
| authenticator | back to summary |
|---|---|
| private AuthenticationHandler<Buffer, Buffer> authenticator | |
| context | back to summary |
|---|---|
| private GSSContext context | |
| SOCKS_ADDRESS_FQDN | back to summary |
|---|---|
| private static final byte SOCKS_ADDRESS_FQDN | |
| SOCKS_ADDRESS_IPv4 | back to summary |
|---|---|
| private static final byte SOCKS_ADDRESS_IPv4 | |
| SOCKS_ADDRESS_IPv6 | back to summary |
|---|---|
| private static final byte SOCKS_ADDRESS_IPv6 | |
| SOCKS_CMD_CONNECT | back to summary |
|---|---|
| private static final byte SOCKS_CMD_CONNECT | |
| SOCKS_REPLY_ADDRESS_UNSUPPORTED | back to summary |
|---|---|
| private static final byte SOCKS_REPLY_ADDRESS_UNSUPPORTED | |
| SOCKS_REPLY_COMMAND_UNSUPPORTED | back to summary |
|---|---|
| private static final byte SOCKS_REPLY_COMMAND_UNSUPPORTED | |
| SOCKS_REPLY_CONNECTION_REFUSED | back to summary |
|---|---|
| private static final byte SOCKS_REPLY_CONNECTION_REFUSED | |
| SOCKS_REPLY_FAILURE | back to summary |
|---|---|
| private static final byte SOCKS_REPLY_FAILURE | |
| SOCKS_REPLY_FORBIDDEN | back to summary |
|---|---|
| private static final byte SOCKS_REPLY_FORBIDDEN | |
| SOCKS_REPLY_HOST_UNREACHABLE | back to summary |
|---|---|
| private static final byte SOCKS_REPLY_HOST_UNREACHABLE | |
| SOCKS_REPLY_NETWORK_UNREACHABLE | back to summary |
|---|---|
| private static final byte SOCKS_REPLY_NETWORK_UNREACHABLE | |
| SOCKS_REPLY_SUCCESS | back to summary |
|---|---|
| private static final byte SOCKS_REPLY_SUCCESS | |
| SOCKS_REPLY_TTL_EXPIRED | back to summary |
|---|---|
| private static final byte SOCKS_REPLY_TTL_EXPIRED | |
| SOCKS_VERSION_5 | back to summary |
|---|---|
| private static final byte SOCKS_VERSION_5 | |
| state | back to summary |
|---|---|
| private Socks5ClientConnector. | |
| Socks5ClientConnector | back to summary |
|---|---|
| public Socks5ClientConnector(InetSocketAddress proxyAddress, InetSocketAddress remoteAddress) Creates a new
| |
| Socks5ClientConnector | back to summary |
|---|---|
| public Socks5ClientConnector(InetSocketAddress proxyAddress, InetSocketAddress remoteAddress, String proxyUser, char[] proxyPassword) Creates a new
| |
| authStep | back to summary |
|---|---|
| private void authStep(IoSession session, Buffer input) throws Exception | |
| close | back to summary |
|---|---|
| private void close() | |
| doGssApiAuth | back to summary |
|---|---|
| private void doGssApiAuth(IoSession session) throws Exception | |
| doPasswordAuth | back to summary |
|---|---|
| private void doPasswordAuth(IoSession session) throws Exception | |
| establishConnection | back to summary |
|---|---|
| private void establishConnection(Buffer data) throws Exception | |
| getAuthenticationProposals | back to summary |
|---|---|
| private byte[] getAuthenticationProposals() | |
| getAuthMethod | back to summary |
|---|---|
| private Socks5ClientConnector. | |
| getGSSContext | back to summary |
|---|---|
| private static GSSContext getGSSContext(InetSocketAddress address) | |
| getRawAddress | back to summary |
|---|---|
| private static byte[] getRawAddress(InetSocketAddress address) | |
| messageReceived | back to summary |
|---|---|
| public void messageReceived(IoSession session, Readable buffer) throws Exception Implements org. Doc from org. Handle a received message. | |
| sendClientProxyMetadata | back to summary |
|---|---|
| public void sendClientProxyMetadata(ClientSession sshSession) throws Exception Implements org. Doc from org. Invoked once initial connection has been established so that the proxy can open its channel and send the meta-data to its peer. Upon successful return the SSH identification line is eventually sent and the protocol proceeds as usual.
| |
| sendConnectInfo | back to summary |
|---|---|
| private void sendConnectInfo(IoSession session) throws Exception | |
| startAuth | back to summary |
|---|---|
| private void startAuth(IoSession session) throws Exception | |
| versionCheck | back to summary |
|---|---|
| private void versionCheck(byte version) throws Exception | |
| Modifier and Type | Field and Description |
|---|---|
| public static final Socks5ClientConnector. | |
| public static final Socks5ClientConnector. | |
| public static final Socks5ClientConnector. | |
| public static final Socks5ClientConnector. | |
| public static final Socks5ClientConnector. | |
| public static final Socks5ClientConnector. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public static Socks5ClientConnector. | |
| public static Socks5ClientConnector. |
| AUTHENTICATING | back to summary |
|---|---|
| public static final Socks5ClientConnector. | |
| CONNECTED | back to summary |
|---|---|
| public static final Socks5ClientConnector. | |
| CONNECTING | back to summary |
|---|---|
| public static final Socks5ClientConnector. | |
| FAILED | back to summary |
|---|---|
| public static final Socks5ClientConnector. | |
| INIT | back to summary |
|---|---|
| public static final Socks5ClientConnector. | |
| NONE | back to summary |
|---|---|
| public static final Socks5ClientConnector. | |
| ProtocolState | back to summary |
|---|---|
| private ProtocolState() | |
| handleMessage | back to summary |
|---|---|
| public void handleMessage(Socks5ClientConnector connector, IoSession session, Buffer data) throws Exception | |
| valueOf | back to summary |
|---|---|
| public static Socks5ClientConnector. | |
| values | back to summary |
|---|---|
| public static Socks5ClientConnector. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final Socks5ClientConnector. | |
| public static final Socks5ClientConnector. | |
| public static final Socks5ClientConnector. | |
| public static final Socks5ClientConnector. | |
| private final byte |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public byte | |
| public static Socks5ClientConnector. | |
| public static Socks5ClientConnector. |
| ANONYMOUS | back to summary |
|---|---|
| public static final Socks5ClientConnector. | |
| GSSAPI | back to summary |
|---|---|
| public static final Socks5ClientConnector. | |
| NONE_ACCEPTABLE | back to summary |
|---|---|
| public static final Socks5ClientConnector. | |
| PASSWORD | back to summary |
|---|---|
| public static final Socks5ClientConnector. | |
| value | back to summary |
|---|---|
| private final byte value | |
| SocksAuthenticationMethod | back to summary |
|---|---|
| private SocksAuthenticationMethod(int value) | |
| getValue | back to summary |
|---|---|
| public byte getValue() | |
| valueOf | back to summary |
|---|---|
| public static Socks5ClientConnector. | |
| values | back to summary |
|---|---|
| public static Socks5ClientConnector. | |
| Modifier and Type | Field and Description |
|---|---|
| private static final byte | |
| private static final byte |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | askCredentials()
Overrides org. Asks for credentials via the global |
| public Buffer | getToken()
Implements org. Retrieves the last token generated. |
| public void | process()
Overrides org. Implements org. Produces the next authentication token, if any. |
| SOCKS_BASIC_AUTH_SUCCESS | back to summary |
|---|---|
| private static final byte SOCKS_BASIC_AUTH_SUCCESS | |
| SOCKS_BASIC_PROTOCOL_VERSION | back to summary |
|---|---|
| private static final byte SOCKS_BASIC_PROTOCOL_VERSION | |
| SocksBasicAuthentication | back to summary |
|---|---|
| public SocksBasicAuthentication() | |
| askCredentials | back to summary |
|---|---|
| protected void askCredentials() Overrides org. Doc from org. Asks for credentials via the global
| |
| getToken | back to summary |
|---|---|
| public Buffer getToken() throws IOException Implements org. Doc from org. Retrieves the last token generated. | |
| process | back to summary |
|---|---|
| public void process() throws Exception Overrides org. Implements org. Doc from org. Produces the next authentication token, if any. | |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final byte | |
| private static final byte |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected GSSContext | createContext()
Implements abstract org. Creates the |
| protected byte[] | extractToken(Buffer
to extract the token from input)Implements abstract org. Extracts the token from the last set parameters. |
| public Buffer | getToken()
Implements org. Retrieves the last token generated. |
| SOCKS5_GSSAPI_FAILURE | back to summary |
|---|---|
| private static final int SOCKS5_GSSAPI_FAILURE | |
| SOCKS5_GSSAPI_TOKEN | back to summary |
|---|---|
| private static final byte SOCKS5_GSSAPI_TOKEN | |
| SOCKS5_GSSAPI_VERSION | back to summary |
|---|---|
| private static final byte SOCKS5_GSSAPI_VERSION | |
| SocksGssApiAuthentication | back to summary |
|---|---|
| public SocksGssApiAuthentication() | |
| createContext | back to summary |
|---|---|
| protected GSSContext createContext() throws Exception Implements abstract org. Doc from org. Creates the
| |
| extractToken | back to summary |
|---|---|
| protected byte[] extractToken(Buffer input) throws Exception Implements abstract org. Doc from org. Extracts the token from the last set parameters. | |
| getToken | back to summary |
|---|---|
| public Buffer getToken() throws Exception Implements org. Doc from org. Retrieves the last token generated. | |