Documentation ¶
Index ¶
Constants ¶
View Source
const ( // configmap name ConfigMapPodTrafficManager = "kubevpn-traffic-manager" // config map keys KeyDHCP = "DHCP" KeyDHCP6 = "DHCP6" KeyEnvoy = "ENVOY_CONFIG" KeyClusterIPv4POOLS = "IPv4_POOLS" KeyRefCount = "REF_COUNT" // secret keys // TLSCertKey is the key for tls certificates in a TLS secret. TLSCertKey = "tls_crt" // TLSPrivateKeyKey is the key for the private key field in a TLS secret. TLSPrivateKeyKey = "tls_key" // container name ContainerSidecarEnvoyProxy = "envoy-proxy" ContainerSidecarControlPlane = "control-plane" ContainerSidecarVPN = "vpn" VolumeEnvoyConfig = "envoy-config" DefaultNetDir = "/etc/cni/net.d" Proc = "/proc" CniNetName = "cni-net-dir-kubevpn" // env name EnvTunNameOrLUID = "TunNameOrLUID" EnvInboundPodTunIPv4 = "TunIPv4" EnvInboundPodTunIPv6 = "TunIPv6" EnvPodName = "POD_NAME" EnvPodNamespace = "POD_NAMESPACE" // header name HeaderPodName = "POD_NAME" HeaderPodNamespace = "POD_NAMESPACE" HeaderIPv4 = "IPv4" HeaderIPv6 = "IPv6" // api APIRentIP = "/rent/ip" APIReleaseIP = "/release/ip" KUBECONFIG = "kubeconfig" // labels ManageBy = konfig.ManagedbyLabelKey // pprof port PProfPort = 32345 // startup by KubeVPN EnvStartSudoKubeVPNByKubeVPN = "DEPTH_SIGNED_BY_NAISON" EnvSSHJump = "SSH_JUMP_BY_KUBEVPN" // transport mode EnvKubeVPNTransportEngine = "EnvKubeVPNTransportEngine" )
Variables ¶
View Source
var ( // Image inject --ldflags -X Image = "docker.io/naison/kubevpn:latest" Version = "latest" GitCommit = "" OriginImage = "docker.io/naison/kubevpn:" + Version )
View Source
var ( CIDR *net.IPNet CIDR6 *net.IPNet RouterIP net.IP RouterIP6 net.IP // for creating docker network DockerCIDR *net.IPNet DockerRouterIP net.IP )
View Source
var ( SmallBufferSize = (1 << 13) - 1 // 8KB small buffer MediumBufferSize = (1 << 15) - 1 // 32KB medium buffer LargeBufferSize = (1 << 16) - 1 // 64KB large buffer )
View Source
var ( KeepAliveTime = 180 * time.Second DialTimeout = 15 * time.Second HandshakeTimeout = 5 * time.Second ConnectTimeout = 5 * time.Second ReadTimeout = 10 * time.Second WriteTimeout = 10 * time.Second )
View Source
var Debug bool
View Source
var ( // network layer ip needs 20 bytes // transport layer UDP header needs 8 bytes // UDP over TCP header needs 22 bytes DefaultMTU = 1500 - 20 - 8 - 21 )
View Source
var ( LPool = &sync.Pool{ New: func() interface{} { return make([]byte, LargeBufferSize) }, } )
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.