Package org.apache.sshd.common.forward
Class SocksProxy
- java.lang.Object
-
- org.apache.sshd.common.util.logging.AbstractLoggingBean
-
- org.apache.sshd.common.util.closeable.IoBaseCloseable
-
- org.apache.sshd.common.util.closeable.AbstractCloseable
-
- org.apache.sshd.common.forward.SocksProxy
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.nio.channels.Channel,Closeable,IoHandler
public class SocksProxy extends AbstractCloseable implements IoHandler
SOCKS proxy server, supporting simple socks4/5 protocols.- See Also:
- SOCKS Wikipedia
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSocksProxy.ProxyclassSocksProxy.Socks4classSocksProxy.Socks5-
Nested classes/interfaces inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
AbstractCloseable.State
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<IoSession,SocksProxy.Proxy>proxiesprivate ConnectionServiceservice-
Fields inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
closeFuture, futureLock, state
-
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
-
Constructor Summary
Constructors Constructor Description SocksProxy(ConnectionService service)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexceptionCaught(IoSession session, java.lang.Throwable cause)voidmessageReceived(IoSession session, Readable message)voidsessionClosed(IoSession session)voidsessionCreated(IoSession session)-
Methods inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
addCloseFutureListener, builder, close, doCloseGracefully, doCloseImmediately, getFutureLock, isClosed, isClosing, preClose, removeCloseFutureListener
-
Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
-
-
-
-
Field Detail
-
service
private final ConnectionService service
-
proxies
private final java.util.Map<IoSession,SocksProxy.Proxy> proxies
-
-
Constructor Detail
-
SocksProxy
public SocksProxy(ConnectionService service)
-
-
Method Detail
-
sessionCreated
public void sessionCreated(IoSession session) throws java.lang.Exception
- Specified by:
sessionCreatedin interfaceIoHandler- Throws:
java.lang.Exception
-
sessionClosed
public void sessionClosed(IoSession session) throws java.lang.Exception
- Specified by:
sessionClosedin interfaceIoHandler- Throws:
java.lang.Exception
-
messageReceived
public void messageReceived(IoSession session, Readable message) throws java.lang.Exception
- Specified by:
messageReceivedin interfaceIoHandler- Throws:
java.lang.Exception
-
exceptionCaught
public void exceptionCaught(IoSession session, java.lang.Throwable cause) throws java.lang.Exception
- Specified by:
exceptionCaughtin interfaceIoHandler- Throws:
java.lang.Exception
-
-