Commit Graph

37 Commits

Author SHA1 Message Date
Maycon Santos
17fbbbea2a
Skip docker login and upload artifacts (#298)
skipping docker login when PR to catch issues earlier

Also, uploading artifacts and keeping then for 3 days
This will help some debug
2022-04-15 18:59:23 +02:00
Misha Bragin
f5933660ba
Fix goreleaser linux & windows builds (#297) 2022-04-15 18:19:30 +02:00
Givi Khojanashvili
951e011a9c
Add Settings window to Agent UI
Agent systray UI has been extended with
a setting window that allows configuring 
management URL, admin URL and 
supports pre-shared key.
While for the Netbird managed version 
the Settings are not necessary, it helps
to properly configure the self-hosted version.
2022-04-15 17:30:12 +02:00
Maycon Santos
97ab8f4c34
Updating Go 1.18 and Wireguard dependencies (#282) 2022-03-22 14:59:17 +01:00
Maycon Santos
a2fc4ec221
Rotate Access token with refresh token (#280)
Add method for rotating access token with refresh tokens
This will be useful for catching expired sessions and
offboarding users

Also added functions to handle secrets. They have to be revisited
as some tests didn't run on CI as they waited some user input, like password
2022-03-22 13:12:11 +01:00
Givi Khojanashvili
4ef3c7a637
Add basic desktop UI - systray
This PR adds a basic UI for desktop
applications that support Linux, Max
and Windows.
2022-03-20 17:36:35 +01:00
Maycon Santos
1cd1e84290
Run tests in serial and update multi-peer test (#269)
Updates test workflows with serial execution to avoid collision 
of ports and resource names.

Also, used -exec sudo flag for UNIX tests and removed not-needed
 limits configuration on Linux and added a 5 minutes timeout.

Updated the multi-peer tests in the client/internal/engine_test.go
 to provide proper validation when creating or starting 
a peer engine instance fails.

As some operations of the tests running on windows
 are slow, we will experiment with disabling the Defender before 
restoring cache and checkout a repository, then we reenable 
it to run the tests.

disabled extra logs for windows interface
2022-03-16 11:02:06 +01:00
Mikhail Bragin
957474817f
Remove up_test (#268)
up_test is redundant because it is tested in
up_daemon_test

Co-authored-by: mlsmaycon <mlsmaycon@gmail.com>
2022-03-14 17:33:15 +01:00
Maycon Santos
3a69f334e8
Set correct goreleaser version and run on push (#267)
Set the correct goreleaser version with v prefix
and enable run the pipeline on every push
2022-03-14 13:38:06 +01:00
Mikhail Bragin
1660a915e2
Fix goreleaser version to 1.6.3 (#266)
As status command relies on log,
we should always use console as output

Co-authored-by: mlsmaycon <mlsmaycon@gmail.com>
2022-03-14 13:16:16 +01:00
Maycon Santos
3385ea6379
Update windows sign pipeline version (#248)
With the latest versions of runner 
and updates of dependencies 
a new version was generated.
2022-03-03 10:21:58 +01:00
shatoboar
b339a9321a
fix: reducing github actions (#215) 2022-02-01 11:53:24 +01:00
Maycon Santos
0739038d51
Fix unstable parallel tests (#202)
* update interface tests and configuration messages

* little debug

* little debug on both errors

* print all devs

* list of devices

* debug func

* handle interface close

* debug socks

* debug socks

* if ports match

* use random assigned ports

* remove unused const

* close management client connection when stopping engine

* GracefulStop when management clients are closed

* enable workflows on PRs too

* remove iface_test debug code
2022-01-25 09:40:28 +01:00
Maycon Santos
0f7ab4354b
Fix cicd testing issue (#197)
* sync module

* cache per test os

* different port for tests

* wireguard packages versions
2022-01-17 15:10:18 +01:00
Maycon Santos
64f2d295a8
Refactor Interface package and update windows driver (#192)
* script to generate syso files

* test wireguard-windows driver package

* set int log

* add windows test

* add windows test

* verbose bash

* use cd

* move checkout

* exit 0

* removed tty flag

* artifact path

* fix tags and add cache

* fix cache

* fix cache

* test dir

* restore artifacts in the root

* try dll file

* try dll file

* copy dll

* typo in copy dll

* compile test

* checkout first

* updated cicd

* fix add address issue and gen GUID

* psexec typo

* accept eula

* mod tidy before tests

* regular test exec and verbose test with psexec

* test all

* return WGInterface Interface

* use WgIfaceName and timeout after 30 seconds

* different ports and validate connect 2 peers

* Use time.After for timeout and close interface

* Use time.After for testing connect peers

* WG Interface struct

* Update engine and parse address

* refactor Linux create and assignAddress

* NewWGIface and configuration methods

* Update proxy with interface methods

* update up command test

* resolve lint warnings

* remove psexec test

* close copied files

* add goos before build

* run tests on mac,windows and linux

* cache by testing os

* run on push

* fix indentation

* adjust test timeouts

* remove parallel flag

* mod tidy before test

* ignore syso files

* removed functions and renamed vars

* different IPs for connect peers test

* Generate syso with DLL

* Single Close method

* use port from test constant

* test: remove wireguard interfaces after finishing engine test

* use load_wgnt_from_rsrc

Co-authored-by: braginini <bangvalo@gmail.com>
2022-01-17 14:01: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
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
Maycon Santos
8551afe04e
enhancement: Support new architectures and auto upload packages to repo (#128)
* adding uploads

* adding uploads

* adding uploads

* adding uploads

* adding uploads

* adding uploads

* use https://pkgs.wiretrustee.com/

* use https://pkgs.wiretrustee.com/

* use https://pkgs.wiretrustee.com/

* set yum id

* secrets for goreleaser uploads

* ensure Github release is enabled
2021-10-12 12:15:45 +02:00
Maycon Santos
e4f9406d44
Removed installer and add workflow dispatch (#120) 2021-09-25 19:30:12 +02:00
Maycon Santos
ee3c292699
Add homebrew tap (#110)
* test homebrew task

* secret HOMEBREW_TAP_GITHUB_TOKEN

* prepare for pr

* use homebrew-client

* add brew install
2021-09-06 14:15:08 +02:00
Maycon Santos
6c233fcc3f
Add windows installer (#109)
* windows installer

* unpack function in local dir

* working-directory client

* using env var plugin

* test tag and publishing

* getting version from tag

* using version number

* remove unnecessary commands and add description

* using long version outputs

* uncomment docker steps
2021-09-06 10:20:26 +02:00
Maycon Santos
a31cbb1f5b
abstract peer channel (#101)
* abstract peer channel

* remove wip code

* refactor NewServer with Peer updates channel

* add PeersUpdateManager tests

* adding documentation

* using older version of linter

* verbose lint

* skip cache

* setup go version

* extra output

* configure fetch-depth

* exit 0

* skip-build-cache: true

* disabling failure for lint for now

* fix: darwin issue

* enable lint failure

* remove sock file for macOS

* refactor: remove tests interdependence

* fixed linux native iface

Co-authored-by: braginini <bangvalo@gmail.com>
2021-08-29 17:48:31 +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
1a8c03bef0
feature: Support live peer list update (#51)
* created InitializePeer and ClosePeerConnection functions

* feature: simplify peer stopping

* chore: remove unused code

* feature: basic management service implementation (#44)

* feat: basic management service implementation [FAILING TESTS]

* test: fix healthcheck test

* test: #39 add peer registration endpoint test

* feat: #39 add setup key handling

* feat: #39 add peer management store persistence

* refactor: extract config read/write to the utility package

* refactor: move file contents copy to the utility package

* refactor: use Accounts instead of Users in the Store

* feature: add management server Docker file

* refactor: introduce datadir instead of config

* chore: use filepath.Join to concat filepaths instead of string concat

* refactor: move stop channel to the root

* refactor: move stop channel to the root

* review: fix PR review notes

Co-authored-by: braginini <hello@wiretrustee.com>

* Handle read config file errors

* feature: add letsencrypt support to the management service

* fix: lint warnings

* chore: change default datadir

* refactor: set default flags in code not Dockerfile

* chore: remove unused code

* Added RemovePeer and centralized configureDevice code

* remove peer from the wg interface when closing proxy

* remove config file

* add iface tests

* fix tests, validate if file exists before removing it

* removed unused functions UpdateListenPort and ConfigureWithKeyGen

* Ensure we don't wait for timeout when closing

* Rename ClosePeerConnection to RemovePeerConnection

* Avoid returning on uapi Accept failures

* Added engine tests

* Remove extra add address code

* Adding iface.Close

* Ensure Close the interface and disable parallel test execution

* check err var when listing interfaces

* chore: add synchronisation to peer management

* chore: add connection status to track peer connection

* refactor: remove unused code

Co-authored-by: braginini <hello@wiretrustee.com>
Co-authored-by: Mikhail Bragin <bangvalo@gmail.com>
2021-07-19 15:02:11 +02:00
mlsmaycon
cffb08ad23 Use go bin 2021-06-25 11:23:13 +02:00
mlsmaycon
8d05789749 preserve env GOROOT 2021-06-25 11:18:34 +02:00
mlsmaycon
ac628b6efa use sudo for testing service installation 2021-06-25 11:01:21 +02:00
mlsmaycon
714c4c3c44 use darwin 2021-06-15 00:13:52 +02:00
mlsmaycon
d5c4f6cb40 fix matrix var to use os 2021-06-15 00:08:54 +02:00
mlsmaycon
744984861b Add build to the test 2021-06-15 00:00:55 +02:00
braginini
74061597a3 fix: test workflow trigger 2021-06-03 12:35:31 +02:00
braginini
9b327ea6ba test: add signal encryption test 2021-06-03 11:39:19 +02:00
mlsmaycon
84c6eb5e16 Add golangci-lint workflow 2021-05-15 15:44:35 +05:00
mlsmaycon
33e9ecfcb9 using docker hub 2021-05-15 11:58:31 +05:00
mlsmaycon
bbf57b064c Building docker images for signal service 2021-05-11 12:38:41 +05:00
braginini
2b77da4e12 project init 2021-05-01 12:45:37 +02:00