Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloakConfig ¶
type CloakConfig struct { Enabled bool Netname string Secret string CidrLenIPv4 int `yaml:"cidr-len-ipv4"` CidrLenIPv6 int `yaml:"cidr-len-ipv6"` NumBits int `yaml:"num-bits"` // contains filtered or unexported fields }
func (*CloakConfig) ComputeCloak ¶
func (config *CloakConfig) ComputeCloak(ip net.IP) string
simple cloaking algorithm: normalize the IP to its CIDR, then hash the resulting bytes with a secret key, then truncate to the desired length, b32encode, and append the fake TLD.
func (*CloakConfig) Initialize ¶
func (cloakConfig *CloakConfig) Initialize()
Click to show internal directories.
Click to hide internal directories.