Documentation ¶
Overview ¶
Package cloudenv reports which known cloud environment we're running in.
Index ¶
Constants ¶
const ( AWS = Cloud("aws") // Amazon Web Services (EC2 in particular) Azure = Cloud("azure") // Microsoft Azure GCP = Cloud("gcp") // Google Cloud )
const AWSResolverIP = "169.254.169.253"
AWSResolverIP is the IP address of the AWS DNS server. See https://docs.aws.amazon.com/vpc/latest/userguide/vpc-dns.html
const AzureResolverIP = "168.63.129.16"
AzureResolverIP is Azure's DNS resolver IP. See https://docs.microsoft.com/en-us/azure/virtual-network/what-is-ip-address-168-63-129-16
const CommonNonRoutableMetadataIP = "169.254.169.254"
CommonNonRoutableMetadataIP is the IP address of the metadata server on Amazon EC2, Google Compute Engine, and Azure. It's not routable. (169.254.0.0/16 is a Link Local range: RFC 3927)
const GoogleMetadataAndDNSIP = "169.254.169.254"
GoogleMetadataAndDNSIP is the metadata IP used by Google Cloud. It's also the *.internal DNS server, and proxies to 8.8.8.8.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cloud ¶
type Cloud string
Cloud is a recognize cloud environment with properties that Tailscale can specialize for in places.
func (Cloud) HasInternalTLD ¶
HasInternalTLD reports whether c is a cloud environment whose ResolverIP serves *.internal records.
func (Cloud) ResolverIP ¶
ResolverIP returns the cloud host's recursive DNS server or the empty string if not available.