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

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final String
     
    private static final byte[]
     

    Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean

    log
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • MAX_PROXY_HEADER_LENGTH

      public static final int MAX_PROXY_HEADER_LENGTH
      See Also:
    • PROX_PROTOCOL_PREFIX

      public static final String 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 interface org.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