public abstract class TransportUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TransportUtil.IPv6Config |
Modifier and Type | Field and Description |
---|---|
static TransportUtil.IPv6Config |
DEFAULT_IPV6_CONFIG |
static String |
NTCP_IPV6_CONFIG |
static String |
PROP_IPV4_FIREWALLED |
static String |
PROP_IPV6_FIREWALLED |
static String |
SSU_IPV6_CONFIG |
Constructor and Description |
---|
TransportUtil() |
Modifier and Type | Method and Description |
---|---|
static TransportUtil.IPv6Config |
getIPv6Config(RouterContext ctx,
String transportStyle) |
static TransportUtil.IPv6Config |
getIPv6Config(String cfg) |
static boolean |
isIPv4Firewalled(RouterContext ctx,
String transportStyle)
This returns true if the force-firewalled setting is configured, false otherwise.
|
static boolean |
isIPv6(RouterAddress addr)
Addresses without a host (i.e.
|
static boolean |
isIPv6Firewalled(RouterContext ctx,
String transportStyle)
This returns true if the force-firewalled setting is configured, false otherwise.
|
static boolean |
isPubliclyRoutable(byte[] addr,
boolean allowIPv6) |
static boolean |
isPubliclyRoutable(byte[] addr,
boolean allowIPv4,
boolean allowIPv6)
Ref: RFC 5735
|
static boolean |
isValidPort(int port)
Is this a valid port for us or a remote router?
ref: http://i2p-projekt.i2p/en/docs/ports
|
public static final String NTCP_IPV6_CONFIG
public static final String SSU_IPV6_CONFIG
public static final String PROP_IPV4_FIREWALLED
public static final String PROP_IPV6_FIREWALLED
public static final TransportUtil.IPv6Config DEFAULT_IPV6_CONFIG
public static TransportUtil.IPv6Config getIPv6Config(RouterContext ctx, String transportStyle)
public static TransportUtil.IPv6Config getIPv6Config(String cfg)
public static boolean isIPv4Firewalled(RouterContext ctx, String transportStyle)
transportStyle
- ignoredpublic static boolean isIPv6Firewalled(RouterContext ctx, String transportStyle)
transportStyle
- ignoredpublic static boolean isIPv6(RouterAddress addr)
public static boolean isPubliclyRoutable(byte[] addr, boolean allowIPv6)
addr
- non-nullpublic static boolean isPubliclyRoutable(byte[] addr, boolean allowIPv4, boolean allowIPv6)
addr
- non-nullpublic static boolean isValidPort(int port)