cloaks

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2019 License: MIT Imports: 4 Imported by: 0

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()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL