Skip to content

number571/hidden-echo-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hidden-echo-service

https://habr.com/ru/articles/839950/

Example of simple application in the «Hidden Lake» anonymity network. The configuration file of the production environment is used.

Download HLS

$ wget https://github.com/number571/hidden-lake/releases/latest/download/hls_amd64_linux && \
    mv hls_amd64_linux hls && \
    chmod +x hls && \
    cp hls client/hls

Running

Terminal 1 (running echo-service):

$ go run ./main.go

Terminal 2 (running HLS service-node):

$ ./hls

Terminal 3 (running HLS client-node):

$ cd client && ./hls

Request

Do request:

curl -i -X POST http://localhost:9572/api/network/request --data '{
    "receiver":"service-node",
    "req_data":{
        "method":"POST",
        "host":"hidden-echo-service",
        "path":"/echo",
        "body":"aGVsbG8sIHdvcmxkIQ=="
    }
}'

Get response:

HTTP/1.1 200 OK
Content-Type: text/plain
Date: Sun, 04 Aug 2024 09:59:50 GMT
Content-Length: 102

{"code":200,"head":{"Content-Type":"text/plain; charset=utf-8"},"body":"ZWNobyhoZWxsbywgd29ybGQhKQ=="}
echo "ZWNobyhoZWxsbywgd29ybGQhKQ==" | base64 -d
# echo(hello, world!)

Releases

No releases published

Packages

No packages published

Languages