mirror of https://github.com/v2ray/v2ray-core
test case for IPv6 any ip
parent
f66b127c0a
commit
9a7177c82c
|
@ -18,6 +18,9 @@ var (
|
||||||
|
|
||||||
// LocalHostIPv6 is a constant value for localhost IP in IPv6.
|
// LocalHostIPv6 is a constant value for localhost IP in IPv6.
|
||||||
LocalHostIPv6 = IPAddress([]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1})
|
LocalHostIPv6 = IPAddress([]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1})
|
||||||
|
|
||||||
|
// AnyIPv6 is a constant value for any IP in IPv6.
|
||||||
|
AnyIPv6 = IPAddress([]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})
|
||||||
)
|
)
|
||||||
|
|
||||||
// AddressFamily is the type of address.
|
// AddressFamily is the type of address.
|
||||||
|
|
|
@ -84,6 +84,14 @@ func TestAddressProperty(t *testing.T) {
|
||||||
String: "[2001:4860:0:2001::68]",
|
String: "[2001:4860:0:2001::68]",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Input: ParseAddress("::0"),
|
||||||
|
Output: addrProprty{
|
||||||
|
IP: AnyIPv6.IP(),
|
||||||
|
Family: AddressFamilyIPv6,
|
||||||
|
String: "[::]",
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Input: ParseAddress("[::ffff:123.151.71.143]"),
|
Input: ParseAddress("[::ffff:123.151.71.143]"),
|
||||||
Output: addrProprty{
|
Output: addrProprty{
|
||||||
|
|
Loading…
Reference in New Issue