Commit Graph

29 Commits

Author SHA1 Message Date
43b0dbb123
tunnel: reduce allocation and improve performance (#1320)
* tunnel: reduce allocation and improve performance

BenchmarkSha256Old-16 100000 156748 ns/op 11835 B/op 168 allocs/op
BenchmarkSha256Old-16 100000 156229 ns/op 11819 B/op 168 allocs/op

BenchmarkSha256New-16 100000 154751 ns/op 11107 B/op 161 allocs/op
BenchmarkSha256New-16 100000 154263 ns/op 11110 B/op 161 allocs/op

simple change lowers allocations and brings performance

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* fix

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* tunnel: reuse buf in Decrypt

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* fix unneeded conversations

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* base32 string is smaller than hex string

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-09 17:10:08 +00:00
5b0175c2e5
allocations improvements and tunnel fixes (#1248)
* reduce allocations in tunnel code

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* another allocation fix

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* allocate maps with len if it known

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* allocate key for send once

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-02-24 14:15:20 +00:00
117f56ebf7
prune util/log and user logger (#1237)
* prune util/log and user logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* plaintext logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* add newline

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-02-23 13:45:20 +00:00
f23638c036 fix import paths for v2 release
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-01-30 14:44:40 +03:00
Asim Aslam
7bd50cd251 fix more broken cruft 2019-12-12 17:10:32 +00:00
Asim Aslam
e260cc4a24 save cruft 2019-12-12 12:27:46 +00:00
Asim Aslam
283c85d256 done 2019-12-08 00:53:55 +00:00
Asim Aslam
9bd0fb9125 save changes 2019-12-07 23:28:39 +00:00
Asim Aslam
c445aed6b1 Cleanup and speedup network convergence along with direct messaging for connect and solicit 2019-12-07 19:54:29 +00:00
Asim Aslam
1d8c66780e save working solution 2019-12-06 00:18:40 +00:00
Asim Aslam
219efd27e9 Optimise the multicast to use one session in the tunnel 2019-12-05 23:11:42 +00:00
Asim Aslam
c840cee404 A variety of fixes to try combat the multicast issue 2019-12-01 19:36:16 +00:00
Asim Aslam
9678daeafa fix bug in the tunnel which causes multicast connections to be closed 2019-11-30 01:14:40 +00:00
Milos Gajdos
9095b99f6b
Token has been stripped; Headers are encrypted 2019-11-25 18:56:00 +00:00
Asim Aslam
7b1f5584ab Tunnel mode 2019-10-15 15:40:04 +01:00
Milos Gajdos
21469a0427
Clean up dead tunnel code
Running go vet on tunnel package returns:
$ go vet ./...
./default.go:929:2: unreachable code
./link.go:104:2: unreachable code
./listener.go:184:2: unreachable code
./session.go:241:2: unreachable code
2019-10-11 11:02:45 +01:00
Asim Aslam
1840b5bd74 Update tunnel to send discovery on connect and multicast messages. Announce as broadcast 2019-09-05 15:16:11 +01:00
Asim Aslam
407381912b Don't try discover on multicast, don't block existing sessions on listen 2019-09-04 15:55:37 +01:00
Asim Aslam
66db0ac52c Move announce into session 2019-09-04 11:58:03 +01:00
Asim Aslam
b9c437fbfe Tunnel discover/announce/open/session/close 2019-09-04 09:48:05 +01:00
Asim Aslam
6c7582a6be Move message to session 2019-09-03 15:56:37 +01:00
Asim Aslam
6fa9d7270f Rename Tunnel ID to Channel 2019-08-30 20:05:00 +01:00
Asim Aslam
00ab58f61b Fix loopback cruft 2019-08-29 12:42:27 +01:00
Asim Aslam
6ab86c9e57 Don't process unless connected, and only fire loopback messages back up the loopback 2019-08-28 23:12:22 +01:00
Asim Aslam
01cb146e0d send message once after creating socket 2019-08-11 18:24:16 +01:00
Asim Aslam
d0d729a789 fix the tunnel execution 2019-08-11 18:11:33 +01:00
Asim Aslam
2c66e94045 fix some tunnel bugs like races and duplicate messages... 2019-08-10 16:37:49 +01:00
Milos Gajdos
9eb45dac82
Close the tunnel listener when the tunnel is cloed. 2019-08-08 15:20:53 +01:00
Asim Aslam
117376a922 Add back the old tunnel interface 2019-08-07 18:44:33 +01:00