Documentation ¶
Index ¶
- Constants
- func CertWith(baseCert *x509.Certificate, domains, ips []string) *x509.Certificate
- func Changes(stat1, stat2 fs.FileInfo) (Change, Change)
- func ChunkBytesVariablely(byteArr []byte, chunks int) [][]byte
- func ChunkedRandomPrime(bits, chunks int) [][]byte
- func Counter(arr []byte) (map[byte]int, map[int]byte, int)
- func CreateCoreRootCA()
- func DCAFrom(parentCert *x509.Certificate, parentKey *ecdsa.PrivateKey) (*x509.Certificate, *ecdsa.PrivateKey)
- func DecodeBase64(arr []byte) chan []byte
- func DecodeHex(src []byte) chan []byte
- func EncodeBase64(arr []byte) chan []byte
- func EncodeHex(src []byte) chan []byte
- func EncodeRune(arr []byte, c chan []rune)
- func FixedXOR(src []byte, res chan []byte)
- func FormatTCPAddr(ip, port string, reusePort bool) string
- func GenerateLogger(namespace string) *log.Logger
- func MostFrequentIn(arr []byte) byte
- func NewNetworkGraph(args Edge) *ring.Ring
- func NewSerialBuffer() *big.Int
- func OpenTempFile() *os.File
- func PrettyPrint(v interface{}) string
- func PrintAll(r *ring.Ring)
- func RandomPrime(bits int) []byte
- func StartMirrorBus(ctx context.Context, l *log.Logger, addr, port string, numLoops int, ...) error
- func StartRedisServer(ctx context.Context, l *log.Logger, addr, port, unixsocket string, ...)
- func Sum(nums ...byte) int
- func Tar(src string, writers ...io.Writer) error
- type Change
- type ContextHandler
- type DirectoryGraph
- type Edge
- type Environment
- type EphemeralId
- type EphemeralUser
- type ExtToFileNode
- type FileExtension
- type FileNode
- type FileState
- type InvertedDAG
- type KeyDB
- type KeyPair
- type KeygenErr
- type Message
- func (*Message) Descriptor() ([]byte, []int)
- func (m *Message) GetFrom() string
- func (m *Message) GetRequest() string
- func (m *Message) GetResponse() string
- func (m *Message) GetTo() string
- func (*Message) ProtoMessage()
- func (m *Message) Reset()
- func (m *Message) String() string
- func (m *Message) XXX_DiscardUnknown()
- func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Message) XXX_Merge(src proto.Message)
- func (m *Message) XXX_Size() int
- func (m *Message) XXX_Unmarshal(b []byte) error
- type NetStats
- type Pool
- func (*Pool) Descriptor() ([]byte, []int)
- func (m *Pool) GetToken() []*Token
- func (*Pool) ProtoMessage()
- func (m *Pool) Reset()
- func (m *Pool) String() string
- func (m *Pool) XXX_DiscardUnknown()
- func (m *Pool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Pool) XXX_Merge(src proto.Message)
- func (m *Pool) XXX_Size() int
- func (m *Pool) XXX_Unmarshal(b []byte) error
- type PrivateKey
- type ProxyManager
- type PublicKey
- type ReverseProxy
- type ReverseProxyConfig
- type SignatureAlgorithm
- type StartContext
- type SysInfo
- type SysInfoToFn
- type Token
- func (*Token) Descriptor() ([]byte, []int)
- func (m *Token) GetId() int32
- func (m *Token) GetLastUpdated() *timestamp.Timestamp
- func (m *Token) GetName() string
- func (m *Token) GetToken() string
- func (*Token) ProtoMessage()
- func (m *Token) Reset()
- func (m *Token) String() string
- func (m *Token) XXX_DiscardUnknown()
- func (m *Token) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Token) XXX_Merge(src proto.Message)
- func (m *Token) XXX_Size() int
- func (m *Token) XXX_Unmarshal(b []byte) error
- type Weights
Constants ¶
const ( Version string = "v0.1.x" CoreEnvironmentRoot string = ".env" CoreTemporaryCacheRoot string = CoreEnvironmentRoot + "/.tmp" CoreLogRoot string = CoreEnvironmentRoot + "/logs" CoreFsRoot string = CoreEnvironmentRoot + "/corefs" CoreMockTestDataRoot string = CoreEnvironmentRoot + "/mock/input" CoreFsCompressedRoot string = CoreEnvironmentRoot + "/corefs.tax.xz" CoreFullChain string = CoreEnvironmentRoot + "/etc/ssl/core.pem" CoreCert string = CoreEnvironmentRoot + "/etc/ssl/core.cert" CoreChildCertPath string = CoreEnvironmentRoot + "/etc/ssl/core-children" SESSION_CIPHER_FORMAT string = "\n-----BEGIN KDB SESSION CIPHER-----\n%s\n-----END KDB SESSION CIPHER-----\n" InternalKeyDBDomain string = "read.core.keydb:9990?reuseport=true" InternalKeyDBNetwork string = "tcp" XSRFActionID string = "CLAIMED" CoreWeightsPath string = CoreEnvironmentRoot + "/static/byte_weights" )
const ( TAR_FILTER = "*.tar.*" ZSTD_FILTER = "*.zst" LOG_FILTER = "*.log" CERT_FILTER = "*.cert" KEY_FILTER = "*.pem" JSON_FILTER = "*.json" )
const ( IsFile = iota IsDirectory DoesNotExist )
Variables ¶
This section is empty.
Functions ¶
func CertWith ¶ added in v0.1.7
func CertWith(baseCert *x509.Certificate, domains, ips []string) *x509.Certificate
func ChunkBytesVariablely ¶
func ChunkedRandomPrime ¶
func Counter ¶
* Counter Maps bytes to their frequency in the input arr & returns the map, the inverse mapping, and the maximum frequency of appearence in arr
func CreateCoreRootCA ¶ added in v0.1.7
func CreateCoreRootCA()
- CreateSelfSignedCertificates Creates a CA Cert & Key for a given ReverseProxy & writes to disk
func DCAFrom ¶ added in v0.1.7
func DCAFrom(parentCert *x509.Certificate, parentKey *ecdsa.PrivateKey) (*x509.Certificate, *ecdsa.PrivateKey)
func DecodeBase64 ¶
func EncodeBase64 ¶
func EncodeRune ¶
func FixedXOR ¶
* FixedXOR The resulting channel will get a hex encoded []byte created from the XOR of each byte i where
src[i] XOR [i+len(src)/2]
while any []byte can be the src the general use-case is to pre-encode src to hex
func FormatTCPAddr ¶ added in v0.1.8
func MostFrequentIn ¶
func NewNetworkGraph ¶
* Graph Builds a two-dimensional, rectangular graph, Wraps *ring.Ring
func NewSerialBuffer ¶ added in v0.1.7
Generates a random serial buffer see rfc5280 section-4.1.2.2 https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.2
func OpenTempFile ¶
func PrettyPrint ¶
func PrettyPrint(v interface{}) string
func PrintAll ¶
* PrintAll Prints all nodes in a subgraph Passing root will print the entire graph Take note of r.Do, this basic example shows how to:
- cast to our type Edge
- Print, however, this can be any transformation f(e)
func RandomPrime ¶
func StartMirrorBus ¶ added in v0.1.8
func StartMirrorBus(ctx context.Context, l *log.Logger, addr, port string, numLoops int, tickspeed time.Duration) error
StartMirrorBus
func StartRedisServer ¶ added in v0.1.8
Types ¶
type ContextHandler ¶
type ContextHandler interface { Key() Value() }
type DirectoryGraph ¶
type DirectoryGraph struct { RootPath string Node *ring.Ring // contains filtered or unexported fields }
func NewDirectoryGraph ¶
func NewDirectoryGraph(root string) DirectoryGraph
func (DirectoryGraph) InvertByExt ¶ added in v0.1.8
func (e DirectoryGraph) InvertByExt() ExtToFileNode
Inverts a directory graph creating a constant time lookup from map[FileExtension][]FileNode This includes the SysInfo last acquired from serialize() Acquires a lock on the result & e.DirectoryGraph while populating the index
func (DirectoryGraph) Size ¶
func (g DirectoryGraph) Size() int
type Edge ¶
type Edge struct {
Depth, Breadth int
}
* Edge Represents either the bounds of or a single point within a two-dimensional matrix/graph. You can create new, traverse & route requests to individual containers starting from any `Edge` Here is what Graph(Edge{2, 4}) generates
┌────────┐ ┌─────────────┤e[-1,-1]├────────────────┐ │ └────────┘ │ │ │ ┌────┴───┐ ┌────▼───┐ │ e[0,0] │ │ e[1,0] │ ┌─────────┼────────┼──────────┐ ┌─────────┼────────┼──────────┐ │ │ │ │ │ │ │ │
┌────▼───┬┬────▼───┬┬───▼────┬┬────▼───||────▼───┬┬────▼───┬┬───▼────┬┬────▼───┐ │ e[0,1] ││ e[0,2] ││ e[0,3] ││ e[0,4] || e[1,1] ││ e[1,2] ││ e[1,3] ││ e[1,4] │ └────────┴┴────────┴┴────────┴┴────────||────────┴┴────────┴┴────────┴┴────────┘
type Environment ¶
type Environment struct { Files []string // contains filtered or unexported fields }
func NewEnvironment ¶
func NewEnvironment() Environment
func (Environment) AddFile ¶
func (e Environment) AddFile(filename string)
func (Environment) AddFiles ¶
func (e Environment) AddFiles(files ...string) Environment
func (Environment) CompressedFiles ¶
func (e Environment) CompressedFiles() []fs.FileInfo
func (Environment) DecompressedFiles ¶
func (e Environment) DecompressedFiles() []fs.FileInfo
type EphemeralId ¶
type EphemeralId int
type EphemeralUser ¶
type EphemeralUser struct { Id EphemeralId GId EphemeralId // contains filtered or unexported fields }
type ExtToFileNode ¶ added in v0.1.8
type ExtToFileNode map[FileExtension][]FileNode
func (ExtToFileNode) Print ¶ added in v0.1.8
func (e ExtToFileNode) Print() string
type FileExtension ¶ added in v0.1.8
type FileExtension string
type InvertedDAG ¶ added in v0.1.8
type InvertedDAG map[interface{}][]FileNode
type KeyPair ¶
type KeyPair struct { Pb PublicKey Pk PrivateKey // contains filtered or unexported fields }
func GenerateKeyPair ¶
* GenerateKeyPair Creates a random pb, pk that sit along the P224 ellipitic curve which implements P-224 (see FIPS 186-3, section D.2.2).
type Message ¶ added in v0.1.8
type Message struct { Request string `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` Response string `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"` To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` From string `protobuf:"bytes,4,opt,name=from,proto3" json:"from,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
[START messages]
func (*Message) Descriptor ¶ added in v0.1.8
func (*Message) GetRequest ¶ added in v0.1.8
func (*Message) GetResponse ¶ added in v0.1.8
func (*Message) ProtoMessage ¶ added in v0.1.8
func (*Message) ProtoMessage()
func (*Message) XXX_DiscardUnknown ¶ added in v0.1.10
func (m *Message) XXX_DiscardUnknown()
func (*Message) XXX_Marshal ¶ added in v0.1.10
func (*Message) XXX_Unmarshal ¶ added in v0.1.10
type NetStats ¶ added in v0.1.8
type Pool ¶ added in v0.1.5
type Pool struct { Token []*Token `protobuf:"bytes,1,rep,name=token,proto3" json:"token,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Pool) Descriptor ¶ added in v0.1.5
func (*Pool) ProtoMessage ¶ added in v0.1.5
func (*Pool) ProtoMessage()
func (*Pool) XXX_DiscardUnknown ¶ added in v0.1.10
func (m *Pool) XXX_DiscardUnknown()
func (*Pool) XXX_Marshal ¶ added in v0.1.10
func (*Pool) XXX_Unmarshal ¶ added in v0.1.10
type PrivateKey ¶
type PrivateKey []byte
type ProxyManager ¶
type ProxyManager struct {
Proxys []*ReverseProxy
}
type ReverseProxy ¶
type ReverseProxy struct { Cfg ReverseProxyConfig Server *http.Server Dialer net.Dialer }
func NewProxy ¶ added in v0.1.7
func NewProxy(parentCtx context.Context, cfg ReverseProxyConfig) ReverseProxy
type ReverseProxyConfig ¶
type SignatureAlgorithm ¶ added in v0.1.7
type SignatureAlgorithm int
const ( UnknownSignatureAlgorithm SignatureAlgorithm = iota MD2WithRSA MD5WithRSA SHA1WithRSA SHA256WithRSA SHA384WithRSA SHA512WithRSA DSAWithSHA1 DSAWithSHA256 ECDSAWithSHA1 ECDSAWithSHA256 ECDSAWithSHA384 ECDSAWithSHA512 SHA256WithRSAPSS SHA384WithRSAPSS SHA512WithRSAPSS PureEd25519 )
type StartContext ¶
func (*StartContext) GetKey ¶
func (t *StartContext) GetKey() string
func (*StartContext) GetTime ¶
func (t *StartContext) GetTime() time.Time
type SysInfoToFn ¶ added in v0.1.8
type Token ¶ added in v0.1.5
type Token struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Id int32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` LastUpdated *timestamp.Timestamp `protobuf:"bytes,4,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
[START messages]
func (*Token) Descriptor ¶ added in v0.1.5
func (*Token) GetLastUpdated ¶ added in v0.1.5
func (*Token) ProtoMessage ¶ added in v0.1.5
func (*Token) ProtoMessage()
func (*Token) XXX_DiscardUnknown ¶ added in v0.1.10
func (m *Token) XXX_DiscardUnknown()