gedigi / noisecat Goto Github PK
View Code? Open in Web Editor NEWThe noise swiss army knife
License: Other
The noise swiss army knife
License: Other
When in proxy mode, noisecat doesn't seem to capture the output of the endpoint.
Setup:
(1) tcpserver:1961
(2) noisecatproxy:1968
# printf 'text://127.0.0.1/\r\n' | noisecat -proto Noise_NN_25519_ChaChaPoly_BLAKE2b 127.0.0.1 1968
2021/04/28 11:49:19 SNT: 19
2021/04/28 11:49:19 RCV: 0
# noisecat -v -k -l -proto Noise_NN_25519_ChaChaPoly_BLAKE2b -proxy 127.0.0.1:1961 -p 1968 127.0.0.1
2021/04/28 11:49:10 Listening on [::]:1968/tcp
2021/04/28 11:49:19 Connection from 127.0.0.1:50718
2021/04/28 11:49:19 RCV: 19
2021/04/28 11:49:19 SNT: 0
# tcpserver -v -c42 -o -D -H -P -l 0 -R 127.0.0.1 1961 timeout 1 ../../bin/publictext
tcpserver: status: 0/42
tcpserver: status: 1/42
tcpserver: pid 5686 from 127.0.0.1
tcpserver: ok 5686 0:::ffff:127.0.0.1:1961 :::ffff:127.0.0.1::50719
127.0.0.1 - - [28/Apr/2021:11:49:19 +0200] "text://127.0.0.1/" 20 264
tcpserver: end 5686 status 0
tcpserver: status: 0/42
Would you know what's missing?
Very nice project!
Having noisecat
support Noise_XK_secp256k1_ChaChaPoly_SHA256
(the Lightning variant of Noise) would be very useful when playing with Lightning Network related projects.
See BOLT #8: Encrypted and Authenticated Transport for details.
# go version
go version go1.16.3 darwin/amd64
Getting a compilation error in noisenet/conn.go:
# make darwin
../noisenet/conn.go:97:14: assignment mismatch: 1 variable but c.out.Encrypt returns 2 values
Which refers to this line:
ciphertext := c.out.Encrypt(nil, nil, data[:m])
Adding an extra value alleviates the problem:
ciphertext, _ := c.out.Encrypt(nil, nil, data[:m])
After git clone
and fixing the assignment issue as described in #5, I get:
noisecat on master took 8s
❯ make
go get -u -f github.com/gedigi/noisecat/...
go get: -f flag is a no-op when using modules
go get: installing executables with 'go get' in module mode is deprecated.
Use 'go install pkg@version' instead.
For more information, see https://golang.org/doc/go-get-install-deprecation
or run 'go help get' or 'go help install'.
cd /tmp/noisecat/cmd/noisecat; \
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o /tmp/noisecat/bin/noisecat-linux-amd64 . ; \
cd /tmp/noisecat >/dev/null
go: cannot find main module, but found .git/config in /tmp/noisecat
to create a module there, run:
cd ../.. && go mod init
cd /tmp/noisecat/cmd/noisecat; \
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o /tmp/noisecat/bin/noisecat-darwin-amd64 . ; \
cd /tmp/noisecat >/dev/null
go: cannot find main module, but found .git/config in /tmp/noisecat
to create a module there, run:
cd ../.. && go mod init
cd /tmp/noisecat/cmd/noisecat; \
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o /tmp/noisecat/bin/noisecat-windows-amd64.exe . ; \
cd /tmp/noisecat >/dev/null
go: cannot find main module, but found .git/config in /tmp/noisecat
to create a module there, run:
cd ../.. && go mod init
Version:
❯ go version
go version go1.17.3 linux/amd64
I'm running Manjaro 21.2.0.
To bind a shell on port 444/tcp (default protocol) and accept multiple clients:
Probably should be 4444/tcp
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.