hiddenlake

package module
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 5 Imported by: 0

README

hl_logo.png

Theoretically Provable Anonymous Network

Go Release License Build Coverage GoDoc Go-Peer

GoReportCard Activity Commits Code Lines CodeSize Downloads

Awesome-Decentralized Alternative-Internet Awesome-Anonymity

About project

[!IMPORTANT] The project is being actively developed, the implementation of some details may change over time. More information about the changes can be obtained from the CHANGELOG.md file.

The Hidden Lake is an anonymous network built on a micro-service architecture. At the heart of HL is the core - HLS (service), which generates anonymizing traffic and combines many other services (for example, HLF and HLM). Thus, Hidden Lake is not a whole and monolithic solution, but a composition of several combined services. The HL is a friend-to-friend (F2F) network, which means building trusted communications. Due to this approach, members of the HL network can avoid spam in their direction, as well as possible attacks if vulnerabilities are found in the code.

Coverage map

coverage.svg

Releases

All cmd programs are compiled for {amd64, arm64} ARCH and {windows, linux, darwin} OS as pattern = appname_arch_os. In total, one application is compiled into six versions. The entire list of releases can be found here: github.com/number571/hidden-lake/releases.

Dependencies

  1. Go library github.com/number571/go-peer (used by cmd/hls,cmd/hle)
  2. Go library golang.org/x/net (used by cmd/hlm)
  3. CSS/JS library getbootstrap.com (used by cmd/hlm,cmd/hlf)

Makefile

There are a number of dependencies that represent separate applications for providing additional information about the quality of the code. These applications are not entered into the project, but are loaded via the make install-deps command. The list of applications is as follows:

  1. golangci-lint github.com/golangci/golangci-lint/cmd/golangci-lintv1.60.0
  2. go-cover-treemap github.com/nikolaydubina/go-cover-treemap@v1.4.2

How it works

The Hidden Lake assigns the task of anonymity to the QB-problem (queue based).

Actions within the QB-problem Figure QB-network with three nodes
  1. Each message m is encrypted with the recipient's key k: c = Ek(m)
  2. Message c is sent during period = T to all network participants
  3. The period T of one participant is independent of the periods T1, T2, ..., Tn of other participants
  4. If there is no message for the period T, then a false message v is sent to the network without a recipient (with a random key r): c = Er(v)
  5. Each participant tries to decrypt the message they received from the network: m = Dk(c)

--------------------------------------------------------------------

hl_qbp.png

--------------------------------------------------------------------

More information about Hidden Lake and QB-problem in research paper: hidden_lake_anonymous_network.pdf

List of applications

  1. Basic
    • HLS - anonymizes traffic using the QB-problem
    • HLC - runs many HL services as one application
    • HLA - adapts HL traffic to external environments
  2. Applied
    • HLM - messenger with a web interface
    • HLF - file sharing with a web interface
    • HLR - executes remote access commands
  3. Helpers:
    • HLT - retransmits and saves encrypted traffic
    • HLL - distributes the stored traffic between nodes
    • HLE - encrypts and decrypts messages

Build and run

Launching an anonymous network is primarily the launch of an anonymizing HLS service. There are two ways to run HLS: through source code, and through the release version.

1. Running from source code

$ go install github.com/number571/hidden-lake/cmd/hls@latest
$ hls

2. Running from release version

$ wget https://github.com/number571/hidden-lake/releases/latest/download/hls_amd64_linux
$ chmod +x hls_amd64_linux
$ ./hls_amd64_linux

Production

The HLS node is easily connected to the production environment. To do this, you just need to specify the network at startup. You can find them in the networks.yml file.

$ hls -network=oi4r9NW9Le7fKF9d

hls_logger.gif

After such a launch, the hls.yml file will be created or overwritten (if it existed). The settings and connections fields will be substituted in it. When overwriting a file, only the above fields will be changed. The remaining fields of the friends, services, address, etc. type will not be overwritten.

Examples of running HL apps in a prod environment: echo_service, anon_messenger, anon_filesharer.

Star History

Star History Chart

License

Licensed under the MIT License. See LICENSE for the full license text.

⬆ back to top

Documentation

Overview

nolint: err113

Index

Constants

View Source
const (
	CDefaultNetwork = "__default_network__"
)

Variables

View Source
var (
	GNetworks map[string]SNetwork

	GSettings SSettings

	GVersion string
)

Functions

This section is empty.

Types

type SConnection added in v1.7.2

type SConnection struct {
	FHost string `yaml:"host"`
	FPort uint16 `yaml:"port"`
}

type SNetwork added in v1.7.2

type SNetwork struct {
	FMessageSizeBytes uint64        `yaml:"message_size_bytes"`
	FFetchTimeoutMS   uint64        `yaml:"fetch_timeout_ms"`
	FQueuePeriodMS    uint64        `yaml:"queue_period_ms"`
	FWorkSizeBits     uint64        `yaml:"work_size_bits"`
	FConnections      []SConnection `yaml:"connections"`
}

type SNetworksYAML added in v1.7.2

type SNetworksYAML struct {
	FSettings SNetwork            `yaml:"settings"`
	FNetworks map[string]SNetwork `yaml:"networks"`
}

type SSettings added in v1.7.5

type SSettings struct {
	FVersion   string `yaml:"version"`
	FProtoMask struct {
		FNetwork uint32 `yaml:"network"`
		FService uint32 `yaml:"service"`
	} `yaml:"proto_mask"`
	FQueueCapacity struct {
		FMain uint64 `yaml:"main"`
		FRand uint64 `yaml:"rand"`
	} `yaml:"queue_capacity"`
	FNetworkManager struct {
		FConnectsLimiter uint64 `yaml:"connects_limiter"`
		FCacheHashesCap  uint64 `yaml:"cache_hashes_cap"`
		FKeeperPeriodMS  uint64 `yaml:"keeper_period_ms"`
	} `yaml:"network_manager"`
	FNetworkConnection struct {
		FWriteTimeoutMS uint64 `yaml:"write_timeout_ms"`
		FReadTimeoutMS  uint64 `yaml:"read_timeout_ms"`
		FDialTimeoutMS  uint64 `yaml:"dial_timeout_ms"`
		FWaitTimeoutMS  uint64 `yaml:"wait_timeout_ms"`
	} `yaml:"network_connection"`
}

func (SSettings) GetDialTimeout added in v1.7.5

func (p SSettings) GetDialTimeout() time.Duration

func (SSettings) GetKeeperPeriod added in v1.7.5

func (p SSettings) GetKeeperPeriod() time.Duration

func (SSettings) GetReadTimeout added in v1.7.5

func (p SSettings) GetReadTimeout() time.Duration

func (SSettings) GetWaitTimeout added in v1.7.5

func (p SSettings) GetWaitTimeout() time.Duration

func (SSettings) GetWriteTimeout added in v1.7.5

func (p SSettings) GetWriteTimeout() time.Duration

Directories

Path Synopsis
cmd
hlc
hle
hlf
hll
hlm
hlr
hls
hlt
examples
internal
nolint: err113
pkg
test

Jump to

Keyboard shortcuts

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