Given the second STUN secret key and an encoded UserName,
returns the corresponding password, an HMAC-SHA1 computed
from the UserName using the secret.
Determines the NAT type and returns it in a NattedAddress,
which contains the local address (host and port number) and the
mapped address if different.
A node behind a NAT (network address translator) may have two
addresses: the address that it uses for communications and the
address that is seen by other machines on the Internet which are
beyond the NAT.
In this implementation, the STUN password is calculated directly
from the encoded UserName, which is a 36-byte value including an
HMAC generated using the UserName secret key.
PASSWORD -
Static variable in interface org.xlattice.protocol.stun.StunConst
A STUN server which listens for UDP BindingRequests on four combinations
of primary/secondary IP address and primary/secondary port and
optionally listens for SharedSecretRequests on TLS (TCP) connections
to the primary IP address and port.
Creates a server instance, setting parameters first from the
values passed, then if there are no such values from system
properties, then if there are no such system properties from
the SERVER_PROPERTIES_FILE file, and lastly by default.
Serialized, a UserName looks like
4B 4B 2B 6B 20B
+---+---+---+---+---+---+---+---+---+- - -+---+
| t | addr |port| salt | HMAC-SHA1 |
+---+---+---+---+---+---+---+---+---+- - -+---+
where t is the time rounded down to the nearest ten
minutes, addr is the IPv4 address, and port is
the port number; all three quantities are in big-endian form.