Documentation
¶
Index ¶
- func AddPeer(name string, peer v1alpha.VPNPeer)
- func AssignPublicIP(localIP net.IP, publicIP net.IP)
- func AssignVPNIP(name string, ipv4 utils.IPWithMask, ipv6 utils.IPWithMask)
- func InitializeVPN(name string, privateKey string, listenPort int)
- func LocalIPv4() net.IP
- func PublicIPv4() net.IP
- func RewritePublicIP(localIP net.IP, publicIP net.IP)
- func SetHostname(hostname string)
- func SetKubeletNodeIP(kubeletEnvFile string, ip net.IP)
- type GeoIPResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssignPublicIP ¶
AssignPublicIP assign the publicIP to the interface with the localIP.
func AssignVPNIP ¶ added in v1.0.9
func AssignVPNIP(name string, ipv4 utils.IPWithMask, ipv6 utils.IPWithMask)
func InitializeVPN ¶ added in v1.0.9
func PublicIPv4 ¶
PublicIPv4 returns the public IPv4 address of the requester.
func RewritePublicIP ¶
RewritePublicIP adds iptables rules to rewrite incoming packets with the publicIP and outgoing packets with the localIP. This counteracts cloud "Internet Gateway" NATs.
func SetHostname ¶
func SetHostname(hostname string)
SetHostname sets the node hostname and update the hosts file.
func SetKubeletNodeIP ¶
SetKubeletNodeIP sets the node IP in the kubelet configuration.
Types ¶
type GeoIPResponse ¶
type GeoIPResponse struct {
City string `json:"string"`
CountryCode string `json:"country_code"`
CountryName string `json:"country_name"`
IP net.IP `json:"ip"`
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
RegionCode string `json:"region_code"`
RegionName string `json:"region_name"`
Timezone string `json:"time_zone"`
}
func GeoIP ¶
func GeoIP() GeoIPResponse
GeoIP returns the geographical location of the requester IP address using an external service.
Click to show internal directories.
Click to hide internal directories.