Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
number571 committed Nov 25, 2024
1 parent f42711f commit 500ff9a
Show file tree
Hide file tree
Showing 22 changed files with 485 additions and 383 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- `pkg/request,pkg/response`: update interfaces: IRequestBuilder, IResponseBuilder
- `hidden-lake`: move GVersion, GSettings, GNetworks from root dir -> to build/ dir
- `build`: default work_size_bits=22 -> work_size_bits=0
- `cmd/*`: add help.yml

<!-- ... -->

Expand Down
7 changes: 7 additions & 0 deletions cmd/hla/common/help.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: Hidden Lake Adapter = Common (HLA=common)
desc: adapts HL traffic to a custom HTTP server
args: |
[ -h, --help ] - print information about service
[ -v, --version ] - print version of service
[ -p, --path ] - set path to config, database files
[ -n, --network ] - set network key for connections
18 changes: 9 additions & 9 deletions cmd/hla/common/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ import (
"github.com/number571/hidden-lake/build"
"github.com/number571/hidden-lake/internal/adapters/common/pkg/app"
"github.com/number571/hidden-lake/internal/utils/flag"
"github.com/number571/hidden-lake/internal/utils/help"

_ "embed"
)

var (
//go:embed help.yml
gHelpYaml []byte
)

func main() {
Expand All @@ -23,15 +31,7 @@ func main() {
}

if flag.GetBoolFlagValue(args, []string{"h", "help"}) {
fmt.Print(
"Hidden Lake Adapter = Common (HLA=common)\n" +
"Description: adapts HL traffic to a custom HTTP server\n" +
"Arguments:\n" +
"[ -h, --help ] - print information about service\n" +
"[ -v, --version ] - print version of service\n" +
"[ -p, --path ] - set path to config, database files\n" +
"[ -n, --network ] - set network key for connections\n",
)
help.Println(gHelpYaml)
return
}

Expand Down
8 changes: 8 additions & 0 deletions cmd/hlc/help.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Hidden Lake Composite (HLC)
desc: runs many HL services as one application
args: |
[ -h, --help ] - print information about service
[ -v, --version ] - print version of service
[ -p, --path ] - set path to config, database files
[ -n, --network ] - set network key for connections
[ -t, --threads ] - set num of parallel functions to calculate PoW
19 changes: 9 additions & 10 deletions cmd/hlc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ import (
"github.com/number571/hidden-lake/build"
"github.com/number571/hidden-lake/internal/composite/pkg/app"
"github.com/number571/hidden-lake/internal/utils/flag"
"github.com/number571/hidden-lake/internal/utils/help"

_ "embed"
)

var (
//go:embed help.yml
gHelpYaml []byte
)

func main() {
Expand All @@ -22,16 +30,7 @@ func main() {
}

if flag.GetBoolFlagValue(args, []string{"h", "help"}) {
fmt.Print(
"Hidden Lake Composite (HLC)\n" +
"Description: runs many HL services as one application\n" +
"Arguments:\n" +
"[ -h, --help ] - print information about service\n" +
"[ -v, --version ] - print version of service\n" +
"[ -p, --path ] - set path to config, database files\n" +
"[ -n, --network ] - set network key for connections\n" +
"[ -t, --threads ] - set num of parallel functions to calculate PoW\n",
)
help.Println(gHelpYaml)
return
}

Expand Down
8 changes: 8 additions & 0 deletions cmd/hle/help.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Hidden Lake Encryptor (HLE)
desc: encrypts and decrypts messages
args: |
[ -h, --help ] - print information about service
[ -v, --version ] - print version of service
[ -p, --path ] - set path to config, database files
[ -n, --network ] - set network key for connections
[ -t, --threads ] - set num of parallel functions to calculate PoW
19 changes: 9 additions & 10 deletions cmd/hle/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ import (
"github.com/number571/hidden-lake/build"
"github.com/number571/hidden-lake/internal/helpers/encryptor/pkg/app"
"github.com/number571/hidden-lake/internal/utils/flag"
"github.com/number571/hidden-lake/internal/utils/help"

_ "embed"
)

var (
//go:embed help.yml
gHelpYaml []byte
)

func main() {
Expand All @@ -23,16 +31,7 @@ func main() {
}

if flag.GetBoolFlagValue(args, []string{"h", "help"}) {
fmt.Print(
"Hidden Lake Encryptor (HLE)\n" +
"Description: encrypts and decrypts messages\n" +
"Arguments:\n" +
"[ -h, --help ] - print information about service\n" +
"[ -v, --version ] - print version of service\n" +
"[ -p, --path ] - set path to config, database files\n" +
"[ -n, --network ] - set network key for connections\n" +
"[ -t, --threads ] - set num of parallel functions to calculate PoW\n",
)
help.Println(gHelpYaml)
return
}

Expand Down
6 changes: 6 additions & 0 deletions cmd/hlf/help.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: Hidden Lake Filesharer (HLF)
desc: file sharing with a web interface
args: |
[ -h, --help ] - print information about service
[ -v, --version ] - print version of service
[ -p, --path ] - set path to config, database files
17 changes: 9 additions & 8 deletions cmd/hlf/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ import (
"github.com/number571/hidden-lake/build"
"github.com/number571/hidden-lake/internal/applications/filesharer/pkg/app"
"github.com/number571/hidden-lake/internal/utils/flag"
"github.com/number571/hidden-lake/internal/utils/help"

_ "embed"
)

var (
//go:embed help.yml
gHelpYaml []byte
)

func main() {
Expand All @@ -23,14 +31,7 @@ func main() {
}

if flag.GetBoolFlagValue(args, []string{"h", "help"}) {
fmt.Print(
"Hidden Lake Filesharer (HLF)\n" +
"Description: file sharing with a web interface\n" +
"Arguments:\n" +
"[ -h, --help ] - print information about service\n" +
"[ -v, --version ] - print version of service\n" +
"[ -p, --path ] - set path to config, database files\n",
)
help.Println(gHelpYaml)
return
}

Expand Down
7 changes: 7 additions & 0 deletions cmd/hll/help.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: Hidden Lake Loader (HLL)
desc: distributes the stored traffic between nodes
args: |
[ -h, --help ] - print information about service
[ -v, --version ] - print version of service
[ -p, --path ] - set path to config, database files
[ -n, --network ] - set network key for connections
18 changes: 9 additions & 9 deletions cmd/hll/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ import (
"github.com/number571/hidden-lake/build"
"github.com/number571/hidden-lake/internal/helpers/loader/pkg/app"
"github.com/number571/hidden-lake/internal/utils/flag"
"github.com/number571/hidden-lake/internal/utils/help"

_ "embed"
)

var (
//go:embed help.yml
gHelpYaml []byte
)

func main() {
Expand All @@ -23,15 +31,7 @@ func main() {
}

if flag.GetBoolFlagValue(args, []string{"h", "help"}) {
fmt.Print(
"Hidden Lake Loader (HLL)\n" +
"Description: distributes the stored traffic between nodes\n" +
"Arguments:\n" +
"[ -h, --help ] - print information about service\n" +
"[ -v, --version ] - print version of service\n" +
"[ -p, --path ] - set path to config, database files\n" +
"[ -n, --network ] - set network key for connections\n",
)
help.Println(gHelpYaml)
return
}

Expand Down
6 changes: 6 additions & 0 deletions cmd/hlm/help.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: Hidden Lake Messenger (HLM)
desc: messenger with a web interface
args: |
[ -h, --help ] - print information about service
[ -v, --version ] - print version of service
[ -p, --path ] - set path to config, database files
17 changes: 9 additions & 8 deletions cmd/hlm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ import (
"github.com/number571/hidden-lake/build"
"github.com/number571/hidden-lake/internal/applications/messenger/pkg/app"
"github.com/number571/hidden-lake/internal/utils/flag"
"github.com/number571/hidden-lake/internal/utils/help"

_ "embed"
)

var (
//go:embed help.yml
gHelpYaml []byte
)

func main() {
Expand All @@ -25,14 +33,7 @@ func main() {
}

if flag.GetBoolFlagValue(args, []string{"h", "help"}) {
fmt.Print(
"Hidden Lake Messenger (HLM)\n" +
"Description: messenger with a web interface\n" +
"Arguments:\n" +
"[ -h, --help ] - print information about service\n" +
"[ -v, --version ] - print version of service\n" +
"[ -p, --path ] - set path to config, database files\n",
)
help.Println(gHelpYaml)
return
}

Expand Down
6 changes: 6 additions & 0 deletions cmd/hlr/help.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: Hidden Lake Remoter (HLR)
desc: executes remote access commands
args: |
[ -h, --help ] - print information about service
[ -v, --version ] - print version of service
[ -p, --path ] - set path to config, database files
17 changes: 9 additions & 8 deletions cmd/hlr/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ import (
"github.com/number571/hidden-lake/build"
"github.com/number571/hidden-lake/internal/applications/remoter/pkg/app"
"github.com/number571/hidden-lake/internal/utils/flag"
"github.com/number571/hidden-lake/internal/utils/help"

_ "embed"
)

var (
//go:embed help.yml
gHelpYaml []byte
)

func main() {
Expand All @@ -23,14 +31,7 @@ func main() {
}

if flag.GetBoolFlagValue(args, []string{"h", "help"}) {
fmt.Print(
"Hidden Lake Remoter (HLR)\n" +
"Description: executes remote access commands\n" +
"Arguments:\n" +
"[ -h, --help ] - print information about service\n" +
"[ -v, --version ] - print version of service\n" +
"[ -p, --path ] - set path to config, database files\n",
)
help.Println(gHelpYaml)
return
}

Expand Down
8 changes: 8 additions & 0 deletions cmd/hls/help.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Hidden Lake Service (HLS)
desc: anonymizes traffic using the QB-problem
args: |
[ -h, --help ] - print information about service
[ -v, --version ] - print version of service
[ -p, --path ] - set path to config, database files
[ -n, --network ] - set network key for connections
[ -t, --threads ] - set num of parallel functions to calculate PoW
19 changes: 9 additions & 10 deletions cmd/hls/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ import (
"github.com/number571/hidden-lake/build"
"github.com/number571/hidden-lake/internal/service/pkg/app"
"github.com/number571/hidden-lake/internal/utils/flag"
"github.com/number571/hidden-lake/internal/utils/help"

_ "embed"
)

var (
//go:embed help.yml
gHelpYaml []byte
)

func main() {
Expand All @@ -23,16 +31,7 @@ func main() {
}

if flag.GetBoolFlagValue(args, []string{"h", "help"}) {
fmt.Print(
"Hidden Lake Service (HLS)\n" +
"Description: anonymizes traffic using the QB-problem\n" +
"Arguments:\n" +
"[ -h, --help ] - print information about service\n" +
"[ -v, --version ] - print version of service\n" +
"[ -p, --path ] - set path to config, database files\n" +
"[ -n, --network ] - set network key for connections\n" +
"[ -t, --threads ] - set num of parallel functions to calculate PoW\n",
)
help.Println(gHelpYaml)
return
}

Expand Down
7 changes: 7 additions & 0 deletions cmd/hlt/help.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: Hidden Lake Traffic (HLT)
desc: retransmits and saves encrypted traffic
args: |
[ -h, --help ] - print information about service
[ -v, --version ] - print version of service
[ -p, --path ] - set path to config, database files
[ -n, --network ] - set network key for connections
18 changes: 9 additions & 9 deletions cmd/hlt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ import (
"github.com/number571/hidden-lake/build"
"github.com/number571/hidden-lake/internal/helpers/traffic/pkg/app"
"github.com/number571/hidden-lake/internal/utils/flag"
"github.com/number571/hidden-lake/internal/utils/help"

_ "embed"
)

var (
//go:embed help.yml
gHelpYaml []byte
)

func main() {
Expand All @@ -23,15 +31,7 @@ func main() {
}

if flag.GetBoolFlagValue(args, []string{"h", "help"}) {
fmt.Print(
"Hidden Lake Traffic (HLT)\n" +
"Description: retransmits and saves encrypted traffic\n" +
"Arguments:\n" +
"[ -h, --help ] - print information about service\n" +
"[ -v, --version ] - print version of service\n" +
"[ -p, --path ] - set path to config, database files\n" +
"[ -n, --network ] - set network key for connections\n",
)
help.Println(gHelpYaml)
return
}

Expand Down
Loading

0 comments on commit 500ff9a

Please sign in to comment.