Commit Graph

50 Commits

Author SHA1 Message Date
Misha Bragin
86a66c6202
Make Signal Service listen on a standard 443/80 port instead of 10000 (#396)
Right now Signal Service runs the Let'sEncrypt manager on port 80
and a gRPC server on port 10000. There are two separate listeners.
This PR combines these listeners into one with a cmux lib.
The gRPC server runs on either 443 with TLS or 80 without TLS.
Let's Encrypt manager always runs on port 80.
2022-07-25 19:55:38 +02:00
Misha Bragin
275d364df6
Fix TURN credentials renewal (#394)
Update conn config with new TURN credentials

Updated Signal connection timeout to 5s
2022-07-21 22:07:38 +02:00
Misha Bragin
3bdfa3cc8e
Introduce larger retries for the agent (#379)
The Management client will try reconnecting in case.
of network issues or non-permanent errors.
If the device was off-boarded, then the client will stop retrying.
2022-07-02 20:38:16 +02:00
Maycon Santos
5cbfa4bb9e
Rebrand client cli (#320) 2022-05-22 18:53:47 +02:00
shatoboar
77e58295e7
Rename wiretrustee-signal to netbird-signal (#313)
* rename wiretrustee-signal to netbird-signal

* Rename Signal repositories and source bin

* Adjust docker-compose with signal volume [skip ci]

Co-authored-by: mlsmaycon <mlsmaycon@gmail.com>
2022-05-13 21:51:41 +02:00
Maycon Santos
c3bc85e22d
Rename module to netbirdio/netbird (#288)
rename the go module to netbirdio/netbird 
as part of our rebranding.
2022-03-26 12:08:54 +01:00
Maycon Santos
ede2795529
Replace Wiretrustee links and naming (#287)
* Replace Wiretrustee links and naming

* Upper case for Netbrid in README

* Replace logo

* Dashboard URL to app.netbird.io

Co-authored-by: Misha Bragin <bangvalo@gmail.com>
2022-03-26 11:39:27 +01:00
Mikhail Bragin
3c959bb178
Login exits on a single attempt to connect to management (#220)
* fix: login exits on a single attempt to connect to management

* chore: add log verbosity for Login operation
2022-02-06 18:56:00 +01:00
Mikhail Bragin
5db130a12e
Support new Management service protocol (NetworkMap) (#193)
* feature: support new management service protocol

* chore: add more logging to track networkmap serial

* refactor: organize peer update code in engine

* chore: fix lint issues

* refactor: extract Signal client interface

* test: add signal client mock

* refactor: introduce Management Service client interface

* chore: place management and signal clients mocks to respective packages

* test: add Serial test to the engine

* fix: lint issues

* test: unit tests for a networkMapUpdate

* test: unit tests Sync update
2022-01-18 16:44:58 +01:00
Mikhail Bragin
319632ffe8
Fix concurrency on the client (#183)
* reworked peer connection establishment logic eliminating race conditions and deadlocks while running many peers
2022-01-10 18:43:13 +01:00
Mikhail Bragin
4d2b194570
[Signal] - when peer disconnects registry keeps broken gRPC stream (#178)
* fix: [signal] - when peer disconnects registry keeps broken gRPC stream. The peer is removed on stream closed.

* chore: [signal] - improve logging

* chore: [signal] - improve logging
2021-12-31 19:25:44 +01:00
Mikhail Bragin
a67b9a16af
fix peer update concurrency on the client side (#177)
* fix: gRpc Signal and Management connections deadlock on IDLE state

* fix: client peer update concurrency issues
2021-12-31 18:11:33 +01:00
Mikhail Bragin
8c75ef8bef
update to go 1.17 (#167)
* chore: update to go 1.17

* fix: update workflows go version

* fix: golint errors/update grpc
2021-12-21 10:02:25 +01:00
Mikhail Bragin
d08e5efbce
fix: too many open files caused by agent not being closed (#154)
* fix: too many open files caused by agent not being closed after unsuccessful attempts to start a peer connection (happens when no network available)

* fix: minor refactor to consider signal status
2021-11-14 19:41:17 +01:00
Mikhail Bragin
ed1e4dfc51
refactor signal client sync func (#147)
* refactor: move goroutine that runs Signal Client Receive to the engine for better control

* chore: fix comments typo

* test: fix golint

* chore: comments update

* chore: consider connection state=READY in signal and management clients

* chore: fix typos

* test: fix signal ping-pong test

* chore: add wait condition to signal client

* refactor: add stream status to the Signal client

* refactor: defer mutex unlock
2021-11-06 15:00:13 +01:00
braginini
4d34fb4e64 chore: decrease backoff maxinterval to avoid long connection waiting times on the client app 2021-11-02 14:51:29 +01:00
Mikhail Bragin
d040cfed7e
fix: client app retry logic (#144)
* fix: retry logic
2021-11-01 09:34:06 +01:00
braginini
e9066b4651 chore: increase signal and management gRPC clients timeouts 2021-10-31 12:14:00 +01:00
Mikhail Bragin
bef3b3392b
fix: graceful shutdown (#134)
* fix: graceful shutdown

* fix: windows graceful shutdown
2021-10-17 22:15:38 +02:00
Mikhail Bragin
ec759bc461
Delete peer (#114)
* feature: add peer deletion

* feature: add peer deletion [CLIENT]

* fix: lint error

* test: fix sync block

* test: fix management test

* feature: add client stop after was deleted

* chore: remove permission denied cancellation

* chore: add larger signal backoff

* feature: notify deleted peer of removal

* fix: lint issue

* chore: add 2nd default key - one off

* test: fix account key check
2021-09-07 18:36:46 +02:00
Mikhail Bragin
13b4be31df
feature: add logging to a file (#112)
* feature: add logging to a file

* refactor: move InitLog to util lib

* docs: update signal and management docs

* chore: update docker compose

* set --log-file to console

* chore: comment out log volume in docker compose

Co-authored-by: mlsmaycon <mlsmaycon@gmail.com>
2021-09-07 09:53:18 +02:00
braginini
2e9fc20567 feature: add update setup key endpoint 2021-08-20 22:33:43 +02:00
Mikhail Bragin
1dfa99d07c
add wiretrustee LOGIN command (#90)
* feature: add wiretrustee LOGIN command

* chore: add management initial connection timeout

* test: add login cmd test

* test: validate generated config in login cmd

* test: add up command test

* chore: add timeout to signal client creation method

* test: close wireguard interface once test finished
2021-08-18 13:35:42 +02:00
Mikhail Bragin
877ad97a96
Peer management login (#83)
* feature: replace RegisterPeer with Login method that does both - registration and login

* test: add management login test

* feature: add WiretrusteeConfig to the Login response to configure peer global config

* feature: add client peer login support

* fix: missing parts

* chore: update go deps

* feature: support Management Service gRPC endpoints [CLIENT]

* feature: finalize client sync with management

* fix: management store peer key lower case restore

* fix: management returns peer ip without a mask

* refactor: remove cmd pkg

* fix: invalid tun interface name on mac

* fix: timeout when calling management client

* fix: tests and lint errors

* fix: golang-test workflow

* fix: client service tests

* fix: iface build

* feature: detect management scheme on startup

* chore: better logs for management

* fix: goreleaser

* fix: lint errors

* fix: signal TLS

* fix: direct Wireguard connection

* chore: verbose logging on direct connection
2021-08-15 16:56:26 +02:00
Maycon Santos
80de6a75d5
Self contained signal cmd build (#82)
* Moved Signal CMD to Signal directory

* Removed config dir and fixed a parameter typo

* removed attempt to create ssl directory

* Update Signal build configuration

* move Signal documentation to its directory

* removed unused variables

* test build management and signal

* User run as subcommand to execute the signal daemon
2021-08-13 08:46:30 +02:00
Maycon Santos
d5af5f1878
Refactor: Move Signal server and client (#80)
* Move Signal Server

* Move Signal Client

* Cleanup duplicates and unused files

* Moved Signal client tests
2021-08-09 19:21:48 +02:00
Maycon Santos
6ce5b2c815
Support Signal server with TLS (#76)
* tlsEnabled flag and DialOption

* Update signal client invocations
2021-08-01 12:54:35 +02:00
Mikhail Bragin
2172d6f1b9
Extract common server encryption logic (#65)
* refactor: extract common message encryption logic
* refactor: move letsencrypt logic to common
* refactor: rename common package to encryption
* test: add encryption tests
2021-07-22 15:23:24 +02:00
Mikhail Bragin
079d35eada
Extend Management to support peer changes distribution (#55)
* feature: add peer sync and a server public key endpoints
* test: add Management.Sync() gRpc endpoint test
* feat: implement peer sync
* docs: added some comments to the Management server
* chore: use for loop over channel when monitoring peer updates
* fix: exit infinite loop when sending updates to peers
* test: add multiple concurrent peers test for management service
* chore: remove unused test
* fix: reduce the amount peers for a concurrent peer update test

Co-authored-by: braginini <m.bragin@wiretrustee.com>
2021-07-22 10:28:00 +02:00
Mikhail Bragin
d27eb317aa
update signal gRpc, enable TLS and add keepalive params (#62)
* chore: update signal gRpc
* chore: add Signal keep alive params and policy
* feature: add signal TLS support
* refactor: move signal Dockerfile to the corresponding folder
Co-authored-by: braginini <m.bragin@wiretrustee.com>
2021-07-21 20:23:11 +02:00
braginini
db673ed34f fix: #35 peer Registration Race when client connects to the signal server 2021-06-17 11:12:35 +02:00
braginini
9308a51800 refactor: rename SignalExchangeServer to Server to comply with good practices 2021-06-15 19:02:46 +02:00
braginini
94c0091a7b test: add message exchange test timeout 2021-06-15 18:58:47 +02:00
braginini
f247f9a2f8 chore: fix golint error 2021-06-15 16:31:45 +02:00
braginini
c49bd23ac5 chore: fix golint error 2021-06-15 16:20:39 +02:00
braginini
dfcf9f9087 test: add messages exchange between peers [SIGNAL] 2021-06-15 16:13:27 +02:00
braginini
5f8a489f90 test: add basic signal IT tests 2021-06-15 16:13:27 +02:00
Andrey Parfenov
6b5010f7d5 Fix Signal doc styling 2021-06-14 20:08:06 -07:00
braginini
06b0c46a5d chore: [Signal] synchronize peer registry 2021-06-10 17:08:40 +02:00
braginini
33a98c7a2c test: add signal peer test 2021-06-03 12:23:18 +02:00
braginini
9b327ea6ba test: add signal encryption test 2021-06-03 11:39:19 +02:00
braginini
44d5e7f205 fix: golint errors (part 3) 2021-05-19 11:17:15 +02:00
braginini
5342f10e7f fix: golint errors 2021-05-19 10:58:21 +02:00
mlsmaycon
e6358e7bb2 fix doc and lint warns for signal package 2021-05-15 15:20:49 +05:00
braginini
54e4e74883 feat: add signal Docker 2021-05-05 15:48:29 +02:00
braginini
682049b49c chore: add a bit more logs to the init command 2021-05-05 12:15:55 +02:00
braginini
f171f6755b fix: signal message encryption 2021-05-05 10:40:53 +02:00
braginini
4e348b733a fix: message type in the signal implementation 2021-05-01 18:37:30 +02:00
braginini
6cd44f1522 feat: add encryption of the payload exchanged via signal 2021-05-01 18:29:59 +02:00
braginini
2b77da4e12 project init 2021-05-01 12:45:37 +02:00