Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
number571 committed Sep 27, 2024
1 parent 9ecc009 commit 8b67ed6
Show file tree
Hide file tree
Showing 40 changed files with 4,454 additions and 4,026 deletions.
4,958 changes: 2,479 additions & 2,479 deletions cmd/hidden_lake/_test/result/coverage.out

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions examples/anonymity/echo_service/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default: clean
clean:
make -C ./prod_test clean
make -C ./routing clean
make -C ./secret_channel/chatingar clean
make -C ./secret_channel/common clean
make -C ./simple clean
make -C ./secret_channel clean
request:
go run ./_request/main.go
5 changes: 5 additions & 0 deletions examples/anonymity/echo_service/secret_channel/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.PHONY: default clean
default: clean
clean:
make -C ./chatingar clean
make -C ./common clean
18 changes: 18 additions & 0 deletions examples/anonymity/echo_service/simple/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
ROOPATH=./../../../..
.PHONY: default copy run clean stop
default: copy run
copy:
cp \
$(ROOPATH)/examples/anonymity/_keys/4096/priv_node1.key \
./recv_hls/hls.key
cp \
$(ROOPATH)/examples/anonymity/_keys/4096/priv_node2.key \
./send_hls/hls.key
run:
docker-compose build
docker-compose up
clean:
rm -f ./recv_hls/hls.key ./send_hls/hls.key
stop:
docker-compose down
docker-compose rm -f
32 changes: 32 additions & 0 deletions examples/anonymity/echo_service/simple/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: "3"
services:
recv_hls_service:
build:
context: ./../../../../
dockerfile: examples/anonymity/echo_service/_service/Dockerfile
networks:
- local-network
recv_hls:
build:
context: ./../../../../
dockerfile: cmd/hidden_lake/service/Dockerfile
environment:
- SERVICE_PATH=examples/anonymity/echo_service/simple/recv_hls
networks:
- local-network
- hidden-lake
send_hls:
build:
context: ./../../../../
dockerfile: cmd/hidden_lake/service/Dockerfile
environment:
- SERVICE_PATH=examples/anonymity/echo_service/simple/send_hls
ports:
- 7572:7572
networks:
- hidden-lake
networks:
local-network:
driver: bridge
hidden-lake:
driver: bridge
17 changes: 17 additions & 0 deletions examples/anonymity/echo_service/simple/recv_hls/hls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
settings:
message_size_bytes: 8192
key_size_bits: 4096
fetch_timeout_ms: 60000
queue_period_ms: 5000
logging:
- info
- warn
- erro
services:
hidden-echo-service:
host: recv_hls_service:8080
connections:
- send_hls:7571
friends:
Alice: >-
PubKey{3082020A0282020100C17B6FA53983050B0339A0AB60D20A8A5FF5F8210564464C45CD2FAC2F266E8DDBA3B36C6F356AE57D1A71EED7B612C4CBC808557E4FCBAF6EDCFCECE37494144F09D65C7533109CE2F9B9B31D754453CA636A4463594F2C38303AE1B7BFFE738AC57805C782193B4854FF3F3FACA2C6BF9F75428DF6C583FBC29614C0B3329DF50F7B6399E1CC1F12BED77F29F885D7137ADFADE74A43451BB97A32F2301BE8EA866AFF34D6C7ED7FF1FAEA11FFB5B1034602B67E7918E42CA3D20E3E68AA700BE1B55A78C73A1D60D0A3DED3A6E5778C0BA68BAB9C345462131B9DC554D1A189066D649D7E167621815AB5B93905582BF19C28BCA6018E0CD205702968885E92A3B1E3DB37A25AC26FA4D2A47FF024ECD401F79FA353FEF2E4C2183C44D1D44B44938D32D8DBEDDAF5C87D042E4E9DAD671BE9C10DD8B3FE0A7C29AFE20843FE268C6A8F14949A04FF25A3EEE1EBE0027A99CE1C4DC561697297EA9FD9E23CF2E190B58CA385B66A235290A23CBB3856108EFFDD775601B3DE92C06C9EA2695C2D25D7897FD9D43C1AE10016E51C46C67F19AC84CD25F47DE2962A48030BCD8A0F14FFE4135A2893F62AC3E15CC61EC2E4ACADE0736C9A8DBC17D439248C42C5C0C6E08612414170FBE5AA6B52AE64E4CCDAE6FD3066BED5C200E07DBB0167D74A9FAD263AF253DFA870F44407F8EF3D9F12B8D910C4D803AD82ABA136F93F0203010001}
15 changes: 15 additions & 0 deletions examples/anonymity/echo_service/simple/send_hls/hls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
settings:
message_size_bytes: 8192
key_size_bits: 4096
fetch_timeout_ms: 60000
queue_period_ms: 5000
logging:
- info
- warn
- erro
address:
tcp: :7571
http: :7572
friends:
Bob: >-
PubKey{3082020A0282020100B752D35E81F4AEEC1A9C42EDED16E8924DD4D359663611DE2DCCE1A9611704A697B26254DD2AFA974A61A2CF94FAD016450FEF22F218CA970BFE41E6340CE3ABCBEE123E35A9DCDA6D23738DAC46AF8AC57902DDE7F41A03EB00A4818137E1BF4DFAE1EEDF8BB9E4363C15FD1C2278D86F2535BC3F395BE9A6CD690A5C852E6C35D6184BE7B9062AEE2AFC1A5AC81E7D21B7252A56C62BB5AC0BBAD36C7A4907C868704985E1754BAA3E8315E775A51B7BDC7ACB0D0675D29513D78CB05AB6119D3CA0A810A41F78150E3C5D9ACAFBE1533FC3533DECEC14387BF7478F6E229EB4CC312DC22436F4DB0D4CC308FB6EEA612F2F9E00239DE7902DE15889EE71370147C9696A5E7B022947ABB8AFBBC64F7840BED4CE69592CAF4085A1074475E365ED015048C89AE717BC259C42510F15F31DA3F9302EAD8F263B43D14886B2335A245C00871C041CBB683F1F047573F789673F9B11B6E6714C2A3360244757BB220C7952C6D3D9D65AA47511A63E2A59706B7A70846C930DCFB3D8CAFB3BD6F687CACF5A708692C26B363C80C460F54E59912D41D9BB359698051ABC049A0D0CFD7F23DC97DA940B1EDEAC6B84B194C8F8A56A46CE69EE7A0AEAA11C99508A368E64D27756AD0BA7146A6ADA3D5FA237B3B4EDDC84B71C27DE3A9F26A42197791C7DC09E2D7C4A7D8FCDC8F9A5D4983BB278FCE9513B1486D18F8560C3F31CC70203010001}
4 changes: 2 additions & 2 deletions examples/anonymity/filesharer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default: clean
clean:
make -C ./prod_test clean
make -C ./routing clean
make -C ./secret_channel/chatingar clean
make -C ./secret_channel/common clean
make -C ./simple clean
make -C ./secret_channel clean
request:
go run ./_request/main.go
5 changes: 5 additions & 0 deletions examples/anonymity/filesharer/secret_channel/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.PHONY: default clean
default: clean
clean:
make -C ./chatingar clean
make -C ./common clean
24 changes: 24 additions & 0 deletions examples/anonymity/filesharer/simple/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
ROOPATH=./../../../..
.PHONY: default copy run clean stop
default: copy run
copy:
cp \
$(ROOPATH)/examples/anonymity/_keys/4096/priv_node1.key \
./node1_hlf/hls.key
cp \
$(ROOPATH)/examples/anonymity/_keys/4096/priv_node2.key \
./node2_hlf/hls.key
cp ./node1_hlf/hls_copy.yml ./node1_hlf/hls.yml
cp ./node2_hlf/hls_copy.yml ./node2_hlf/hls.yml
mkdir ./node2_hlf/hlf.stg | true
cp $(ROOPATH)/examples/anonymity/filesharer/_storage/* ./node2_hlf/hlf.stg
run:
docker-compose build
docker-compose up
clean:
rm -rf ./node2_hlf/hlf.stg
rm -f ./node1_hlf/hls.yml ./node2_hlf/hls.yml
rm -f ./node1_hlf/hls.key ./node2_hlf/hls.key
stop:
docker-compose down
docker-compose rm -f
25 changes: 25 additions & 0 deletions examples/anonymity/filesharer/simple/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: "3"
services:
node1_hlc:
build:
context: ./../../../../
dockerfile: cmd/hidden_lake/composite/Dockerfile
environment:
- SERVICE_PATH=examples/anonymity/filesharer/simple/node1_hlf
ports:
- 8080:8080
networks:
- hidden-lake
node2_hlc:
build:
context: ./../../../../
dockerfile: cmd/hidden_lake/composite/Dockerfile
environment:
- SERVICE_PATH=examples/anonymity/filesharer/simple/node2_hlf
ports:
- 7070:7070
networks:
- hidden-lake
networks:
hidden-lake:
driver: bridge
7 changes: 7 additions & 0 deletions examples/anonymity/filesharer/simple/node1_hlf/hlc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
logging:
- info
- warn
- erro
services:
- hidden-lake-service
- hidden-lake-filesharer
11 changes: 11 additions & 0 deletions examples/anonymity/filesharer/simple/node1_hlf/hlf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
settings:
page_offset: 10
retry_num: 2
logging:
- info
- warn
- erro
address:
interface: :8080
incoming: :8081
connection: node1_hlc:8572
18 changes: 18 additions & 0 deletions examples/anonymity/filesharer/simple/node1_hlf/hls_copy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
settings:
message_size_bytes: 8192
key_size_bits: 4096
fetch_timeout_ms: 60000
queue_period_ms: 5000
logging:
- info
- warn
- erro
address:
http: :8572
services:
hidden-lake-filesharer:
host: node1_hlc:8081
connections:
- node2_hlc:7571
friends:
Bob: PubKey{3082020A0282020100C17B6FA53983050B0339A0AB60D20A8A5FF5F8210564464C45CD2FAC2F266E8DDBA3B36C6F356AE57D1A71EED7B612C4CBC808557E4FCBAF6EDCFCECE37494144F09D65C7533109CE2F9B9B31D754453CA636A4463594F2C38303AE1B7BFFE738AC57805C782193B4854FF3F3FACA2C6BF9F75428DF6C583FBC29614C0B3329DF50F7B6399E1CC1F12BED77F29F885D7137ADFADE74A43451BB97A32F2301BE8EA866AFF34D6C7ED7FF1FAEA11FFB5B1034602B67E7918E42CA3D20E3E68AA700BE1B55A78C73A1D60D0A3DED3A6E5778C0BA68BAB9C345462131B9DC554D1A189066D649D7E167621815AB5B93905582BF19C28BCA6018E0CD205702968885E92A3B1E3DB37A25AC26FA4D2A47FF024ECD401F79FA353FEF2E4C2183C44D1D44B44938D32D8DBEDDAF5C87D042E4E9DAD671BE9C10DD8B3FE0A7C29AFE20843FE268C6A8F14949A04FF25A3EEE1EBE0027A99CE1C4DC561697297EA9FD9E23CF2E190B58CA385B66A235290A23CBB3856108EFFDD775601B3DE92C06C9EA2695C2D25D7897FD9D43C1AE10016E51C46C67F19AC84CD25F47DE2962A48030BCD8A0F14FFE4135A2893F62AC3E15CC61EC2E4ACADE0736C9A8DBC17D439248C42C5C0C6E08612414170FBE5AA6B52AE64E4CCDAE6FD3066BED5C200E07DBB0167D74A9FAD263AF253DFA870F44407F8EF3D9F12B8D910C4D803AD82ABA136F93F0203010001}
7 changes: 7 additions & 0 deletions examples/anonymity/filesharer/simple/node2_hlf/hlc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
logging:
- info
- warn
- erro
services:
- hidden-lake-service
- hidden-lake-filesharer
11 changes: 11 additions & 0 deletions examples/anonymity/filesharer/simple/node2_hlf/hlf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
settings:
page_offset: 10
retry_num: 2
logging:
- info
- warn
- erro
address:
interface: :7070
incoming: :7071
connection: node2_hlc:7572
17 changes: 17 additions & 0 deletions examples/anonymity/filesharer/simple/node2_hlf/hls_copy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
settings:
message_size_bytes: 8192
key_size_bits: 4096
fetch_timeout_ms: 60000
queue_period_ms: 5000
logging:
- info
- warn
- erro
address:
tcp: :7571
http: :7572
services:
hidden-lake-filesharer:
host: node2_hlc:7071
friends:
Alice: PubKey{3082020A0282020100B752D35E81F4AEEC1A9C42EDED16E8924DD4D359663611DE2DCCE1A9611704A697B26254DD2AFA974A61A2CF94FAD016450FEF22F218CA970BFE41E6340CE3ABCBEE123E35A9DCDA6D23738DAC46AF8AC57902DDE7F41A03EB00A4818137E1BF4DFAE1EEDF8BB9E4363C15FD1C2278D86F2535BC3F395BE9A6CD690A5C852E6C35D6184BE7B9062AEE2AFC1A5AC81E7D21B7252A56C62BB5AC0BBAD36C7A4907C868704985E1754BAA3E8315E775A51B7BDC7ACB0D0675D29513D78CB05AB6119D3CA0A810A41F78150E3C5D9ACAFBE1533FC3533DECEC14387BF7478F6E229EB4CC312DC22436F4DB0D4CC308FB6EEA612F2F9E00239DE7902DE15889EE71370147C9696A5E7B022947ABB8AFBBC64F7840BED4CE69592CAF4085A1074475E365ED015048C89AE717BC259C42510F15F31DA3F9302EAD8F263B43D14886B2335A245C00871C041CBB683F1F047573F789673F9B11B6E6714C2A3360244757BB220C7952C6D3D9D65AA47511A63E2A59706B7A70846C930DCFB3D8CAFB3BD6F687CACF5A708692C26B363C80C460F54E59912D41D9BB359698051ABC049A0D0CFD7F23DC97DA940B1EDEAC6B84B194C8F8A56A46CE69EE7A0AEAA11C99508A368E64D27756AD0BA7146A6ADA3D5FA237B3B4EDDC84B71C27DE3A9F26A42197791C7DC09E2D7C4A7D8FCDC8F9A5D4983BB278FCE9513B1486D18F8560C3F31CC70203010001}
4 changes: 2 additions & 2 deletions examples/anonymity/messenger/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ clean:
make -C ./group clean
make -C ./prod_test clean
make -C ./routing clean
make -C ./secret_channel/chatingar clean
make -C ./secret_channel/common clean
make -C ./simple clean
make -C ./secret_channel clean
request:
go run ./_request/main.go
5 changes: 5 additions & 0 deletions examples/anonymity/messenger/secret_channel/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.PHONY: default clean
default: clean
clean:
make -C ./chatingar clean
make -C ./common clean
21 changes: 21 additions & 0 deletions examples/anonymity/messenger/simple/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
ROOPATH=./../../../..
.PHONY: default copy run clean stop
default: copy run
copy:
cp \
$(ROOPATH)/examples/anonymity/_keys/4096/priv_node1.key \
./node1_hlm/hls.key
cp \
$(ROOPATH)/examples/anonymity/_keys/4096/priv_node2.key \
./node2_hlm/hls.key
cp ./node1_hlm/hls_copy.yml ./node1_hlm/hls.yml
cp ./node2_hlm/hls_copy.yml ./node2_hlm/hls.yml
run:
docker-compose build
docker-compose up
clean:
rm -f ./node1_hlm/hls.key ./node2_hlm/hls.key
rm -f ./node1_hlm/hls.yml ./node2_hlm/hls.yml
stop:
docker-compose down
docker-compose rm -f
25 changes: 25 additions & 0 deletions examples/anonymity/messenger/simple/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: "3"
services:
node1_hlc:
build:
context: ./../../../../
dockerfile: cmd/hidden_lake/composite/Dockerfile
environment:
- SERVICE_PATH=examples/anonymity/messenger/simple/node1_hlm
ports:
- 8080:8080
networks:
- hidden-lake
node2_hlc:
build:
context: ./../../../../
dockerfile: cmd/hidden_lake/composite/Dockerfile
environment:
- SERVICE_PATH=examples/anonymity/messenger/simple/node2_hlm
ports:
- 7070:7070
networks:
- hidden-lake
networks:
hidden-lake:
driver: bridge
7 changes: 7 additions & 0 deletions examples/anonymity/messenger/simple/node1_hlm/hlc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
logging:
- info
- warn
- erro
services:
- hidden-lake-service
- hidden-lake-messenger
11 changes: 11 additions & 0 deletions examples/anonymity/messenger/simple/node1_hlm/hlm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
settings:
messages_capacity: 2048
work_size_bits: 20
logging:
- info
- warn
- erro
address:
interface: :8080
incoming: :8081
connection: node1_hlc:8572
18 changes: 18 additions & 0 deletions examples/anonymity/messenger/simple/node1_hlm/hls_copy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
settings:
message_size_bytes: 8192
key_size_bits: 4096
fetch_timeout_ms: 60000
queue_period_ms: 5000
logging:
- info
- warn
- erro
address:
http: :8572
services:
hidden-lake-messenger:
host: node1_hlc:8081
connections:
- node2_hlc:7571
friends:
Bob: PubKey{3082020A0282020100C17B6FA53983050B0339A0AB60D20A8A5FF5F8210564464C45CD2FAC2F266E8DDBA3B36C6F356AE57D1A71EED7B612C4CBC808557E4FCBAF6EDCFCECE37494144F09D65C7533109CE2F9B9B31D754453CA636A4463594F2C38303AE1B7BFFE738AC57805C782193B4854FF3F3FACA2C6BF9F75428DF6C583FBC29614C0B3329DF50F7B6399E1CC1F12BED77F29F885D7137ADFADE74A43451BB97A32F2301BE8EA866AFF34D6C7ED7FF1FAEA11FFB5B1034602B67E7918E42CA3D20E3E68AA700BE1B55A78C73A1D60D0A3DED3A6E5778C0BA68BAB9C345462131B9DC554D1A189066D649D7E167621815AB5B93905582BF19C28BCA6018E0CD205702968885E92A3B1E3DB37A25AC26FA4D2A47FF024ECD401F79FA353FEF2E4C2183C44D1D44B44938D32D8DBEDDAF5C87D042E4E9DAD671BE9C10DD8B3FE0A7C29AFE20843FE268C6A8F14949A04FF25A3EEE1EBE0027A99CE1C4DC561697297EA9FD9E23CF2E190B58CA385B66A235290A23CBB3856108EFFDD775601B3DE92C06C9EA2695C2D25D7897FD9D43C1AE10016E51C46C67F19AC84CD25F47DE2962A48030BCD8A0F14FFE4135A2893F62AC3E15CC61EC2E4ACADE0736C9A8DBC17D439248C42C5C0C6E08612414170FBE5AA6B52AE64E4CCDAE6FD3066BED5C200E07DBB0167D74A9FAD263AF253DFA870F44407F8EF3D9F12B8D910C4D803AD82ABA136F93F0203010001}
7 changes: 7 additions & 0 deletions examples/anonymity/messenger/simple/node2_hlm/hlc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
logging:
- info
- warn
- erro
services:
- hidden-lake-service
- hidden-lake-messenger
11 changes: 11 additions & 0 deletions examples/anonymity/messenger/simple/node2_hlm/hlm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
settings:
messages_capacity: 2048
work_size_bits: 20
logging:
- info
- warn
- erro
address:
interface: :7070
incoming: :7071
connection: node2_hlc:7572
17 changes: 17 additions & 0 deletions examples/anonymity/messenger/simple/node2_hlm/hls_copy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
settings:
message_size_bytes: 8192
key_size_bits: 4096
fetch_timeout_ms: 60000
queue_period_ms: 5000
logging:
- info
- warn
- erro
address:
tcp: :7571
http: :7572
services:
hidden-lake-messenger:
host: node2_hlc:7071
friends:
Alice: PubKey{3082020A0282020100B752D35E81F4AEEC1A9C42EDED16E8924DD4D359663611DE2DCCE1A9611704A697B26254DD2AFA974A61A2CF94FAD016450FEF22F218CA970BFE41E6340CE3ABCBEE123E35A9DCDA6D23738DAC46AF8AC57902DDE7F41A03EB00A4818137E1BF4DFAE1EEDF8BB9E4363C15FD1C2278D86F2535BC3F395BE9A6CD690A5C852E6C35D6184BE7B9062AEE2AFC1A5AC81E7D21B7252A56C62BB5AC0BBAD36C7A4907C868704985E1754BAA3E8315E775A51B7BDC7ACB0D0675D29513D78CB05AB6119D3CA0A810A41F78150E3C5D9ACAFBE1533FC3533DECEC14387BF7478F6E229EB4CC312DC22436F4DB0D4CC308FB6EEA612F2F9E00239DE7902DE15889EE71370147C9696A5E7B022947ABB8AFBBC64F7840BED4CE69592CAF4085A1074475E365ED015048C89AE717BC259C42510F15F31DA3F9302EAD8F263B43D14886B2335A245C00871C041CBB683F1F047573F789673F9B11B6E6714C2A3360244757BB220C7952C6D3D9D65AA47511A63E2A59706B7A70846C930DCFB3D8CAFB3BD6F687CACF5A708692C26B363C80C460F54E59912D41D9BB359698051ABC049A0D0CFD7F23DC97DA940B1EDEAC6B84B194C8F8A56A46CE69EE7A0AEAA11C99508A368E64D27756AD0BA7146A6ADA3D5FA237B3B4EDDC84B71C27DE3A9F26A42197791C7DC09E2D7C4A7D8FCDC8F9A5D4983BB278FCE9513B1486D18F8560C3F31CC70203010001}
4 changes: 2 additions & 2 deletions examples/anonymity/remoter/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default: clean
clean:
make -C ./prod_test clean
make -C ./routing clean
make -C ./secret_channel/chatingar clean
make -C ./secret_channel/common clean
make -C ./simple clean
make -C ./secret_channel clean
request:
go run ./_request/main.go
Loading

0 comments on commit 8b67ed6

Please sign in to comment.