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 {
Status string `json:"success"`
Country string `json:"country"`
CountryCode string `json:"countryCode"`
Region string `json:"region"`
RegionName string `json:"regionName"`
City string `json:"city"`
Zip string `json:"zip"`
Lat float64 `json:"lat"`
Lon float64 `json:"lon"`
Timezone string `json:"timezone"`
ISP string `json:"isp"`
Org string `json:"org"`
As string `json:"as"`
Query string `json:"query"`
}
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.