From a048519cbea2635741859c3b2840409c3c4ccaa8 Mon Sep 17 00:00:00 2001 From: number571 Date: Sat, 14 Oct 2023 07:37:43 +0700 Subject: [PATCH] update --- CHANGELOG.md | 3 + README.md | 7 +- .../composite/service_messenger/Makefile | 2 +- .../service_messenger/cmd/hlc_sm/init_app.go | 4 +- .../service_messenger/cmd/hlc_sm/main.go | 2 +- .../service_traffic/cmd/hlc_st/init_app.go | 4 +- .../service_traffic/cmd/hlc_st/main.go | 2 +- .../service_traffic_messenger/Makefile | 2 +- .../cmd/hlc_stm/init_app.go | 4 +- .../cmd/hlc_stm/main.go | 2 +- cmd/hidden_lake/messenger/.gitignore | 1 - cmd/hidden_lake/messenger/Makefile | 2 +- cmd/hidden_lake/messenger/README.md | 4 +- .../messenger/internal/database/database.go | 11 +- .../messenger/internal/database/types.go | 7 - .../messenger/internal/database/wrapper.go | 57 ----- .../messenger/internal/handler/about.go | 8 +- .../messenger/internal/handler/favicon.go | 6 +- .../messenger/internal/handler/friends.go | 30 +-- .../internal/handler/friends_chat.go | 37 +-- .../internal/handler/friends_upload.go | 22 +- .../messenger/internal/handler/getters.go | 31 +++ .../messenger/internal/handler/incoming.go | 23 +- .../messenger/internal/handler/index.go | 6 +- .../messenger/internal/handler/page404.go | 6 +- .../messenger/internal/handler/qr.go | 16 +- .../messenger/internal/handler/settings.go | 37 ++- .../messenger/internal/handler/signin.go | 74 ------ .../messenger/internal/handler/signout.go | 37 --- .../messenger/internal/handler/signup.go | 120 --------- cmd/hidden_lake/messenger/pkg/app/app.go | 28 ++- .../init_storage.go => init_database.go} | 22 +- .../messenger/pkg/app/init_pprof.go | 2 +- .../messenger/pkg/app/init_service.go | 35 ++- .../messenger/pkg/app/init_traffic.go | 71 ++++++ .../messenger/pkg/app/state/clear.go | 44 ---- .../messenger/pkg/app/state/state.go | 227 ------------------ .../messenger/pkg/app/state/state_test.go | 8 - .../messenger/pkg/app/state/types.go | 39 --- .../messenger/pkg/app/state/update.go | 111 --------- .../messenger/pkg/app/state/updater.go | 48 ---- .../messenger/pkg/settings/settings.go | 1 - .../messenger/web/template/index.html | 13 - cmd/hidden_lake/service/.gitignore | 1 - cmd/hidden_lake/service/Dockerfile | 2 +- cmd/hidden_lake/service/README.md | 38 +-- .../service/_daemon/install_hls.sh | 2 +- cmd/hidden_lake/service/cmd/hls/main.go | 2 +- .../service/internal/handler/handler_test.go | 11 +- .../internal/handler/network_request.go | 6 +- .../service/internal/handler/node_key.go | 71 +----- .../service/internal/handler/node_key_test.go | 37 +-- cmd/hidden_lake/service/pkg/app/app_test.go | 2 +- cmd/hidden_lake/service/pkg/app/init_app.go | 44 ++-- .../service/pkg/app/init_service.go | 8 +- cmd/hidden_lake/service/pkg/client/builder.go | 11 - cmd/hidden_lake/service/pkg/client/client.go | 22 +- .../service/pkg/client/requester.go | 46 +--- cmd/hidden_lake/service/pkg/client/types.go | 9 +- .../anon_messenger/_docker/default/.gitignore | 2 - .../anon_messenger/_docker/default/Makefile | 3 - .../_docker/default/_mounted_middle/hlt.cfg | 4 +- .../_docker/default/_mounted_node1/hlm.cfg | 8 +- .../default/_mounted_node1/hlm_copy.stg | Bin 8061 -> 0 bytes .../default/_mounted_node1/hls_copy.cfg | 9 +- .../_docker/default/_mounted_node1/priv.key | 1 + .../_docker/default/_mounted_node1/pub.key | 1 + .../_docker/default/_mounted_node2/hlm.cfg | 9 +- .../default/_mounted_node2/hlm_copy.stg | Bin 8065 -> 0 bytes .../default/_mounted_node2/hls_copy.cfg | 9 +- .../_docker/default/_mounted_node2/priv.key | 1 + .../_docker/default/_mounted_node2/pub.key | 1 + .../_docker/default/docker-compose.yaml | 8 +- examples/anon_messenger/_request/request.sh | 3 +- examples/anon_messenger/default/.gitignore | 2 - .../anon_messenger/default/middle_hlt/hlt.cfg | 5 +- .../anon_messenger/default/node1_hlm/Makefile | 3 +- .../anon_messenger/default/node1_hlm/hlm.cfg | 5 +- .../default/node1_hlm/hlm_copy.stg | Bin 8061 -> 0 bytes .../default/node1_hlm/hls_copy.cfg | 10 +- .../anon_messenger/default/node1_hlm/priv.key | 1 + .../anon_messenger/default/node1_hlm/pub.key | 1 + .../anon_messenger/default/node2_hlm/Makefile | 3 +- .../anon_messenger/default/node2_hlm/hlm.cfg | 2 +- .../default/node2_hlm/hlm_copy.stg | Bin 8065 -> 0 bytes .../default/node2_hlm/hls_copy.cfg | 7 +- .../anon_messenger/default/node2_hlm/priv.key | 1 + .../anon_messenger/default/node2_hlm/pub.key | 1 + examples/anon_messenger/prod_test/.gitignore | 2 - .../prod_test/node1_hlm/Makefile | 3 +- .../prod_test/node1_hlm/hlm_copy.stg | Bin 8061 -> 0 bytes .../prod_test/node1_hlm/hls_copy.cfg | 5 +- .../prod_test/node1_hlm/priv.key | 1 + .../prod_test/node1_hlm/pub.key | 1 + .../prod_test/node2_hlm/Makefile | 3 +- .../prod_test/node2_hlm/hlm_copy.stg | Bin 8065 -> 0 bytes .../prod_test/node2_hlm/hls_copy.cfg | 5 +- .../prod_test/node2_hlm/priv.key | 1 + .../prod_test/node2_hlm/pub.key | 1 + .../anon_messenger/secret_channel/.gitignore | 2 - .../secret_channel/node1_hlm/Makefile | 3 +- .../secret_channel/node1_hlm/hlm_copy.stg | Bin 8061 -> 0 bytes .../secret_channel/node1_hlm/hls_copy.cfg | 3 + .../secret_channel/node1_hlm/priv.key | 1 + .../secret_channel/node1_hlm/pub.key | 1 + .../secret_channel/node2_hlm/Makefile | 3 +- .../secret_channel/node2_hlm/hlm_copy.stg | Bin 8065 -> 0 bytes .../secret_channel/node2_hlm/hls_copy.cfg | 3 + .../secret_channel/node2_hlm/priv.key | 1 + .../secret_channel/node2_hlm/pub.key | 1 + .../_docker/default/_mounted_middle/hlt.cfg | 2 +- .../_docker/default/_mounted_recv/hls.cfg | 2 +- .../_docker/default/_mounted_send/hls.cfg | 4 +- .../_docker/default/docker-compose.yaml | 2 +- .../echo_service/default/middle_hlt/hlt.cfg | 2 +- .../echo_service/default/recv_hls/hls.cfg | 2 +- .../echo_service/default/send_hls/hls.cfg | 2 +- .../echo_service/routing/middle_hlt_1/hlt.cfg | 2 +- .../echo_service/routing/middle_hlt_2/hlt.cfg | 4 +- .../echo_service/routing/middle_hlt_3/hlt.cfg | 4 +- .../echo_service/routing/recv_hls/hls.cfg | 2 +- .../echo_service/routing/send_hls/hls.cfg | 3 +- go.mod | 1 - go.sum | 2 - 124 files changed, 396 insertions(+), 1306 deletions(-) delete mode 100644 cmd/hidden_lake/messenger/internal/database/wrapper.go create mode 100644 cmd/hidden_lake/messenger/internal/handler/getters.go delete mode 100644 cmd/hidden_lake/messenger/internal/handler/signin.go delete mode 100644 cmd/hidden_lake/messenger/internal/handler/signout.go delete mode 100644 cmd/hidden_lake/messenger/internal/handler/signup.go rename cmd/hidden_lake/messenger/pkg/app/{state/init_storage.go => init_database.go} (52%) create mode 100644 cmd/hidden_lake/messenger/pkg/app/init_traffic.go delete mode 100644 cmd/hidden_lake/messenger/pkg/app/state/clear.go delete mode 100644 cmd/hidden_lake/messenger/pkg/app/state/state.go delete mode 100644 cmd/hidden_lake/messenger/pkg/app/state/state_test.go delete mode 100644 cmd/hidden_lake/messenger/pkg/app/state/types.go delete mode 100644 cmd/hidden_lake/messenger/pkg/app/state/update.go delete mode 100644 cmd/hidden_lake/messenger/pkg/app/state/updater.go delete mode 100644 examples/anon_messenger/_docker/default/_mounted_node1/hlm_copy.stg create mode 100644 examples/anon_messenger/_docker/default/_mounted_node1/priv.key create mode 100644 examples/anon_messenger/_docker/default/_mounted_node1/pub.key delete mode 100644 examples/anon_messenger/_docker/default/_mounted_node2/hlm_copy.stg create mode 100644 examples/anon_messenger/_docker/default/_mounted_node2/priv.key create mode 100644 examples/anon_messenger/_docker/default/_mounted_node2/pub.key delete mode 100644 examples/anon_messenger/default/node1_hlm/hlm_copy.stg create mode 100644 examples/anon_messenger/default/node1_hlm/priv.key create mode 100644 examples/anon_messenger/default/node1_hlm/pub.key delete mode 100644 examples/anon_messenger/default/node2_hlm/hlm_copy.stg create mode 100644 examples/anon_messenger/default/node2_hlm/priv.key create mode 100644 examples/anon_messenger/default/node2_hlm/pub.key delete mode 100644 examples/anon_messenger/prod_test/node1_hlm/hlm_copy.stg create mode 100644 examples/anon_messenger/prod_test/node1_hlm/priv.key create mode 100644 examples/anon_messenger/prod_test/node1_hlm/pub.key delete mode 100644 examples/anon_messenger/prod_test/node2_hlm/hlm_copy.stg create mode 100644 examples/anon_messenger/prod_test/node2_hlm/priv.key create mode 100644 examples/anon_messenger/prod_test/node2_hlm/pub.key delete mode 100644 examples/anon_messenger/secret_channel/node1_hlm/hlm_copy.stg create mode 100644 examples/anon_messenger/secret_channel/node1_hlm/priv.key create mode 100644 examples/anon_messenger/secret_channel/node1_hlm/pub.key delete mode 100644 examples/anon_messenger/secret_channel/node2_hlm/hlm_copy.stg create mode 100644 examples/anon_messenger/secret_channel/node2_hlm/priv.key create mode 100644 examples/anon_messenger/secret_channel/node2_hlm/pub.key diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a65e2231..a9c71e58f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,9 @@ - Update `cmd/hidden_lake/service`: CNetworkMaxConns 64 -> 256 - Update `examples/echo_service/prod_test`: append switch prod_1/prod_2 in Makefile with PROD param - Update `cmd/hidden_lake`: delete jino, timeweb.cloud providers +- Update `cmd/hidden_lake/messenger`: delete auth +- Update `cmd/hidden_lake/service`: delete SetPrivKey/ResetPrivKey +- Update `cmd/hidden_lake/service`: generates priv key file ### BUG FIXES diff --git a/README.md b/README.md index c98fef0ce..c6a1d87e1 100644 --- a/README.md +++ b/README.md @@ -76,8 +76,7 @@ Some final applications are compositions of other applications. Due to this, suc 2. Go library (used by `cmd/hidden_lake/messenger`) [github.com/boombuler/barcode](https://github.com/boombuler/barcode "boombuler/barcode"); 3. Go library (used by `cmd/hidden_lake/messenger`) [golang.org/x/net](https://golang.org/x/net "x/net"); 4. Go library (used by `pkg/crypto/keybuilder`) [golang.org/x/crypto](https://golang.org/x/crypto "x/crypto"); -5. Go library (used by `cmd/hidden_lake/messenger`) [github.com/wagslane/go-password-validator](https://github.com/wagslane/go-password-validator "wagslane/go-password-validator"); -6. CSS/JS library (used by `cmd/hidden_lake/messenger`) [getbootstrap.com](https://getbootstrap.com "bootstrap") +5. CSS/JS library (used by `cmd/hidden_lake/messenger`) [getbootstrap.com](https://getbootstrap.com "bootstrap") ## Library based applications @@ -351,8 +350,8 @@ $ make run # run ./bin/hlm ``` Open ports `9591` (HTTP, interface) and `9592` (HTTP, incoming). -Creates `./hlm.cfg` or `./_mounted/hlm.cfg` (docker), `./hlm.db` or `./_mounted/hlm.db` (docker) files and `./hlm.stg` or `./_mounted/hlm.stg` (docker). -The file `hlm.db` stores all sent/received messages in encrypted view. The file `hlm.stg` stores all auth information (logins, passwords, private keys) in encrypted view. +Creates `./hlm.cfg` or `./_mounted/hlm.cfg` (docker) and `./hlm.db` or `./_mounted/hlm.db` (docker) files. +The file `hlm.db` stores all sent/received messages in encrypted view. Default config `hlm.cfg` diff --git a/cmd/hidden_lake/composite/service_messenger/Makefile b/cmd/hidden_lake/composite/service_messenger/Makefile index 1fb9d8ea4..87b03b218 100644 --- a/cmd/hidden_lake/composite/service_messenger/Makefile +++ b/cmd/hidden_lake/composite/service_messenger/Makefile @@ -22,4 +22,4 @@ run: ./$(BINPATH)/hlc_sm clean: rm -f $(BINPATH)/hlc_sm $(BINPATH)/hlc_sm_* - rm -rf hls.cfg hlm.cfg hlm.stg hls.db hlm.db + rm -rf hls.cfg hlm.cfg hls.db hlm.db diff --git a/cmd/hidden_lake/composite/service_messenger/cmd/hlc_sm/init_app.go b/cmd/hidden_lake/composite/service_messenger/cmd/hlc_sm/init_app.go index 47b6a8604..170b90986 100644 --- a/cmd/hidden_lake/composite/service_messenger/cmd/hlc_sm/init_app.go +++ b/cmd/hidden_lake/composite/service_messenger/cmd/hlc_sm/init_app.go @@ -16,8 +16,8 @@ type sApp struct { fHLM types.ICommand } -func initApp(pPath string) (types.ICommand, error) { - hlsApp, err := hls_app.InitApp(pPath) +func initApp(pPath, pKey string) (types.ICommand, error) { + hlsApp, err := hls_app.InitApp(pPath, pKey) if err != nil { return nil, err } diff --git a/cmd/hidden_lake/composite/service_messenger/cmd/hlc_sm/main.go b/cmd/hidden_lake/composite/service_messenger/cmd/hlc_sm/main.go index d6396f8da..7a298d1a7 100644 --- a/cmd/hidden_lake/composite/service_messenger/cmd/hlc_sm/main.go +++ b/cmd/hidden_lake/composite/service_messenger/cmd/hlc_sm/main.go @@ -7,7 +7,7 @@ import ( ) func main() { - app, err := initApp(".") + app, err := initApp(".", "./priv.key") if err != nil { panic(err) } diff --git a/cmd/hidden_lake/composite/service_traffic/cmd/hlc_st/init_app.go b/cmd/hidden_lake/composite/service_traffic/cmd/hlc_st/init_app.go index a6c171f29..c16d358c2 100644 --- a/cmd/hidden_lake/composite/service_traffic/cmd/hlc_st/init_app.go +++ b/cmd/hidden_lake/composite/service_traffic/cmd/hlc_st/init_app.go @@ -16,8 +16,8 @@ type sApp struct { fHLT types.ICommand } -func initApp(pPath string) (types.ICommand, error) { - hlsApp, err := hls_app.InitApp(pPath) +func initApp(pPath, pKey string) (types.ICommand, error) { + hlsApp, err := hls_app.InitApp(pPath, pKey) if err != nil { return nil, err } diff --git a/cmd/hidden_lake/composite/service_traffic/cmd/hlc_st/main.go b/cmd/hidden_lake/composite/service_traffic/cmd/hlc_st/main.go index d6396f8da..7a298d1a7 100644 --- a/cmd/hidden_lake/composite/service_traffic/cmd/hlc_st/main.go +++ b/cmd/hidden_lake/composite/service_traffic/cmd/hlc_st/main.go @@ -7,7 +7,7 @@ import ( ) func main() { - app, err := initApp(".") + app, err := initApp(".", "./priv.key") if err != nil { panic(err) } diff --git a/cmd/hidden_lake/composite/service_traffic_messenger/Makefile b/cmd/hidden_lake/composite/service_traffic_messenger/Makefile index 6c5bb9fe5..6ca8bdd83 100644 --- a/cmd/hidden_lake/composite/service_traffic_messenger/Makefile +++ b/cmd/hidden_lake/composite/service_traffic_messenger/Makefile @@ -23,4 +23,4 @@ run: ./$(BINPATH)/hlc_stm clean: rm -f $(BINPATH)/hlc_stm $(BINPATH)/hlc_stm_* - rm -rf hls.cfg hlt.cfg hlm.cfg hlm.stg hls.db hlm.db hlt.db + rm -rf hls.cfg hlt.cfg hlm.cfg hls.db hlm.db hlt.db diff --git a/cmd/hidden_lake/composite/service_traffic_messenger/cmd/hlc_stm/init_app.go b/cmd/hidden_lake/composite/service_traffic_messenger/cmd/hlc_stm/init_app.go index 4a955c7f1..17cfafaf0 100644 --- a/cmd/hidden_lake/composite/service_traffic_messenger/cmd/hlc_stm/init_app.go +++ b/cmd/hidden_lake/composite/service_traffic_messenger/cmd/hlc_stm/init_app.go @@ -18,8 +18,8 @@ type sApp struct { fHLM types.ICommand } -func initApp(pPath string) (types.ICommand, error) { - hlsApp, err := hls_app.InitApp(pPath) +func initApp(pPath, pKey string) (types.ICommand, error) { + hlsApp, err := hls_app.InitApp(pPath, pKey) if err != nil { return nil, err } diff --git a/cmd/hidden_lake/composite/service_traffic_messenger/cmd/hlc_stm/main.go b/cmd/hidden_lake/composite/service_traffic_messenger/cmd/hlc_stm/main.go index d6396f8da..7a298d1a7 100644 --- a/cmd/hidden_lake/composite/service_traffic_messenger/cmd/hlc_stm/main.go +++ b/cmd/hidden_lake/composite/service_traffic_messenger/cmd/hlc_stm/main.go @@ -7,7 +7,7 @@ import ( ) func main() { - app, err := initApp(".") + app, err := initApp(".", "./priv.key") if err != nil { panic(err) } diff --git a/cmd/hidden_lake/messenger/.gitignore b/cmd/hidden_lake/messenger/.gitignore index 01ded3382..bad49ac00 100644 --- a/cmd/hidden_lake/messenger/.gitignore +++ b/cmd/hidden_lake/messenger/.gitignore @@ -1,6 +1,5 @@ hlm hlm.cfg -hlm.stg hlm.db/ prog_hls hls.cfg diff --git a/cmd/hidden_lake/messenger/Makefile b/cmd/hidden_lake/messenger/Makefile index 96d8a969e..4bb3f609d 100644 --- a/cmd/hidden_lake/messenger/Makefile +++ b/cmd/hidden_lake/messenger/Makefile @@ -24,7 +24,7 @@ test: for i in {1..$(N)}; do go clean -testcache; echo $$i; go test ./...; done clean: rm -f $(BINPATH)/hlm $(BINPATH)/hlm_* - rm -rf hlm.cfg hlm.db hlm.stg + rm -rf hlm.cfg hlm.db docker-default: docker-build docker-run docker-build: diff --git a/cmd/hidden_lake/messenger/README.md b/cmd/hidden_lake/messenger/README.md index af0d11042..4a5c85640 100644 --- a/cmd/hidden_lake/messenger/README.md +++ b/cmd/hidden_lake/messenger/README.md @@ -48,8 +48,8 @@ $ make run # run ./bin/hlm ``` Open ports `9591` (HTTP, interface) and `9592` (HTTP, incoming). -Creates `./hlm.cfg` or `./_mounted/hlm.cfg` (docker), `./hlm.db` or `./_mounted/hlm.db` (docker) files and `./hlm.stg` or `./_mounted/hlm.stg` (docker). -The file `hlm.db` stores all sent/received messages in encrypted view. The file `hlm.stg` stores all auth information (logins, passwords, private keys) in encrypted view. +Creates `./hlm.cfg` or `./_mounted/hlm.cfg` (docker) and `./hlm.db` or `./_mounted/hlm.db` (docker) files. +The file `hlm.db` stores all sent/received messages in encrypted view. Default config `hlm.cfg` diff --git a/cmd/hidden_lake/messenger/internal/database/database.go b/cmd/hidden_lake/messenger/internal/database/database.go index 03765ea15..e6809b212 100644 --- a/cmd/hidden_lake/messenger/internal/database/database.go +++ b/cmd/hidden_lake/messenger/internal/database/database.go @@ -3,7 +3,6 @@ package database import ( "sync" - "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/settings" "github.com/number571/go-peer/pkg/encoding" "github.com/number571/go-peer/pkg/errors" "github.com/number571/go-peer/pkg/storage" @@ -15,14 +14,8 @@ type sKeyValueDB struct { fDB *gp_database.IKVDatabase } -func NewKeyValueDB(pPath, pPassword string) (IKVDatabase, error) { - db, err := gp_database.NewKeyValueDB( - storage.NewSettings(&storage.SSettings{ - FPath: pPath, - FWorkSize: settings.CWorkForKeys, - FPassword: pPassword, - }), - ) +func NewKeyValueDB(pSettings storage.ISettings) (IKVDatabase, error) { + db, err := gp_database.NewKeyValueDB(pSettings) if err != nil { return nil, errors.WrapError(err, "new key/value database") } diff --git a/cmd/hidden_lake/messenger/internal/database/types.go b/cmd/hidden_lake/messenger/internal/database/types.go index 9e6402e45..630880034 100644 --- a/cmd/hidden_lake/messenger/internal/database/types.go +++ b/cmd/hidden_lake/messenger/internal/database/types.go @@ -5,13 +5,6 @@ import ( "github.com/number571/go-peer/pkg/types" ) -type IWrapperDB interface { - types.ICloser - - Get() IKVDatabase - Set(IKVDatabase) IWrapperDB -} - type IKVDatabase interface { types.ICloser diff --git a/cmd/hidden_lake/messenger/internal/database/wrapper.go b/cmd/hidden_lake/messenger/internal/database/wrapper.go deleted file mode 100644 index 780b26899..000000000 --- a/cmd/hidden_lake/messenger/internal/database/wrapper.go +++ /dev/null @@ -1,57 +0,0 @@ -package database - -import ( - "sync" - - "github.com/number571/go-peer/pkg/errors" - "github.com/number571/go-peer/pkg/wrapper" -) - -var ( - _ IWrapperDB = &sWrapperDB{} -) - -type sWrapperDB struct { - fMutex sync.Mutex - fWrapper wrapper.IWrapper -} - -func NewWrapperDB() IWrapperDB { - return &sWrapperDB{fWrapper: wrapper.NewWrapper()} -} - -func (p *sWrapperDB) Get() IKVDatabase { - p.fMutex.Lock() - defer p.fMutex.Unlock() - - db, ok := p.fWrapper.Get().(IKVDatabase) - if !ok { - return nil - } - - return db -} - -func (p *sWrapperDB) Set(pDB IKVDatabase) IWrapperDB { - p.fMutex.Lock() - defer p.fMutex.Unlock() - - p.fWrapper.Set(pDB) - return p -} - -func (p *sWrapperDB) Close() error { - p.fMutex.Lock() - defer p.fMutex.Unlock() - - db, ok := p.fWrapper.Get().(IKVDatabase) - if !ok { - return nil - } - - p.fWrapper.Set(nil) - if err := db.Close(); err != nil { - return errors.WrapError(err, "close database wrapper") - } - return nil -} diff --git a/cmd/hidden_lake/messenger/internal/handler/about.go b/cmd/hidden_lake/messenger/internal/handler/about.go index 470ed1dcd..98b53ecec 100644 --- a/cmd/hidden_lake/messenger/internal/handler/about.go +++ b/cmd/hidden_lake/messenger/internal/handler/about.go @@ -4,7 +4,7 @@ import ( "html/template" "net/http" - "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/app/state" + "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/config" "github.com/number571/go-peer/cmd/hidden_lake/messenger/web" "github.com/number571/go-peer/pkg/logger" @@ -12,12 +12,12 @@ import ( http_logger "github.com/number571/go-peer/internal/logger/http" ) -func AboutPage(pStateManager state.IStateManager, pLogger logger.ILogger) http.HandlerFunc { +func AboutPage(pLogger logger.ILogger, pCfg config.IConfig) http.HandlerFunc { return func(pW http.ResponseWriter, pR *http.Request) { logBuilder := http_logger.NewLogBuilder(hlm_settings.CServiceName, pR) if pR.URL.Path != "/about" { - NotFoundPage(pStateManager, pLogger)(pW, pR) + NotFoundPage(pLogger, pCfg)(pW, pR) return } @@ -31,6 +31,6 @@ func AboutPage(pStateManager state.IStateManager, pLogger logger.ILogger) http.H } pLogger.PushInfo(logBuilder.WithMessage(http_logger.CLogSuccess)) - t.Execute(pW, pStateManager.GetTemplate()) + t.Execute(pW, getTemplate(pCfg)) } } diff --git a/cmd/hidden_lake/messenger/internal/handler/favicon.go b/cmd/hidden_lake/messenger/internal/handler/favicon.go index 17a1b21ee..9628eac1e 100644 --- a/cmd/hidden_lake/messenger/internal/handler/favicon.go +++ b/cmd/hidden_lake/messenger/internal/handler/favicon.go @@ -3,19 +3,19 @@ package handler import ( "net/http" - "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/app/state" http_logger "github.com/number571/go-peer/internal/logger/http" "github.com/number571/go-peer/pkg/logger" + "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/config" hlm_settings "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/settings" ) -func FaviconPage(pStateManager state.IStateManager, pLogger logger.ILogger) http.HandlerFunc { +func FaviconPage(pLogger logger.ILogger, pCfg config.IConfig) http.HandlerFunc { return func(pW http.ResponseWriter, pR *http.Request) { logBuilder := http_logger.NewLogBuilder(hlm_settings.CServiceName, pR) if pR.URL.Path != "/favicon.ico" { - NotFoundPage(pStateManager, pLogger)(pW, pR) + NotFoundPage(pLogger, pCfg)(pW, pR) return } diff --git a/cmd/hidden_lake/messenger/internal/handler/friends.go b/cmd/hidden_lake/messenger/internal/handler/friends.go index 3395ddfbb..1de93d586 100644 --- a/cmd/hidden_lake/messenger/internal/handler/friends.go +++ b/cmd/hidden_lake/messenger/internal/handler/friends.go @@ -7,7 +7,7 @@ import ( "sort" "strings" - "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/app/state" + "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/config" hlm_settings "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/settings" "github.com/number571/go-peer/cmd/hidden_lake/messenger/web" http_logger "github.com/number571/go-peer/internal/logger/http" @@ -16,27 +16,23 @@ import ( ) type sFriends struct { - *state.STemplateState + *sTemplate FFriends []string } -func FriendsPage(pStateManager state.IStateManager, pLogger logger.ILogger) http.HandlerFunc { +func FriendsPage(pLogger logger.ILogger, pCfg config.IConfig) http.HandlerFunc { return func(pW http.ResponseWriter, pR *http.Request) { logBuilder := http_logger.NewLogBuilder(hlm_settings.CServiceName, pR) if pR.URL.Path != "/friends" { - NotFoundPage(pStateManager, pLogger)(pW, pR) - return - } - - if !pStateManager.StateIsActive() { - pLogger.PushInfo(logBuilder.WithMessage(http_logger.CLogRedirect)) - http.Redirect(pW, pR, "/sign/in", http.StatusFound) + NotFoundPage(pLogger, pCfg)(pW, pR) return } pR.ParseForm() + client := getClient(pCfg) + switch pR.FormValue("method") { case http.MethodPost: aliasName := strings.TrimSpace(pR.FormValue("alias_name")) @@ -52,7 +48,7 @@ func FriendsPage(pStateManager state.IStateManager, pLogger logger.ILogger) http fmt.Fprint(pW, "error: public key is nil") return } - if err := pStateManager.AddFriend(aliasName, pubKey); err != nil { + if err := client.AddFriend(aliasName, pubKey); err != nil { pLogger.PushWarn(logBuilder.WithMessage("add_friend")) fmt.Fprint(pW, "error: add friend") return @@ -64,14 +60,14 @@ func FriendsPage(pStateManager state.IStateManager, pLogger logger.ILogger) http fmt.Fprint(pW, "error: alias_name is null") return } - if err := pStateManager.DelFriend(aliasName); err != nil { + if err := client.DelFriend(aliasName); err != nil { pLogger.PushWarn(logBuilder.WithMessage("del_friend")) fmt.Fprint(pW, "error: del friend") return } } - res, err := pStateManager.GetClient().GetFriends() + friends, err := client.GetFriends() if err != nil { pLogger.PushWarn(logBuilder.WithMessage("get_friends")) fmt.Fprint(pW, "error: read friends") @@ -79,11 +75,11 @@ func FriendsPage(pStateManager state.IStateManager, pLogger logger.ILogger) http } result := new(sFriends) - result.STemplateState = pStateManager.GetTemplate() - result.FFriends = make([]string, 0, len(res)+1) // +1 CIamAliasName + result.sTemplate = getTemplate(pCfg) + result.FFriends = make([]string, 0, len(friends)+1) // +1 CIamAliasName - friendsList := make([]string, 0, len(res)) - for aliasName := range res { + friendsList := make([]string, 0, len(friends)) + for aliasName := range friends { friendsList = append(friendsList, aliasName) } sort.Strings(friendsList) diff --git a/cmd/hidden_lake/messenger/internal/handler/friends_chat.go b/cmd/hidden_lake/messenger/internal/handler/friends_chat.go index 22f1f7dfc..40e473a64 100644 --- a/cmd/hidden_lake/messenger/internal/handler/friends_chat.go +++ b/cmd/hidden_lake/messenger/internal/handler/friends_chat.go @@ -7,9 +7,9 @@ import ( "net/http" "strings" + "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/config" "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/database" "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/utils" - "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/app/state" "github.com/number571/go-peer/cmd/hidden_lake/messenger/web" "github.com/number571/go-peer/cmd/hidden_lake/service/pkg/client" "github.com/number571/go-peer/cmd/hidden_lake/service/pkg/request" @@ -30,23 +30,17 @@ type sChatAddress struct { FPubKeyHash string } type sChatMessages struct { - *state.STemplateState + *sTemplate FAddress sChatAddress FMessages []sChatMessage } -func FriendsChatPage(pStateManager state.IStateManager, pLogger logger.ILogger) http.HandlerFunc { +func FriendsChatPage(pLogger logger.ILogger, pCfg config.IConfig, pDB database.IKVDatabase) http.HandlerFunc { return func(pW http.ResponseWriter, pR *http.Request) { logBuilder := http_logger.NewLogBuilder(hlm_settings.CServiceName, pR) if pR.URL.Path != "/friends/chat" { - NotFoundPage(pStateManager, pLogger)(pW, pR) - return - } - - if !pStateManager.StateIsActive() { - pLogger.PushInfo(logBuilder.WithMessage(http_logger.CLogRedirect)) - http.Redirect(pW, pR, "/sign/in", http.StatusFound) + NotFoundPage(pLogger, pCfg)(pW, pR) return } @@ -60,16 +54,9 @@ func FriendsChatPage(pStateManager state.IStateManager, pLogger logger.ILogger) return } - db := pStateManager.GetWrapperDB().Get() - if db == nil { - pLogger.PushErro(logBuilder.WithMessage("get_database")) - fmt.Fprint(pW, "error: database closed") - return - } - - client := pStateManager.GetClient() - myPubKey, _, err := client.GetPubKey() - if err != nil || !pStateManager.IsMyPubKey(myPubKey) { + client := getClient(pCfg) + myPubKey, err := client.GetPubKey() + if err != nil { pLogger.PushWarn(logBuilder.WithMessage("get_public_key")) fmt.Fprint(pW, errors.WrapError(err, "error: read public key")) return @@ -100,7 +87,7 @@ func FriendsChatPage(pStateManager state.IStateManager, pLogger logger.ILogger) } dbMsg := database.NewMessage(false, doMessageProcessor(msgBytes)) - if err := db.Push(rel, dbMsg); err != nil { + if err := pDB.Push(rel, dbMsg); err != nil { pLogger.PushWarn(logBuilder.WithMessage("push_message")) fmt.Fprint(pW, errors.WrapError(err, "error: add message to database")) return @@ -114,14 +101,14 @@ func FriendsChatPage(pStateManager state.IStateManager, pLogger logger.ILogger) } start := uint64(0) - size := db.Size(rel) + size := pDB.Size(rel) - messagesCap := pStateManager.GetConfig().GetSettings().GetMessagesCapacity() + messagesCap := pCfg.GetSettings().GetMessagesCapacity() if size > messagesCap { start = size - messagesCap } - msgs, err := db.Load(rel, start, size) + msgs, err := pDB.Load(rel, start, size) if err != nil { pLogger.PushErro(logBuilder.WithMessage("read_database")) fmt.Fprint(pW, errors.WrapError(err, "error: read database")) @@ -129,7 +116,7 @@ func FriendsChatPage(pStateManager state.IStateManager, pLogger logger.ILogger) } res := &sChatMessages{ - STemplateState: pStateManager.GetTemplate(), + sTemplate: getTemplate(pCfg), FAddress: sChatAddress{ FAliasName: aliasName, FPubKeyHash: recvPubKey.GetAddress().ToString(), diff --git a/cmd/hidden_lake/messenger/internal/handler/friends_upload.go b/cmd/hidden_lake/messenger/internal/handler/friends_upload.go index 46e96dd3b..8085da0ea 100644 --- a/cmd/hidden_lake/messenger/internal/handler/friends_upload.go +++ b/cmd/hidden_lake/messenger/internal/handler/friends_upload.go @@ -5,7 +5,7 @@ import ( "html/template" "net/http" - "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/app/state" + "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/config" "github.com/number571/go-peer/cmd/hidden_lake/messenger/web" http_logger "github.com/number571/go-peer/internal/logger/http" "github.com/number571/go-peer/pkg/logger" @@ -14,23 +14,17 @@ import ( ) type sUploadFile struct { - *state.STemplateState + *sTemplate FAliasName string FMessageLimit uint64 } -func FriendsUploadPage(pStateManager state.IStateManager, pLogger logger.ILogger) http.HandlerFunc { +func FriendsUploadPage(pLogger logger.ILogger, pCfg config.IConfig) http.HandlerFunc { return func(pW http.ResponseWriter, pR *http.Request) { logBuilder := http_logger.NewLogBuilder(hlm_settings.CServiceName, pR) if pR.URL.Path != "/friends/upload" { - NotFoundPage(pStateManager, pLogger)(pW, pR) - return - } - - if !pStateManager.StateIsActive() { - pLogger.PushInfo(logBuilder.WithMessage(http_logger.CLogRedirect)) - http.Redirect(pW, pR, "/sign/in", http.StatusFound) + NotFoundPage(pLogger, pCfg)(pW, pR) return } @@ -50,7 +44,7 @@ func FriendsUploadPage(pStateManager state.IStateManager, pLogger logger.ILogger panic("can't load hmtl files") } - msgLimit, err := getMessageLimit(pStateManager.GetClient()) + msgLimit, err := getMessageLimit(getClient(pCfg)) if err != nil { pLogger.PushWarn(logBuilder.WithMessage("get_message_size")) fmt.Fprint(pW, "get message size (limit)") @@ -58,9 +52,9 @@ func FriendsUploadPage(pStateManager state.IStateManager, pLogger logger.ILogger } res := &sUploadFile{ - STemplateState: pStateManager.GetTemplate(), - FAliasName: aliasName, - FMessageLimit: msgLimit, + sTemplate: getTemplate(pCfg), + FAliasName: aliasName, + FMessageLimit: msgLimit, } pLogger.PushInfo(logBuilder.WithMessage(http_logger.CLogSuccess)) diff --git a/cmd/hidden_lake/messenger/internal/handler/getters.go b/cmd/hidden_lake/messenger/internal/handler/getters.go new file mode 100644 index 000000000..bfe724ae6 --- /dev/null +++ b/cmd/hidden_lake/messenger/internal/handler/getters.go @@ -0,0 +1,31 @@ +package handler + +import ( + "fmt" + "net/http" + "time" + + "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/config" + "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/utils" + hls_client "github.com/number571/go-peer/cmd/hidden_lake/service/pkg/client" +) + +type sTemplate struct { + FLanguage utils.ILanguage +} + +func getTemplate(pCfg config.IConfig) *sTemplate { + return &sTemplate{ + FLanguage: pCfg.GetLanguage(), + } +} + +func getClient(pCfg config.IConfig) hls_client.IClient { + return hls_client.NewClient( + hls_client.NewBuilder(), + hls_client.NewRequester( + fmt.Sprintf("http://%s", pCfg.GetConnection()), + &http.Client{Timeout: time.Minute}, + ), + ) +} diff --git a/cmd/hidden_lake/messenger/internal/handler/incoming.go b/cmd/hidden_lake/messenger/internal/handler/incoming.go index 1300048c1..9f97c1535 100644 --- a/cmd/hidden_lake/messenger/internal/handler/incoming.go +++ b/cmd/hidden_lake/messenger/internal/handler/incoming.go @@ -6,9 +6,9 @@ import ( "strings" "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/chat_queue" + "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/config" "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/database" "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/utils" - "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/app/state" "github.com/number571/go-peer/internal/api" http_logger "github.com/number571/go-peer/internal/logger/http" "github.com/number571/go-peer/pkg/crypto/asymmetric" @@ -19,7 +19,7 @@ import ( hls_settings "github.com/number571/go-peer/cmd/hidden_lake/service/pkg/settings" ) -func HandleIncomigHTTP(pStateManager state.IStateManager, pLogger logger.ILogger) http.HandlerFunc { +func HandleIncomigHTTP(pLogger logger.ILogger, pCfg config.IConfig, pDB database.IKVDatabase) http.HandlerFunc { return func(pW http.ResponseWriter, pR *http.Request) { logBuilder := http_logger.NewLogBuilder(hlm_settings.CServiceName, pR) @@ -31,12 +31,6 @@ func HandleIncomigHTTP(pStateManager state.IStateManager, pLogger logger.ILogger return } - if !pStateManager.StateIsActive() { - pLogger.PushWarn(logBuilder.WithMessage(http_logger.CLogRedirect)) - api.Response(pW, http.StatusUnauthorized, "failed: client unauthorized") - return - } - rawMsgBytes, err := io.ReadAll(pR.Body) if err != nil { pLogger.PushWarn(logBuilder.WithMessage(http_logger.CLogDecodeBody)) @@ -50,20 +44,13 @@ func HandleIncomigHTTP(pStateManager state.IStateManager, pLogger logger.ILogger return } - myPubKey, _, err := pStateManager.GetClient().GetPubKey() - if err != nil || !pStateManager.IsMyPubKey(myPubKey) { + myPubKey, err := getClient(pCfg).GetPubKey() + if err != nil { pLogger.PushWarn(logBuilder.WithMessage("get_public_key")) api.Response(pW, http.StatusBadGateway, "failed: get public key from service") return } - db := pStateManager.GetWrapperDB().Get() - if db == nil { - pLogger.PushErro(logBuilder.WithMessage("get_database")) - api.Response(pW, http.StatusForbidden, "failed: database closed") - return - } - fPubKey := asymmetric.LoadRSAPubKey(pR.Header.Get(hls_settings.CHeaderPublicKey)) if fPubKey == nil { panic("public key is null (invalid data from HLS)!") @@ -72,7 +59,7 @@ func HandleIncomigHTTP(pStateManager state.IStateManager, pLogger logger.ILogger rel := database.NewRelation(myPubKey, fPubKey) dbMsg := database.NewMessage(true, doMessageProcessor(rawMsgBytes)) - if err := db.Push(rel, dbMsg); err != nil { + if err := pDB.Push(rel, dbMsg); err != nil { pLogger.PushErro(logBuilder.WithMessage("push_message")) api.Response(pW, http.StatusInternalServerError, "failed: push message to database") return diff --git a/cmd/hidden_lake/messenger/internal/handler/index.go b/cmd/hidden_lake/messenger/internal/handler/index.go index 53266db12..991e3dfb1 100644 --- a/cmd/hidden_lake/messenger/internal/handler/index.go +++ b/cmd/hidden_lake/messenger/internal/handler/index.go @@ -3,18 +3,18 @@ package handler import ( "net/http" - "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/app/state" + "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/config" hlm_settings "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/settings" http_logger "github.com/number571/go-peer/internal/logger/http" "github.com/number571/go-peer/pkg/logger" ) -func IndexPage(pStateManager state.IStateManager, pLogger logger.ILogger) http.HandlerFunc { +func IndexPage(pLogger logger.ILogger, pCfg config.IConfig) http.HandlerFunc { return func(pW http.ResponseWriter, pR *http.Request) { logBuilder := http_logger.NewLogBuilder(hlm_settings.CServiceName, pR) if pR.URL.Path != "/" { - NotFoundPage(pStateManager, pLogger)(pW, pR) + NotFoundPage(pLogger, pCfg)(pW, pR) return } diff --git a/cmd/hidden_lake/messenger/internal/handler/page404.go b/cmd/hidden_lake/messenger/internal/handler/page404.go index c1e794a78..ee233d4e9 100644 --- a/cmd/hidden_lake/messenger/internal/handler/page404.go +++ b/cmd/hidden_lake/messenger/internal/handler/page404.go @@ -4,7 +4,7 @@ import ( "html/template" "net/http" - "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/app/state" + "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/config" hlm_settings "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/settings" "github.com/number571/go-peer/cmd/hidden_lake/messenger/web" "github.com/number571/go-peer/pkg/logger" @@ -12,7 +12,7 @@ import ( http_logger "github.com/number571/go-peer/internal/logger/http" ) -func NotFoundPage(pStateManager state.IStateManager, pLogger logger.ILogger) http.HandlerFunc { +func NotFoundPage(pLogger logger.ILogger, pCfg config.IConfig) http.HandlerFunc { return func(pW http.ResponseWriter, pR *http.Request) { logBuilder := http_logger.NewLogBuilder(hlm_settings.CServiceName, pR) @@ -27,6 +27,6 @@ func NotFoundPage(pStateManager state.IStateManager, pLogger logger.ILogger) htt } pLogger.PushWarn(logBuilder.WithMessage(http_logger.CLogNotFound)) - t.Execute(pW, pStateManager.GetTemplate()) + t.Execute(pW, getTemplate(pCfg)) } } diff --git a/cmd/hidden_lake/messenger/internal/handler/qr.go b/cmd/hidden_lake/messenger/internal/handler/qr.go index 53b1e1633..1587e7939 100644 --- a/cmd/hidden_lake/messenger/internal/handler/qr.go +++ b/cmd/hidden_lake/messenger/internal/handler/qr.go @@ -7,29 +7,23 @@ import ( "github.com/boombuler/barcode" "github.com/boombuler/barcode/qr" - "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/app/state" + "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/config" hlm_settings "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/settings" http_logger "github.com/number571/go-peer/internal/logger/http" "github.com/number571/go-peer/pkg/logger" ) -func QRPublicKeyPage(pStateManager state.IStateManager, pLogger logger.ILogger) http.HandlerFunc { +func QRPublicKeyPage(pLogger logger.ILogger, pCfg config.IConfig) http.HandlerFunc { return func(pW http.ResponseWriter, pR *http.Request) { logBuilder := http_logger.NewLogBuilder(hlm_settings.CServiceName, pR) if pR.URL.Path != "/qr/public_key" { - NotFoundPage(pStateManager, pLogger)(pW, pR) + NotFoundPage(pLogger, pCfg)(pW, pR) return } - if !pStateManager.StateIsActive() { - pLogger.PushInfo(logBuilder.WithMessage(http_logger.CLogRedirect)) - http.Redirect(pW, pR, "/sign/in", http.StatusFound) - return - } - - myPubKey, _, err := pStateManager.GetClient().GetPubKey() - if err != nil || !pStateManager.IsMyPubKey(myPubKey) { + myPubKey, err := getClient(pCfg).GetPubKey() + if err != nil { pLogger.PushWarn(logBuilder.WithMessage("get_public_key")) fmt.Fprint(pW, "error: read public key") return diff --git a/cmd/hidden_lake/messenger/internal/handler/settings.go b/cmd/hidden_lake/messenger/internal/handler/settings.go index 8663d6322..9e60a401e 100644 --- a/cmd/hidden_lake/messenger/internal/handler/settings.go +++ b/cmd/hidden_lake/messenger/internal/handler/settings.go @@ -9,7 +9,6 @@ import ( "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/config" "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/utils" - "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/app/state" hlm_settings "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/settings" "github.com/number571/go-peer/cmd/hidden_lake/messenger/web" http_logger "github.com/number571/go-peer/internal/logger/http" @@ -27,33 +26,29 @@ type sConnection struct { } type sSettings struct { - *state.STemplateState + *sTemplate FPublicKey string FNetworkKey string FConnections []sConnection } -func SettingsPage(pStateManager state.IStateManager, pEditor config.IEditor, pLogger logger.ILogger) http.HandlerFunc { +func SettingsPage(pLogger logger.ILogger, pWrapper config.IWrapper) http.HandlerFunc { return func(pW http.ResponseWriter, pR *http.Request) { logBuilder := http_logger.NewLogBuilder(hlm_settings.CServiceName, pR) - if pR.URL.Path != "/settings" { - NotFoundPage(pStateManager, pLogger)(pW, pR) - return - } + cfg := pWrapper.GetConfig() + cfgEditor := pWrapper.GetEditor() - if !pStateManager.StateIsActive() { - pLogger.PushInfo(logBuilder.WithMessage(http_logger.CLogRedirect)) - http.Redirect(pW, pR, "/sign/in", http.StatusFound) + if pR.URL.Path != "/settings" { + NotFoundPage(pLogger, cfg)(pW, pR) return } pR.ParseForm() - client := pStateManager.GetClient() - - myPubKey, _, err := client.GetPubKey() - if err != nil || !pStateManager.IsMyPubKey(myPubKey) { + client := getClient(cfg) + myPubKey, err := client.GetPubKey() + if err != nil { pLogger.PushWarn(logBuilder.WithMessage("get_public_key")) fmt.Fprint(pW, "error: read public key") return @@ -75,7 +70,7 @@ func SettingsPage(pStateManager state.IStateManager, pEditor config.IEditor, pLo fmt.Fprint(pW, "error: load unknown language") return } - if err := pEditor.UpdateLanguage(res); err != nil { + if err := cfgEditor.UpdateLanguage(res); err != nil { pLogger.PushWarn(logBuilder.WithMessage("update_language")) fmt.Fprint(pW, "error: update language") return @@ -101,10 +96,10 @@ func SettingsPage(pStateManager state.IStateManager, pEditor config.IEditor, pLo switch isBackup { case true: connects := stringtools.UniqAppendToSlice( - pStateManager.GetConfig().GetBackupConnections(), + cfg.GetBackupConnections(), connect, ) - if err := pEditor.UpdateBackupConnections(connects); err != nil { + if err := cfgEditor.UpdateBackupConnections(connects); err != nil { pLogger.PushWarn(logBuilder.WithMessage("update_backup_connections")) fmt.Fprint(pW, errors.WrapError(err, "error: update backup connections")) return @@ -125,10 +120,10 @@ func SettingsPage(pStateManager state.IStateManager, pEditor config.IEditor, pLo } connects := stringtools.DeleteFromSlice( - pStateManager.GetConfig().GetBackupConnections(), + cfg.GetBackupConnections(), connect, ) - if err := pEditor.UpdateBackupConnections(connects); err != nil { + if err := cfgEditor.UpdateBackupConnections(connects); err != nil { pLogger.PushWarn(logBuilder.WithMessage("delete_backup_connection")) fmt.Fprint(pW, "failed: delete backup connection") return @@ -142,7 +137,7 @@ func SettingsPage(pStateManager state.IStateManager, pEditor config.IEditor, pLo } result := new(sSettings) - result.STemplateState = pStateManager.GetTemplate() + result.sTemplate = getTemplate(cfg) result.FPublicKey = myPubKey.ToString() @@ -155,7 +150,7 @@ func SettingsPage(pStateManager state.IStateManager, pEditor config.IEditor, pLo result.FNetworkKey = networkKey // append HLS connections to backup connections - allConns, err := getAllConnections(pStateManager.GetConfig(), client) + allConns, err := getAllConnections(cfg, client) if err != nil { pLogger.PushWarn(logBuilder.WithMessage("get_all_connections")) fmt.Fprint(pW, errors.WrapError(err, "error: get online connections")) diff --git a/cmd/hidden_lake/messenger/internal/handler/signin.go b/cmd/hidden_lake/messenger/internal/handler/signin.go deleted file mode 100644 index f6fb7261a..000000000 --- a/cmd/hidden_lake/messenger/internal/handler/signin.go +++ /dev/null @@ -1,74 +0,0 @@ -package handler - -import ( - "fmt" - "html/template" - "net/http" - "strings" - - http_logger "github.com/number571/go-peer/internal/logger/http" - "github.com/number571/go-peer/pkg/crypto/keybuilder" - "github.com/number571/go-peer/pkg/logger" - - "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/app/state" - hlm_settings "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/settings" - "github.com/number571/go-peer/cmd/hidden_lake/messenger/web" -) - -func SignInPage(pStateManager state.IStateManager, pLogger logger.ILogger) http.HandlerFunc { - return func(pW http.ResponseWriter, pR *http.Request) { - logBuilder := http_logger.NewLogBuilder(hlm_settings.CServiceName, pR) - - if pR.URL.Path != "/sign/in" { - NotFoundPage(pStateManager, pLogger)(pW, pR) - return - } - - if pStateManager.StateIsActive() { - pLogger.PushInfo(logBuilder.WithMessage(http_logger.CLogRedirect)) - http.Redirect(pW, pR, "/about", http.StatusFound) - return - } - - pR.ParseForm() - - switch pR.FormValue("method") { - case http.MethodPost: - login := strings.TrimSpace(pR.FormValue("login")) - if login == "" { - pLogger.PushWarn(logBuilder.WithMessage("get_login")) - fmt.Fprint(pW, "error: login is null") - return - } - - password := strings.TrimSpace(pR.FormValue("password")) - if password == "" { - pLogger.PushWarn(logBuilder.WithMessage("get_password")) - fmt.Fprint(pW, "error: password is null") - return - } - - hashLP := keybuilder.NewKeyBuilder(hlm_settings.CWorkForKeys, []byte(login)).Build(password) - if err := pStateManager.OpenState(hashLP); err != nil { - pLogger.PushWarn(logBuilder.WithMessage("open_state")) - fmt.Fprintf(pW, "error: %s", err.Error()) - return - } - - http.Redirect(pW, pR, "/about", http.StatusFound) - return - } - - t, err := template.ParseFS( - web.GetTemplatePath(), - "index.html", - "signin.html", - ) - if err != nil { - panic("can't load hmtl files") - } - - pLogger.PushInfo(logBuilder.WithMessage(http_logger.CLogSuccess)) - t.Execute(pW, pStateManager.GetTemplate()) - } -} diff --git a/cmd/hidden_lake/messenger/internal/handler/signout.go b/cmd/hidden_lake/messenger/internal/handler/signout.go deleted file mode 100644 index 805887289..000000000 --- a/cmd/hidden_lake/messenger/internal/handler/signout.go +++ /dev/null @@ -1,37 +0,0 @@ -package handler - -import ( - "fmt" - "net/http" - - "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/app/state" - hlm_settings "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/settings" - http_logger "github.com/number571/go-peer/internal/logger/http" - "github.com/number571/go-peer/pkg/logger" -) - -func SignOutPage(pStateManager state.IStateManager, pLogger logger.ILogger) http.HandlerFunc { - return func(pW http.ResponseWriter, pR *http.Request) { - logBuilder := http_logger.NewLogBuilder(hlm_settings.CServiceName, pR) - - if pR.URL.Path != "/sign/out" { - NotFoundPage(pStateManager, pLogger)(pW, pR) - return - } - - if !pStateManager.StateIsActive() { - pLogger.PushInfo(logBuilder.WithMessage(http_logger.CLogRedirect)) - http.Redirect(pW, pR, "/sign/in", http.StatusFound) - return - } - - if err := pStateManager.CloseState(); err != nil { - pLogger.PushWarn(logBuilder.WithMessage("close_state")) - fmt.Fprint(pW, "error: clean hls_client data") - return - } - - pLogger.PushInfo(logBuilder.WithMessage(http_logger.CLogSuccess)) - http.Redirect(pW, pR, "/about", http.StatusFound) - } -} diff --git a/cmd/hidden_lake/messenger/internal/handler/signup.go b/cmd/hidden_lake/messenger/internal/handler/signup.go deleted file mode 100644 index c616aee37..000000000 --- a/cmd/hidden_lake/messenger/internal/handler/signup.go +++ /dev/null @@ -1,120 +0,0 @@ -package handler - -import ( - "fmt" - "html/template" - "net/http" - "strings" - - "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/app/state" - hlm_settings "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/settings" - http_logger "github.com/number571/go-peer/internal/logger/http" - "github.com/number571/go-peer/pkg/crypto/asymmetric" - "github.com/number571/go-peer/pkg/crypto/keybuilder" - "github.com/number571/go-peer/pkg/logger" - - "github.com/number571/go-peer/cmd/hidden_lake/messenger/web" - pvalidator "github.com/wagslane/go-password-validator" -) - -func SignUpPage(pStateManager state.IStateManager, pLogger logger.ILogger) http.HandlerFunc { - return func(pW http.ResponseWriter, pR *http.Request) { - logBuilder := http_logger.NewLogBuilder(hlm_settings.CServiceName, pR) - - if pR.URL.Path != "/sign/up" { - NotFoundPage(pStateManager, pLogger)(pW, pR) - return - } - - if pStateManager.StateIsActive() { - pLogger.PushInfo(logBuilder.WithMessage(http_logger.CLogRedirect)) - http.Redirect(pW, pR, "/about", http.StatusFound) - return - } - - pR.ParseForm() - - switch pR.FormValue("method") { - case http.MethodPost: - client := pStateManager.GetClient() - sett, err := client.GetSettings() - if err != nil { - pLogger.PushWarn(logBuilder.WithMessage("get_settings")) - fmt.Fprint(pW, "error: get settings from HLS") - return - } - - login := strings.TrimSpace(pR.FormValue("login")) - if login == "" { - pLogger.PushWarn(logBuilder.WithMessage("get_login")) - fmt.Fprint(pW, "error: login is null") - return - } - - password := strings.TrimSpace(pR.FormValue("password")) - if password == "" { - pLogger.PushWarn(logBuilder.WithMessage("get_password")) - fmt.Fprint(pW, "error: password is null") - return - } - - passwordRepeat := strings.TrimSpace(pR.FormValue("password_repeat")) - if passwordRepeat == "" { - pLogger.PushWarn(logBuilder.WithMessage("get_password_repeat")) - fmt.Fprint(pW, "error: password_repeat is null") - return - } - - if password != passwordRepeat { - pLogger.PushWarn(logBuilder.WithMessage("incorrect_password")) - fmt.Fprint(pW, "error: passwords not equals") - return - } - - if err := pvalidator.Validate(password, hlm_settings.CMinEntropy); err != nil { - pLogger.PushWarn(logBuilder.WithMessage("password_is_weak")) - fmt.Fprint(pW, "error: password is weak") - return - } - - var privKey asymmetric.IPrivKey - privateKey := strings.TrimSpace(pR.FormValue("private_key")) - - switch privateKey { - case "": - privKey = asymmetric.NewRSAPrivKey(sett.GetKeySizeBits()) - default: - privKey = asymmetric.LoadRSAPrivKey(privateKey) - } - - if privKey == nil { - pLogger.PushWarn(logBuilder.WithMessage("get_private_key")) - fmt.Fprint(pW, "error: incorrect private key") - return - } - - hashLP := keybuilder.NewKeyBuilder(hlm_settings.CWorkForKeys, []byte(login)).Build(password) - if err := pStateManager.CreateState(hashLP, privKey); err != nil { - pLogger.PushWarn(logBuilder.WithMessage("create_state")) - fmt.Fprint(pW, "error: create account") - return - } - - pLogger.PushInfo(logBuilder.WithMessage(http_logger.CLogRedirect)) - http.Redirect(pW, pR, "/sign/in", http.StatusFound) - return - } - - t, err := template.ParseFS( - web.GetTemplatePath(), - "index.html", - "signup.html", - ) - if err != nil { - panic("can't load hmtl files") - } - - pLogger.PushInfo(logBuilder.WithMessage(http_logger.CLogSuccess)) - t.Execute(pW, pStateManager.GetTemplate()) - } -} diff --git a/cmd/hidden_lake/messenger/pkg/app/app.go b/cmd/hidden_lake/messenger/pkg/app/app.go index 0d7ab907d..55e01405c 100644 --- a/cmd/hidden_lake/messenger/pkg/app/app.go +++ b/cmd/hidden_lake/messenger/pkg/app/app.go @@ -8,7 +8,7 @@ import ( "time" "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/config" - "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/app/state" + "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/database" "github.com/number571/go-peer/pkg/logger" "github.com/number571/go-peer/pkg/types" @@ -30,9 +30,10 @@ type sApp struct { fIsRun bool fMutex sync.Mutex - fWrapper config.IWrapper - fStateManager state.IStateManager + fConfig config.IConfig + fPathTo string + fDatabase database.IKVDatabase fIntServiceHTTP *http.Server fIncServiceHTTP *http.Server fServicePPROF *http.Server @@ -49,10 +50,10 @@ func NewApp( stdfLogger := std_logger.NewStdLogger(pCfg.GetLogging(), std_logger.GetLogFunc()) return &sApp{ - fWrapper: config.NewWrapper(pCfg), - fStateManager: state.NewStateManager(pCfg, pPathTo), - fHTTPLogger: httpLogger, - fStdfLogger: stdfLogger, + fConfig: pCfg, + fPathTo: pPathTo, + fHTTPLogger: httpLogger, + fStdfLogger: stdfLogger, } } @@ -65,14 +66,20 @@ func (p *sApp) Run() error { } p.fIsRun = true + if err := p.initDatabase(); err != nil { + return pkg_errors.WrapError(err, "open database") + } + p.initIncomingServiceHTTP() p.initInterfaceServiceHTTP() p.initServicePPROF() + p.initTrafficMessages() + res := make(chan error) go func() { - if p.fWrapper.GetConfig().GetAddress().GetPPROF() == "" { + if p.fConfig.GetAddress().GetPPROF() == "" { return } @@ -118,14 +125,11 @@ func (p *sApp) Stop() error { p.fIsRun = false p.fStdfLogger.PushInfo(fmt.Sprintf("%s is shutting down...", pkg_settings.CServiceName)) - // state may be already closed by HLS - _ = p.fStateManager.CloseState() - err := types.CloseAll([]types.ICloser{ p.fIntServiceHTTP, p.fIncServiceHTTP, p.fServicePPROF, - p.fStateManager.GetWrapperDB(), + // p.fStateManager.GetWrapperDB(), }) if err != nil { return pkg_errors.WrapError(err, "close/stop all") diff --git a/cmd/hidden_lake/messenger/pkg/app/state/init_storage.go b/cmd/hidden_lake/messenger/pkg/app/init_database.go similarity index 52% rename from cmd/hidden_lake/messenger/pkg/app/state/init_storage.go rename to cmd/hidden_lake/messenger/pkg/app/init_database.go index a06337685..397087bd3 100644 --- a/cmd/hidden_lake/messenger/pkg/app/state/init_storage.go +++ b/cmd/hidden_lake/messenger/pkg/app/init_database.go @@ -1,27 +1,29 @@ -package state +package app import ( "fmt" - "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/config" - hlm_settings "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/settings" + "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/database" "github.com/number571/go-peer/pkg/errors" "github.com/number571/go-peer/pkg/storage" + + hlm_settings "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/settings" ) -func initCryptoStorage(pCfg config.IConfig, pPathTo string) (storage.IKVStorage, error) { - storageKey := pCfg.GetStorageKey() +func (p *sApp) initDatabase() error { + storageKey := p.fConfig.GetStorageKey() if storageKey == "" { - return nil, errors.NewError("storage key is nil") + return errors.NewError("storage key is nil") } sett := storage.NewSettings(&storage.SSettings{ - FPath: fmt.Sprintf("%s/%s", pPathTo, hlm_settings.CPathSTG), + FPath: fmt.Sprintf("%s/%s", p.fPathTo, hlm_settings.CPathDB), FWorkSize: hlm_settings.CWorkForKeys, FPassword: storageKey, }) - stg, err := storage.NewCryptoStorage(sett) + db, err := database.NewKeyValueDB(sett) if err != nil { - return nil, errors.WrapError(err, "new crypto storage") + return errors.WrapError(err, "open KV database") } - return stg, nil + p.fDatabase = db + return nil } diff --git a/cmd/hidden_lake/messenger/pkg/app/init_pprof.go b/cmd/hidden_lake/messenger/pkg/app/init_pprof.go index 7c7073861..35794805f 100644 --- a/cmd/hidden_lake/messenger/pkg/app/init_pprof.go +++ b/cmd/hidden_lake/messenger/pkg/app/init_pprof.go @@ -3,5 +3,5 @@ package app import "github.com/number571/go-peer/internal/pprof" func (p *sApp) initServicePPROF() { - p.fServicePPROF = pprof.InitPprofService(p.fWrapper.GetConfig().GetAddress().GetPPROF()) + p.fServicePPROF = pprof.InitPprofService(p.fConfig.GetAddress().GetPPROF()) } diff --git a/cmd/hidden_lake/messenger/pkg/app/init_service.go b/cmd/hidden_lake/messenger/pkg/app/init_service.go index a49154fd1..10625770d 100644 --- a/cmd/hidden_lake/messenger/pkg/app/init_service.go +++ b/cmd/hidden_lake/messenger/pkg/app/init_service.go @@ -4,8 +4,8 @@ import ( "net/http" "os" + "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/config" "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/handler" - "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/app/state" hlm_settings "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/settings" "github.com/number571/go-peer/cmd/hidden_lake/messenger/web" "github.com/number571/go-peer/pkg/logger" @@ -16,11 +16,11 @@ func (p *sApp) initIncomingServiceHTTP() { mux := http.NewServeMux() mux.HandleFunc( hlm_settings.CPushPath, - handler.HandleIncomigHTTP(p.fStateManager, p.fHTTPLogger), + handler.HandleIncomigHTTP(p.fHTTPLogger, p.fConfig, p.fDatabase), ) // POST p.fIncServiceHTTP = &http.Server{ - Addr: p.fWrapper.GetConfig().GetAddress().GetIncoming(), + Addr: p.fConfig.GetAddress().GetIncoming(), Handler: mux, } } @@ -29,33 +29,32 @@ func (p *sApp) initInterfaceServiceHTTP() { mux := http.NewServeMux() mux.Handle(hlm_settings.CStaticPath, http.StripPrefix( hlm_settings.CStaticPath, - handleFileServer(p.fStateManager, p.fHTTPLogger, http.FS(web.GetStaticPath()))), + handleFileServer(p.fHTTPLogger, p.fConfig, http.FS(web.GetStaticPath()))), ) - mux.HandleFunc(hlm_settings.CHandleIndexPath, handler.IndexPage(p.fStateManager, p.fHTTPLogger)) // GET - mux.HandleFunc(hlm_settings.CHandleSignOutPath, handler.SignOutPage(p.fStateManager, p.fHTTPLogger)) // GET - mux.HandleFunc(hlm_settings.CHandleSignInPath, handler.SignInPage(p.fStateManager, p.fHTTPLogger)) // GET, POST - mux.HandleFunc(hlm_settings.CHandleSignUpPath, handler.SignUpPage(p.fStateManager, p.fHTTPLogger)) // GET, POST - mux.HandleFunc(hlm_settings.CHandleFaviconPath, handler.FaviconPage(p.fStateManager, p.fHTTPLogger)) // GET - mux.HandleFunc(hlm_settings.CHandleAboutPath, handler.AboutPage(p.fStateManager, p.fHTTPLogger)) // GET - mux.HandleFunc(hlm_settings.CHandleSettingsPath, handler.SettingsPage(p.fStateManager, p.fWrapper.GetEditor(), p.fHTTPLogger)) // GET, PATCH, PUT, POST, DELETE - mux.HandleFunc(hlm_settings.CHandleQRPublicKeyKeyPath, handler.QRPublicKeyPage(p.fStateManager, p.fHTTPLogger)) // GET - mux.HandleFunc(hlm_settings.CHandleFriendsPath, handler.FriendsPage(p.fStateManager, p.fHTTPLogger)) // GET, POST, DELETE - mux.HandleFunc(hlm_settings.CHandleFriendsChatPath, handler.FriendsChatPage(p.fStateManager, p.fHTTPLogger)) // GET, POST, PUT - mux.HandleFunc(hlm_settings.CHandleFriendsUploadPath, handler.FriendsUploadPage(p.fStateManager, p.fHTTPLogger)) // GET + cfgWrapper := config.NewWrapper(p.fConfig) + + mux.HandleFunc(hlm_settings.CHandleIndexPath, handler.IndexPage(p.fHTTPLogger, p.fConfig)) // GET, POST + mux.HandleFunc(hlm_settings.CHandleFaviconPath, handler.FaviconPage(p.fHTTPLogger, p.fConfig)) // GET + mux.HandleFunc(hlm_settings.CHandleAboutPath, handler.AboutPage(p.fHTTPLogger, p.fConfig)) // GET + mux.HandleFunc(hlm_settings.CHandleSettingsPath, handler.SettingsPage(p.fHTTPLogger, cfgWrapper)) // GET, PATCH, PUT, POST, DELETE + mux.HandleFunc(hlm_settings.CHandleQRPublicKeyKeyPath, handler.QRPublicKeyPage(p.fHTTPLogger, p.fConfig)) // GET + mux.HandleFunc(hlm_settings.CHandleFriendsPath, handler.FriendsPage(p.fHTTPLogger, p.fConfig)) // GET, POST, DELETE + mux.HandleFunc(hlm_settings.CHandleFriendsChatPath, handler.FriendsChatPage(p.fHTTPLogger, p.fConfig, p.fDatabase)) // GET, POST, PUT + mux.HandleFunc(hlm_settings.CHandleFriendsUploadPath, handler.FriendsUploadPage(p.fHTTPLogger, p.fConfig)) // GET mux.Handle(hlm_settings.CHandleFriendsChatWSPath, websocket.Handler(handler.FriendsChatWS)) p.fIntServiceHTTP = &http.Server{ - Addr: p.fWrapper.GetConfig().GetAddress().GetInterface(), + Addr: p.fConfig.GetAddress().GetInterface(), Handler: mux, } } -func handleFileServer(pStateManager state.IStateManager, pLogger logger.ILogger, pFS http.FileSystem) http.Handler { +func handleFileServer(pLogger logger.ILogger, pCfg config.IConfig, pFS http.FileSystem) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if _, err := pFS.Open(r.URL.Path); os.IsNotExist(err) { - handler.NotFoundPage(pStateManager, pLogger)(w, r) + handler.NotFoundPage(pLogger, pCfg)(w, r) return } http.FileServer(pFS).ServeHTTP(w, r) diff --git a/cmd/hidden_lake/messenger/pkg/app/init_traffic.go b/cmd/hidden_lake/messenger/pkg/app/init_traffic.go new file mode 100644 index 000000000..90779b55e --- /dev/null +++ b/cmd/hidden_lake/messenger/pkg/app/init_traffic.go @@ -0,0 +1,71 @@ +package app + +import ( + "bytes" + "fmt" + "net/http" + "time" + + "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/config" + "github.com/number571/go-peer/pkg/client/message" + "github.com/number571/go-peer/pkg/encoding" + + hls_client "github.com/number571/go-peer/cmd/hidden_lake/service/pkg/client" + hlt_client "github.com/number571/go-peer/cmd/hidden_lake/traffic/pkg/client" +) + +func (p *sApp) initTrafficMessages() { + cfg := p.fConfig + for _, conn := range cfg.GetBackupConnections() { + go handleTrafficMessages(cfg, conn) + } +} + +func handleTrafficMessages(pCfg config.IConfig, pConn string) { + hlsClient := hls_client.NewClient( + hls_client.NewBuilder(), + hls_client.NewRequester( + fmt.Sprintf("http://%s", pCfg.GetConnection()), + &http.Client{Timeout: time.Minute}, + ), + ) + + sett, err := hlsClient.GetSettings() + if err != nil { + return + } + + hltClient := hlt_client.NewClient( + hlt_client.NewBuilder(), + hlt_client.NewRequester( + fmt.Sprintf("http://%s", pConn), + &http.Client{Timeout: time.Minute}, + message.NewSettings(&message.SSettings{ + FWorkSizeBits: sett.GetWorkSizeBits(), + FMessageSizeBytes: sett.GetMessageSizeBytes(), + }), + ), + ) + + hashes, err := hltClient.GetHashes() + if err != nil { + return + } + + for i, hash := range hashes { + if uint64(i) >= pCfg.GetSettings().GetMessagesCapacity() { + break + } + msg, err := hltClient.GetMessage(hash) + if err != nil { + continue + } + bytesHash := encoding.HexDecode(hash) + if !bytes.Equal(msg.GetBody().GetHash(), bytesHash) { + break + } + if err := hlsClient.HandleMessage(msg); err != nil { + continue + } + } +} diff --git a/cmd/hidden_lake/messenger/pkg/app/state/clear.go b/cmd/hidden_lake/messenger/pkg/app/state/clear.go deleted file mode 100644 index 44ce964b3..000000000 --- a/cmd/hidden_lake/messenger/pkg/app/state/clear.go +++ /dev/null @@ -1,44 +0,0 @@ -package state - -import ( - "github.com/number571/go-peer/pkg/errors" -) - -func (p *sStateManager) clearClientState() error { - if err := p.clearClientPrivKey(); err != nil { - return errors.WrapError(err, "clear client private key") - } - - if err := p.clearClientFriends(); err != nil { - return errors.WrapError(err, "clear client friends") - } - - return nil -} - -func (p *sStateManager) clearClientPrivKey() error { - hlsClient := p.GetClient() - - if err := hlsClient.ResetPrivKey(); err != nil { - return errors.WrapError(err, "reset private key (clear)") - } - - return nil -} - -func (p *sStateManager) clearClientFriends() error { - client := p.GetClient() - - friends, err := client.GetFriends() - if err != nil { - return errors.WrapError(err, "get friends") - } - - for aliasName := range friends { - if err := client.DelFriend(aliasName); err != nil { - return errors.WrapError(err, "del friend") - } - } - - return nil -} diff --git a/cmd/hidden_lake/messenger/pkg/app/state/state.go b/cmd/hidden_lake/messenger/pkg/app/state/state.go deleted file mode 100644 index d2793d37f..000000000 --- a/cmd/hidden_lake/messenger/pkg/app/state/state.go +++ /dev/null @@ -1,227 +0,0 @@ -package state - -import ( - "fmt" - "net/http" - "sync" - "time" - - "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/config" - "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/database" - "github.com/number571/go-peer/pkg/crypto/asymmetric" - "github.com/number571/go-peer/pkg/encoding" - "github.com/number571/go-peer/pkg/errors" - "github.com/number571/go-peer/pkg/storage" - - hlm_settings "github.com/number571/go-peer/cmd/hidden_lake/messenger/pkg/settings" - hls_client "github.com/number571/go-peer/cmd/hidden_lake/service/pkg/client" -) - -var ( - _ IStateManager = &sStateManager{} -) - -type sStateManager struct { - fMutex sync.Mutex - fHashLP []byte - fPrivKey asymmetric.IPrivKey - fConfig config.IConfig - fPathTo string - fStorage storage.IKVStorage - fDatabase database.IWrapperDB - fClient hls_client.IClient -} - -func NewStateManager( - pConfig config.IConfig, - pPathTo string, -) IStateManager { - stg, err := initCryptoStorage(pConfig, pPathTo) - if err != nil { - panic(err) - } - return &sStateManager{ - fConfig: pConfig, - fPathTo: pPathTo, - fStorage: stg, - fDatabase: database.NewWrapperDB(), - fClient: hls_client.NewClient( - hls_client.NewBuilder(), - hls_client.NewRequester( - fmt.Sprintf("http://%s", pConfig.GetConnection()), - &http.Client{Timeout: time.Minute}, - ), - ), - } -} - -func (p *sStateManager) GetConfig() config.IConfig { - return p.fConfig -} - -func (p *sStateManager) GetClient() hls_client.IClient { - return p.fClient -} - -func (p *sStateManager) GetWrapperDB() database.IWrapperDB { - return p.fDatabase -} - -func (p *sStateManager) GetTemplate() *STemplateState { - return &STemplateState{ - FLanguage: p.fConfig.GetLanguage(), - FAuthorized: p.StateIsActive(), - } -} - -func (p *sStateManager) GetPrivKey() asymmetric.IPrivKey { - if !p.StateIsActive() { - return nil - } - return p.fPrivKey -} - -func (p *sStateManager) IsMyPubKey(pPubKey asymmetric.IPubKey) bool { - if !p.StateIsActive() { - return false - } - myPubKey := p.fPrivKey.GetPubKey() - if myPubKey == nil || pPubKey == nil { - return false - } - return myPubKey.ToString() == pPubKey.ToString() -} - -func (p *sStateManager) CreateState(pHashLP []byte, pPrivKey asymmetric.IPrivKey) error { - if _, err := p.fStorage.Get(pHashLP); err == nil { - return errors.NewError("state already exists") - } - if err := p.newStorageState(pHashLP, pPrivKey); err != nil { - return errors.WrapError(err, "new storage state") - } - return nil -} - -func (p *sStateManager) OpenState(pHashLP []byte) error { - p.fMutex.Lock() - defer p.fMutex.Unlock() - - if p.StateIsActive() { - return errors.NewError("state already exists") - } - - stateValue, err := p.getStorageState(pHashLP) - if err != nil { - return errors.WrapError(err, "get storage state") - } - - db, err := database.NewKeyValueDB( - fmt.Sprintf("%s/%s", p.fPathTo, hlm_settings.CPathDB), - encoding.HexEncode(pHashLP), - ) - if err != nil { - return errors.WrapError(err, "open KV database") - } - - p.GetWrapperDB().Set(db) - if err := p.updateClientState(stateValue); err != nil { - return errors.WrapError(err, "update client state") - } - - privKey := asymmetric.LoadRSAPrivKey(stateValue.FPrivKey) - if privKey == nil { - return errors.NewError("private key is null (open state)") - } - - p.fHashLP = pHashLP - p.fPrivKey = privKey - - p.updateClientTraffic(stateValue) - return nil -} - -func (p *sStateManager) CloseState() error { - p.fMutex.Lock() - defer p.fMutex.Unlock() - - if !p.StateIsActive() { - return errors.NewError("state does not exist") - } - - p.fHashLP = nil - - if err := p.GetWrapperDB().Close(); err != nil { - return errors.WrapError(err, "close database") - } - - if err := p.clearClientState(); err != nil { - return errors.WrapError(err, "clear client state") - } - - return nil -} - -func (p *sStateManager) AddFriend(pAliasName string, pPubKey asymmetric.IPubKey) error { - err := p.stateUpdater( - p.updateClientFriends, - func(storageValue *SStorageState) { - storageValue.FFriends[pAliasName] = pPubKey.ToString() - }, - ) - if err != nil { - return errors.WrapError(err, "add friend (state updater)") - } - return nil -} - -func (p *sStateManager) DelFriend(pAliasName string) error { - err := p.stateUpdater( - p.updateClientFriends, - func(storageValue *SStorageState) { - delete(storageValue.FFriends, pAliasName) - }, - ) - if err != nil { - return errors.WrapError(err, "del friend (state updater)") - } - return nil -} - -func (p *sStateManager) StateIsActive() bool { - return p.fHashLP != nil -} - -func (p *sStateManager) newStorageState(pHashLP []byte, pPrivKey asymmetric.IPrivKey) error { - stateValueBytes := encoding.Serialize( - &SStorageState{ - FPrivKey: pPrivKey.ToString(), - }, - false, - ) - if err := p.fStorage.Set(pHashLP, stateValueBytes); err != nil { - return errors.WrapError(err, "new storage state") - } - return nil -} - -func (p *sStateManager) setStorageState(pStateValue *SStorageState) error { - stateValueBytes := encoding.Serialize(pStateValue, false) - if err := p.fStorage.Set(p.fHashLP, stateValueBytes); err != nil { - return errors.WrapError(err, "update storage state") - } - return nil -} - -func (p *sStateManager) getStorageState(pHashLP []byte) (*SStorageState, error) { - stateValueBytes, err := p.fStorage.Get(pHashLP) - if err != nil { - return nil, errors.WrapError(err, "get storage state bytes") - } - - var stateValue = new(SStorageState) - if err := encoding.Deserialize(stateValueBytes, stateValue); err != nil { - return nil, errors.WrapError(err, "deserialize state") - } - - return stateValue, nil -} diff --git a/cmd/hidden_lake/messenger/pkg/app/state/state_test.go b/cmd/hidden_lake/messenger/pkg/app/state/state_test.go deleted file mode 100644 index c59b4a8ac..000000000 --- a/cmd/hidden_lake/messenger/pkg/app/state/state_test.go +++ /dev/null @@ -1,8 +0,0 @@ -package state - -import "testing" - -// TODO -func TestDefault(t *testing.T) { - -} diff --git a/cmd/hidden_lake/messenger/pkg/app/state/types.go b/cmd/hidden_lake/messenger/pkg/app/state/types.go deleted file mode 100644 index 729338732..000000000 --- a/cmd/hidden_lake/messenger/pkg/app/state/types.go +++ /dev/null @@ -1,39 +0,0 @@ -package state - -import ( - "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/config" - "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/database" - "github.com/number571/go-peer/cmd/hidden_lake/messenger/internal/utils" - hls_client "github.com/number571/go-peer/cmd/hidden_lake/service/pkg/client" - "github.com/number571/go-peer/pkg/crypto/asymmetric" -) - -type STemplateState struct { - FLanguage utils.ILanguage - FAuthorized bool -} - -type SStorageState struct { - FPrivKey string `json:"priv_key"` - FFriends map[string]string `json:"friends"` -} - -type IStateManager interface { - GetConfig() config.IConfig - - IsMyPubKey(asymmetric.IPubKey) bool - GetPrivKey() asymmetric.IPrivKey - - CreateState([]byte, asymmetric.IPrivKey) error - - StateIsActive() bool - OpenState([]byte) error - CloseState() error - - GetClient() hls_client.IClient - GetWrapperDB() database.IWrapperDB - GetTemplate() *STemplateState - - AddFriend(string, asymmetric.IPubKey) error - DelFriend(string) error -} diff --git a/cmd/hidden_lake/messenger/pkg/app/state/update.go b/cmd/hidden_lake/messenger/pkg/app/state/update.go deleted file mode 100644 index ef01c1f5a..000000000 --- a/cmd/hidden_lake/messenger/pkg/app/state/update.go +++ /dev/null @@ -1,111 +0,0 @@ -package state - -import ( - "bytes" - "fmt" - "net/http" - "time" - - "github.com/number571/go-peer/pkg/client/message" - "github.com/number571/go-peer/pkg/crypto/asymmetric" - "github.com/number571/go-peer/pkg/encoding" - "github.com/number571/go-peer/pkg/errors" - - hlt_client "github.com/number571/go-peer/cmd/hidden_lake/traffic/pkg/client" -) - -func (p *sStateManager) updateClientState(pStateValue *SStorageState) error { - if err := p.updateClientPrivKey(pStateValue); err != nil { - return errors.WrapError(err, "update client private key") - } - - if err := p.updateClientFriends(pStateValue); err != nil { - return errors.WrapError(err, "update client friends") - } - - return nil -} - -func (p *sStateManager) updateClientPrivKey(pStateValue *SStorageState) error { - hlsClient := p.GetClient() - - _, ephPubKey, err := hlsClient.GetPubKey() - if err != nil { - return errors.WrapError(err, "get public key from node (update)") - } - - privKey := asymmetric.LoadRSAPrivKey(pStateValue.FPrivKey) - if privKey == nil { - return errors.NewError("private key is null (update)") - } - - if err := hlsClient.SetPrivKey(privKey, ephPubKey); err != nil { - return errors.WrapError(err, "set private key (update)") - } - return nil -} - -func (p *sStateManager) updateClientFriends(pStateValue *SStorageState) error { - client := p.GetClient() - - if err := p.clearClientFriends(); err != nil { - return errors.WrapError(err, "clear client friends") - } - - for aliasName, pubKeyString := range pStateValue.FFriends { - pubKey := asymmetric.LoadRSAPubKey(pubKeyString) - if err := client.AddFriend(aliasName, pubKey); err != nil { - return errors.WrapError(err, "add friend") - } - } - - return nil -} - -func (p *sStateManager) updateClientTraffic(pStateValue *SStorageState) { - for _, conn := range p.fConfig.GetBackupConnections() { - go p.handleMessages(conn) - } -} - -func (p *sStateManager) handleMessages(pConn string) { - hlsClient := p.GetClient() - sett, err := hlsClient.GetSettings() - if err != nil { - return - } - - hltClient := hlt_client.NewClient( - hlt_client.NewBuilder(), - hlt_client.NewRequester( - fmt.Sprintf("http://%s", pConn), - &http.Client{Timeout: time.Minute}, - message.NewSettings(&message.SSettings{ - FWorkSizeBits: sett.GetWorkSizeBits(), - FMessageSizeBytes: sett.GetMessageSizeBytes(), - }), - ), - ) - - hashes, err := hltClient.GetHashes() - if err != nil { - return - } - - for i, hash := range hashes { - if uint64(i) >= p.fConfig.GetSettings().GetMessagesCapacity() { - break - } - msg, err := hltClient.GetMessage(hash) - if err != nil { - continue - } - bytesHash := encoding.HexDecode(hash) - if !bytes.Equal(msg.GetBody().GetHash(), bytesHash) { - break - } - if err := hlsClient.HandleMessage(msg); err != nil { - continue - } - } -} diff --git a/cmd/hidden_lake/messenger/pkg/app/state/updater.go b/cmd/hidden_lake/messenger/pkg/app/state/updater.go deleted file mode 100644 index 7d9b7dc40..000000000 --- a/cmd/hidden_lake/messenger/pkg/app/state/updater.go +++ /dev/null @@ -1,48 +0,0 @@ -package state - -import "github.com/number571/go-peer/pkg/errors" - -func (p *sStateManager) stateUpdater( - clientUpdater func(storageValue *SStorageState) error, - middleWare func(storageValue *SStorageState), -) error { - p.fMutex.Lock() - defer p.fMutex.Unlock() - - if !p.StateIsActive() { - return errors.NewError("state does not exist") - } - - oldStorageValue, err := p.getStorageState(p.fHashLP) - if err != nil { - return errors.WrapError(err, "get old storage state") - } - - newStorageValue := copyStorageState(oldStorageValue) - middleWare(newStorageValue) - - if err := clientUpdater(newStorageValue); err == nil { - if err := p.setStorageState(newStorageValue); err != nil { - return errors.WrapError(err, "set new storage state") - } - return nil - } - - if err := p.setStorageState(oldStorageValue); err != nil { - return errors.WrapError(err, "update state (old -> new)") - } - return nil -} - -func copyStorageState(pStorageValue *SStorageState) *SStorageState { - copyStorageValue := &SStorageState{ - FPrivKey: pStorageValue.FPrivKey, - FFriends: make(map[string]string, len(pStorageValue.FFriends)), - } - - for aliasName, pubKey := range pStorageValue.FFriends { - copyStorageValue.FFriends[aliasName] = pubKey - } - - return copyStorageValue -} diff --git a/cmd/hidden_lake/messenger/pkg/settings/settings.go b/cmd/hidden_lake/messenger/pkg/settings/settings.go index bf3f647aa..44ce09ee9 100644 --- a/cmd/hidden_lake/messenger/pkg/settings/settings.go +++ b/cmd/hidden_lake/messenger/pkg/settings/settings.go @@ -6,7 +6,6 @@ const ( ) const ( - CPathSTG = "hlm.stg" CPathCFG = "hlm.cfg" CPathDB = "hlm.db" ) diff --git a/cmd/hidden_lake/messenger/web/template/index.html b/cmd/hidden_lake/messenger/web/template/index.html index a33e369cc..8c2c85012 100644 --- a/cmd/hidden_lake/messenger/web/template/index.html +++ b/cmd/hidden_lake/messenger/web/template/index.html @@ -17,7 +17,6 @@ HLM
- {{if .FAuthorized}} {{if (eq .FLanguage 0)}} Friends Settings @@ -28,18 +27,6 @@ Amikoj Agordoj {{end}} - {{else}} - {{if (eq .FLanguage 0)}} - Sign up - Sign in - {{else if (eq .FLanguage 1)}} - Регистрация - Вход - {{else if (eq .FLanguage 2)}} - Registrado - Enirejo - {{end}} - {{end}}
{{template "main" .}} diff --git a/cmd/hidden_lake/service/.gitignore b/cmd/hidden_lake/service/.gitignore index 7548d21d7..a577ab00e 100644 --- a/cmd/hidden_lake/service/.gitignore +++ b/cmd/hidden_lake/service/.gitignore @@ -1,5 +1,4 @@ hls -hls.stg hls.cfg hls.db pub.key diff --git a/cmd/hidden_lake/service/Dockerfile b/cmd/hidden_lake/service/Dockerfile index fe52f3cfd..e04cf1ef5 100644 --- a/cmd/hidden_lake/service/Dockerfile +++ b/cmd/hidden_lake/service/Dockerfile @@ -10,5 +10,5 @@ COPY ./ ./ RUN go build -o hls ./cmd/hidden_lake/service/cmd/hls ENV SERVICE_PATH="/mounted" -ENV SERVICE_KEY="" +ENV SERVICE_KEY="/mounted/priv.key" CMD ./hls -path="${SERVICE_PATH}" -key="${SERVICE_KEY}" diff --git a/cmd/hidden_lake/service/README.md b/cmd/hidden_lake/service/README.md index a101498ae..e3be784e3 100644 --- a/cmd/hidden_lake/service/README.md +++ b/cmd/hidden_lake/service/README.md @@ -303,7 +303,7 @@ and put result to "hex_data" HLS API 3. GET/DELETE /api/network/online 4. POST/PUT /api/network/request 5. GET/POST /api/network/key -6. GET/POST/DELETE /api/node/key +6. GET /api/node/key ``` ### 1. /api/config/connects @@ -579,40 +579,6 @@ Date: Mon, 07 Aug 2023 00:35:45 GMT Transfer-Encoding: chunked ``` -```json -["PubKey(go-peer/rsa){3082020A0282020100C17B6FA53983050B0339A0AB60D20A8A5FF5F8210564464C45CD2FAC2F266E8DDBA3B36C6F356AE57D1A71EED7B612C4CBC808557E4FCBAF6EDCFCECE37494144F09D65C7533109CE2F9B9B31D754453CA636A4463594F2C38303AE1B7BFFE738AC57805C782193B4854FF3F3FACA2C6BF9F75428DF6C583FBC29614C0B3329DF50F7B6399E1CC1F12BED77F29F885D7137ADFADE74A43451BB97A32F2301BE8EA866AFF34D6C7ED7FF1FAEA11FFB5B1034602B67E7918E42CA3D20E3E68AA700BE1B55A78C73A1D60D0A3DED3A6E5778C0BA68BAB9C345462131B9DC554D1A189066D649D7E167621815AB5B93905582BF19C28BCA6018E0CD205702968885E92A3B1E3DB37A25AC26FA4D2A47FF024ECD401F79FA353FEF2E4C2183C44D1D44B44938D32D8DBEDDAF5C87D042E4E9DAD671BE9C10DD8B3FE0A7C29AFE20843FE268C6A8F14949A04FF25A3EEE1EBE0027A99CE1C4DC561697297EA9FD9E23CF2E190B58CA385B66A235290A23CBB3856108EFFDD775601B3DE92C06C9EA2695C2D25D7897FD9D43C1AE10016E51C46C67F19AC84CD25F47DE2962A48030BCD8A0F14FFE4135A2893F62AC3E15CC61EC2E4ACADE0736C9A8DBC17D439248C42C5C0C6E08612414170FBE5AA6B52AE64E4CCDAE6FD3066BED5C200E07DBB0167D74A9FAD263AF253DFA870F44407F8EF3D9F12B8D910C4D803AD82ABA136F93F0203010001}","PubKey(go-peer/rsa){3082020A0282020100A4FDC84A2BE3212F32C75F54BB259CFB8F8B701D7B3E3B1FD6D0AA4CD4B9E2DDE44005362C1483895065902F0C68C7B4C5EDA89BE8A5C08019C1D3337E3D3660620AF3793224816866140A4E9E47747F53EDC32A31ADFAF493DF222A5BF484EF91AFB6AC8AE426F8E3F981180689F666000EBC9285DC74C12CA6B287CB93AD1F87097E9104851565DE127CBE675A3E6486E702EFE027A53A98A19C5E0D12458E620DD9443FF99D2ACFD0F1C813262E0A85C7E442F9ABE4BD316C794B3F95676E59B6E5220AB9744419BD3CA1B082C5540CF537B15737E5B3019EE50AB9501CEBF2D38CA4D3F90719D575BB8B6ACC0D8EDEB2BDF69A5293945F7F0C0B5DB9AAC15EEB13CE107B8A7C72E670EC82A53783DEFDD7A836698CC5FE0F4C95B72C6A64ED114E4E4F69B22F46D5255AA26E357999BDBBF003917C295A50682F4E39F5E89BF8A40360EA77DA0FEDB29C902B11D403B2DBE851F8CCAD0B888EF7161D4A4DEB70CA43515FE5CA3E19AA0587A9CE162BAA0401E81425E76CDCEB851075F32A97C958E0C8617684563C39DF8B89B6C348D734F3F5996F026B149AFB200C465B28D86D0D06652D8D2B66F5E5E1820AC42AE6183A3C0AFA7DAE39DDF880E1EB1DB76F937788CC24A60EE001CD2A5EBA9C919F6FEF54A4531F1B53DD8507FEE30605CA88E98499ED2809BA3A1CE1EF4EB60953B638B3395722CFAA6564896E7DCF0203010001}"] -``` - -#### 6.2. POST Request - -```bash -curl -i -X POST -H 'Accept: application/json' http://localhost:9572/api/node/key --data '{"priv_key":"PrivKey(go-peer/rsa){3082092802010002820201009D5159F646E8E6F55B0FCD2445BDD5320F75AB6A5A5CEDFBB60B5B52FFC54E08543A8F5A329B1CCE1BE815C6AD7A30BEC3BE8EDCE0DB212C503F75D208AE2D1472C891DF7D5ECBC088358B33462579C95E43BD2E7C1577E9FB95A5B1105A55CD2459D499660659A843CC801F9260FA5846C67211BFE456DDD1121A8E0CBC7849A5301FEB18496B8DA3B6A7669229744D20C360CFEBB1F6245326F1D1EEE13A902A7A8E14A63457053DB6A285ABA6654960A310B7B54F43F191CCFFFEB35375C23FEEAF3D039FF57650CCF52FD76FA7EC9FD18627D8DE95486FA5EB8B50AF79A20CDF2DCBC4BC4B6931C57842D4E20AF531CCCB89D70F83232938AE0290963A379152C912989D8C85898123428C2A14D5046475D6EE9B6658B7B99DB4BCD863268792CB1185C0DDE874978F7DFA8DCAA1E97D092CA852C061F2FEBA6ECDC7F9CF08791BDADC8A2488405EDE35D59D407AD39C5FC2A167F2AC7F631CE64F7A099FFB41BBEB7C6036058E97CD9DF43C287B9A3A1D4E8D8273CBE65DE103F05CA87C0B3940131B3388AF97B383DB7D0C6A1BCFC93971C5D8D4CE6C3A61E1DA431C43B32D393422FDD6716BE27D9A5928402634940ADEE8A15C18B1F036636312843FD1738B98A4F6A3677455FB61D8310FEE2C1A0B705E5DBCECB4806F1603018F8E9CA18B0EA715F2D9A5498CF78BAE6B2CB4ADA658B4F8E074D78E5045B174D62302030100010282020021B59BDC4CC77D2DD7EC63DDC0DFF37DFD980E3A04D0E2E1CBD955214CD31F6C637804DDA3F85ECCBF6814BA74D3B8FC377F6EA75FBB34B9851C8407947A96084AAC35ADB8F4861E64516CD978CF70F03835B5A4EF4BBE5D31DE98197FD28B8E209AEB164FA94EAEE2904068037AAA4A1E2849AB09FE48AAD130DAE5D34ED34B9C8CDA5A0AE3389BAA17EA78ED1ADAE3E800558F5806D322677AF1D83522A7E4DA65566A904EA8D2E3AD6DD7CCB723FEFC2914DCF889DA9A39CEBE8FFA270915AD935C936B626C3B8506D6070157D898B88A31FFF9D580117C73062CDD062CBF0F9906FC21D4E327D0556AF68F1D3C91DBB0F17040D7FF169AAF9D81C92F979B9888618AEA88917281D14078891B944942ACB5073A67DFF2F889E470BD5FF29EEE2F04131629324724A7CD065200C34C4B8E44C64F2A3D25E9712A7CC83FA7F66929CFBFEE12137C0BF32FA109F630D3872910B20A3DD7DC12CFD0EB7E5D13883CA01E9EA032A6993304E9BFC2DA30A7D02FB3522661F1B6842EF097FC6E3D64381775DB516063F8762E036DAB436016757F393F0D7E1D6147EAF5BB8D7D3BFD764CC7F64EEB2C1163E4EC7E6D72AD50CC273E0D9B53D39788020C2101F7F1AE0223FF74E6ADEB659F21E2C2143AA1352E39C16447873F3EB060BC016C5F1A73B89DB0115AEDA6E2FE3588611064D6C9A288E2904BBA6D4985F007E6AC548B010282010100C239EF2FC77DE8A6022A34C9A0DAD65427841CC3BC067E12AE2A25FC282541B2FBE857773252058BEE309EA18DDB9EAA6038AF8DA0E36E901A57B369A257A814DC00D8A2E24E95CD491BAC1C258306EFEA51FA3CCEDDBC97A72B06EA3D9A42E07AF1EF83282092BEAFD117648DEA9F3D887B05136213C471BC6A01ED4C5586F661B61C8D5F130D80BF92C4C641CA49EB953DFD7E7B035816CF0EBB797E8A9018952710D4B67415C3269CD437225A640E213643AF24446595BE0E29AB5C9D1C7BBB8BCFBCB6113592DF68C693D7961A6223D9DDBA6DC422BE7AAE1C86B38F37F1DD10B5132101AD4B18ACC26B8F413D84D0A5A091BA4D3A453C06562CDADA60810282010100CF5A4B60FBC10BE3FD78FABA01C8E24839488DF13EF530B3FD7A02FC0D6C32EAEAD81CC12B4DE0B9016F7F164DAF8A8AABC3FD139BF5EC13AE69AADEB109514530F7ED49D88B441879F72178821620800744877B98C0F8B416546B754AD4E526470BB010A114F28F85CB7E027B154266D57839FA21A42B52FBB6B6FC01B4CF0AE04C6555F354F0A3C901BEAB60898B1BD652995F663AEB6FF7389023CAD11374EC94A2EDF6DFECBFFD964D8A30B6A8597505B0339FF352BAAB84C8AF3C9A0DB19A996875C0CBE7F102ADB227255C9B058B2D80046B961B3632FA4B152EBBA102240A6113139D58285A089BFA2BADFFFB52832047ACFB00BBE193F046CF3764A3028201004B77E9699E515D29CC238C39604848099105338C16AE4B24850A19925E2303E14122A981C64ABA9F01A160B21385E7A3FA196C955293ACAD4F9F0E36987F08EF7A00D62C8C54CEBE628EDF145CBB09E205216F635B5A2B629DF10911D177F44E775734A2B8DFD74542D9B3063E6291177EC596564EC0B18F240FE8C9C4E462B9AF83EC9A3DFC103E1BB232C57A60D8D2323E5116694406616E7921FD765EEED8AE73EC854A93D6B4EA76FBBAA49D8CCD34B87A1A3EB458E8935DBB713B5E4CE8031AB350774A3E8FE0413D0FCB3026F64549ED6EF821C3025276FEDC943EAD154CB9A632559BEA3308D670010D3BE3648D121E4F219DCA6B86844BCDC8081C810282010100CD24F164CF4ECBFBD1C00A9752C2B3956F0F2857A0C926593D13A4B648755EDEEA5FCBFB1563E44C456E5116F8DF0EBB697AEAFCA695A4EE47E58546F3725B7490210A23C058F09322BFECDE741D7E240C8CB15A07E40B6AE898B7040178260A3BCA05743E5A222CFADB3C1D2A36FB4E102EF5755229412FC5979CEC30A7F91B329482C1898FE4D0B642C2A87D473758E02F324C9F30F5D3FD8C7996DFC7006FF2CC8F71CD88F78B6F516FFFA3786390B5E55DD185934FAB1D9CAE8C28F1E5506CBB100D4824B4A1CEDB98618066617D1798798A6602C98352E62CB89556CED1F6644A6C7C407482DFA89AE0E4AC2E9130AE4896813E881859F26A8B33E202EF028201001AD162216179FAA9CA9012CCBE241AABCD2217011DB1FD049FC434491EA0A8C73FCFBDA0B92A2E34C7BC21D532C3A5FD36020BCAECD6C3C14E2BD642FA4FD0DF079047C2D061F148AED765A36EBAC1FC02E978AB8D397582457F3D11B5CE7A269868326F49E7087DE9A1E75DCD5BA249CBA60A8405EF53E86FBA1936A76B3542DD78031406BDEC421DEB969F5478AA9C53E3B34FD23D62986399C6978777B57DA715C72AB193210C48B26133DEA5BDDEE087E2E9809E55030FBDBB71F87728D5D923B15BEC9E1A38E85D33BBA27AC2BCBCC9AD7F759B76105120E758A58EAA359E793D05E23493A9A2925032E1234782D7728055EEC0FF28B30D3F613EE3A356}"}' -``` - -#### 6.2. POST Response - -``` -HTTP/1.1 200 OK -Content-Type: text/plain -Date: Mon, 07 Aug 2023 00:41:09 GMT -Content-Length: 27 - -success: update private key -``` - -#### 6.3. DELETE Request - -```bash -curl -i -X DELETE -H 'Accept: application/json' http://localhost:9572/api/node/key -``` - -#### 6.3. DELETE Response - ``` -HTTP/1.1 200 OK -Content-Type: text/plain -Date: Sun, 08 Oct 2023 07:10:24 GMT -Content-Length: 26 - -success: reset private key +PubKey(go-peer/rsa){3082020A0282020100C17B6FA53983050B0339A0AB60D20A8A5FF5F8210564464C45CD2FAC2F266E8DDBA3B36C6F356AE57D1A71EED7B612C4CBC808557E4FCBAF6EDCFCECE37494144F09D65C7533109CE2F9B9B31D754453CA636A4463594F2C38303AE1B7BFFE738AC57805C782193B4854FF3F3FACA2C6BF9F75428DF6C583FBC29614C0B3329DF50F7B6399E1CC1F12BED77F29F885D7137ADFADE74A43451BB97A32F2301BE8EA866AFF34D6C7ED7FF1FAEA11FFB5B1034602B67E7918E42CA3D20E3E68AA700BE1B55A78C73A1D60D0A3DED3A6E5778C0BA68BAB9C345462131B9DC554D1A189066D649D7E167621815AB5B93905582BF19C28BCA6018E0CD205702968885E92A3B1E3DB37A25AC26FA4D2A47FF024ECD401F79FA353FEF2E4C2183C44D1D44B44938D32D8DBEDDAF5C87D042E4E9DAD671BE9C10DD8B3FE0A7C29AFE20843FE268C6A8F14949A04FF25A3EEE1EBE0027A99CE1C4DC561697297EA9FD9E23CF2E190B58CA385B66A235290A23CBB3856108EFFDD775601B3DE92C06C9EA2695C2D25D7897FD9D43C1AE10016E51C46C67F19AC84CD25F47DE2962A48030BCD8A0F14FFE4135A2893F62AC3E15CC61EC2E4ACADE0736C9A8DBC17D439248C42C5C0C6E08612414170FBE5AA6B52AE64E4CCDAE6FD3066BED5C200E07DBB0167D74A9FAD263AF253DFA870F44407F8EF3D9F12B8D910C4D803AD82ABA136F93F0203010001} ``` diff --git a/cmd/hidden_lake/service/_daemon/install_hls.sh b/cmd/hidden_lake/service/_daemon/install_hls.sh index 56b660fdd..787bec5f3 100755 --- a/cmd/hidden_lake/service/_daemon/install_hls.sh +++ b/cmd/hidden_lake/service/_daemon/install_hls.sh @@ -5,7 +5,7 @@ echo " Description=HiddenLakeService [Service] -ExecStart=/root/hls_amd64_linux -path=/root -key=root/priv.key +ExecStart=/root/hls_amd64_linux -path=/root -key=/root/priv.key Restart=always RestartSec=10 diff --git a/cmd/hidden_lake/service/cmd/hls/main.go b/cmd/hidden_lake/service/cmd/hls/main.go index ab5f6a398..d2cca82b8 100644 --- a/cmd/hidden_lake/service/cmd/hls/main.go +++ b/cmd/hidden_lake/service/cmd/hls/main.go @@ -9,7 +9,7 @@ import ( ) func main() { - app, err := app.InitApp(".") + app, err := app.InitApp(".", "./priv.key") if err != nil { panic(err) } diff --git a/cmd/hidden_lake/service/internal/handler/handler_test.go b/cmd/hidden_lake/service/internal/handler/handler_test.go index c590dfabd..6d0ef097f 100644 --- a/cmd/hidden_lake/service/internal/handler/handler_test.go +++ b/cmd/hidden_lake/service/internal/handler/handler_test.go @@ -68,10 +68,6 @@ var ( ) ) -var ( - tgInitPrivKey = asymmetric.LoadRSAPrivKey(testutils.Tc1PrivKey1024) -) - func testStartServerHTTP(addr string) *http.Server { mux := http.NewServeMux() mux.HandleFunc("/echo", testEchoPage) @@ -137,9 +133,6 @@ func testAllFree(node anonymity.INode, srv *http.Server) { func testRunService(wcfg config.IWrapper, node anonymity.INode, addr string) *http.Server { mux := http.NewServeMux() - keySize := wcfg.GetConfig().GetSettings().GetKeySizeBits() - ephPrivKey := asymmetric.NewRSAPrivKey(keySize) - logger := logger.NewLogger( logger.NewSettings(&logger.SSettings{}), func(_ logger.ILogArg) string { @@ -152,10 +145,10 @@ func testRunService(wcfg config.IWrapper, node anonymity.INode, addr string) *ht mux.HandleFunc(pkg_settings.CHandleConfigConnectsPath, HandleConfigConnectsAPI(wcfg, logger, node)) mux.HandleFunc(pkg_settings.CHandleConfigFriendsPath, HandleConfigFriendsAPI(wcfg, logger, node)) mux.HandleFunc(pkg_settings.CHandleNetworkOnlinePath, HandleNetworkOnlineAPI(logger, node)) - mux.HandleFunc(pkg_settings.CHandleNetworkRequestPath, HandleNetworkRequestAPI(wcfg, logger, node, ephPrivKey)) + mux.HandleFunc(pkg_settings.CHandleNetworkRequestPath, HandleNetworkRequestAPI(wcfg, logger, node)) mux.HandleFunc(pkg_settings.CHandleNetworkMessagePath, HandleNetworkMessageAPI(logger, node)) mux.HandleFunc(pkg_settings.CHandleNetworkKeyPath, HandleNetworkKeyAPI(wcfg, logger, node)) - mux.HandleFunc(pkg_settings.CHandleNodeKeyPath, HandleNodeKeyAPI(wcfg, logger, node, ephPrivKey, tgInitPrivKey)) + mux.HandleFunc(pkg_settings.CHandleNodeKeyPath, HandleNodeKeyAPI(wcfg, logger, node)) srv := &http.Server{ Addr: addr, diff --git a/cmd/hidden_lake/service/internal/handler/network_request.go b/cmd/hidden_lake/service/internal/handler/network_request.go index 021b76e64..e947d0adf 100644 --- a/cmd/hidden_lake/service/internal/handler/network_request.go +++ b/cmd/hidden_lake/service/internal/handler/network_request.go @@ -23,7 +23,7 @@ const ( cErrorLoadRequest ) -func HandleNetworkRequestAPI(pWrapper config.IWrapper, pLogger logger.ILogger, pNode anonymity.INode, pEphPrivKey asymmetric.IPrivKey) http.HandlerFunc { +func HandleNetworkRequestAPI(pWrapper config.IWrapper, pLogger logger.ILogger, pNode anonymity.INode) http.HandlerFunc { return func(pW http.ResponseWriter, pR *http.Request) { logBuilder := http_logger.NewLogBuilder(pkg_settings.CServiceName, pR) @@ -41,7 +41,7 @@ func HandleNetworkRequestAPI(pWrapper config.IWrapper, pLogger logger.ILogger, p return } - pubKey, data, errCode := unwrapRequest(pWrapper.GetConfig(), pEphPrivKey, vRequest) + pubKey, data, errCode := unwrapRequest(pWrapper.GetConfig(), vRequest) switch errCode { case cErrorNone: // pass @@ -104,7 +104,7 @@ func HandleNetworkRequestAPI(pWrapper config.IWrapper, pLogger logger.ILogger, p } } -func unwrapRequest(pConfig config.IConfig, pEphPrivKey asymmetric.IPrivKey, pRequest pkg_settings.SRequest) (asymmetric.IPubKey, []byte, int) { +func unwrapRequest(pConfig config.IConfig, pRequest pkg_settings.SRequest) (asymmetric.IPubKey, []byte, int) { friends := pConfig.GetFriends() pubKey, ok := friends[pRequest.FReceiver] diff --git a/cmd/hidden_lake/service/internal/handler/node_key.go b/cmd/hidden_lake/service/internal/handler/node_key.go index 017804091..e9a323a0c 100644 --- a/cmd/hidden_lake/service/internal/handler/node_key.go +++ b/cmd/hidden_lake/service/internal/handler/node_key.go @@ -1,91 +1,28 @@ package handler import ( - "encoding/json" "net/http" "github.com/number571/go-peer/cmd/hidden_lake/service/internal/config" pkg_settings "github.com/number571/go-peer/cmd/hidden_lake/service/pkg/settings" "github.com/number571/go-peer/internal/api" - "github.com/number571/go-peer/pkg/crypto/asymmetric" - "github.com/number571/go-peer/pkg/crypto/symmetric" - "github.com/number571/go-peer/pkg/encoding" "github.com/number571/go-peer/pkg/logger" "github.com/number571/go-peer/pkg/network/anonymity" http_logger "github.com/number571/go-peer/internal/logger/http" ) -func HandleNodeKeyAPI(pWrapper config.IWrapper, pLogger logger.ILogger, pNode anonymity.INode, pEphPrivKey asymmetric.IPrivKey, pInitPrivKey asymmetric.IPrivKey) http.HandlerFunc { +func HandleNodeKeyAPI(pWrapper config.IWrapper, pLogger logger.ILogger, pNode anonymity.INode) http.HandlerFunc { return func(pW http.ResponseWriter, pR *http.Request) { logBuilder := http_logger.NewLogBuilder(pkg_settings.CServiceName, pR) - switch pR.Method { - case http.MethodGet, http.MethodPost, http.MethodDelete: - // pass - default: + if pR.Method != http.MethodGet { pLogger.PushWarn(logBuilder.WithMessage(http_logger.CLogMethod)) api.Response(pW, http.StatusMethodNotAllowed, "failed: incorrect method") return } - switch pR.Method { - case http.MethodGet: - pubKeys := []string{ - pNode.GetMessageQueue().GetClient().GetPubKey().ToString(), - pEphPrivKey.GetPubKey().ToString(), - } - - pLogger.PushInfo(logBuilder.WithMessage(http_logger.CLogSuccess)) - api.Response(pW, http.StatusOK, pubKeys) - return - - case http.MethodPost: - var vPrivKey pkg_settings.SPrivKey - - if err := json.NewDecoder(pR.Body).Decode(&vPrivKey); err != nil { - pLogger.PushWarn(logBuilder.WithMessage(http_logger.CLogDecodeBody)) - api.Response(pW, http.StatusConflict, "failed: decode request") - return - } - - privKey := getPrivKey(pEphPrivKey, vPrivKey) - if privKey == nil { - pLogger.PushWarn(logBuilder.WithMessage("decode_key")) - api.Response(pW, http.StatusBadRequest, "failed: decode private key") - return - } - - if privKey.GetSize() != pWrapper.GetConfig().GetSettings().GetKeySizeBits() { - pLogger.PushWarn(logBuilder.WithMessage("key_size")) - api.Response(pW, http.StatusNotAcceptable, "failed: incorrect private key size") - return - } - - client := pkg_settings.InitClient(pWrapper.GetConfig().GetSettings(), privKey) - pNode.GetMessageQueue().UpdateClient(client) - - pLogger.PushInfo(logBuilder.WithMessage(http_logger.CLogSuccess)) - api.Response(pW, http.StatusOK, "success: update private key") - return - - case http.MethodDelete: - client := pkg_settings.InitClient(pWrapper.GetConfig().GetSettings(), pInitPrivKey) - pNode.GetMessageQueue().UpdateClient(client) - - pLogger.PushInfo(logBuilder.WithMessage(http_logger.CLogSuccess)) - api.Response(pW, http.StatusOK, "success: reset private key") - return - } - } -} - -func getPrivKey(pEphPrivKey asymmetric.IPrivKey, pPrivKey pkg_settings.SPrivKey) asymmetric.IPrivKey { - if pPrivKey.FSessionKey == "" { - return asymmetric.LoadRSAPrivKey(pPrivKey.FPrivKey) // string + pLogger.PushInfo(logBuilder.WithMessage(http_logger.CLogSuccess)) + api.Response(pW, http.StatusOK, pNode.GetMessageQueue().GetClient().GetPubKey().ToString()) } - sessionKey := pEphPrivKey.DecryptBytes(encoding.HexDecode(pPrivKey.FSessionKey)) - encPrivKey := encoding.HexDecode(pPrivKey.FPrivKey) - decPrivKey := symmetric.NewAESCipher(sessionKey).DecryptBytes(encPrivKey) - return asymmetric.LoadRSAPrivKey(decPrivKey) // bytes } diff --git a/cmd/hidden_lake/service/internal/handler/node_key_test.go b/cmd/hidden_lake/service/internal/handler/node_key_test.go index b67fa6efd..7a01b01eb 100644 --- a/cmd/hidden_lake/service/internal/handler/node_key_test.go +++ b/cmd/hidden_lake/service/internal/handler/node_key_test.go @@ -7,7 +7,6 @@ import ( "time" hls_client "github.com/number571/go-peer/cmd/hidden_lake/service/pkg/client" - "github.com/number571/go-peer/pkg/crypto/asymmetric" testutils "github.com/number571/go-peer/test/_data" ) @@ -23,7 +22,7 @@ func TestHandlePubKeyAPI(t *testing.T) { ), ) - pubKey, ephPubKey, err := client.GetPubKey() + pubKey, err := client.GetPubKey() if err != nil { t.Error(err) return @@ -33,38 +32,4 @@ func TestHandlePubKeyAPI(t *testing.T) { t.Error("public keys not equals") return } - - privKey := asymmetric.LoadRSAPrivKey(testutils.Tc2PrivKey1024) - if err := client.SetPrivKey(privKey, ephPubKey); err != nil { - t.Error("failed update private key") - return - } - - newPubKey, _, err := client.GetPubKey() - if err != nil { - t.Error(err) - return - } - - if pubKey.GetAddress().ToString() == newPubKey.GetAddress().ToString() { - t.Error("public keys are equals") - return - } - - if err := client.ResetPrivKey(); err != nil { - t.Error(err) - return - } - - gotInitPubKey, _, err := client.GetPubKey() - if err != nil { - t.Error(err) - return - } - - // tgInitPrivKey = testutils.Tc1PrivKey1024 - if gotInitPubKey.GetAddress().ToString() != tgInitPrivKey.GetPubKey().GetAddress().ToString() { - t.Error("init state of private key is incorrect after reset") - return - } } diff --git a/cmd/hidden_lake/service/pkg/app/app_test.go b/cmd/hidden_lake/service/pkg/app/app_test.go index 3b22929ce..058f43e96 100644 --- a/cmd/hidden_lake/service/pkg/app/app_test.go +++ b/cmd/hidden_lake/service/pkg/app/app_test.go @@ -69,7 +69,7 @@ func TestApp(t *testing.T) { ) // Check public key of node - pubKey, _, err := client.GetPubKey() + pubKey, err := client.GetPubKey() if err != nil { t.Error(err) return diff --git a/cmd/hidden_lake/service/pkg/app/init_app.go b/cmd/hidden_lake/service/pkg/app/init_app.go index 26a56f8b8..dc488af40 100644 --- a/cmd/hidden_lake/service/pkg/app/init_app.go +++ b/cmd/hidden_lake/service/pkg/app/init_app.go @@ -15,29 +15,18 @@ import ( ) // initApp work with the raw data = read files, read args -func InitApp(pDefaultPath string) (types.ICommand, error) { +func InitApp(pDefaultPath, pDefaultKey string) (types.ICommand, error) { inputPath := strings.TrimSuffix(flag.GetFlagValue("path", pDefaultPath), "/") - inputKey := flag.GetFlagValue("key", "") + inputKey := flag.GetFlagValue("key", pDefaultKey) cfg, err := pkg_config.InitConfig(fmt.Sprintf("%s/%s", inputPath, pkg_settings.CPathCFG), nil) if err != nil { return nil, errors.WrapError(err, "init config") } - var privKey asymmetric.IPrivKey - switch inputKey { - case "": - privKey = asymmetric.NewRSAPrivKey(cfg.GetSettings().GetKeySizeBits()) - default: - privKeyStr, err := filesystem.OpenFile(inputKey).Read() - if err != nil { - return nil, errors.WrapError(err, "read public key") - } - privKey = asymmetric.LoadRSAPrivKey(string(privKeyStr)) - } - - if privKey == nil { - return nil, errors.NewError("private key is invalid") + privKey, err := getPrivKey(cfg, inputKey) + if err != nil { + return nil, errors.WrapError(err, "get private key") } if privKey.GetSize() != cfg.GetSettings().GetKeySizeBits() { @@ -46,3 +35,26 @@ func InitApp(pDefaultPath string) (types.ICommand, error) { return NewApp(cfg, privKey, inputPath), nil } + +func getPrivKey(pCfg pkg_config.IConfig, pKeyPath string) (asymmetric.IPrivKey, error) { + keyFile := filesystem.OpenFile(pKeyPath) + + if keyFile.IsExist() { + privKeyStr, err := keyFile.Read() + if err != nil { + return nil, errors.WrapError(err, "read private key") + } + privKey := asymmetric.LoadRSAPrivKey(string(privKeyStr)) + if privKey == nil { + return nil, errors.NewError("private key is invalid") + } + return privKey, nil + } + + privKey := asymmetric.NewRSAPrivKey(pCfg.GetSettings().GetKeySizeBits()) + if err := keyFile.Write([]byte(privKey.ToString())); err != nil { + return nil, errors.WrapError(err, "write private key") + } + + return privKey, nil +} diff --git a/cmd/hidden_lake/service/pkg/app/init_service.go b/cmd/hidden_lake/service/pkg/app/init_service.go index 83546347d..30a6e3593 100644 --- a/cmd/hidden_lake/service/pkg/app/init_service.go +++ b/cmd/hidden_lake/service/pkg/app/init_service.go @@ -5,24 +5,20 @@ import ( "github.com/number571/go-peer/cmd/hidden_lake/service/internal/handler" pkg_settings "github.com/number571/go-peer/cmd/hidden_lake/service/pkg/settings" - "github.com/number571/go-peer/pkg/crypto/asymmetric" ) func (p *sApp) initServiceHTTP() { mux := http.NewServeMux() - keySize := p.fWrapper.GetConfig().GetSettings().GetKeySizeBits() - ephPrivKey := asymmetric.NewRSAPrivKey(keySize) - mux.HandleFunc(pkg_settings.CHandleIndexPath, handler.HandleIndexAPI(p.fHTTPLogger)) mux.HandleFunc(pkg_settings.CHandleConfigSettingsPath, handler.HandleConfigSettingsAPI(p.fWrapper, p.fHTTPLogger)) mux.HandleFunc(pkg_settings.CHandleConfigConnectsPath, handler.HandleConfigConnectsAPI(p.fWrapper, p.fHTTPLogger, p.fNode)) mux.HandleFunc(pkg_settings.CHandleConfigFriendsPath, handler.HandleConfigFriendsAPI(p.fWrapper, p.fHTTPLogger, p.fNode)) mux.HandleFunc(pkg_settings.CHandleNetworkOnlinePath, handler.HandleNetworkOnlineAPI(p.fHTTPLogger, p.fNode)) - mux.HandleFunc(pkg_settings.CHandleNetworkRequestPath, handler.HandleNetworkRequestAPI(p.fWrapper, p.fHTTPLogger, p.fNode, ephPrivKey)) + mux.HandleFunc(pkg_settings.CHandleNetworkRequestPath, handler.HandleNetworkRequestAPI(p.fWrapper, p.fHTTPLogger, p.fNode)) mux.HandleFunc(pkg_settings.CHandleNetworkMessagePath, handler.HandleNetworkMessageAPI(p.fHTTPLogger, p.fNode)) mux.HandleFunc(pkg_settings.CHandleNetworkKeyPath, handler.HandleNetworkKeyAPI(p.fWrapper, p.fHTTPLogger, p.fNode)) - mux.HandleFunc(pkg_settings.CHandleNodeKeyPath, handler.HandleNodeKeyAPI(p.fWrapper, p.fHTTPLogger, p.fNode, ephPrivKey, p.fPrivKey)) + mux.HandleFunc(pkg_settings.CHandleNodeKeyPath, handler.HandleNodeKeyAPI(p.fWrapper, p.fHTTPLogger, p.fNode)) p.fServiceHTTP = &http.Server{ Addr: p.fWrapper.GetConfig().GetAddress().GetHTTP(), diff --git a/cmd/hidden_lake/service/pkg/client/builder.go b/cmd/hidden_lake/service/pkg/client/builder.go index 6f79cd870..33fffbb30 100644 --- a/cmd/hidden_lake/service/pkg/client/builder.go +++ b/cmd/hidden_lake/service/pkg/client/builder.go @@ -5,9 +5,6 @@ import ( pkg_settings "github.com/number571/go-peer/cmd/hidden_lake/service/pkg/settings" "github.com/number571/go-peer/pkg/client/message" "github.com/number571/go-peer/pkg/crypto/asymmetric" - "github.com/number571/go-peer/pkg/crypto/random" - "github.com/number571/go-peer/pkg/crypto/symmetric" - "github.com/number571/go-peer/pkg/encoding" ) var ( @@ -21,14 +18,6 @@ func NewBuilder() IBuilder { return &sBuilder{} } -func (p *sBuilder) SetPrivKey(pPrivKey asymmetric.IPrivKey, pEphPubKey asymmetric.IPubKey) *pkg_settings.SPrivKey { - sessionKey := random.NewStdPRNG().GetBytes(32) - return &pkg_settings.SPrivKey{ - FSessionKey: encoding.HexEncode(pEphPubKey.EncryptBytes(sessionKey)), - FPrivKey: encoding.HexEncode(symmetric.NewAESCipher(sessionKey).EncryptBytes(pPrivKey.ToBytes())), - } -} - func (p *sBuilder) Friend(pAliasName string, pPubKey asymmetric.IPubKey) *pkg_settings.SFriend { if pPubKey == nil { return &pkg_settings.SFriend{ diff --git a/cmd/hidden_lake/service/pkg/client/client.go b/cmd/hidden_lake/service/pkg/client/client.go index 0ce254ebd..3190e9d2b 100644 --- a/cmd/hidden_lake/service/pkg/client/client.go +++ b/cmd/hidden_lake/service/pkg/client/client.go @@ -138,24 +138,10 @@ func (p *sClient) DelConnection(pConnect string) error { return nil } -func (p *sClient) SetPrivKey(pPrivKey asymmetric.IPrivKey, pEphPubKey asymmetric.IPubKey) error { - if err := p.fRequester.SetPrivKey(p.fBuilder.SetPrivKey(pPrivKey, pEphPubKey)); err != nil { - return errors.WrapError(err, "set private key (client)") - } - return nil -} - -func (p *sClient) ResetPrivKey() error { - if err := p.fRequester.ResetPrivKey(); err != nil { - return errors.WrapError(err, "reset private key (client)") - } - return nil -} - -func (p *sClient) GetPubKey() (asymmetric.IPubKey, asymmetric.IPubKey, error) { - pubKey, ephPubKey, err := p.fRequester.GetPubKey() +func (p *sClient) GetPubKey() (asymmetric.IPubKey, error) { + pubKey, err := p.fRequester.GetPubKey() if err != nil { - return nil, nil, errors.WrapError(err, "get public key (client)") + return nil, errors.WrapError(err, "get public key (client)") } - return pubKey, ephPubKey, nil + return pubKey, nil } diff --git a/cmd/hidden_lake/service/pkg/client/requester.go b/cmd/hidden_lake/service/pkg/client/requester.go index 5f61a1e4d..540dfcc52 100644 --- a/cmd/hidden_lake/service/pkg/client/requester.go +++ b/cmd/hidden_lake/service/pkg/client/requester.go @@ -262,33 +262,7 @@ func (p *sRequester) DelConnection(pConnect string) error { return nil } -func (p *sRequester) SetPrivKey(pPrivKey *pkg_settings.SPrivKey) error { - _, err := api.Request( - p.fClient, - http.MethodPost, - fmt.Sprintf(pkg_settings.CHandleNodeKeyTemplate, p.fHost), - pPrivKey, - ) - if err != nil { - return errors.WrapError(err, "set private key (requester)") - } - return nil -} - -func (p *sRequester) ResetPrivKey() error { - _, err := api.Request( - p.fClient, - http.MethodDelete, - fmt.Sprintf(pkg_settings.CHandleNodeKeyTemplate, p.fHost), - nil, - ) - if err != nil { - return errors.WrapError(err, "set private key (requester)") - } - return nil -} - -func (p *sRequester) GetPubKey() (asymmetric.IPubKey, asymmetric.IPubKey, error) { +func (p *sRequester) GetPubKey() (asymmetric.IPubKey, error) { res, err := api.Request( p.fClient, http.MethodGet, @@ -296,23 +270,13 @@ func (p *sRequester) GetPubKey() (asymmetric.IPubKey, asymmetric.IPubKey, error) nil, ) if err != nil { - return nil, nil, errors.WrapError(err, "get public key (requester)") - } - - strPubKeys := make([]string, 0, 2) - if err := encoding.Deserialize([]byte(res), &strPubKeys); err != nil { - return nil, nil, errors.WrapError(err, "deserialize public keys (requeser)") + return nil, errors.WrapError(err, "get public key (requester)") } - pubKey := asymmetric.LoadRSAPubKey(strPubKeys[0]) + pubKey := asymmetric.LoadRSAPubKey(res) if pubKey == nil { - return nil, nil, errors.NewError("got invalid public key") - } - - ephPubKey := asymmetric.LoadRSAPubKey(strPubKeys[1]) - if ephPubKey == nil { - return nil, nil, errors.NewError("got invalid eph public key") + return nil, errors.NewError("got invalid public key") } - return pubKey, ephPubKey, nil + return pubKey, nil } diff --git a/cmd/hidden_lake/service/pkg/client/types.go b/cmd/hidden_lake/service/pkg/client/types.go index b30959019..13a9f6c9b 100644 --- a/cmd/hidden_lake/service/pkg/client/types.go +++ b/cmd/hidden_lake/service/pkg/client/types.go @@ -17,9 +17,7 @@ type IClient interface { GetNetworkKey() (string, error) SetNetworkKey(string) error - GetPubKey() (asymmetric.IPubKey, asymmetric.IPubKey, error) - SetPrivKey(asymmetric.IPrivKey, asymmetric.IPubKey) error - ResetPrivKey() error + GetPubKey() (asymmetric.IPubKey, error) GetOnlines() ([]string, error) DelOnline(string) error @@ -45,9 +43,7 @@ type IRequester interface { GetNetworkKey() (string, error) SetNetworkKey(string) error - GetPubKey() (asymmetric.IPubKey, asymmetric.IPubKey, error) - SetPrivKey(*pkg_settings.SPrivKey) error - ResetPrivKey() error + GetPubKey() (asymmetric.IPubKey, error) GetOnlines() ([]string, error) DelOnline(string) error @@ -67,7 +63,6 @@ type IRequester interface { } type IBuilder interface { - SetPrivKey(asymmetric.IPrivKey, asymmetric.IPubKey) *pkg_settings.SPrivKey Request(string, request.IRequest) *pkg_settings.SRequest Friend(string, asymmetric.IPubKey) *pkg_settings.SFriend Message(message.IMessage) string diff --git a/examples/anon_messenger/_docker/default/.gitignore b/examples/anon_messenger/_docker/default/.gitignore index 9c9841a2c..8b2eaedcf 100644 --- a/examples/anon_messenger/_docker/default/.gitignore +++ b/examples/anon_messenger/_docker/default/.gitignore @@ -1,4 +1,2 @@ !*.cfg -!*.stg hls.cfg -hlm.stg diff --git a/examples/anon_messenger/_docker/default/Makefile b/examples/anon_messenger/_docker/default/Makefile index 7c9707554..c930536a0 100644 --- a/examples/anon_messenger/_docker/default/Makefile +++ b/examples/anon_messenger/_docker/default/Makefile @@ -3,8 +3,6 @@ docker-default: docker-run docker-run: cp _mounted_node1/hls_copy.cfg _mounted_node1/hls.cfg cp _mounted_node2/hls_copy.cfg _mounted_node2/hls.cfg - cp _mounted_node1/hlm_copy.stg _mounted_node1/hlm.stg - cp _mounted_node2/hlm_copy.stg _mounted_node2/hlm.stg docker-compose build docker-compose up docker-clean: @@ -12,6 +10,5 @@ docker-clean: rm -rf _mounted_node1/hlm.db _mounted_node2/hlm.db rm -rf _mounted_middle/hlt.db rm -f _mounted_node1/hls.cfg _mounted_node2/hls.cfg - rm -f _mounted_node1/hlm.stg _mounted_node2/hlm.stg docker-compose down docker-compose rm -f diff --git a/examples/anon_messenger/_docker/default/_mounted_middle/hlt.cfg b/examples/anon_messenger/_docker/default/_mounted_middle/hlt.cfg index 2e6165663..6734389d6 100644 --- a/examples/anon_messenger/_docker/default/_mounted_middle/hlt.cfg +++ b/examples/anon_messenger/_docker/default/_mounted_middle/hlt.cfg @@ -8,7 +8,7 @@ }, "logging": ["info", "warn", "erro"], "address": { - "tcp": "traffic-middle:9581", - "http": "traffic-middle:9582" + "tcp": "traffic-middle:6581", + "http": "traffic-middle:6582" } } \ No newline at end of file diff --git a/examples/anon_messenger/_docker/default/_mounted_node1/hlm.cfg b/examples/anon_messenger/_docker/default/_mounted_node1/hlm.cfg index 8c5f227ee..3a724aa0e 100644 --- a/examples/anon_messenger/_docker/default/_mounted_node1/hlm.cfg +++ b/examples/anon_messenger/_docker/default/_mounted_node1/hlm.cfg @@ -10,11 +10,11 @@ "language": "ENG", "storage_key": "_", "address": { - "interface": "messenger-node1:9592", - "incoming": "messenger-node1:9591" + "interface": "messenger-node1:8080", + "incoming": "messenger-node1:8081" }, - "connection": "service-node1:9572", + "connection": "service-node1:8572", "backup_connections": [ - "traffic-middle:9582" + "traffic-middle:6582" ] } \ No newline at end of file diff --git a/examples/anon_messenger/_docker/default/_mounted_node1/hlm_copy.stg b/examples/anon_messenger/_docker/default/_mounted_node1/hlm_copy.stg deleted file mode 100644 index fb49380f57d53bd869a0bcc1bed069c75c5b1775..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 liter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hls_copy.cfg b/examples/anon_messenger/_docker/default/_mounted_node2/hls_copy.cfg index 7f38cff67..d26501b6b 100644 --- a/examples/anon_messenger/_docker/default/_mounted_node2/hls_copy.cfg +++ b/examples/anon_messenger/_docker/default/_mounted_node2/hls_copy.cfg @@ -8,12 +8,15 @@ }, "logging": ["info", "warn", "erro"], "address": { - "http": "service-node2:9572" + "http": "service-node2:7572" }, "connections": [ - "traffic-middle:9581" + "traffic-middle:6581" ], "services": { - "go-peer/hidden-lake-messenger": "messenger-node2:9591" + "go-peer/hidden-lake-messenger": "messenger-node2:7071" + }, + "friends": { + "Alice": "PubKey(go-peer/rsa){3082020A0282020100B752D35E81F4AEEC1A9C42EDED16E8924DD4D359663611DE2DCCE1A9611704A697B26254DD2AFA974A61A2CF94FAD016450FEF22F218CA970BFE41E6340CE3ABCBEE123E35A9DCDA6D23738DAC46AF8AC57902DDE7F41A03EB00A4818137E1BF4DFAE1EEDF8BB9E4363C15FD1C2278D86F2535BC3F395BE9A6CD690A5C852E6C35D6184BE7B9062AEE2AFC1A5AC81E7D21B7252A56C62BB5AC0BBAD36C7A4907C868704985E1754BAA3E8315E775A51B7BDC7ACB0D0675D29513D78CB05AB6119D3CA0A810A41F78150E3C5D9ACAFBE1533FC3533DECEC14387BF7478F6E229EB4CC312DC22436F4DB0D4CC308FB6EEA612F2F9E00239DE7902DE15889EE71370147C9696A5E7B022947ABB8AFBBC64F7840BED4CE69592CAF4085A1074475E365ED015048C89AE717BC259C42510F15F31DA3F9302EAD8F263B43D14886B2335A245C00871C041CBB683F1F047573F789673F9B11B6E6714C2A3360244757BB220C7952C6D3D9D65AA47511A63E2A59706B7A70846C930DCFB3D8CAFB3BD6F687CACF5A708692C26B363C80C460F54E59912D41D9BB359698051ABC049A0D0CFD7F23DC97DA940B1EDEAC6B84B194C8F8A56A46CE69EE7A0AEAA11C99508A368E64D27756AD0BA7146A6ADA3D5FA237B3B4EDDC84B71C27DE3A9F26A42197791C7DC09E2D7C4A7D8FCDC8F9A5D4983BB278FCE9513B1486D18F8560C3F31CC70203010001}" } } \ No newline at end of file diff --git a/examples/anon_messenger/_docker/default/_mounted_node2/priv.key b/examples/anon_messenger/_docker/default/_mounted_node2/priv.key new file mode 100644 index 000000000..94ca2c31f --- /dev/null +++ b/examples/anon_messenger/_docker/default/_mounted_node2/priv.key @@ -0,0 +1 @@ +PrivKey(go-peer/rsa){308209270201000282020100C17B6FA53983050B0339A0AB60D20A8A5FF5F8210564464C45CD2FAC2F266E8DDBA3B36C6F356AE57D1A71EED7B612C4CBC808557E4FCBAF6EDCFCECE37494144F09D65C7533109CE2F9B9B31D754453CA636A4463594F2C38303AE1B7BFFE738AC57805C782193B4854FF3F3FACA2C6BF9F75428DF6C583FBC29614C0B3329DF50F7B6399E1CC1F12BED77F29F885D7137ADFADE74A43451BB97A32F2301BE8EA866AFF34D6C7ED7FF1FAEA11FFB5B1034602B67E7918E42CA3D20E3E68AA700BE1B55A78C73A1D60D0A3DED3A6E5778C0BA68BAB9C345462131B9DC554D1A189066D649D7E167621815AB5B93905582BF19C28BCA6018E0CD205702968885E92A3B1E3DB37A25AC26FA4D2A47FF024ECD401F79FA353FEF2E4C2183C44D1D44B44938D32D8DBEDDAF5C87D042E4E9DAD671BE9C10DD8B3FE0A7C29AFE20843FE268C6A8F14949A04FF25A3EEE1EBE0027A99CE1C4DC561697297EA9FD9E23CF2E190B58CA385B66A235290A23CBB3856108EFFDD775601B3DE92C06C9EA2695C2D25D7897FD9D43C1AE10016E51C46C67F19AC84CD25F47DE2962A48030BCD8A0F14FFE4135A2893F62AC3E15CC61EC2E4ACADE0736C9A8DBC17D439248C42C5C0C6E08612414170FBE5AA6B52AE64E4CCDAE6FD3066BED5C200E07DBB0167D74A9FAD263AF253DFA870F44407F8EF3D9F12B8D910C4D803AD82ABA136F93F0203010001028202007497315BDB203CB5BA27CBCDF9F6182BF24F824A43B97D33110CE82155F84EBE65106C5A775935253D11E67E0AB6C8F095EBE039C477C941DA0888D126EF651C27D4C1BBCD540C3ABDFBC60F4D3D11037CFE13574A96D2C2CEC921724B0C030515269180CA0C77AFE592728D668D5D396ED7640DCB065D577F2A6ECDEAA1116B65F50261AEA5061FE367E4EBD81ACE6C206CF6C5108F0BA265668B608FD8B5B8D13A56D79ABBA296577735C03F405BF863049935E75889CB55AB12354B1E3F366DB2815A1755D68B457FF47F9E03005BDDA457A3EAB1A2470722848DBA0FB69324C31EC076B73849CF3EE7AE8202FE5977818C9C6FB18956541B6AF37FC0620BAD4A401FEBADEB782F85597BD4E8110E948DB2FA6D1BA6D9B3C76226EDB97578B0FAA480D8ED07CBD93FBEFA1CB499F6841DF85EE5A8EFFCAAD5193772930E164BCB254E63324E7DD545C629CB25358162A990DB55397510E0E7BBFF896E9673B9286F1ED353E3580D925AC89268EC6DDE2912BE8CB9CEBFCD4212DD6863BE267AAAA646B215C45541F98D606ED20964AE23B017B85119C267F00A99A86D31CB0A32BD66A4F7D07044B03F9A45C4775A753EFB2CA2E238857F968AFF607476D2CBB07A560E649895502C55B8782E3E761A935C223EE0573005D93CE92DEE0D60F2DBED5B044CC40445F50F83539F90455BED7E94145A0C6AF9B95B47B355E1210282010100F9A85AA543F0D90CBE0ED7A879FE5186D2A14BE5C1C10EC7848557CA312EED8DCE148B1E74D73FAF3022876E8AE985192ED8E0E64556D6B6E20AB9C94F06FF67B465D5F6156156A990DB5E7FC56FB0A352A5E75FA76ABF62C346F70546F6D7AA0E4F8C3947ED2F83782509BD75E3EF1F8BD5F37B62C0677393A959AB503251A13D111B7DE46103C8DEF96744BA0F383EC45B7CE66556AEE1DFE79EECE1F6E301955FFBBE935FE2689989C0F476525DBD8498CB42CF32D3129B66B6B34EC2A33F5CB5ECEEAF6E59B30800AB80879DFBE7D50D3E3771B2345C669290EABE2C9A3734F87414CFD4DF21C0D1F00E3665CF311FEBCAB3A20153886BB83448AADA7A730282010100C665BED80AB3AB43D55BBD1B584C5278D4DC7FD32B4B9870D8F606AB63BC3BBF3330915E587B1C408704FC2D1FCB86433E24E06937785372BB7A8F655BADF073C7E3B5CBFBC870F0F94A0D9EB1FF133CBCD406A4DE63552AEC6F52F50671A095F47D6D87A2B039DBD120116BC26A7D1278EBE7FC46B2B572CBD904804EBE92A0B424D308C4E822B29E670C4C1FE95CBD917FF546434AAED98FC7F8EA0ACF49F571572CCBFEE772686EFF8F6AD45904A305A850D6C3ADE545B8F3A2966E428A59A92B9640B5ED1C0CFDF5DF9D00D5320852321FCCBF699F1A8D3408ED5ACCCB20C387DE5524D9680E3F5837E11496F65843B1B5965FCEB131AEE74C40E674D705028201000C9711E32DB6F2AB32D67AC7B34741034491FFCAD9678C0041CD9BACC5A83130AA88DCAF2F833F61ED528073F1AB6F1BE301EAED91E79C3262D9D99EAE4E9308BECF37E80E11F795DB89448DBAFE33F13894C7434AA5167BBB8F539BBF856940D931E7C767BA2D603AE9DB40E3B617F4065046D41D19C8DDCA3F8B17199740089A94C7472502437798CF09072D3EE13E4116C008BA6991AE306574DD4B53F104BE6CB5BC59A04741B124824791C3FB98381CA07B8109761D851ABBF1F4F1D9DBB32835879FEF37B4D09D80089E4E384AEBB29C459D853820C4C775697127BCAB360FA582FB2C280882B9D39A53E1F47DECB72E64BAB1C86DA3C90951F4D3C9C3028201001688F008720EBE615216BD8021A369AAB7E2E3D20494ED97C3CD0E2CE1833BF617C6687CA2E838E94B6CD187FE988B838FC77885FAFAFBDF8853FF7DAFD02E03B8ACB0B59EBFC1B45D5C7FF78A9842831F9FA5B18C611407701BA4FC97E2C82EC03A8EFA5D0C4F461C96DBE3B58D8AEF5234D980DA36EA4D43C23EB4A43D19428FB3AF14CBE8E2280FBDFCB398DC54E0636A795DA5BF11E53C63A66E4F14047E90852A5D7172B09814238B12C353E926EB3997150DDCEEB1E0B42BBF927E946062CAC4A24D07C5ABE41CCD6D73EEC364169202F2AABB408B2F86BD8CD84772BB21FA88D27B0106C4B78539B3A337127C2C143F5FF939ECFE8BB35201FD2B4051028201007013EF7A989CF3DAF73407F23F75DD141AE5AB841D2A31BC1C632761B71F37EE0BE7690922130E4B29F5A92EF3CFD9184275B015BF95F885720AE117C5C8960BAC8E7E9FEB19B3007970E5CDE0F935C75F90D887AE15A820F104CBBA2ABC37697C2952B5D25A91CAA27E5C04DB6D74B5C8B012093A927E96E7315EB2C2E882300171AF0E725DB4088F7B2AC2A36DE6FE7B73413BB40989B21BEED9662EEF9477B938B4020A01169E7F70D8050F9D751A7530E2A44A47F69FAB1FDD7F3F78EC1C22236B49C3B68100712B53C97DB8DB67A4D8B9309D69773BE761CFFAB42DEE9C55E55573AE40AC6A4926A28119BD1C069869250297938875850E4F471CDD2DC7} \ No newline at end of file diff --git a/examples/anon_messenger/_docker/default/_mounted_node2/pub.key b/examples/anon_messenger/_docker/default/_mounted_node2/pub.key new file mode 100644 index 000000000..bc4fa2e93 --- /dev/null +++ b/examples/anon_messenger/_docker/default/_mounted_node2/pub.key @@ -0,0 +1 @@ +PubKey(go-peer/rsa){3082020A0282020100C17B6FA53983050B0339A0AB60D20A8A5FF5F8210564464C45CD2FAC2F266E8DDBA3B36C6F356AE57D1A71EED7B612C4CBC808557E4FCBAF6EDCFCECE37494144F09D65C7533109CE2F9B9B31D754453CA636A4463594F2C38303AE1B7BFFE738AC57805C782193B4854FF3F3FACA2C6BF9F75428DF6C583FBC29614C0B3329DF50F7B6399E1CC1F12BED77F29F885D7137ADFADE74A43451BB97A32F2301BE8EA866AFF34D6C7ED7FF1FAEA11FFB5B1034602B67E7918E42CA3D20E3E68AA700BE1B55A78C73A1D60D0A3DED3A6E5778C0BA68BAB9C345462131B9DC554D1A189066D649D7E167621815AB5B93905582BF19C28BCA6018E0CD205702968885E92A3B1E3DB37A25AC26FA4D2A47FF024ECD401F79FA353FEF2E4C2183C44D1D44B44938D32D8DBEDDAF5C87D042E4E9DAD671BE9C10DD8B3FE0A7C29AFE20843FE268C6A8F14949A04FF25A3EEE1EBE0027A99CE1C4DC561697297EA9FD9E23CF2E190B58CA385B66A235290A23CBB3856108EFFDD775601B3DE92C06C9EA2695C2D25D7897FD9D43C1AE10016E51C46C67F19AC84CD25F47DE2962A48030BCD8A0F14FFE4135A2893F62AC3E15CC61EC2E4ACADE0736C9A8DBC17D439248C42C5C0C6E08612414170FBE5AA6B52AE64E4CCDAE6FD3066BED5C200E07DBB0167D74A9FAD263AF253DFA870F44407F8EF3D9F12B8D910C4D803AD82ABA136F93F0203010001} \ No newline at end of file diff --git a/examples/anon_messenger/_docker/default/docker-compose.yaml b/examples/anon_messenger/_docker/default/docker-compose.yaml index 27d400dc1..87381d075 100644 --- a/examples/anon_messenger/_docker/default/docker-compose.yaml +++ b/examples/anon_messenger/_docker/default/docker-compose.yaml @@ -18,6 +18,8 @@ services: SERVICE_PATH: /mounted volumes: - ./_mounted_node1:/mounted + ports: + - "8572:8572" networks: - hidden-lake messenger-node1: @@ -29,7 +31,7 @@ services: volumes: - ./_mounted_node1:/mounted ports: - - "8080:9592" + - "8080:8080" networks: - hidden-lake service-node2: @@ -40,6 +42,8 @@ services: SERVICE_PATH: /mounted volumes: - ./_mounted_node2:/mounted + ports: + - "7572:7572" networks: - hidden-lake messenger-node2: @@ -51,7 +55,7 @@ services: volumes: - ./_mounted_node2:/mounted ports: - - "7070:9592" + - "7070:7070" networks: - hidden-lake networks: diff --git a/examples/anon_messenger/_request/request.sh b/examples/anon_messenger/_request/request.sh index c2e942efc..06f1f50ce 100755 --- a/examples/anon_messenger/_request/request.sh +++ b/examples/anon_messenger/_request/request.sh @@ -1,7 +1,6 @@ #!/bin/bash -## Works only if users are logged in to the account! -## node2[localhost:7070] -> node1[localhost:8080] +## node2[localhost:7070](Bob) -> node1[localhost:8080](Alice) randVal=$((RANDOM % 2)) if [ "$randVal" -eq "0" ]; then diff --git a/examples/anon_messenger/default/.gitignore b/examples/anon_messenger/default/.gitignore index a83de8b7a..9f8368efd 100644 --- a/examples/anon_messenger/default/.gitignore +++ b/examples/anon_messenger/default/.gitignore @@ -3,6 +3,4 @@ hls hlm hlt !*.cfg -!*.stg -hlm.stg hls.cfg diff --git a/examples/anon_messenger/default/middle_hlt/hlt.cfg b/examples/anon_messenger/default/middle_hlt/hlt.cfg index bd00293fc..e46aafa9d 100644 --- a/examples/anon_messenger/default/middle_hlt/hlt.cfg +++ b/examples/anon_messenger/default/middle_hlt/hlt.cfg @@ -8,8 +8,7 @@ }, "logging": ["info", "warn", "erro"], "address": { - "tcp": "localhost:9581", - "http": "localhost:9582", - "pprof": "localhost:9583" + "tcp": "localhost:6581", + "http": "localhost:6582" } } \ No newline at end of file diff --git a/examples/anon_messenger/default/node1_hlm/Makefile b/examples/anon_messenger/default/node1_hlm/Makefile index ee843b81e..679d2e2cc 100644 --- a/examples/anon_messenger/default/node1_hlm/Makefile +++ b/examples/anon_messenger/default/node1_hlm/Makefile @@ -3,12 +3,11 @@ GC=go build default: clean build run build: cp hls_copy.cfg hls.cfg - cp hlm_copy.stg hlm.stg run: ./prog_hls1 & ./prog_hlm1 & clean: pkill -15 prog_hlm1 || true pkill -15 prog_hls1 || true - rm -rf prog_hls1 hls.db hls.cfg hlm.stg + rm -rf prog_hls1 hls.db hls.cfg rm -rf prog_hlm1 hlm.db diff --git a/examples/anon_messenger/default/node1_hlm/hlm.cfg b/examples/anon_messenger/default/node1_hlm/hlm.cfg index 736667455..d6b6de4ba 100644 --- a/examples/anon_messenger/default/node1_hlm/hlm.cfg +++ b/examples/anon_messenger/default/node1_hlm/hlm.cfg @@ -10,11 +10,10 @@ "storage_key": "_", "address": { "interface": "localhost:8080", - "incoming": "localhost:8081", - "pprof": "localhost:8082" + "incoming": "localhost:8081" }, "connection": "localhost:8572", "backup_connections": [ - "127.0.0.1:9582" + "127.0.0.1:6582" ] } \ No newline at end of file diff --git a/examples/anon_messenger/default/node1_hlm/hlm_copy.stg b/examples/anon_messenger/default/node1_hlm/hlm_copy.stg deleted file mode 100644 index fb49380f57d53bd869a0bcc1bed069c75c5b1775..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8061 zcmV-@AA;ai{|XZgy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lm/hls_copy.cfg index 062ea9165..35e8ffaac 100644 --- a/examples/anon_messenger/default/node2_hlm/hls_copy.cfg +++ b/examples/anon_messenger/default/node2_hlm/hls_copy.cfg @@ -14,6 +14,9 @@ "go-peer/hidden-lake-messenger": "localhost:7071" }, "connections": [ - "127.0.0.1:9581" - ] + "127.0.0.1:6581" + ], + "friends": { + "Alice": "PubKey(go-peer/rsa){3082020A0282020100B752D35E81F4AEEC1A9C42EDED16E8924DD4D359663611DE2DCCE1A9611704A697B26254DD2AFA974A61A2CF94FAD016450FEF22F218CA970BFE41E6340CE3ABCBEE123E35A9DCDA6D23738DAC46AF8AC57902DDE7F41A03EB00A4818137E1BF4DFAE1EEDF8BB9E4363C15FD1C2278D86F2535BC3F395BE9A6CD690A5C852E6C35D6184BE7B9062AEE2AFC1A5AC81E7D21B7252A56C62BB5AC0BBAD36C7A4907C868704985E1754BAA3E8315E775A51B7BDC7ACB0D0675D29513D78CB05AB6119D3CA0A810A41F78150E3C5D9ACAFBE1533FC3533DECEC14387BF7478F6E229EB4CC312DC22436F4DB0D4CC308FB6EEA612F2F9E00239DE7902DE15889EE71370147C9696A5E7B022947ABB8AFBBC64F7840BED4CE69592CAF4085A1074475E365ED015048C89AE717BC259C42510F15F31DA3F9302EAD8F263B43D14886B2335A245C00871C041CBB683F1F047573F789673F9B11B6E6714C2A3360244757BB220C7952C6D3D9D65AA47511A63E2A59706B7A70846C930DCFB3D8CAFB3BD6F687CACF5A708692C26B363C80C460F54E59912D41D9BB359698051ABC049A0D0CFD7F23DC97DA940B1EDEAC6B84B194C8F8A56A46CE69EE7A0AEAA11C99508A368E64D27756AD0BA7146A6ADA3D5FA237B3B4EDDC84B71C27DE3A9F26A42197791C7DC09E2D7C4A7D8FCDC8F9A5D4983BB278FCE9513B1486D18F8560C3F31CC70203010001}" + } } \ No newline at end of file diff --git a/examples/anon_messenger/default/node2_hlm/priv.key b/examples/anon_messenger/default/node2_hlm/priv.key new file mode 100644 index 000000000..94ca2c31f --- /dev/null +++ b/examples/anon_messenger/default/node2_hlm/priv.key @@ -0,0 +1 @@ +PrivKey(go-peer/rsa){308209270201000282020100C17B6FA53983050B0339A0AB60D20A8A5FF5F8210564464C45CD2FAC2F266E8DDBA3B36C6F356AE57D1A71EED7B612C4CBC808557E4FCBAF6EDCFCECE37494144F09D65C7533109CE2F9B9B31D754453CA636A4463594F2C38303AE1B7BFFE738AC57805C782193B4854FF3F3FACA2C6BF9F75428DF6C583FBC29614C0B3329DF50F7B6399E1CC1F12BED77F29F885D7137ADFADE74A43451BB97A32F2301BE8EA866AFF34D6C7ED7FF1FAEA11FFB5B1034602B67E7918E42CA3D20E3E68AA700BE1B55A78C73A1D60D0A3DED3A6E5778C0BA68BAB9C345462131B9DC554D1A189066D649D7E167621815AB5B93905582BF19C28BCA6018E0CD205702968885E92A3B1E3DB37A25AC26FA4D2A47FF024ECD401F79FA353FEF2E4C2183C44D1D44B44938D32D8DBEDDAF5C87D042E4E9DAD671BE9C10DD8B3FE0A7C29AFE20843FE268C6A8F14949A04FF25A3EEE1EBE0027A99CE1C4DC561697297EA9FD9E23CF2E190B58CA385B66A235290A23CBB3856108EFFDD775601B3DE92C06C9EA2695C2D25D7897FD9D43C1AE10016E51C46C67F19AC84CD25F47DE2962A48030BCD8A0F14FFE4135A2893F62AC3E15CC61EC2E4ACADE0736C9A8DBC17D439248C42C5C0C6E08612414170FBE5AA6B52AE64E4CCDAE6FD3066BED5C200E07DBB0167D74A9FAD263AF253DFA870F44407F8EF3D9F12B8D910C4D803AD82ABA136F93F0203010001028202007497315BDB203CB5BA27CBCDF9F6182BF24F824A43B97D33110CE82155F84EBE65106C5A775935253D11E67E0AB6C8F095EBE039C477C941DA0888D126EF651C27D4C1BBCD540C3ABDFBC60F4D3D11037CFE13574A96D2C2CEC921724B0C030515269180CA0C77AFE592728D668D5D396ED7640DCB065D577F2A6ECDEAA1116B65F50261AEA5061FE367E4EBD81ACE6C206CF6C5108F0BA265668B608FD8B5B8D13A56D79ABBA296577735C03F405BF863049935E75889CB55AB12354B1E3F366DB2815A1755D68B457FF47F9E03005BDDA457A3EAB1A2470722848DBA0FB69324C31EC076B73849CF3EE7AE8202FE5977818C9C6FB18956541B6AF37FC0620BAD4A401FEBADEB782F85597BD4E8110E948DB2FA6D1BA6D9B3C76226EDB97578B0FAA480D8ED07CBD93FBEFA1CB499F6841DF85EE5A8EFFCAAD5193772930E164BCB254E63324E7DD545C629CB25358162A990DB55397510E0E7BBFF896E9673B9286F1ED353E3580D925AC89268EC6DDE2912BE8CB9CEBFCD4212DD6863BE267AAAA646B215C45541F98D606ED20964AE23B017B85119C267F00A99A86D31CB0A32BD66A4F7D07044B03F9A45C4775A753EFB2CA2E238857F968AFF607476D2CBB07A560E649895502C55B8782E3E761A935C223EE0573005D93CE92DEE0D60F2DBED5B044CC40445F50F83539F90455BED7E94145A0C6AF9B95B47B355E1210282010100F9A85AA543F0D90CBE0ED7A879FE5186D2A14BE5C1C10EC7848557CA312EED8DCE148B1E74D73FAF3022876E8AE985192ED8E0E64556D6B6E20AB9C94F06FF67B465D5F6156156A990DB5E7FC56FB0A352A5E75FA76ABF62C346F70546F6D7AA0E4F8C3947ED2F83782509BD75E3EF1F8BD5F37B62C0677393A959AB503251A13D111B7DE46103C8DEF96744BA0F383EC45B7CE66556AEE1DFE79EECE1F6E301955FFBBE935FE2689989C0F476525DBD8498CB42CF32D3129B66B6B34EC2A33F5CB5ECEEAF6E59B30800AB80879DFBE7D50D3E3771B2345C669290EABE2C9A3734F87414CFD4DF21C0D1F00E3665CF311FEBCAB3A20153886BB83448AADA7A730282010100C665BED80AB3AB43D55BBD1B584C5278D4DC7FD32B4B9870D8F606AB63BC3BBF3330915E587B1C408704FC2D1FCB86433E24E06937785372BB7A8F655BADF073C7E3B5CBFBC870F0F94A0D9EB1FF133CBCD406A4DE63552AEC6F52F50671A095F47D6D87A2B039DBD120116BC26A7D1278EBE7FC46B2B572CBD904804EBE92A0B424D308C4E822B29E670C4C1FE95CBD917FF546434AAED98FC7F8EA0ACF49F571572CCBFEE772686EFF8F6AD45904A305A850D6C3ADE545B8F3A2966E428A59A92B9640B5ED1C0CFDF5DF9D00D5320852321FCCBF699F1A8D3408ED5ACCCB20C387DE5524D9680E3F5837E11496F65843B1B5965FCEB131AEE74C40E674D705028201000C9711E32DB6F2AB32D67AC7B34741034491FFCAD9678C0041CD9BACC5A83130AA88DCAF2F833F61ED528073F1AB6F1BE301EAED91E79C3262D9D99EAE4E9308BECF37E80E11F795DB89448DBAFE33F13894C7434AA5167BBB8F539BBF856940D931E7C767BA2D603AE9DB40E3B617F4065046D41D19C8DDCA3F8B17199740089A94C7472502437798CF09072D3EE13E4116C008BA6991AE306574DD4B53F104BE6CB5BC59A04741B124824791C3FB98381CA07B8109761D851ABBF1F4F1D9DBB32835879FEF37B4D09D80089E4E384AEBB29C459D853820C4C775697127BCAB360FA582FB2C280882B9D39A53E1F47DECB72E64BAB1C86DA3C90951F4D3C9C3028201001688F008720EBE615216BD8021A369AAB7E2E3D20494ED97C3CD0E2CE1833BF617C6687CA2E838E94B6CD187FE988B838FC77885FAFAFBDF8853FF7DAFD02E03B8ACB0B59EBFC1B45D5C7FF78A9842831F9FA5B18C611407701BA4FC97E2C82EC03A8EFA5D0C4F461C96DBE3B58D8AEF5234D980DA36EA4D43C23EB4A43D19428FB3AF14CBE8E2280FBDFCB398DC54E0636A795DA5BF11E53C63A66E4F14047E90852A5D7172B09814238B12C353E926EB3997150DDCEEB1E0B42BBF927E946062CAC4A24D07C5ABE41CCD6D73EEC364169202F2AABB408B2F86BD8CD84772BB21FA88D27B0106C4B78539B3A337127C2C143F5FF939ECFE8BB35201FD2B4051028201007013EF7A989CF3DAF73407F23F75DD141AE5AB841D2A31BC1C632761B71F37EE0BE7690922130E4B29F5A92EF3CFD9184275B015BF95F885720AE117C5C8960BAC8E7E9FEB19B3007970E5CDE0F935C75F90D887AE15A820F104CBBA2ABC37697C2952B5D25A91CAA27E5C04DB6D74B5C8B012093A927E96E7315EB2C2E882300171AF0E725DB4088F7B2AC2A36DE6FE7B73413BB40989B21BEED9662EEF9477B938B4020A01169E7F70D8050F9D751A7530E2A44A47F69FAB1FDD7F3F78EC1C22236B49C3B68100712B53C97DB8DB67A4D8B9309D69773BE761CFFAB42DEE9C55E55573AE40AC6A4926A28119BD1C069869250297938875850E4F471CDD2DC7} \ No newline at end of file diff --git a/examples/anon_messenger/default/node2_hlm/pub.key b/examples/anon_messenger/default/node2_hlm/pub.key new file mode 100644 index 000000000..bc4fa2e93 --- /dev/null +++ b/examples/anon_messenger/default/node2_hlm/pub.key @@ -0,0 +1 @@ +PubKey(go-peer/rsa){3082020A0282020100C17B6FA53983050B0339A0AB60D20A8A5FF5F8210564464C45CD2FAC2F266E8DDBA3B36C6F356AE57D1A71EED7B612C4CBC808557E4FCBAF6EDCFCECE37494144F09D65C7533109CE2F9B9B31D754453CA636A4463594F2C38303AE1B7BFFE738AC57805C782193B4854FF3F3FACA2C6BF9F75428DF6C583FBC29614C0B3329DF50F7B6399E1CC1F12BED77F29F885D7137ADFADE74A43451BB97A32F2301BE8EA866AFF34D6C7ED7FF1FAEA11FFB5B1034602B67E7918E42CA3D20E3E68AA700BE1B55A78C73A1D60D0A3DED3A6E5778C0BA68BAB9C345462131B9DC554D1A189066D649D7E167621815AB5B93905582BF19C28BCA6018E0CD205702968885E92A3B1E3DB37A25AC26FA4D2A47FF024ECD401F79FA353FEF2E4C2183C44D1D44B44938D32D8DBEDDAF5C87D042E4E9DAD671BE9C10DD8B3FE0A7C29AFE20843FE268C6A8F14949A04FF25A3EEE1EBE0027A99CE1C4DC561697297EA9FD9E23CF2E190B58CA385B66A235290A23CBB3856108EFFDD775601B3DE92C06C9EA2695C2D25D7897FD9D43C1AE10016E51C46C67F19AC84CD25F47DE2962A48030BCD8A0F14FFE4135A2893F62AC3E15CC61EC2E4ACADE0736C9A8DBC17D439248C42C5C0C6E08612414170FBE5AA6B52AE64E4CCDAE6FD3066BED5C200E07DBB0167D74A9FAD263AF253DFA870F44407F8EF3D9F12B8D910C4D803AD82ABA136F93F0203010001} \ No newline at end of file diff --git a/examples/anon_messenger/prod_test/.gitignore b/examples/anon_messenger/prod_test/.gitignore index 3b786da57..10dfdc4f5 100644 --- a/examples/anon_messenger/prod_test/.gitignore +++ b/examples/anon_messenger/prod_test/.gitignore @@ -2,6 +2,4 @@ prog_* hls hlm !*.cfg -!*.stg -hlm.stg hls.cfg diff --git a/examples/anon_messenger/prod_test/node1_hlm/Makefile b/examples/anon_messenger/prod_test/node1_hlm/Makefile index ee843b81e..679d2e2cc 100644 --- a/examples/anon_messenger/prod_test/node1_hlm/Makefile +++ b/examples/anon_messenger/prod_test/node1_hlm/Makefile @@ -3,12 +3,11 @@ GC=go build default: clean build run build: cp hls_copy.cfg hls.cfg - cp hlm_copy.stg hlm.stg run: ./prog_hls1 & ./prog_hlm1 & clean: pkill -15 prog_hlm1 || true pkill -15 prog_hls1 || true - rm -rf prog_hls1 hls.db hls.cfg hlm.stg + rm -rf prog_hls1 hls.db hls.cfg rm -rf prog_hlm1 hlm.db diff --git a/examples/anon_messenger/prod_test/node1_hlm/hlm_copy.stg b/examples/anon_messenger/prod_test/node1_hlm/hlm_copy.stg deleted file mode 100644 index fb49380f57d53bd869a0bcc1bed069c75c5b1775..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8061 zcmV-@AA;ai{|XZgyM5j{{$DKMv2W&liz;0R8+D3ZIlJm!mG@61Wo`gC!(}$tTljoN zI%HmGs*i%*l$E9J;i!%7x-6cD4qOLuD+EE?$lW9&`N}s$URb1?Q#za1V*v+Ov1w|; zYj}B{)I7u6-WNr~V!jUB1mT?BR19}nV~m!WA^#}9%0&~Z_5;^nL%nHG&_H#}WBA%O z?Y7=TCrRfvZRIW>!|<%~^?R_K8}KNOZSMEp)&WD5?=01)e}xQioixWe{tI^=fOT^W zwgJa{!>Q<$D9OfOiAFc0#gN?t;nNpJDpZ=`m|Xd%mJZAHGtpR~8Br%PrLu%}Eg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J^7PHaiR~Y*01anv+r&no*}8d z!Hp$4eg)WPnk+H`(Tayw7CZ*|@OZuXiZxg<>x`9G=hO%V#aMR;FO5vdmJQYCEVTF( z*RJw9m?#pA`50_KiCMlP*vEe(^ixgvT1~SEma`c(T^(nUEEOC34ZRlattGbf;F1o>s_ z*yVgp#4S9`ut00;jF~^ROl!HH$?YdcRJrIchwshOF4+{kUNtMv1$f!k2FN=hSIeEu zpD>5`;ps=D$X+pd+K>NTlDS=UaUtWk{fAd*$o~(J=XooK*x;ySuYT{mGzJa{q#YOU zE=X}Q-y6Gt-}Af$Lt9CRT#uX5gq5+}*{SeEhR$C^U8RUWDDD5Bi0_~O5>H@L67Sv& z!mak9K9)O+OtPj3sSqPOR0{XpNkCwht29)E-+&7ZhhtQQEZ&jR%*aM?4qEBk*>U;&`BsdN+;*-uOw8 z-zjR4{zgJm8rf6NV{&M80ry-?EMkvbV2@C|gFz))HM@%!lX>Or^3TV~J3JCVRR0Z` zq-t#Uf8RUZjp(JD(j3>#fix2goz>-M9;CBnf@9ueYV^1?#2bEoNW4*bgGj*kz~j2L=g)V4Xp!m9 zA2puZVcmCkGy2B6pV^_MwI98``2cJ|o5lFs@srE&&4C&I5*QF@GKq>%@W_Mk8pLe1 PvA>S;PbyzrfP3mgiP*6} diff --git a/examples/anon_messenger/prod_test/node2_hlm/hls_copy.cfg b/examples/anon_messenger/prod_test/node2_hlm/hls_copy.cfg index ec240f573..60da19c21 100644 --- a/examples/anon_messenger/prod_test/node2_hlm/hls_copy.cfg +++ b/examples/anon_messenger/prod_test/node2_hlm/hls_copy.cfg @@ -16,5 +16,8 @@ }, "connections": [ "195.133.1.126:9581" - ] + ], + "friends": { + "Alice": "PubKey(go-peer/rsa){3082020A0282020100B752D35E81F4AEEC1A9C42EDED16E8924DD4D359663611DE2DCCE1A9611704A697B26254DD2AFA974A61A2CF94FAD016450FEF22F218CA970BFE41E6340CE3ABCBEE123E35A9DCDA6D23738DAC46AF8AC57902DDE7F41A03EB00A4818137E1BF4DFAE1EEDF8BB9E4363C15FD1C2278D86F2535BC3F395BE9A6CD690A5C852E6C35D6184BE7B9062AEE2AFC1A5AC81E7D21B7252A56C62BB5AC0BBAD36C7A4907C868704985E1754BAA3E8315E775A51B7BDC7ACB0D0675D29513D78CB05AB6119D3CA0A810A41F78150E3C5D9ACAFBE1533FC3533DECEC14387BF7478F6E229EB4CC312DC22436F4DB0D4CC308FB6EEA612F2F9E00239DE7902DE15889EE71370147C9696A5E7B022947ABB8AFBBC64F7840BED4CE69592CAF4085A1074475E365ED015048C89AE717BC259C42510F15F31DA3F9302EAD8F263B43D14886B2335A245C00871C041CBB683F1F047573F789673F9B11B6E6714C2A3360244757BB220C7952C6D3D9D65AA47511A63E2A59706B7A70846C930DCFB3D8CAFB3BD6F687CACF5A708692C26B363C80C460F54E59912D41D9BB359698051ABC049A0D0CFD7F23DC97DA940B1EDEAC6B84B194C8F8A56A46CE69EE7A0AEAA11C99508A368E64D27756AD0BA7146A6ADA3D5FA237B3B4EDDC84B71C27DE3A9F26A42197791C7DC09E2D7C4A7D8FCDC8F9A5D4983BB278FCE9513B1486D18F8560C3F31CC70203010001}" + } } \ No newline at end of file diff --git a/examples/anon_messenger/prod_test/node2_hlm/priv.key b/examples/anon_messenger/prod_test/node2_hlm/priv.key new file mode 100644 index 000000000..94ca2c31f --- /dev/null +++ b/examples/anon_messenger/prod_test/node2_hlm/priv.key @@ -0,0 +1 @@ +PrivKey(go-peer/rsa){308209270201000282020100C17B6FA53983050B0339A0AB60D20A8A5FF5F8210564464C45CD2FAC2F266E8DDBA3B36C6F356AE57D1A71EED7B612C4CBC808557E4FCBAF6EDCFCECE37494144F09D65C7533109CE2F9B9B31D754453CA636A4463594F2C38303AE1B7BFFE738AC57805C782193B4854FF3F3FACA2C6BF9F75428DF6C583FBC29614C0B3329DF50F7B6399E1CC1F12BED77F29F885D7137ADFADE74A43451BB97A32F2301BE8EA866AFF34D6C7ED7FF1FAEA11FFB5B1034602B67E7918E42CA3D20E3E68AA700BE1B55A78C73A1D60D0A3DED3A6E5778C0BA68BAB9C345462131B9DC554D1A189066D649D7E167621815AB5B93905582BF19C28BCA6018E0CD205702968885E92A3B1E3DB37A25AC26FA4D2A47FF024ECD401F79FA353FEF2E4C2183C44D1D44B44938D32D8DBEDDAF5C87D042E4E9DAD671BE9C10DD8B3FE0A7C29AFE20843FE268C6A8F14949A04FF25A3EEE1EBE0027A99CE1C4DC561697297EA9FD9E23CF2E190B58CA385B66A235290A23CBB3856108EFFDD775601B3DE92C06C9EA2695C2D25D7897FD9D43C1AE10016E51C46C67F19AC84CD25F47DE2962A48030BCD8A0F14FFE4135A2893F62AC3E15CC61EC2E4ACADE0736C9A8DBC17D439248C42C5C0C6E08612414170FBE5AA6B52AE64E4CCDAE6FD3066BED5C200E07DBB0167D74A9FAD263AF253DFA870F44407F8EF3D9F12B8D910C4D803AD82ABA136F93F0203010001028202007497315BDB203CB5BA27CBCDF9F6182BF24F824A43B97D33110CE82155F84EBE65106C5A775935253D11E67E0AB6C8F095EBE039C477C941DA0888D126EF651C27D4C1BBCD540C3ABDFBC60F4D3D11037CFE13574A96D2C2CEC921724B0C030515269180CA0C77AFE592728D668D5D396ED7640DCB065D577F2A6ECDEAA1116B65F50261AEA5061FE367E4EBD81ACE6C206CF6C5108F0BA265668B608FD8B5B8D13A56D79ABBA296577735C03F405BF863049935E75889CB55AB12354B1E3F366DB2815A1755D68B457FF47F9E03005BDDA457A3EAB1A2470722848DBA0FB69324C31EC076B73849CF3EE7AE8202FE5977818C9C6FB18956541B6AF37FC0620BAD4A401FEBADEB782F85597BD4E8110E948DB2FA6D1BA6D9B3C76226EDB97578B0FAA480D8ED07CBD93FBEFA1CB499F6841DF85EE5A8EFFCAAD5193772930E164BCB254E63324E7DD545C629CB25358162A990DB55397510E0E7BBFF896E9673B9286F1ED353E3580D925AC89268EC6DDE2912BE8CB9CEBFCD4212DD6863BE267AAAA646B215C45541F98D606ED20964AE23B017B85119C267F00A99A86D31CB0A32BD66A4F7D07044B03F9A45C4775A753EFB2CA2E238857F968AFF607476D2CBB07A560E649895502C55B8782E3E761A935C223EE0573005D93CE92DEE0D60F2DBED5B044CC40445F50F83539F90455BED7E94145A0C6AF9B95B47B355E1210282010100F9A85AA543F0D90CBE0ED7A879FE5186D2A14BE5C1C10EC7848557CA312EED8DCE148B1E74D73FAF3022876E8AE985192ED8E0E64556D6B6E20AB9C94F06FF67B465D5F6156156A990DB5E7FC56FB0A352A5E75FA76ABF62C346F70546F6D7AA0E4F8C3947ED2F83782509BD75E3EF1F8BD5F37B62C0677393A959AB503251A13D111B7DE46103C8DEF96744BA0F383EC45B7CE66556AEE1DFE79EECE1F6E301955FFBBE935FE2689989C0F476525DBD8498CB42CF32D3129B66B6B34EC2A33F5CB5ECEEAF6E59B30800AB80879DFBE7D50D3E3771B2345C669290EABE2C9A3734F87414CFD4DF21C0D1F00E3665CF311FEBCAB3A20153886BB83448AADA7A730282010100C665BED80AB3AB43D55BBD1B584C5278D4DC7FD32B4B9870D8F606AB63BC3BBF3330915E587B1C408704FC2D1FCB86433E24E06937785372BB7A8F655BADF073C7E3B5CBFBC870F0F94A0D9EB1FF133CBCD406A4DE63552AEC6F52F50671A095F47D6D87A2B039DBD120116BC26A7D1278EBE7FC46B2B572CBD904804EBE92A0B424D308C4E822B29E670C4C1FE95CBD917FF546434AAED98FC7F8EA0ACF49F571572CCBFEE772686EFF8F6AD45904A305A850D6C3ADE545B8F3A2966E428A59A92B9640B5ED1C0CFDF5DF9D00D5320852321FCCBF699F1A8D3408ED5ACCCB20C387DE5524D9680E3F5837E11496F65843B1B5965FCEB131AEE74C40E674D705028201000C9711E32DB6F2AB32D67AC7B34741034491FFCAD9678C0041CD9BACC5A83130AA88DCAF2F833F61ED528073F1AB6F1BE301EAED91E79C3262D9D99EAE4E9308BECF37E80E11F795DB89448DBAFE33F13894C7434AA5167BBB8F539BBF856940D931E7C767BA2D603AE9DB40E3B617F4065046D41D19C8DDCA3F8B17199740089A94C7472502437798CF09072D3EE13E4116C008BA6991AE306574DD4B53F104BE6CB5BC59A04741B124824791C3FB98381CA07B8109761D851ABBF1F4F1D9DBB32835879FEF37B4D09D80089E4E384AEBB29C459D853820C4C775697127BCAB360FA582FB2C280882B9D39A53E1F47DECB72E64BAB1C86DA3C90951F4D3C9C3028201001688F008720EBE615216BD8021A369AAB7E2E3D20494ED97C3CD0E2CE1833BF617C6687CA2E838E94B6CD187FE988B838FC77885FAFAFBDF8853FF7DAFD02E03B8ACB0B59EBFC1B45D5C7FF78A9842831F9FA5B18C611407701BA4FC97E2C82EC03A8EFA5D0C4F461C96DBE3B58D8AEF5234D980DA36EA4D43C23EB4A43D19428FB3AF14CBE8E2280FBDFCB398DC54E0636A795DA5BF11E53C63A66E4F14047E90852A5D7172B09814238B12C353E926EB3997150DDCEEB1E0B42BBF927E946062CAC4A24D07C5ABE41CCD6D73EEC364169202F2AABB408B2F86BD8CD84772BB21FA88D27B0106C4B78539B3A337127C2C143F5FF939ECFE8BB35201FD2B4051028201007013EF7A989CF3DAF73407F23F75DD141AE5AB841D2A31BC1C632761B71F37EE0BE7690922130E4B29F5A92EF3CFD9184275B015BF95F885720AE117C5C8960BAC8E7E9FEB19B3007970E5CDE0F935C75F90D887AE15A820F104CBBA2ABC37697C2952B5D25A91CAA27E5C04DB6D74B5C8B012093A927E96E7315EB2C2E882300171AF0E725DB4088F7B2AC2A36DE6FE7B73413BB40989B21BEED9662EEF9477B938B4020A01169E7F70D8050F9D751A7530E2A44A47F69FAB1FDD7F3F78EC1C22236B49C3B68100712B53C97DB8DB67A4D8B9309D69773BE761CFFAB42DEE9C55E55573AE40AC6A4926A28119BD1C069869250297938875850E4F471CDD2DC7} \ No newline at end of file diff --git a/examples/anon_messenger/prod_test/node2_hlm/pub.key b/examples/anon_messenger/prod_test/node2_hlm/pub.key new file mode 100644 index 000000000..bc4fa2e93 --- /dev/null +++ b/examples/anon_messenger/prod_test/node2_hlm/pub.key @@ -0,0 +1 @@ +PubKey(go-peer/rsa){3082020A0282020100C17B6FA53983050B0339A0AB60D20A8A5FF5F8210564464C45CD2FAC2F266E8DDBA3B36C6F356AE57D1A71EED7B612C4CBC808557E4FCBAF6EDCFCECE37494144F09D65C7533109CE2F9B9B31D754453CA636A4463594F2C38303AE1B7BFFE738AC57805C782193B4854FF3F3FACA2C6BF9F75428DF6C583FBC29614C0B3329DF50F7B6399E1CC1F12BED77F29F885D7137ADFADE74A43451BB97A32F2301BE8EA866AFF34D6C7ED7FF1FAEA11FFB5B1034602B67E7918E42CA3D20E3E68AA700BE1B55A78C73A1D60D0A3DED3A6E5778C0BA68BAB9C345462131B9DC554D1A189066D649D7E167621815AB5B93905582BF19C28BCA6018E0CD205702968885E92A3B1E3DB37A25AC26FA4D2A47FF024ECD401F79FA353FEF2E4C2183C44D1D44B44938D32D8DBEDDAF5C87D042E4E9DAD671BE9C10DD8B3FE0A7C29AFE20843FE268C6A8F14949A04FF25A3EEE1EBE0027A99CE1C4DC561697297EA9FD9E23CF2E190B58CA385B66A235290A23CBB3856108EFFDD775601B3DE92C06C9EA2695C2D25D7897FD9D43C1AE10016E51C46C67F19AC84CD25F47DE2962A48030BCD8A0F14FFE4135A2893F62AC3E15CC61EC2E4ACADE0736C9A8DBC17D439248C42C5C0C6E08612414170FBE5AA6B52AE64E4CCDAE6FD3066BED5C200E07DBB0167D74A9FAD263AF253DFA870F44407F8EF3D9F12B8D910C4D803AD82ABA136F93F0203010001} \ No newline at end of file diff --git a/examples/anon_messenger/secret_channel/.gitignore b/examples/anon_messenger/secret_channel/.gitignore index 6fe526aa9..01bf4574a 100644 --- a/examples/anon_messenger/secret_channel/.gitignore +++ b/examples/anon_messenger/secret_channel/.gitignore @@ -4,6 +4,4 @@ hlm hlt web/ !*.cfg -!*.stg -hlm.stg hls.cfg diff --git a/examples/anon_messenger/secret_channel/node1_hlm/Makefile b/examples/anon_messenger/secret_channel/node1_hlm/Makefile index 0343b0187..2665362ab 100644 --- a/examples/anon_messenger/secret_channel/node1_hlm/Makefile +++ b/examples/anon_messenger/secret_channel/node1_hlm/Makefile @@ -3,7 +3,6 @@ GC=go build default: clean run run: cp hls_copy.cfg hls.cfg - cp hlm_copy.stg hlm.stg ./prog_hls1 & ./prog_hlt1 & ./prog_hlm1 & @@ -15,7 +14,7 @@ clean: pkill -15 prog_hlt1 || true pkill -15 prog_send1 || true pkill -15 prog_recv1 || true - rm -rf prog_hls1 hls.db hls.cfg hlm.stg + rm -rf prog_hls1 hls.db hls.cfg rm -rf prog_hlt1 hlt.db rm -rf prog_hlm1 hlm.db rm -rf prog_send1 diff --git a/examples/anon_messenger/secret_channel/node1_hlm/hlm_copy.stg b/examples/anon_messenger/secret_channel/node1_hlm/hlm_copy.stg deleted file mode 100644 index fb49380f57d53bd869a0bcc1bed069c75c5b1775..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8061 zcmV-@AA;ai{|XZgyM5j{{$DKMv2W&liz;0R8+D3ZIlJm!mG@61Wo`gC!(}$tTljoN zI%HmGs*i%*l$E9J;i!%7x-6cD4qOLuD+EE?$lW9&`N}s$URb1?Q#za1V*v+Ov1w|; zYj}B{)I7u6-WNr~V!jUB1mT?BR19}nV~m!WA^#}9%0&~Z_5;^nL%nHG&_H#}WBA%O z?Y7=TCrRfvZRIW>!|<%~^?R_K8}KNOZSMEp)&WD5?=01)e}xQioixWe{tI^=fOT^W zwgJa{!>Q<$D9OfOiAFc0#gN?t;nNpJDpZ=`m|Xd%mJZAHGtpR~8Br%PrLu%}Eg*me zLz5VfUecp|!x`7>pyib*`r-?vzlWQ*lEZlye19*4#Q)cLqqk6iE-(hDOQdpqH^|OVfuW$-}v+>R8aVj(rcBboOMYoKs zy6DMeZ*}vHWUT3jNE5QE%8OC)Dvje>xnCgAPK021MqU4hfd2@nl_26ROTQ3q>xf37 zMgl;PKJer}dy}g^yw#DR*WC-UL4i#MuImpwacCEvejOQTL&tX)1Lnl?3)* zFH(Y6-V~vHg}F%BGkPbhwKu5eDzQ=$Ku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Wk{fAd*$o~(J=XooK*x;ySuYT{mGzJa{q#YOU zE=X}Q-y6Gt-}Af$Lt9CRT#uX5gq5+}*{SeEhR$C^U8RUWDDD5Bi0_~O5>H@L67Sv& z!mak9K9)O+OtPj3sSqPOR0{XpNkCwht29)E-+&7ZhhtQQEZ&jR%*aM?4qEBk*>U;&`BsdN+;*-uOw8 z-zjR4{zgJm8rf6NV{&M80ry-?EMkvbV2@C|gFz))HM@%!lX>Or^3TV~J3JCVRR0Z` zq-t#Uf8RUZjp(JD(j3>#fix2goz>-M9;CBnf@9ueYV^1?#2bEoNW4*bgGj*kz~j2L=g)V4Xp!m9 zA2puZVcmCkGy2B6pV^_MwI98``2cJ|o5lFs@srE&&4C&I5*QF@GKq>%@W_Mk8pLe1 PvA>S;PbyzrfP3mgiP*6} diff --git a/examples/anon_messenger/secret_channel/node2_hlm/hls_copy.cfg b/examples/anon_messenger/secret_channel/node2_hlm/hls_copy.cfg index 192373ab6..0b6b33e61 100644 --- a/examples/anon_messenger/secret_channel/node2_hlm/hls_copy.cfg +++ b/examples/anon_messenger/secret_channel/node2_hlm/hls_copy.cfg @@ -12,5 +12,8 @@ }, "services": { "go-peer/hidden-lake-messenger": "localhost:7071" + }, + "friends": { + "Alice": "PubKey(go-peer/rsa){3082020A0282020100B752D35E81F4AEEC1A9C42EDED16E8924DD4D359663611DE2DCCE1A9611704A697B26254DD2AFA974A61A2CF94FAD016450FEF22F218CA970BFE41E6340CE3ABCBEE123E35A9DCDA6D23738DAC46AF8AC57902DDE7F41A03EB00A4818137E1BF4DFAE1EEDF8BB9E4363C15FD1C2278D86F2535BC3F395BE9A6CD690A5C852E6C35D6184BE7B9062AEE2AFC1A5AC81E7D21B7252A56C62BB5AC0BBAD36C7A4907C868704985E1754BAA3E8315E775A51B7BDC7ACB0D0675D29513D78CB05AB6119D3CA0A810A41F78150E3C5D9ACAFBE1533FC3533DECEC14387BF7478F6E229EB4CC312DC22436F4DB0D4CC308FB6EEA612F2F9E00239DE7902DE15889EE71370147C9696A5E7B022947ABB8AFBBC64F7840BED4CE69592CAF4085A1074475E365ED015048C89AE717BC259C42510F15F31DA3F9302EAD8F263B43D14886B2335A245C00871C041CBB683F1F047573F789673F9B11B6E6714C2A3360244757BB220C7952C6D3D9D65AA47511A63E2A59706B7A70846C930DCFB3D8CAFB3BD6F687CACF5A708692C26B363C80C460F54E59912D41D9BB359698051ABC049A0D0CFD7F23DC97DA940B1EDEAC6B84B194C8F8A56A46CE69EE7A0AEAA11C99508A368E64D27756AD0BA7146A6ADA3D5FA237B3B4EDDC84B71C27DE3A9F26A42197791C7DC09E2D7C4A7D8FCDC8F9A5D4983BB278FCE9513B1486D18F8560C3F31CC70203010001}" } } \ No newline at end of file diff --git a/examples/anon_messenger/secret_channel/node2_hlm/priv.key b/examples/anon_messenger/secret_channel/node2_hlm/priv.key new file mode 100644 index 000000000..94ca2c31f --- /dev/null +++ b/examples/anon_messenger/secret_channel/node2_hlm/priv.key @@ -0,0 +1 @@ +PrivKey(go-peer/rsa){308209270201000282020100C17B6FA53983050B0339A0AB60D20A8A5FF5F8210564464C45CD2FAC2F266E8DDBA3B36C6F356AE57D1A71EED7B612C4CBC808557E4FCBAF6EDCFCECE37494144F09D65C7533109CE2F9B9B31D754453CA636A4463594F2C38303AE1B7BFFE738AC57805C782193B4854FF3F3FACA2C6BF9F75428DF6C583FBC29614C0B3329DF50F7B6399E1CC1F12BED77F29F885D7137ADFADE74A43451BB97A32F2301BE8EA866AFF34D6C7ED7FF1FAEA11FFB5B1034602B67E7918E42CA3D20E3E68AA700BE1B55A78C73A1D60D0A3DED3A6E5778C0BA68BAB9C345462131B9DC554D1A189066D649D7E167621815AB5B93905582BF19C28BCA6018E0CD205702968885E92A3B1E3DB37A25AC26FA4D2A47FF024ECD401F79FA353FEF2E4C2183C44D1D44B44938D32D8DBEDDAF5C87D042E4E9DAD671BE9C10DD8B3FE0A7C29AFE20843FE268C6A8F14949A04FF25A3EEE1EBE0027A99CE1C4DC561697297EA9FD9E23CF2E190B58CA385B66A235290A23CBB3856108EFFDD775601B3DE92C06C9EA2695C2D25D7897FD9D43C1AE10016E51C46C67F19AC84CD25F47DE2962A48030BCD8A0F14FFE4135A2893F62AC3E15CC61EC2E4ACADE0736C9A8DBC17D439248C42C5C0C6E08612414170FBE5AA6B52AE64E4CCDAE6FD3066BED5C200E07DBB0167D74A9FAD263AF253DFA870F44407F8EF3D9F12B8D910C4D803AD82ABA136F93F0203010001028202007497315BDB203CB5BA27CBCDF9F6182BF24F824A43B97D33110CE82155F84EBE65106C5A775935253D11E67E0AB6C8F095EBE039C477C941DA0888D126EF651C27D4C1BBCD540C3ABDFBC60F4D3D11037CFE13574A96D2C2CEC921724B0C030515269180CA0C77AFE592728D668D5D396ED7640DCB065D577F2A6ECDEAA1116B65F50261AEA5061FE367E4EBD81ACE6C206CF6C5108F0BA265668B608FD8B5B8D13A56D79ABBA296577735C03F405BF863049935E75889CB55AB12354B1E3F366DB2815A1755D68B457FF47F9E03005BDDA457A3EAB1A2470722848DBA0FB69324C31EC076B73849CF3EE7AE8202FE5977818C9C6FB18956541B6AF37FC0620BAD4A401FEBADEB782F85597BD4E8110E948DB2FA6D1BA6D9B3C76226EDB97578B0FAA480D8ED07CBD93FBEFA1CB499F6841DF85EE5A8EFFCAAD5193772930E164BCB254E63324E7DD545C629CB25358162A990DB55397510E0E7BBFF896E9673B9286F1ED353E3580D925AC89268EC6DDE2912BE8CB9CEBFCD4212DD6863BE267AAAA646B215C45541F98D606ED20964AE23B017B85119C267F00A99A86D31CB0A32BD66A4F7D07044B03F9A45C4775A753EFB2CA2E238857F968AFF607476D2CBB07A560E649895502C55B8782E3E761A935C223EE0573005D93CE92DEE0D60F2DBED5B044CC40445F50F83539F90455BED7E94145A0C6AF9B95B47B355E1210282010100F9A85AA543F0D90CBE0ED7A879FE5186D2A14BE5C1C10EC7848557CA312EED8DCE148B1E74D73FAF3022876E8AE985192ED8E0E64556D6B6E20AB9C94F06FF67B465D5F6156156A990DB5E7FC56FB0A352A5E75FA76ABF62C346F70546F6D7AA0E4F8C3947ED2F83782509BD75E3EF1F8BD5F37B62C0677393A959AB503251A13D111B7DE46103C8DEF96744BA0F383EC45B7CE66556AEE1DFE79EECE1F6E301955FFBBE935FE2689989C0F476525DBD8498CB42CF32D3129B66B6B34EC2A33F5CB5ECEEAF6E59B30800AB80879DFBE7D50D3E3771B2345C669290EABE2C9A3734F87414CFD4DF21C0D1F00E3665CF311FEBCAB3A20153886BB83448AADA7A730282010100C665BED80AB3AB43D55BBD1B584C5278D4DC7FD32B4B9870D8F606AB63BC3BBF3330915E587B1C408704FC2D1FCB86433E24E06937785372BB7A8F655BADF073C7E3B5CBFBC870F0F94A0D9EB1FF133CBCD406A4DE63552AEC6F52F50671A095F47D6D87A2B039DBD120116BC26A7D1278EBE7FC46B2B572CBD904804EBE92A0B424D308C4E822B29E670C4C1FE95CBD917FF546434AAED98FC7F8EA0ACF49F571572CCBFEE772686EFF8F6AD45904A305A850D6C3ADE545B8F3A2966E428A59A92B9640B5ED1C0CFDF5DF9D00D5320852321FCCBF699F1A8D3408ED5ACCCB20C387DE5524D9680E3F5837E11496F65843B1B5965FCEB131AEE74C40E674D705028201000C9711E32DB6F2AB32D67AC7B34741034491FFCAD9678C0041CD9BACC5A83130AA88DCAF2F833F61ED528073F1AB6F1BE301EAED91E79C3262D9D99EAE4E9308BECF37E80E11F795DB89448DBAFE33F13894C7434AA5167BBB8F539BBF856940D931E7C767BA2D603AE9DB40E3B617F4065046D41D19C8DDCA3F8B17199740089A94C7472502437798CF09072D3EE13E4116C008BA6991AE306574DD4B53F104BE6CB5BC59A04741B124824791C3FB98381CA07B8109761D851ABBF1F4F1D9DBB32835879FEF37B4D09D80089E4E384AEBB29C459D853820C4C775697127BCAB360FA582FB2C280882B9D39A53E1F47DECB72E64BAB1C86DA3C90951F4D3C9C3028201001688F008720EBE615216BD8021A369AAB7E2E3D20494ED97C3CD0E2CE1833BF617C6687CA2E838E94B6CD187FE988B838FC77885FAFAFBDF8853FF7DAFD02E03B8ACB0B59EBFC1B45D5C7FF78A9842831F9FA5B18C611407701BA4FC97E2C82EC03A8EFA5D0C4F461C96DBE3B58D8AEF5234D980DA36EA4D43C23EB4A43D19428FB3AF14CBE8E2280FBDFCB398DC54E0636A795DA5BF11E53C63A66E4F14047E90852A5D7172B09814238B12C353E926EB3997150DDCEEB1E0B42BBF927E946062CAC4A24D07C5ABE41CCD6D73EEC364169202F2AABB408B2F86BD8CD84772BB21FA88D27B0106C4B78539B3A337127C2C143F5FF939ECFE8BB35201FD2B4051028201007013EF7A989CF3DAF73407F23F75DD141AE5AB841D2A31BC1C632761B71F37EE0BE7690922130E4B29F5A92EF3CFD9184275B015BF95F885720AE117C5C8960BAC8E7E9FEB19B3007970E5CDE0F935C75F90D887AE15A820F104CBBA2ABC37697C2952B5D25A91CAA27E5C04DB6D74B5C8B012093A927E96E7315EB2C2E882300171AF0E725DB4088F7B2AC2A36DE6FE7B73413BB40989B21BEED9662EEF9477B938B4020A01169E7F70D8050F9D751A7530E2A44A47F69FAB1FDD7F3F78EC1C22236B49C3B68100712B53C97DB8DB67A4D8B9309D69773BE761CFFAB42DEE9C55E55573AE40AC6A4926A28119BD1C069869250297938875850E4F471CDD2DC7} \ No newline at end of file diff --git a/examples/anon_messenger/secret_channel/node2_hlm/pub.key b/examples/anon_messenger/secret_channel/node2_hlm/pub.key new file mode 100644 index 000000000..bc4fa2e93 --- /dev/null +++ b/examples/anon_messenger/secret_channel/node2_hlm/pub.key @@ -0,0 +1 @@ +PubKey(go-peer/rsa){3082020A0282020100C17B6FA53983050B0339A0AB60D20A8A5FF5F8210564464C45CD2FAC2F266E8DDBA3B36C6F356AE57D1A71EED7B612C4CBC808557E4FCBAF6EDCFCECE37494144F09D65C7533109CE2F9B9B31D754453CA636A4463594F2C38303AE1B7BFFE738AC57805C782193B4854FF3F3FACA2C6BF9F75428DF6C583FBC29614C0B3329DF50F7B6399E1CC1F12BED77F29F885D7137ADFADE74A43451BB97A32F2301BE8EA866AFF34D6C7ED7FF1FAEA11FFB5B1034602B67E7918E42CA3D20E3E68AA700BE1B55A78C73A1D60D0A3DED3A6E5778C0BA68BAB9C345462131B9DC554D1A189066D649D7E167621815AB5B93905582BF19C28BCA6018E0CD205702968885E92A3B1E3DB37A25AC26FA4D2A47FF024ECD401F79FA353FEF2E4C2183C44D1D44B44938D32D8DBEDDAF5C87D042E4E9DAD671BE9C10DD8B3FE0A7C29AFE20843FE268C6A8F14949A04FF25A3EEE1EBE0027A99CE1C4DC561697297EA9FD9E23CF2E190B58CA385B66A235290A23CBB3856108EFFDD775601B3DE92C06C9EA2695C2D25D7897FD9D43C1AE10016E51C46C67F19AC84CD25F47DE2962A48030BCD8A0F14FFE4135A2893F62AC3E15CC61EC2E4ACADE0736C9A8DBC17D439248C42C5C0C6E08612414170FBE5AA6B52AE64E4CCDAE6FD3066BED5C200E07DBB0167D74A9FAD263AF253DFA870F44407F8EF3D9F12B8D910C4D803AD82ABA136F93F0203010001} \ No newline at end of file diff --git a/examples/echo_service/_docker/default/_mounted_middle/hlt.cfg b/examples/echo_service/_docker/default/_mounted_middle/hlt.cfg index aba5088e7..d2d0fe1ad 100644 --- a/examples/echo_service/_docker/default/_mounted_middle/hlt.cfg +++ b/examples/echo_service/_docker/default/_mounted_middle/hlt.cfg @@ -7,6 +7,6 @@ }, "logging": ["info", "warn", "erro"], "address": { - "tcp": "traffic-middle:9571" + "tcp": "traffic-middle:6581" } } \ No newline at end of file diff --git a/examples/echo_service/_docker/default/_mounted_recv/hls.cfg b/examples/echo_service/_docker/default/_mounted_recv/hls.cfg index d4435e71e..2702a908f 100644 --- a/examples/echo_service/_docker/default/_mounted_recv/hls.cfg +++ b/examples/echo_service/_docker/default/_mounted_recv/hls.cfg @@ -11,7 +11,7 @@ "hidden-echo-service": "recv-echo-service:8080" }, "connections": [ - "traffic-middle:9571" + "traffic-middle:6581" ], "friends": { "Alice": "PubKey(go-peer/rsa){3082020A0282020100C17B6FA53983050B0339A0AB60D20A8A5FF5F8210564464C45CD2FAC2F266E8DDBA3B36C6F356AE57D1A71EED7B612C4CBC808557E4FCBAF6EDCFCECE37494144F09D65C7533109CE2F9B9B31D754453CA636A4463594F2C38303AE1B7BFFE738AC57805C782193B4854FF3F3FACA2C6BF9F75428DF6C583FBC29614C0B3329DF50F7B6399E1CC1F12BED77F29F885D7137ADFADE74A43451BB97A32F2301BE8EA866AFF34D6C7ED7FF1FAEA11FFB5B1034602B67E7918E42CA3D20E3E68AA700BE1B55A78C73A1D60D0A3DED3A6E5778C0BA68BAB9C345462131B9DC554D1A189066D649D7E167621815AB5B93905582BF19C28BCA6018E0CD205702968885E92A3B1E3DB37A25AC26FA4D2A47FF024ECD401F79FA353FEF2E4C2183C44D1D44B44938D32D8DBEDDAF5C87D042E4E9DAD671BE9C10DD8B3FE0A7C29AFE20843FE268C6A8F14949A04FF25A3EEE1EBE0027A99CE1C4DC561697297EA9FD9E23CF2E190B58CA385B66A235290A23CBB3856108EFFDD775601B3DE92C06C9EA2695C2D25D7897FD9D43C1AE10016E51C46C67F19AC84CD25F47DE2962A48030BCD8A0F14FFE4135A2893F62AC3E15CC61EC2E4ACADE0736C9A8DBC17D439248C42C5C0C6E08612414170FBE5AA6B52AE64E4CCDAE6FD3066BED5C200E07DBB0167D74A9FAD263AF253DFA870F44407F8EF3D9F12B8D910C4D803AD82ABA136F93F0203010001}" diff --git a/examples/echo_service/_docker/default/_mounted_send/hls.cfg b/examples/echo_service/_docker/default/_mounted_send/hls.cfg index 982c664d4..deb732551 100644 --- a/examples/echo_service/_docker/default/_mounted_send/hls.cfg +++ b/examples/echo_service/_docker/default/_mounted_send/hls.cfg @@ -8,10 +8,10 @@ }, "logging": ["info", "warn", "erro"], "address": { - "http": "service-send:9572" + "http": "service-send:7572" }, "connections": [ - "traffic-middle:9571" + "traffic-middle:6581" ], "friends": { "Bob": "PubKey(go-peer/rsa){3082020A0282020100B752D35E81F4AEEC1A9C42EDED16E8924DD4D359663611DE2DCCE1A9611704A697B26254DD2AFA974A61A2CF94FAD016450FEF22F218CA970BFE41E6340CE3ABCBEE123E35A9DCDA6D23738DAC46AF8AC57902DDE7F41A03EB00A4818137E1BF4DFAE1EEDF8BB9E4363C15FD1C2278D86F2535BC3F395BE9A6CD690A5C852E6C35D6184BE7B9062AEE2AFC1A5AC81E7D21B7252A56C62BB5AC0BBAD36C7A4907C868704985E1754BAA3E8315E775A51B7BDC7ACB0D0675D29513D78CB05AB6119D3CA0A810A41F78150E3C5D9ACAFBE1533FC3533DECEC14387BF7478F6E229EB4CC312DC22436F4DB0D4CC308FB6EEA612F2F9E00239DE7902DE15889EE71370147C9696A5E7B022947ABB8AFBBC64F7840BED4CE69592CAF4085A1074475E365ED015048C89AE717BC259C42510F15F31DA3F9302EAD8F263B43D14886B2335A245C00871C041CBB683F1F047573F789673F9B11B6E6714C2A3360244757BB220C7952C6D3D9D65AA47511A63E2A59706B7A70846C930DCFB3D8CAFB3BD6F687CACF5A708692C26B363C80C460F54E59912D41D9BB359698051ABC049A0D0CFD7F23DC97DA940B1EDEAC6B84B194C8F8A56A46CE69EE7A0AEAA11C99508A368E64D27756AD0BA7146A6ADA3D5FA237B3B4EDDC84B71C27DE3A9F26A42197791C7DC09E2D7C4A7D8FCDC8F9A5D4983BB278FCE9513B1486D18F8560C3F31CC70203010001}" diff --git a/examples/echo_service/_docker/default/docker-compose.yaml b/examples/echo_service/_docker/default/docker-compose.yaml index 0fae0efbf..b55738edc 100644 --- a/examples/echo_service/_docker/default/docker-compose.yaml +++ b/examples/echo_service/_docker/default/docker-compose.yaml @@ -40,7 +40,7 @@ services: volumes: - ./_mounted_send:/mounted ports: - - "7572:9572" + - "7572:7572" networks: - hidden-lake networks: diff --git a/examples/echo_service/default/middle_hlt/hlt.cfg b/examples/echo_service/default/middle_hlt/hlt.cfg index 0e01e9a63..6de6c2bac 100644 --- a/examples/echo_service/default/middle_hlt/hlt.cfg +++ b/examples/echo_service/default/middle_hlt/hlt.cfg @@ -7,6 +7,6 @@ }, "logging": ["info", "warn", "erro"], "address": { - "tcp": "localhost:9581" + "tcp": "localhost:6581" } } \ No newline at end of file diff --git a/examples/echo_service/default/recv_hls/hls.cfg b/examples/echo_service/default/recv_hls/hls.cfg index 0f3e9ff01..aa05b03f2 100644 --- a/examples/echo_service/default/recv_hls/hls.cfg +++ b/examples/echo_service/default/recv_hls/hls.cfg @@ -11,7 +11,7 @@ "hidden-echo-service": "localhost:8080" }, "connections": [ - "localhost:9581" + "localhost:6581" ], "friends": { "Alice": "PubKey(go-peer/rsa){3082020A0282020100C17B6FA53983050B0339A0AB60D20A8A5FF5F8210564464C45CD2FAC2F266E8DDBA3B36C6F356AE57D1A71EED7B612C4CBC808557E4FCBAF6EDCFCECE37494144F09D65C7533109CE2F9B9B31D754453CA636A4463594F2C38303AE1B7BFFE738AC57805C782193B4854FF3F3FACA2C6BF9F75428DF6C583FBC29614C0B3329DF50F7B6399E1CC1F12BED77F29F885D7137ADFADE74A43451BB97A32F2301BE8EA866AFF34D6C7ED7FF1FAEA11FFB5B1034602B67E7918E42CA3D20E3E68AA700BE1B55A78C73A1D60D0A3DED3A6E5778C0BA68BAB9C345462131B9DC554D1A189066D649D7E167621815AB5B93905582BF19C28BCA6018E0CD205702968885E92A3B1E3DB37A25AC26FA4D2A47FF024ECD401F79FA353FEF2E4C2183C44D1D44B44938D32D8DBEDDAF5C87D042E4E9DAD671BE9C10DD8B3FE0A7C29AFE20843FE268C6A8F14949A04FF25A3EEE1EBE0027A99CE1C4DC561697297EA9FD9E23CF2E190B58CA385B66A235290A23CBB3856108EFFDD775601B3DE92C06C9EA2695C2D25D7897FD9D43C1AE10016E51C46C67F19AC84CD25F47DE2962A48030BCD8A0F14FFE4135A2893F62AC3E15CC61EC2E4ACADE0736C9A8DBC17D439248C42C5C0C6E08612414170FBE5AA6B52AE64E4CCDAE6FD3066BED5C200E07DBB0167D74A9FAD263AF253DFA870F44407F8EF3D9F12B8D910C4D803AD82ABA136F93F0203010001}" diff --git a/examples/echo_service/default/send_hls/hls.cfg b/examples/echo_service/default/send_hls/hls.cfg index 4ea5ae796..35a15ea97 100644 --- a/examples/echo_service/default/send_hls/hls.cfg +++ b/examples/echo_service/default/send_hls/hls.cfg @@ -15,7 +15,7 @@ "http": "localhost:7572" }, "connections": [ - "localhost:9581" + "localhost:6581" ], "friends": { "Bob": "PubKey(go-peer/rsa){3082020A0282020100B752D35E81F4AEEC1A9C42EDED16E8924DD4D359663611DE2DCCE1A9611704A697B26254DD2AFA974A61A2CF94FAD016450FEF22F218CA970BFE41E6340CE3ABCBEE123E35A9DCDA6D23738DAC46AF8AC57902DDE7F41A03EB00A4818137E1BF4DFAE1EEDF8BB9E4363C15FD1C2278D86F2535BC3F395BE9A6CD690A5C852E6C35D6184BE7B9062AEE2AFC1A5AC81E7D21B7252A56C62BB5AC0BBAD36C7A4907C868704985E1754BAA3E8315E775A51B7BDC7ACB0D0675D29513D78CB05AB6119D3CA0A810A41F78150E3C5D9ACAFBE1533FC3533DECEC14387BF7478F6E229EB4CC312DC22436F4DB0D4CC308FB6EEA612F2F9E00239DE7902DE15889EE71370147C9696A5E7B022947ABB8AFBBC64F7840BED4CE69592CAF4085A1074475E365ED015048C89AE717BC259C42510F15F31DA3F9302EAD8F263B43D14886B2335A245C00871C041CBB683F1F047573F789673F9B11B6E6714C2A3360244757BB220C7952C6D3D9D65AA47511A63E2A59706B7A70846C930DCFB3D8CAFB3BD6F687CACF5A708692C26B363C80C460F54E59912D41D9BB359698051ABC049A0D0CFD7F23DC97DA940B1EDEAC6B84B194C8F8A56A46CE69EE7A0AEAA11C99508A368E64D27756AD0BA7146A6ADA3D5FA237B3B4EDDC84B71C27DE3A9F26A42197791C7DC09E2D7C4A7D8FCDC8F9A5D4983BB278FCE9513B1486D18F8560C3F31CC70203010001}" diff --git a/examples/echo_service/routing/middle_hlt_1/hlt.cfg b/examples/echo_service/routing/middle_hlt_1/hlt.cfg index 0e01e9a63..6de6c2bac 100644 --- a/examples/echo_service/routing/middle_hlt_1/hlt.cfg +++ b/examples/echo_service/routing/middle_hlt_1/hlt.cfg @@ -7,6 +7,6 @@ }, "logging": ["info", "warn", "erro"], "address": { - "tcp": "localhost:9581" + "tcp": "localhost:6581" } } \ No newline at end of file diff --git a/examples/echo_service/routing/middle_hlt_2/hlt.cfg b/examples/echo_service/routing/middle_hlt_2/hlt.cfg index 086157d07..bbf76deaf 100644 --- a/examples/echo_service/routing/middle_hlt_2/hlt.cfg +++ b/examples/echo_service/routing/middle_hlt_2/hlt.cfg @@ -7,9 +7,9 @@ }, "logging": ["info", "warn", "erro"], "address": { - "tcp": "localhost:9582" + "tcp": "localhost:6582" }, "connections": [ - "localhost:9581" + "localhost:6581" ] } \ No newline at end of file diff --git a/examples/echo_service/routing/middle_hlt_3/hlt.cfg b/examples/echo_service/routing/middle_hlt_3/hlt.cfg index 977eae1a0..a80885d40 100644 --- a/examples/echo_service/routing/middle_hlt_3/hlt.cfg +++ b/examples/echo_service/routing/middle_hlt_3/hlt.cfg @@ -7,9 +7,9 @@ }, "logging": ["info", "warn", "erro"], "address": { - "tcp": "localhost:9583" + "tcp": "localhost:6583" }, "connections": [ - "localhost:9581" + "localhost:6582" ] } \ No newline at end of file diff --git a/examples/echo_service/routing/recv_hls/hls.cfg b/examples/echo_service/routing/recv_hls/hls.cfg index 6b7475aef..37822c303 100644 --- a/examples/echo_service/routing/recv_hls/hls.cfg +++ b/examples/echo_service/routing/recv_hls/hls.cfg @@ -10,7 +10,7 @@ "hidden-echo-service": "localhost:8080" }, "connections": [ - "localhost:9581" + "localhost:6583" ], "friends": { "Alice": "PubKey(go-peer/rsa){3082020A0282020100C17B6FA53983050B0339A0AB60D20A8A5FF5F8210564464C45CD2FAC2F266E8DDBA3B36C6F356AE57D1A71EED7B612C4CBC808557E4FCBAF6EDCFCECE37494144F09D65C7533109CE2F9B9B31D754453CA636A4463594F2C38303AE1B7BFFE738AC57805C782193B4854FF3F3FACA2C6BF9F75428DF6C583FBC29614C0B3329DF50F7B6399E1CC1F12BED77F29F885D7137ADFADE74A43451BB97A32F2301BE8EA866AFF34D6C7ED7FF1FAEA11FFB5B1034602B67E7918E42CA3D20E3E68AA700BE1B55A78C73A1D60D0A3DED3A6E5778C0BA68BAB9C345462131B9DC554D1A189066D649D7E167621815AB5B93905582BF19C28BCA6018E0CD205702968885E92A3B1E3DB37A25AC26FA4D2A47FF024ECD401F79FA353FEF2E4C2183C44D1D44B44938D32D8DBEDDAF5C87D042E4E9DAD671BE9C10DD8B3FE0A7C29AFE20843FE268C6A8F14949A04FF25A3EEE1EBE0027A99CE1C4DC561697297EA9FD9E23CF2E190B58CA385B66A235290A23CBB3856108EFFDD775601B3DE92C06C9EA2695C2D25D7897FD9D43C1AE10016E51C46C67F19AC84CD25F47DE2962A48030BCD8A0F14FFE4135A2893F62AC3E15CC61EC2E4ACADE0736C9A8DBC17D439248C42C5C0C6E08612414170FBE5AA6B52AE64E4CCDAE6FD3066BED5C200E07DBB0167D74A9FAD263AF253DFA870F44407F8EF3D9F12B8D910C4D803AD82ABA136F93F0203010001}" diff --git a/examples/echo_service/routing/send_hls/hls.cfg b/examples/echo_service/routing/send_hls/hls.cfg index e92376a85..12b05321f 100644 --- a/examples/echo_service/routing/send_hls/hls.cfg +++ b/examples/echo_service/routing/send_hls/hls.cfg @@ -10,8 +10,7 @@ "http": "localhost:7572" }, "connections": [ - "localhost:9582", - "localhost:9583" + "localhost:6581" ], "friends": { "Bob": "PubKey(go-peer/rsa){3082020A0282020100B752D35E81F4AEEC1A9C42EDED16E8924DD4D359663611DE2DCCE1A9611704A697B26254DD2AFA974A61A2CF94FAD016450FEF22F218CA970BFE41E6340CE3ABCBEE123E35A9DCDA6D23738DAC46AF8AC57902DDE7F41A03EB00A4818137E1BF4DFAE1EEDF8BB9E4363C15FD1C2278D86F2535BC3F395BE9A6CD690A5C852E6C35D6184BE7B9062AEE2AFC1A5AC81E7D21B7252A56C62BB5AC0BBAD36C7A4907C868704985E1754BAA3E8315E775A51B7BDC7ACB0D0675D29513D78CB05AB6119D3CA0A810A41F78150E3C5D9ACAFBE1533FC3533DECEC14387BF7478F6E229EB4CC312DC22436F4DB0D4CC308FB6EEA612F2F9E00239DE7902DE15889EE71370147C9696A5E7B022947ABB8AFBBC64F7840BED4CE69592CAF4085A1074475E365ED015048C89AE717BC259C42510F15F31DA3F9302EAD8F263B43D14886B2335A245C00871C041CBB683F1F047573F789673F9B11B6E6714C2A3360244757BB220C7952C6D3D9D65AA47511A63E2A59706B7A70846C930DCFB3D8CAFB3BD6F687CACF5A708692C26B363C80C460F54E59912D41D9BB359698051ABC049A0D0CFD7F23DC97DA940B1EDEAC6B84B194C8F8A56A46CE69EE7A0AEAA11C99508A368E64D27756AD0BA7146A6ADA3D5FA237B3B4EDDC84B71C27DE3A9F26A42197791C7DC09E2D7C4A7D8FCDC8F9A5D4983BB278FCE9513B1486D18F8560C3F31CC70203010001}" diff --git a/go.mod b/go.mod index ca096578b..897311890 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,6 @@ go 1.16 require ( github.com/boombuler/barcode v1.0.1 github.com/syndtr/goleveldb v1.0.0 - github.com/wagslane/go-password-validator v0.3.0 golang.org/x/crypto v0.12.0 golang.org/x/net v0.14.0 gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index c1ae2fe36..7df363fb3 100644 --- a/go.sum +++ b/go.sum @@ -13,8 +13,6 @@ github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= -github.com/wagslane/go-password-validator v0.3.0 h1:vfxOPzGHkz5S146HDpavl0cw1DSVP061Ry2PX0/ON6I= -github.com/wagslane/go-password-validator v0.3.0/go.mod h1:TI1XJ6T5fRdRnHqHt14pvy1tNVnrwe7m3/f1f2fDphQ= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=