Class ProxyProtocolAcceptor
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.contrib.server.session.proxyprotocol.ProxyProtocolAcceptor
- All Implemented Interfaces:
org.apache.sshd.server.session.ServerProxyAcceptor
- Direct Known Subclasses:
ProxyProtocolV2Acceptor
public class ProxyProtocolAcceptor
extends org.apache.sshd.common.util.logging.AbstractLoggingBean
implements org.apache.sshd.server.session.ServerProxyAcceptor
A working prototype to support PROXY protocol as described in
HAProxy Documentation.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final String
private static final byte[]
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
acceptServerProxyMetadata
(org.apache.sshd.server.session.ServerSession session, org.apache.sshd.common.util.buffer.Buffer buffer) protected boolean
parseProxyHeader
(org.apache.sshd.server.session.ServerSession session, String proxyHeader, int markPosition, org.apache.sshd.common.util.buffer.Buffer buffer) 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 Details
-
MAX_PROXY_HEADER_LENGTH
public static final int MAX_PROXY_HEADER_LENGTH- See Also:
-
PROX_PROTOCOL_PREFIX
- See Also:
-
PROXY_HEADER
private static final byte[] PROXY_HEADER
-
-
Constructor Details
-
ProxyProtocolAcceptor
public ProxyProtocolAcceptor()
-
-
Method Details
-
acceptServerProxyMetadata
public boolean acceptServerProxyMetadata(org.apache.sshd.server.session.ServerSession session, org.apache.sshd.common.util.buffer.Buffer buffer) throws Exception - Specified by:
acceptServerProxyMetadata
in interfaceorg.apache.sshd.server.session.ServerProxyAcceptor
- Throws:
Exception
-
parseProxyHeader
protected boolean parseProxyHeader(org.apache.sshd.server.session.ServerSession session, String proxyHeader, int markPosition, org.apache.sshd.common.util.buffer.Buffer buffer) throws Exception - Throws:
Exception
-