Asim Aslam
563768b58a
v3 refactor ( #1868 )
...
* Move to v3
Co-authored-by: Ben Toogood <bentoogood@gmail.com>
2020-07-27 13:22:00 +01:00
7b385bf163
minimize allocations in logger and tunnel code ( #1323 )
...
* logs alloc
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* fix allocs
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* fix allocs
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* tunnel allocs
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* try to fix tunnel
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* cache cipher for send
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-11 17:55:39 +00:00
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
6a9f5fac61
fire send in a go routine to prevent blocking other requests
2020-01-25 23:16:00 +00:00
Milos Gajdos
efcac3d009
Define tunnel errors
2020-01-13 20:14:30 +00:00
Milos Gajdos
78aed5beed
Fixed tunnel race conditions. ( #1094 )
2020-01-08 14:48:38 +00:00
Asim Aslam
b0b6b8fce2
final updates
2019-12-13 15:27:47 +00:00
Asim Aslam
caa74d1b5f
fix build
2019-12-12 23:29:44 +00:00
Asim Aslam
f6b4a9da1c
strip some code
2019-12-12 23:20:31 +00:00
Asim Aslam
74c5102e41
strip a couple things
2019-12-12 21:49:39 +00:00
Asim Aslam
7bd50cd251
fix more broken cruft
2019-12-12 17:10:32 +00:00
Asim Aslam
df728aaddd
remove go routines from tunnel, fire network messages in go routines
2019-12-12 13:34:08 +00:00
Asim Aslam
ae934c19f1
fix tunnel test
2019-12-12 13:04:34 +00:00
Asim Aslam
e260cc4a24
save cruft
2019-12-12 12:27:46 +00:00
Asim Aslam
27af221fd2
batch metric updates
2019-12-11 15:23:08 +00:00
Asim Aslam
6e28e7a86f
Save current state of the world
2019-12-11 14:37:03 +00:00
Asim Aslam
398acc67ca
fix broken test
2019-12-08 13:45:24 +00:00
Asim Aslam
6307d6ba51
further cleanup of tunnel/network
2019-12-08 12:12:20 +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
Milos Gajdos
5db7514a91
This PR fixes various tunnel race conditions
2019-12-05 15:50:32 +00:00
a1eaf9cc20
linting fixes
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-12-04 00:22:02 +03:00
Asim Aslam
93d66afe8c
fix that broken logic
2019-12-01 19:43:36 +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
Till Knuesting
24b8d2a315
preallocating slices ( #904 )
...
* preallocated some slices when size is known
* gofmt
* gofmt
2019-11-04 10:33:53 +00:00
Asim Aslam
45cd14c4b7
Suppress log messages
2019-11-03 16:12:17 +00:00
tegk
f88518d994
used gofmt with -s flag on whole project
2019-11-01 15:07:53 +00:00
Asim Aslam
cf593e7c50
fix link panic
2019-10-31 17:22:38 +00:00
Asim Aslam
3831199600
Use best link in tunnel, loop waiting for announce and accept messages, cleanup some code
2019-10-25 14:16:22 +01:00
Asim Aslam
f26d470db1
A few changes for the network / tunnel link state
2019-10-24 17:51:41 +01:00
Milos Gajdos
494eb13534
Make sure we pick some link when Dialling
2019-10-24 16:07:31 +01:00
Asim Aslam
842fc01568
add send/recv queues for link
2019-10-23 16:05:21 +01:00
Asim Aslam
d64f8c665e
add rate measure
2019-10-22 19:38:29 +01:00
Asim Aslam
407694232a
Measure roundtrip times on link
2019-10-22 18:43:09 +01:00
Milos Gajdos
2ae583ce94
Cleanup of tunnel dial code. Clean up network channel processors
2019-10-16 20:44:22 +01:00
Asim Aslam
ca18089382
Fix bugs related to needing to send Broadcast
2019-10-15 15:55:08 +01:00
Asim Aslam
7b1f5584ab
Tunnel mode
2019-10-15 15:40:04 +01:00
Asim Aslam
f77df51f60
Support reconnects
2019-10-13 18:36:22 +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
9e33637213
Do not log send/recv body
2019-09-25 20:24:56 +01:00
Asim Aslam
3d2bf7d4f6
Add log message
2019-09-25 12:36:07 +01:00
Asim Aslam
6c2b9d7636
Keep track of errors and delete beyond error count > 3
2019-09-25 12:14:09 +01:00