Class ForwardingPolicy

java.lang.Object
com.sshtools.common.permissions.Permissions
com.sshtools.common.forwarding.ForwardingPolicy

public class ForwardingPolicy extends Permissions
  • Field Details

  • Constructor Details

    • ForwardingPolicy

      public ForwardingPolicy()
  • Method Details

    • allowGatewayForwarding

      public ForwardingPolicy allowGatewayForwarding()
    • denyGatewayForwarding

      public ForwardingPolicy denyGatewayForwarding()
    • grantForwarding

      public ForwardingPolicy grantForwarding(String host)
      Grant access to a specific host.
      Parameters:
      host -
      port -
    • revokeForwarding

      public ForwardingPolicy revokeForwarding(String host)
      Revoke access from a specific host.
      Parameters:
      host -
    • checkInterfacePermitted

      public boolean checkInterfacePermitted(SshConnection con, String originHost, int originPort)
      Check that the source of the forwarding is permitted under this policy. For remote forwarding the source is the network interface on the server that is listening for connections. For local forwarding it is the original source of the forward on the client's network.
      Parameters:
      con - the connection the request originated from
      originHost -
      originPort -
      Returns:
    • checkHostPermitted

      public boolean checkHostPermitted(SshConnection con, String host, int port)
      Check the host of the forwarding is permitted under this policy. For remote forwarding the host is the original source of the forwarding request on the local network. For local forwarding the host is the destination of the forwarding on the local network.
      Parameters:
      con - the connection the request originated from
      host -
      port -
      Returns:
    • allowForwarding

      public ForwardingPolicy allowForwarding()
    • denyForwarding

      public ForwardingPolicy denyForwarding()
    • getForwardingMaxPacketSize

      public int getForwardingMaxPacketSize()
    • setForwardingMaxPacketSize

      public void setForwardingMaxPacketSize(int forwardingMaxPacketSize)
    • getForwardingMaxWindowSize

      public com.sshtools.common.util.UnsignedInteger32 getForwardingMaxWindowSize()
    • setForwardingMaxWindowSize

      public void setForwardingMaxWindowSize(com.sshtools.common.util.UnsignedInteger32 forwardingMaxWindowSize)
    • getForwardingMinWindowSize

      public com.sshtools.common.util.UnsignedInteger32 getForwardingMinWindowSize()
    • setForwardingMinWindowSize

      public void setForwardingMinWindowSize(com.sshtools.common.util.UnsignedInteger32 forwardingMinWindowSize)