Package com.sshtools.common.forwarding
Class ForwardingPolicy
java.lang.Object
com.sshtools.common.permissions.Permissions
com.sshtools.common.forwarding.ForwardingPolicy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intFields inherited from class com.sshtools.common.permissions.Permissions
permissions -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckHostPermitted(SshConnection con, String host, int port) Check the host of the forwarding is permitted under this policy.booleancheckInterfacePermitted(SshConnection con, String originHost, int originPort) Check that the source of the forwarding is permitted under this policy.intcom.sshtools.common.util.UnsignedInteger32com.sshtools.common.util.UnsignedInteger32grantForwarding(String host) Grant access to a specific host.revokeForwarding(String host) Revoke access from a specific host.voidsetForwardingMaxPacketSize(int forwardingMaxPacketSize) voidsetForwardingMaxWindowSize(com.sshtools.common.util.UnsignedInteger32 forwardingMaxWindowSize) voidsetForwardingMinWindowSize(com.sshtools.common.util.UnsignedInteger32 forwardingMinWindowSize) Methods inherited from class com.sshtools.common.permissions.Permissions
add, check, remove
-
Field Details
-
ALLOW_FORWARDING
public static final int ALLOW_FORWARDING- See Also:
-
GATEWAY_FORWARDING
public static final int GATEWAY_FORWARDING- See Also:
-
UNIX_DOMAIN_SOCKET_FORWARDING
public static final int UNIX_DOMAIN_SOCKET_FORWARDING- See Also:
-
-
Constructor Details
-
ForwardingPolicy
public ForwardingPolicy()
-
-
Method Details
-
allowGatewayForwarding
-
denyGatewayForwarding
-
grantForwarding
Grant access to a specific host.- Parameters:
host-port-
-
revokeForwarding
Revoke access from a specific host.- Parameters:
host-
-
checkInterfacePermitted
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 fromoriginHost-originPort-- Returns:
-
checkHostPermitted
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 fromhost-port-- Returns:
-
allowForwarding
-
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)
-