[misc, client, management] Replace Wiretrustee with Netbird (#3267)

This commit is contained in:
Viktor Liu 2025-02-05 16:49:41 +01:00 committed by GitHub
parent 0125cd97d8
commit 97d498c59c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
36 changed files with 679 additions and 681 deletions

View File

@ -12,7 +12,7 @@ env:
SIGN_PIPE_VER: "v0.0.18" SIGN_PIPE_VER: "v0.0.18"
GORELEASER_VER: "v2.3.2" GORELEASER_VER: "v2.3.2"
PRODUCT_NAME: "NetBird" PRODUCT_NAME: "NetBird"
COPYRIGHT: "Wiretrustee UG (haftungsbeschreankt)" COPYRIGHT: "NetBird GmbH"
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.actor_id }} group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.actor_id }}

View File

@ -1,3 +1,3 @@
Mikhail Bragin (https://github.com/braginini) Mikhail Bragin (https://github.com/braginini)
Maycon Santos (https://github.com/mlsmaycon) Maycon Santos (https://github.com/mlsmaycon)
Wiretrustee UG (haftungsbeschränkt) NetBird GmbH

View File

@ -3,10 +3,10 @@
We are incredibly thankful for the contributions we receive from the community. We are incredibly thankful for the contributions we receive from the community.
We require our external contributors to sign a Contributor License Agreement ("CLA") in We require our external contributors to sign a Contributor License Agreement ("CLA") in
order to ensure that our projects remain licensed under Free and Open Source licenses such order to ensure that our projects remain licensed under Free and Open Source licenses such
as BSD-3 while allowing Wiretrustee to build a sustainable business. as BSD-3 while allowing NetBird to build a sustainable business.
Wiretrustee is committed to having a true Open Source Software ("OSS") license for NetBird is committed to having a true Open Source Software ("OSS") license for
our software. A CLA enables Wiretrustee to safely commercialize our products our software. A CLA enables NetBird to safely commercialize our products
while keeping a standard OSS license with all the rights that license grants to users: the while keeping a standard OSS license with all the rights that license grants to users: the
ability to use the project in their own projects or businesses, to republish modified ability to use the project in their own projects or businesses, to republish modified
source, or to completely fork the project. source, or to completely fork the project.
@ -20,11 +20,11 @@ This is a human-readable summary of (and not a substitute for) the full agreemen
This highlights only some of key terms of the CLA. It has no legal value and you should This highlights only some of key terms of the CLA. It has no legal value and you should
carefully review all the terms of the actual CLA before agreeing. carefully review all the terms of the actual CLA before agreeing.
<li>Grant of copyright license. You give Wiretrustee permission to use your copyrighted work <li>Grant of copyright license. You give NetBird permission to use your copyrighted work
in commercial products. in commercial products.
</li> </li>
<li>Grant of patent license. If your contributed work uses a patent, you give Wiretrustee a <li>Grant of patent license. If your contributed work uses a patent, you give NetBird a
license to use that patent including within commercial products. You also agree that you license to use that patent including within commercial products. You also agree that you
have permission to grant this license. have permission to grant this license.
</li> </li>
@ -45,7 +45,7 @@ more.
# Why require a CLA? # Why require a CLA?
Agreeing to a CLA explicitly states that you are entitled to provide a contribution, that you cannot withdraw permission Agreeing to a CLA explicitly states that you are entitled to provide a contribution, that you cannot withdraw permission
to use your contribution at a later date, and that Wiretrustee has permission to use your contribution in our commercial to use your contribution at a later date, and that NetBird has permission to use your contribution in our commercial
products. products.
This removes any ambiguities or uncertainties caused by not having a CLA and allows users and customers to confidently This removes any ambiguities or uncertainties caused by not having a CLA and allows users and customers to confidently
@ -65,25 +65,25 @@ Follow the steps given by the bot to sign the CLA. This will require you to log
information from your account) and to fill in a few additional details such as your name and email address. We will only information from your account) and to fill in a few additional details such as your name and email address. We will only
use this information for CLA tracking; none of your submitted information will be used for marketing purposes. use this information for CLA tracking; none of your submitted information will be used for marketing purposes.
You only have to sign the CLA once. Once you've signed the CLA, future contributions to any Wiretrustee project will not You only have to sign the CLA once. Once you've signed the CLA, future contributions to any NetBird project will not
require you to sign again. require you to sign again.
# Legal Terms and Agreement # Legal Terms and Agreement
In order to clarify the intellectual property license granted with Contributions from any person or entity, Wiretrustee In order to clarify the intellectual property license granted with Contributions from any person or entity, NetBird
UG (haftungsbeschränkt) ("Wiretrustee") must have a Contributor License Agreement ("CLA") on file that has been signed GmbH ("NetBird") must have a Contributor License Agreement ("CLA") on file that has been signed
by each Contributor, indicating agreement to the license terms below. This license does not change your rights to use by each Contributor, indicating agreement to the license terms below. This license does not change your rights to use
your own Contributions for any other purpose. your own Contributions for any other purpose.
You accept and agree to the following terms and conditions for Your present and future Contributions submitted to You accept and agree to the following terms and conditions for Your present and future Contributions submitted to
Wiretrustee. Except for the license granted herein to Wiretrustee and recipients of software distributed by Wiretrustee, NetBird. Except for the license granted herein to NetBird and recipients of software distributed by NetBird,
You reserve all right, title, and interest in and to Your Contributions. You reserve all right, title, and interest in and to Your Contributions.
1. Definitions. 1. Definitions.
``` ```
"You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner "You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner
that is making this Agreement with Wiretrustee. For legal entities, the entity making a Contribution and all other that is making this Agreement with NetBird. For legal entities, the entity making a Contribution and all other
entities that control, are controlled by, or are under common control with that entity are considered entities that control, are controlled by, or are under common control with that entity are considered
to be a single Contributor. For the purposes of this definition, "control" means (i) the power, direct or indirect, to be a single Contributor. For the purposes of this definition, "control" means (i) the power, direct or indirect,
to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty
@ -91,23 +91,23 @@ You reserve all right, title, and interest in and to Your Contributions.
``` ```
``` ```
"Contribution" shall mean any original work of authorship, including any modifications or additions to "Contribution" shall mean any original work of authorship, including any modifications or additions to
an existing work, that is or previously has been intentionally submitted by You to Wiretrustee for inclusion in, an existing work, that is or previously has been intentionally submitted by You to NetBird for inclusion in,
or documentation of, any of the products owned or managed by Wiretrustee (the "Work"). or documentation of, any of the products owned or managed by NetBird (the "Work").
For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication
sent to Wiretrustee or its representatives, including but not limited to communication on electronic mailing lists, sent to NetBird or its representatives, including but not limited to communication on electronic mailing lists,
source code control systems, and issue tracking systems that are managed by, or on behalf of, source code control systems, and issue tracking systems that are managed by, or on behalf of,
Wiretrustee for the purpose of discussing and improving the Work, but excluding communication that is conspicuously NetBird for the purpose of discussing and improving the Work, but excluding communication that is conspicuously
marked or otherwise designated in writing by You as "Not a Contribution." marked or otherwise designated in writing by You as "Not a Contribution."
``` ```
2. Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to Wiretrustee 2. Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to NetBird
and to recipients of software distributed by Wiretrustee a perpetual, worldwide, non-exclusive, no-charge, and to recipients of software distributed by NetBird a perpetual, worldwide, non-exclusive, no-charge,
royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly
perform, sublicense, and distribute Your Contributions and such derivative works. perform, sublicense, and distribute Your Contributions and such derivative works.
3. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to Wiretrustee and 3. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to NetBird and
to recipients of software distributed by Wiretrustee a perpetual, worldwide, non-exclusive, no-charge, royalty-free, to recipients of software distributed by NetBird a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import,
and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are
necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Work to which necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Work to which
@ -121,8 +121,8 @@ You reserve all right, title, and interest in and to Your Contributions.
intellectual property that you create that includes your Contributions, you represent that you have received intellectual property that you create that includes your Contributions, you represent that you have received
permission to make Contributions on behalf of that employer, that you will have received permission from your current permission to make Contributions on behalf of that employer, that you will have received permission from your current
and future employers for all future Contributions, that your applicable employer has waived such rights for all of and future employers for all future Contributions, that your applicable employer has waived such rights for all of
your current and future Contributions to Wiretrustee, or that your employer has executed a separate Corporate CLA your current and future Contributions to NetBird, or that your employer has executed a separate Corporate CLA
with Wiretrustee. with NetBird.
5. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of 5. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of
@ -138,11 +138,11 @@ You reserve all right, title, and interest in and to Your Contributions.
MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
7. Should You wish to submit work that is not Your original creation, You may submit it to Wiretrustee separately from 7. Should You wish to submit work that is not Your original creation, You may submit it to NetBird separately from
any Contribution, identifying the complete details of its source and of any license or other restriction (including, any Contribution, identifying the complete details of its source and of any license or other restriction (including,
but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and
conspicuously marking the work as "Submitted on behalf of a third-party: [named here]". conspicuously marking the work as "Submitted on behalf of a third-party: [named here]".
8. You agree to notify Wiretrustee of any facts or circumstances of which you become aware that would make these 8. You agree to notify NetBird of any facts or circumstances of which you become aware that would make these
representations inaccurate in any respect. representations inaccurate in any respect.

View File

@ -1,6 +1,6 @@
BSD 3-Clause License BSD 3-Clause License
Copyright (c) 2022 Wiretrustee UG (haftungsbeschränkt) & AUTHORS Copyright (c) 2022 NetBird GmbH & AUTHORS
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

View File

@ -2,5 +2,5 @@
package configurer package configurer
// WgInterfaceDefault is a default interface name of Wiretrustee // WgInterfaceDefault is a default interface name of Netbird
const WgInterfaceDefault = "wt0" const WgInterfaceDefault = "wt0"

View File

@ -2,5 +2,5 @@
package configurer package configurer
// WgInterfaceDefault is a default interface name of Wiretrustee // WgInterfaceDefault is a default interface name of Netbird
const WgInterfaceDefault = "utun100" const WgInterfaceDefault = "utun100"

View File

@ -63,7 +63,7 @@ func (t *WGTunDevice) Create(routes []string, dns string, searchDomains []string
t.filteredDevice = newDeviceFilter(tunDevice) t.filteredDevice = newDeviceFilter(tunDevice)
log.Debugf("attaching to interface %v", name) log.Debugf("attaching to interface %v", name)
t.device = device.NewDevice(t.filteredDevice, t.iceBind, device.NewLogger(wgLogLevel(), "[wiretrustee] ")) t.device = device.NewDevice(t.filteredDevice, t.iceBind, device.NewLogger(wgLogLevel(), "[netbird] "))
// without this property mobile devices can discover remote endpoints if the configured one was wrong. // without this property mobile devices can discover remote endpoints if the configured one was wrong.
// this helps with support for the older NetBird clients that had a hardcoded direct mode // this helps with support for the older NetBird clients that had a hardcoded direct mode
// t.device.DisableSomeRoamingForBrokenMobileSemantics() // t.device.DisableSomeRoamingForBrokenMobileSemantics()

View File

@ -64,7 +64,7 @@ func (t *TunDevice) Create() (WGConfigurer, error) {
t.filteredDevice = newDeviceFilter(tunDevice) t.filteredDevice = newDeviceFilter(tunDevice)
log.Debug("Attaching to interface") log.Debug("Attaching to interface")
t.device = device.NewDevice(t.filteredDevice, t.iceBind, device.NewLogger(wgLogLevel(), "[wiretrustee] ")) t.device = device.NewDevice(t.filteredDevice, t.iceBind, device.NewLogger(wgLogLevel(), "[netbird] "))
// without this property mobile devices can discover remote endpoints if the configured one was wrong. // without this property mobile devices can discover remote endpoints if the configured one was wrong.
// this helps with support for the older NetBird clients that had a hardcoded direct mode // this helps with support for the older NetBird clients that had a hardcoded direct mode
// t.device.DisableSomeRoamingForBrokenMobileSemantics() // t.device.DisableSomeRoamingForBrokenMobileSemantics()

View File

@ -177,7 +177,7 @@ func (c *ConnectClient) run(mobileDependency MobileDependency, runningChan chan
} }
}() }()
// connect (just a connection, no stream yet) and login to Management Service to get an initial global Wiretrustee config // connect (just a connection, no stream yet) and login to Management Service to get an initial global Netbird config
loginResp, err := loginToManagement(engineCtx, mgmClient, publicSSHKey, c.config) loginResp, err := loginToManagement(engineCtx, mgmClient, publicSSHKey, c.config)
if err != nil { if err != nil {
log.Debug(err) log.Debug(err)
@ -199,8 +199,8 @@ func (c *ConnectClient) run(mobileDependency MobileDependency, runningChan chan
c.statusRecorder.UpdateLocalPeerState(localPeerState) c.statusRecorder.UpdateLocalPeerState(localPeerState)
signalURL := fmt.Sprintf("%s://%s", signalURL := fmt.Sprintf("%s://%s",
strings.ToLower(loginResp.GetWiretrusteeConfig().GetSignal().GetProtocol().String()), strings.ToLower(loginResp.GetNetbirdConfig().GetSignal().GetProtocol().String()),
loginResp.GetWiretrusteeConfig().GetSignal().GetUri(), loginResp.GetNetbirdConfig().GetSignal().GetUri(),
) )
c.statusRecorder.UpdateSignalAddress(signalURL) c.statusRecorder.UpdateSignalAddress(signalURL)
@ -211,8 +211,8 @@ func (c *ConnectClient) run(mobileDependency MobileDependency, runningChan chan
c.statusRecorder.MarkSignalDisconnected(err) c.statusRecorder.MarkSignalDisconnected(err)
}() }()
// with the global Wiretrustee config in hand connect (just a connection, no stream yet) Signal // with the global Netbird config in hand connect (just a connection, no stream yet) Signal
signalClient, err := connectToSignal(engineCtx, loginResp.GetWiretrusteeConfig(), myPrivateKey) signalClient, err := connectToSignal(engineCtx, loginResp.GetNetbirdConfig(), myPrivateKey)
if err != nil { if err != nil {
log.Error(err) log.Error(err)
return wrapErr(err) return wrapErr(err)
@ -311,7 +311,7 @@ func (c *ConnectClient) run(mobileDependency MobileDependency, runningChan chan
} }
func parseRelayInfo(loginResp *mgmProto.LoginResponse) ([]string, *hmac.Token) { func parseRelayInfo(loginResp *mgmProto.LoginResponse) ([]string, *hmac.Token) {
relayCfg := loginResp.GetWiretrusteeConfig().GetRelay() relayCfg := loginResp.GetNetbirdConfig().GetRelay()
if relayCfg == nil { if relayCfg == nil {
return nil, nil return nil, nil
} }
@ -440,7 +440,7 @@ func createEngineConfig(key wgtypes.Key, config *Config, peerConfig *mgmProto.Pe
} }
// connectToSignal creates Signal Service client and established a connection // connectToSignal creates Signal Service client and established a connection
func connectToSignal(ctx context.Context, wtConfig *mgmProto.WiretrusteeConfig, ourPrivateKey wgtypes.Key) (*signal.GrpcClient, error) { func connectToSignal(ctx context.Context, wtConfig *mgmProto.NetbirdConfig, ourPrivateKey wgtypes.Key) (*signal.GrpcClient, error) {
var sigTLSEnabled bool var sigTLSEnabled bool
if wtConfig.Signal.Protocol == mgmProto.HostConfig_HTTPS { if wtConfig.Signal.Protocol == mgmProto.HostConfig_HTTPS {
sigTLSEnabled = true sigTLSEnabled = true
@ -457,7 +457,7 @@ func connectToSignal(ctx context.Context, wtConfig *mgmProto.WiretrusteeConfig,
return signalClient, nil return signalClient, nil
} }
// loginToManagement creates Management Services client, establishes a connection, logs-in and gets a global Wiretrustee config (signal, turn, stun hosts, etc) // loginToManagement creates Management Services client, establishes a connection, logs-in and gets a global Netbird config (signal, turn, stun hosts, etc)
func loginToManagement(ctx context.Context, client mgm.Client, pubSSHKey []byte, config *Config) (*mgmProto.LoginResponse, error) { func loginToManagement(ctx context.Context, client mgm.Client, pubSSHKey []byte, config *Config) (*mgmProto.LoginResponse, error) {
serverPublicKey, err := client.GetServerPublicKey() serverPublicKey, err := client.GetServerPublicKey()

View File

@ -608,8 +608,8 @@ func (e *Engine) handleSync(update *mgmProto.SyncResponse) error {
e.syncMsgMux.Lock() e.syncMsgMux.Lock()
defer e.syncMsgMux.Unlock() defer e.syncMsgMux.Unlock()
if update.GetWiretrusteeConfig() != nil { if update.GetNetbirdConfig() != nil {
wCfg := update.GetWiretrusteeConfig() wCfg := update.GetNetbirdConfig()
err := e.updateTURNs(wCfg.GetTurns()) err := e.updateTURNs(wCfg.GetTurns())
if err != nil { if err != nil {
return fmt.Errorf("update TURNs: %w", err) return fmt.Errorf("update TURNs: %w", err)

View File

@ -1,6 +1,6 @@
<Wix <Wix
xmlns="http://wixtoolset.org/schemas/v4/wxs"> xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Package Name="NetBird" Version="$(env.NETBIRD_VERSION)" Manufacturer="Wiretrustee UG (haftungsbeschreankt)" Language="1033" UpgradeCode="6456ec4e-3ad6-4b9b-a2be-98e81cb21ccf" <Package Name="NetBird" Version="$(env.NETBIRD_VERSION)" Manufacturer="NetBird GmbH" Language="1033" UpgradeCode="6456ec4e-3ad6-4b9b-a2be-98e81cb21ccf"
InstallerVersion="500" Compressed="yes" Codepage="utf-8" > InstallerVersion="500" Compressed="yes" Codepage="utf-8" >
<MediaTemplate EmbedCab="yes" /> <MediaTemplate EmbedCab="yes" />

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.26.0 // protoc-gen-go v1.26.0
// protoc v4.23.4 // protoc v4.24.3
// source: daemon.proto // source: daemon.proto
package proto package proto
@ -92,7 +92,7 @@ type LoginRequest struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
// setupKey wiretrustee setup key. // setupKey netbird setup key.
SetupKey string `protobuf:"bytes,1,opt,name=setupKey,proto3" json:"setupKey,omitempty"` SetupKey string `protobuf:"bytes,1,opt,name=setupKey,proto3" json:"setupKey,omitempty"`
// This is the old PreSharedKey field which will be deprecated in favor of optionalPreSharedKey field that is defined as optional // This is the old PreSharedKey field which will be deprecated in favor of optionalPreSharedKey field that is defined as optional
// to allow clearing of preshared key while being able to persist in the config file. // to allow clearing of preshared key while being able to persist in the config file.

View File

@ -61,7 +61,7 @@ service DaemonService {
message LoginRequest { message LoginRequest {
// setupKey wiretrustee setup key. // setupKey netbird setup key.
string setupKey = 1; string setupKey = 1;
// This is the old PreSharedKey field which will be deprecated in favor of optionalPreSharedKey field that is defined as optional // This is the old PreSharedKey field which will be deprecated in favor of optionalPreSharedKey field that is defined as optional

View File

@ -50,7 +50,7 @@ type Info struct {
OSVersion string OSVersion string
Hostname string Hostname string
CPUs int CPUs int
WiretrusteeVersion string NetbirdVersion string
UIVersion string UIVersion string
KernelVersion string KernelVersion string
NetworkAddresses []NetworkAddress NetworkAddresses []NetworkAddress

View File

@ -36,7 +36,7 @@ func GetInfo(ctx context.Context) *Info {
OSVersion: osVersion(), OSVersion: osVersion(),
Hostname: extractDeviceName(ctx, "android"), Hostname: extractDeviceName(ctx, "android"),
CPUs: runtime.NumCPU(), CPUs: runtime.NumCPU(),
WiretrusteeVersion: version.NetbirdVersion(), NetbirdVersion: version.NetbirdVersion(),
UIVersion: extractUIVersion(ctx), UIVersion: extractUIVersion(ctx),
KernelVersion: kernelVersion, KernelVersion: kernelVersion,
SystemSerialNumber: serial(), SystemSerialNumber: serial(),

View File

@ -63,7 +63,7 @@ func GetInfo(ctx context.Context) *Info {
systemHostname, _ := os.Hostname() systemHostname, _ := os.Hostname()
gio.Hostname = extractDeviceName(ctx, systemHostname) gio.Hostname = extractDeviceName(ctx, systemHostname)
gio.WiretrusteeVersion = version.NetbirdVersion() gio.NetbirdVersion = version.NetbirdVersion()
gio.UIVersion = extractUserAgent(ctx) gio.UIVersion = extractUserAgent(ctx)
return gio return gio

View File

@ -46,7 +46,7 @@ func GetInfo(ctx context.Context) *Info {
OSVersion: osVersion, OSVersion: osVersion,
Hostname: extractDeviceName(ctx, systemHostname), Hostname: extractDeviceName(ctx, systemHostname),
CPUs: runtime.NumCPU(), CPUs: runtime.NumCPU(),
WiretrusteeVersion: version.NetbirdVersion(), NetbirdVersion: version.NetbirdVersion(),
UIVersion: extractUserAgent(ctx), UIVersion: extractUserAgent(ctx),
KernelVersion: osInfo[1], KernelVersion: osInfo[1],
Environment: env, Environment: env,

View File

@ -19,7 +19,7 @@ func GetInfo(ctx context.Context) *Info {
gio := &Info{Kernel: sysName, OSVersion: swVersion, Platform: "unknown", OS: sysName, GoOS: runtime.GOOS, CPUs: runtime.NumCPU(), KernelVersion: swVersion} gio := &Info{Kernel: sysName, OSVersion: swVersion, Platform: "unknown", OS: sysName, GoOS: runtime.GOOS, CPUs: runtime.NumCPU(), KernelVersion: swVersion}
gio.Hostname = extractDeviceName(ctx, "hostname") gio.Hostname = extractDeviceName(ctx, "hostname")
gio.WiretrusteeVersion = version.NetbirdVersion() gio.NetbirdVersion = version.NetbirdVersion()
gio.UIVersion = extractUserAgent(ctx) gio.UIVersion = extractUserAgent(ctx)
return gio return gio

View File

@ -61,7 +61,7 @@ func GetInfo(ctx context.Context) *Info {
Hostname: extractDeviceName(ctx, systemHostname), Hostname: extractDeviceName(ctx, systemHostname),
GoOS: runtime.GOOS, GoOS: runtime.GOOS,
CPUs: runtime.NumCPU(), CPUs: runtime.NumCPU(),
WiretrusteeVersion: version.NetbirdVersion(), NetbirdVersion: version.NetbirdVersion(),
UIVersion: extractUserAgent(ctx), UIVersion: extractUserAgent(ctx),
KernelVersion: osInfo[1], KernelVersion: osInfo[1],
NetworkAddresses: addrs, NetworkAddresses: addrs,

View File

@ -11,7 +11,7 @@ import (
func Test_LocalWTVersion(t *testing.T) { func Test_LocalWTVersion(t *testing.T) {
got := GetInfo(context.TODO()) got := GetInfo(context.TODO())
want := "development" want := "development"
assert.Equal(t, want, got.WiretrusteeVersion) assert.Equal(t, want, got.NetbirdVersion)
} }
func Test_UIVersion(t *testing.T) { func Test_UIVersion(t *testing.T) {

View File

@ -64,7 +64,7 @@ func GetInfo(ctx context.Context) *Info {
systemHostname, _ := os.Hostname() systemHostname, _ := os.Hostname()
gio.Hostname = extractDeviceName(ctx, systemHostname) gio.Hostname = extractDeviceName(ctx, systemHostname)
gio.WiretrusteeVersion = version.NetbirdVersion() gio.NetbirdVersion = version.NetbirdVersion()
gio.UIVersion = extractUserAgent(ctx) gio.UIVersion = extractUserAgent(ctx)
return gio return gio

View File

@ -273,8 +273,8 @@ func TestClient_Sync(t *testing.T) {
if resp.GetPeerConfig() == nil { if resp.GetPeerConfig() == nil {
t.Error("expecting non nil PeerConfig got nil") t.Error("expecting non nil PeerConfig got nil")
} }
if resp.GetWiretrusteeConfig() == nil { if resp.GetNetbirdConfig() == nil {
t.Error("expecting non nil WiretrusteeConfig got nil") t.Error("expecting non nil NetbirdConfig got nil")
} }
if len(resp.GetRemotePeers()) != 1 { if len(resp.GetRemotePeers()) != 1 {
t.Errorf("expecting RemotePeers size %d got %d", 1, len(resp.GetRemotePeers())) t.Errorf("expecting RemotePeers size %d got %d", 1, len(resp.GetRemotePeers()))
@ -373,7 +373,7 @@ func Test_SystemMetaDataFromClient(t *testing.T) {
OS: info.OS, OS: info.OS,
Core: info.OSVersion, Core: info.OSVersion,
OSVersion: info.OSVersion, OSVersion: info.OSVersion,
WiretrusteeVersion: info.WiretrusteeVersion, NetbirdVersion: info.NetbirdVersion,
KernelVersion: info.KernelVersion, KernelVersion: info.KernelVersion,
NetworkAddresses: protoNetAddr, NetworkAddresses: protoNetAddr,
@ -417,7 +417,7 @@ func isEqual(a, b *mgmtProto.PeerSystemMeta) bool {
a.GetPlatform() == b.GetPlatform() && a.GetPlatform() == b.GetPlatform() &&
a.GetOS() == b.GetOS() && a.GetOS() == b.GetOS() &&
a.GetOSVersion() == b.GetOSVersion() && a.GetOSVersion() == b.GetOSVersion() &&
a.GetWiretrusteeVersion() == b.GetWiretrusteeVersion() && a.GetNetbirdVersion() == b.GetNetbirdVersion() &&
a.GetUiVersion() == b.GetUiVersion() && a.GetUiVersion() == b.GetUiVersion() &&
a.GetSysSerialNumber() == b.GetSysSerialNumber() && a.GetSysSerialNumber() == b.GetSysSerialNumber() &&
a.GetSysProductName() == b.GetSysProductName() && a.GetSysProductName() == b.GetSysProductName() &&

View File

@ -528,7 +528,7 @@ func infoToMetaData(info *system.Info) *proto.PeerSystemMeta {
OSVersion: info.OSVersion, OSVersion: info.OSVersion,
Platform: info.Platform, Platform: info.Platform,
Kernel: info.Kernel, Kernel: info.Kernel,
WiretrusteeVersion: info.WiretrusteeVersion, NetbirdVersion: info.NetbirdVersion,
UiVersion: info.UIVersion, UiVersion: info.UIVersion,
KernelVersion: info.KernelVersion, KernelVersion: info.KernelVersion,
NetworkAddresses: addresses, NetworkAddresses: addresses,

File diff suppressed because it is too large Load Diff

View File

@ -52,7 +52,7 @@ message EncryptedMessage {
// encrypted message Body // encrypted message Body
bytes body = 2; bytes body = 2;
// Version of the Wiretrustee Management Service protocol // Version of the Netbird Management Service protocol
int32 version = 3; int32 version = 3;
} }
@ -61,11 +61,11 @@ message SyncRequest {
PeerSystemMeta meta = 1; PeerSystemMeta meta = 1;
} }
// SyncResponse represents a state that should be applied to the local peer (e.g. Wiretrustee servers config as well as local peer and remote peers configs) // SyncResponse represents a state that should be applied to the local peer (e.g. Netbird servers config as well as local peer and remote peers configs)
message SyncResponse { message SyncResponse {
// Global config // Global config
WiretrusteeConfig wiretrusteeConfig = 1; NetbirdConfig netbirdConfig = 1;
// Deprecated. Use NetworkMap.PeerConfig // Deprecated. Use NetworkMap.PeerConfig
PeerConfig peerConfig = 2; PeerConfig peerConfig = 2;
@ -146,7 +146,7 @@ message PeerSystemMeta {
string core = 4; string core = 4;
string platform = 5; string platform = 5;
string OS = 6; string OS = 6;
string wiretrusteeVersion = 7; string netbirdVersion = 7;
string uiVersion = 8; string uiVersion = 8;
string kernelVersion = 9; string kernelVersion = 9;
string OSVersion = 10; string OSVersion = 10;
@ -161,7 +161,7 @@ message PeerSystemMeta {
message LoginResponse { message LoginResponse {
// Global config // Global config
WiretrusteeConfig wiretrusteeConfig = 1; NetbirdConfig netbirdConfig = 1;
// Peer local config // Peer local config
PeerConfig peerConfig = 2; PeerConfig peerConfig = 2;
// Posture checks to be evaluated by client // Posture checks to be evaluated by client
@ -173,14 +173,14 @@ message ServerKeyResponse {
string key = 1; string key = 1;
// Key expiration timestamp after which the key should be fetched again by the client // Key expiration timestamp after which the key should be fetched again by the client
google.protobuf.Timestamp expiresAt = 2; google.protobuf.Timestamp expiresAt = 2;
// Version of the Wiretrustee Management Service protocol // Version of the Netbird Management Service protocol
int32 version = 3; int32 version = 3;
} }
message Empty {} message Empty {}
// WiretrusteeConfig is a common configuration of any Wiretrustee peer. It contains STUN, TURN, Signal and Management servers configurations // NetbirdConfig is a common configuration of any Netbird peer. It contains STUN, TURN, Signal and Management servers configurations
message WiretrusteeConfig { message NetbirdConfig {
// a list of STUN servers // a list of STUN servers
repeated HostConfig stuns = 1; repeated HostConfig stuns = 1;
// a list of TURN servers // a list of TURN servers
@ -194,7 +194,7 @@ message WiretrusteeConfig {
// HostConfig describes connection properties of some server (e.g. STUN, Signal, Management) // HostConfig describes connection properties of some server (e.g. STUN, Signal, Management)
message HostConfig { message HostConfig {
// URI of the resource e.g. turns://stun.wiretrustee.com:4430 or signal.wiretrustee.com:10000 // URI of the resource e.g. turns://stun.netbird.io:4430 or signal.netbird.io:10000
string uri = 1; string uri = 1;
Protocol protocol = 2; Protocol protocol = 2;
@ -224,9 +224,9 @@ message ProtectedHostConfig {
// PeerConfig represents a configuration of a "our" peer. // PeerConfig represents a configuration of a "our" peer.
// The properties are used to configure local Wireguard // The properties are used to configure local Wireguard
message PeerConfig { message PeerConfig {
// Peer's virtual IP address within the Wiretrustee VPN (a Wireguard address config) // Peer's virtual IP address within the Netbird VPN (a Wireguard address config)
string address = 1; string address = 1;
// Wiretrustee DNS server (a Wireguard DNS config) // Netbird DNS server (a Wireguard DNS config)
string dns = 2; string dns = 2;
// SSHConfig of the peer. // SSHConfig of the peer.

View File

@ -106,10 +106,10 @@ type HttpServerConfig struct {
ExtraAuthAudience string ExtraAuthAudience string
} }
// Host represents a Wiretrustee host (e.g. STUN, TURN, Signal) // Host represents a Netbird host (e.g. STUN, TURN, Signal)
type Host struct { type Host struct {
Proto Protocol Proto Protocol
// URI e.g. turns://stun.wiretrustee.com:4430 or signal.wiretrustee.com:10000 // URI e.g. turns://stun.netbird.io:4430 or signal.netbird.io:10000
URI string URI string
Username string Username string
Password string Password string

View File

@ -381,7 +381,7 @@ func extractPeerMeta(ctx context.Context, meta *proto.PeerSystemMeta) nbpeer.Pee
Platform: meta.GetPlatform(), Platform: meta.GetPlatform(),
OS: meta.GetOS(), OS: meta.GetOS(),
OSVersion: osVersion, OSVersion: osVersion,
WtVersion: meta.GetWiretrusteeVersion(), WtVersion: meta.GetNetbirdVersion(),
UIVersion: meta.GetUiVersion(), UIVersion: meta.GetUiVersion(),
KernelVersion: meta.GetKernelVersion(), KernelVersion: meta.GetKernelVersion(),
NetworkAddresses: networkAddresses, NetworkAddresses: networkAddresses,
@ -489,7 +489,7 @@ func (s *GRPCServer) Login(ctx context.Context, req *proto.EncryptedMessage) (*p
// if peer has reached this point then it has logged in // if peer has reached this point then it has logged in
loginResp := &proto.LoginResponse{ loginResp := &proto.LoginResponse{
WiretrusteeConfig: toWiretrusteeConfig(s.config, nil, relayToken), NetbirdConfig: toNetbirdConfig(s.config, nil, relayToken),
PeerConfig: toPeerConfig(peer, netMap.Network, s.accountManager.GetDNSDomain(), false), PeerConfig: toPeerConfig(peer, netMap.Network, s.accountManager.GetDNSDomain(), false),
Checks: toProtocolChecks(ctx, postureChecks), Checks: toProtocolChecks(ctx, postureChecks),
} }
@ -547,7 +547,7 @@ func ToResponseProto(configProto Protocol) proto.HostConfig_Protocol {
} }
} }
func toWiretrusteeConfig(config *Config, turnCredentials *Token, relayToken *Token) *proto.WiretrusteeConfig { func toNetbirdConfig(config *Config, turnCredentials *Token, relayToken *Token) *proto.NetbirdConfig {
if config == nil { if config == nil {
return nil return nil
} }
@ -595,7 +595,7 @@ func toWiretrusteeConfig(config *Config, turnCredentials *Token, relayToken *Tok
} }
} }
return &proto.WiretrusteeConfig{ return &proto.NetbirdConfig{
Stuns: stuns, Stuns: stuns,
Turns: turns, Turns: turns,
Signal: &proto.HostConfig{ Signal: &proto.HostConfig{
@ -619,7 +619,7 @@ func toPeerConfig(peer *nbpeer.Peer, network *types.Network, dnsName string, dns
func toSyncResponse(ctx context.Context, config *Config, peer *nbpeer.Peer, turnCredentials *Token, relayCredentials *Token, networkMap *types.NetworkMap, dnsName string, checks []*posture.Checks, dnsCache *DNSConfigCache, dnsResolutionOnRoutingPeerEnbled bool) *proto.SyncResponse { func toSyncResponse(ctx context.Context, config *Config, peer *nbpeer.Peer, turnCredentials *Token, relayCredentials *Token, networkMap *types.NetworkMap, dnsName string, checks []*posture.Checks, dnsCache *DNSConfigCache, dnsResolutionOnRoutingPeerEnbled bool) *proto.SyncResponse {
response := &proto.SyncResponse{ response := &proto.SyncResponse{
WiretrusteeConfig: toWiretrusteeConfig(config, turnCredentials, relayCredentials), NetbirdConfig: toNetbirdConfig(config, turnCredentials, relayCredentials),
PeerConfig: toPeerConfig(peer, networkMap.Network, dnsName, dnsResolutionOnRoutingPeerEnbled), PeerConfig: toPeerConfig(peer, networkMap.Network, dnsName, dnsResolutionOnRoutingPeerEnbled),
NetworkMap: &proto.NetworkMap{ NetworkMap: &proto.NetworkMap{
Serial: networkMap.Network.CurrentSerial(), Serial: networkMap.Network.CurrentSerial(),

View File

@ -94,7 +94,7 @@ func Test_SyncProtocol(t *testing.T) {
mgmtServer, _, mgmtAddr, cleanup, err := startManagementForTest(t, "testdata/store_with_expired_peers.sql", &Config{ mgmtServer, _, mgmtAddr, cleanup, err := startManagementForTest(t, "testdata/store_with_expired_peers.sql", &Config{
Stuns: []*Host{{ Stuns: []*Host{{
Proto: "udp", Proto: "udp",
URI: "stun:stun.wiretrustee.com:3468", URI: "stun:stun.netbird.io:3468",
}}, }},
TURNConfig: &TURNConfig{ TURNConfig: &TURNConfig{
TimeBasedCredentials: false, TimeBasedCredentials: false,
@ -102,12 +102,12 @@ func Test_SyncProtocol(t *testing.T) {
Secret: "whatever", Secret: "whatever",
Turns: []*Host{{ Turns: []*Host{{
Proto: "udp", Proto: "udp",
URI: "turn:stun.wiretrustee.com:3468", URI: "turn:stun.netbird.io:3468",
}}, }},
}, },
Signal: &Host{ Signal: &Host{
Proto: "http", Proto: "http",
URI: "signal.wiretrustee.com:10000", URI: "signal.netbird.io:10000",
}, },
Datadir: dir, Datadir: dir,
HttpConfig: nil, HttpConfig: nil,
@ -173,64 +173,64 @@ func Test_SyncProtocol(t *testing.T) {
return return
} }
wiretrusteeConfig := syncResp.GetWiretrusteeConfig() netbirdConfig := syncResp.GetNetbirdConfig()
if wiretrusteeConfig == nil { if netbirdConfig == nil {
t.Fatal("expecting SyncResponse to have non-nil WiretrusteeConfig") t.Fatal("expecting SyncResponse to have non-nil NetbirdConfig")
} }
if wiretrusteeConfig.GetSignal() == nil { if netbirdConfig.GetSignal() == nil {
t.Fatal("expecting SyncResponse to have WiretrusteeConfig with non-nil Signal config") t.Fatal("expecting SyncResponse to have NetbirdConfig with non-nil Signal config")
} }
expectedSignalConfig := &mgmtProto.HostConfig{ expectedSignalConfig := &mgmtProto.HostConfig{
Uri: "signal.wiretrustee.com:10000", Uri: "signal.netbird.io:10000",
Protocol: mgmtProto.HostConfig_HTTP, Protocol: mgmtProto.HostConfig_HTTP,
} }
if wiretrusteeConfig.GetSignal().GetUri() != expectedSignalConfig.GetUri() { if netbirdConfig.GetSignal().GetUri() != expectedSignalConfig.GetUri() {
t.Fatalf("expecting SyncResponse to have WiretrusteeConfig with expected Signal URI: %v, actual: %v", t.Fatalf("expecting SyncResponse to have NetbirdConfig with expected Signal URI: %v, actual: %v",
expectedSignalConfig.GetUri(), expectedSignalConfig.GetUri(),
wiretrusteeConfig.GetSignal().GetUri()) netbirdConfig.GetSignal().GetUri())
} }
if wiretrusteeConfig.GetSignal().GetProtocol() != expectedSignalConfig.GetProtocol() { if netbirdConfig.GetSignal().GetProtocol() != expectedSignalConfig.GetProtocol() {
t.Fatalf("expecting SyncResponse to have WiretrusteeConfig with expected Signal Protocol: %v, actual: %v", t.Fatalf("expecting SyncResponse to have NetbirdConfig with expected Signal Protocol: %v, actual: %v",
expectedSignalConfig.GetProtocol().String(), expectedSignalConfig.GetProtocol().String(),
wiretrusteeConfig.GetSignal().GetProtocol()) netbirdConfig.GetSignal().GetProtocol())
} }
expectedStunsConfig := &mgmtProto.HostConfig{ expectedStunsConfig := &mgmtProto.HostConfig{
Uri: "stun:stun.wiretrustee.com:3468", Uri: "stun:stun.netbird.io:3468",
Protocol: mgmtProto.HostConfig_UDP, Protocol: mgmtProto.HostConfig_UDP,
} }
if wiretrusteeConfig.GetStuns()[0].GetUri() != expectedStunsConfig.GetUri() { if netbirdConfig.GetStuns()[0].GetUri() != expectedStunsConfig.GetUri() {
t.Fatalf("expecting SyncResponse to have WiretrusteeConfig with expected STUN URI: %v, actual: %v", t.Fatalf("expecting SyncResponse to have NetbirdConfig with expected STUN URI: %v, actual: %v",
expectedStunsConfig.GetUri(), expectedStunsConfig.GetUri(),
wiretrusteeConfig.GetStuns()[0].GetUri()) netbirdConfig.GetStuns()[0].GetUri())
} }
if wiretrusteeConfig.GetStuns()[0].GetProtocol() != expectedStunsConfig.GetProtocol() { if netbirdConfig.GetStuns()[0].GetProtocol() != expectedStunsConfig.GetProtocol() {
t.Fatalf("expecting SyncResponse to have WiretrusteeConfig with expected STUN Protocol: %v, actual: %v", t.Fatalf("expecting SyncResponse to have NetbirdConfig with expected STUN Protocol: %v, actual: %v",
expectedStunsConfig.GetProtocol(), expectedStunsConfig.GetProtocol(),
wiretrusteeConfig.GetStuns()[0].GetProtocol()) netbirdConfig.GetStuns()[0].GetProtocol())
} }
expectedTRUNHost := &mgmtProto.HostConfig{ expectedTRUNHost := &mgmtProto.HostConfig{
Uri: "turn:stun.wiretrustee.com:3468", Uri: "turn:stun.netbird.io:3468",
Protocol: mgmtProto.HostConfig_UDP, Protocol: mgmtProto.HostConfig_UDP,
} }
if wiretrusteeConfig.GetTurns()[0].GetHostConfig().GetUri() != expectedTRUNHost.GetUri() { if netbirdConfig.GetTurns()[0].GetHostConfig().GetUri() != expectedTRUNHost.GetUri() {
t.Fatalf("expecting SyncResponse to have WiretrusteeConfig with expected TURN URI: %v, actual: %v", t.Fatalf("expecting SyncResponse to have NetbirdConfig with expected TURN URI: %v, actual: %v",
expectedTRUNHost.GetUri(), expectedTRUNHost.GetUri(),
wiretrusteeConfig.GetTurns()[0].GetHostConfig().GetUri()) netbirdConfig.GetTurns()[0].GetHostConfig().GetUri())
} }
if wiretrusteeConfig.GetTurns()[0].GetHostConfig().GetProtocol() != expectedTRUNHost.GetProtocol() { if netbirdConfig.GetTurns()[0].GetHostConfig().GetProtocol() != expectedTRUNHost.GetProtocol() {
t.Fatalf("expecting SyncResponse to have WiretrusteeConfig with expected TURN Protocol: %v, actual: %v", t.Fatalf("expecting SyncResponse to have NetbirdConfig with expected TURN Protocol: %v, actual: %v",
expectedTRUNHost.GetProtocol().String(), expectedTRUNHost.GetProtocol().String(),
wiretrusteeConfig.GetTurns()[0].GetHostConfig().GetProtocol()) netbirdConfig.GetTurns()[0].GetHostConfig().GetProtocol())
} }
// ensure backward compatibility // ensure backward compatibility
@ -291,7 +291,7 @@ func loginPeerWithValidSetupKey(key wgtypes.Key, client mgmtProto.ManagementServ
Core: "core", Core: "core",
Platform: "platform", Platform: "platform",
Kernel: "kernel", Kernel: "kernel",
WiretrusteeVersion: "", NetbirdVersion: "",
} }
message, err := encryption.EncryptMessage(*serverKey, key, &mgmtProto.LoginRequest{SetupKey: TestValidSetupKey, Meta: meta}) message, err := encryption.EncryptMessage(*serverKey, key, &mgmtProto.LoginRequest{SetupKey: TestValidSetupKey, Meta: meta})
if err != nil { if err != nil {
@ -498,7 +498,7 @@ func testSyncStatusRace(t *testing.T) {
mgmtServer, am, mgmtAddr, cleanup, err := startManagementForTest(t, "testdata/store_with_expired_peers.sql", &Config{ mgmtServer, am, mgmtAddr, cleanup, err := startManagementForTest(t, "testdata/store_with_expired_peers.sql", &Config{
Stuns: []*Host{{ Stuns: []*Host{{
Proto: "udp", Proto: "udp",
URI: "stun:stun.wiretrustee.com:3468", URI: "stun:stun.netbird.io:3468",
}}, }},
TURNConfig: &TURNConfig{ TURNConfig: &TURNConfig{
TimeBasedCredentials: false, TimeBasedCredentials: false,
@ -506,12 +506,12 @@ func testSyncStatusRace(t *testing.T) {
Secret: "whatever", Secret: "whatever",
Turns: []*Host{{ Turns: []*Host{{
Proto: "udp", Proto: "udp",
URI: "turn:stun.wiretrustee.com:3468", URI: "turn:stun.netbird.io:3468",
}}, }},
}, },
Signal: &Host{ Signal: &Host{
Proto: "http", Proto: "http",
URI: "signal.wiretrustee.com:10000", URI: "signal.netbird.io:10000",
}, },
Datadir: dir, Datadir: dir,
HttpConfig: nil, HttpConfig: nil,
@ -670,7 +670,7 @@ func Test_LoginPerformance(t *testing.T) {
mgmtServer, am, _, cleanup, err := startManagementForTest(t, "testdata/store_with_expired_peers.sql", &Config{ mgmtServer, am, _, cleanup, err := startManagementForTest(t, "testdata/store_with_expired_peers.sql", &Config{
Stuns: []*Host{{ Stuns: []*Host{{
Proto: "udp", Proto: "udp",
URI: "stun:stun.wiretrustee.com:3468", URI: "stun:stun.netbird.io:3468",
}}, }},
TURNConfig: &TURNConfig{ TURNConfig: &TURNConfig{
TimeBasedCredentials: false, TimeBasedCredentials: false,
@ -678,12 +678,12 @@ func Test_LoginPerformance(t *testing.T) {
Secret: "whatever", Secret: "whatever",
Turns: []*Host{{ Turns: []*Host{{
Proto: "udp", Proto: "udp",
URI: "turn:stun.wiretrustee.com:3468", URI: "turn:stun.netbird.io:3468",
}}, }},
}, },
Signal: &Host{ Signal: &Host{
Proto: "http", Proto: "http",
URI: "signal.wiretrustee.com:10000", URI: "signal.netbird.io:10000",
}, },
Datadir: dir, Datadir: dir,
HttpConfig: nil, HttpConfig: nil,
@ -736,7 +736,7 @@ func Test_LoginPerformance(t *testing.T) {
Core: "core", Core: "core",
Platform: "platform", Platform: "platform",
Kernel: "kernel", Kernel: "kernel",
WiretrusteeVersion: "", NetbirdVersion: "",
} }
peerLogin := PeerLogin{ peerLogin := PeerLogin{

View File

@ -47,7 +47,7 @@ var _ = Describe("Management service", func() {
level, _ := log.ParseLevel("Debug") level, _ := log.ParseLevel("Debug")
log.SetLevel(level) log.SetLevel(level)
var err error var err error
dataDir, err = os.MkdirTemp("", "wiretrustee_mgmt_test_tmp_*") dataDir, err = os.MkdirTemp("", "netbird_mgmt_test_tmp_*")
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
var listener net.Listener var listener net.Listener
@ -109,23 +109,23 @@ var _ = Describe("Management service", func() {
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
expectedSignalConfig := &mgmtProto.HostConfig{ expectedSignalConfig := &mgmtProto.HostConfig{
Uri: "signal.wiretrustee.com:10000", Uri: "signal.netbird.io:10000",
Protocol: mgmtProto.HostConfig_HTTP, Protocol: mgmtProto.HostConfig_HTTP,
} }
expectedStunsConfig := &mgmtProto.HostConfig{ expectedStunsConfig := &mgmtProto.HostConfig{
Uri: "stun:stun.wiretrustee.com:3468", Uri: "stun:stun.netbird.io:3468",
Protocol: mgmtProto.HostConfig_UDP, Protocol: mgmtProto.HostConfig_UDP,
} }
expectedTRUNHost := &mgmtProto.HostConfig{ expectedTRUNHost := &mgmtProto.HostConfig{
Uri: "turn:stun.wiretrustee.com:3468", Uri: "turn:stun.netbird.io:3468",
Protocol: mgmtProto.HostConfig_UDP, Protocol: mgmtProto.HostConfig_UDP,
} }
Expect(resp.WiretrusteeConfig.Signal).To(BeEquivalentTo(expectedSignalConfig)) Expect(resp.NetbirdConfig.Signal).To(BeEquivalentTo(expectedSignalConfig))
Expect(resp.WiretrusteeConfig.Stuns).To(ConsistOf(expectedStunsConfig)) Expect(resp.NetbirdConfig.Stuns).To(ConsistOf(expectedStunsConfig))
// TURN validation is special because credentials are dynamically generated // TURN validation is special because credentials are dynamically generated
Expect(resp.WiretrusteeConfig.Turns).To(HaveLen(1)) Expect(resp.NetbirdConfig.Turns).To(HaveLen(1))
actualTURN := resp.WiretrusteeConfig.Turns[0] actualTURN := resp.NetbirdConfig.Turns[0]
Expect(len(actualTURN.User) > 0).To(BeTrue()) Expect(len(actualTURN.User) > 0).To(BeTrue())
Expect(actualTURN.HostConfig).To(BeEquivalentTo(expectedTRUNHost)) Expect(actualTURN.HostConfig).To(BeEquivalentTo(expectedTRUNHost))
Expect(len(resp.NetworkMap.OfflinePeers) == 0).To(BeTrue()) Expect(len(resp.NetworkMap.OfflinePeers) == 0).To(BeTrue())
@ -286,25 +286,25 @@ var _ = Describe("Management service", func() {
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
expectedSignalConfig := &mgmtProto.HostConfig{ expectedSignalConfig := &mgmtProto.HostConfig{
Uri: "signal.wiretrustee.com:10000", Uri: "signal.netbird.io:10000",
Protocol: mgmtProto.HostConfig_HTTP, Protocol: mgmtProto.HostConfig_HTTP,
} }
expectedStunsConfig := &mgmtProto.HostConfig{ expectedStunsConfig := &mgmtProto.HostConfig{
Uri: "stun:stun.wiretrustee.com:3468", Uri: "stun:stun.netbird.io:3468",
Protocol: mgmtProto.HostConfig_UDP, Protocol: mgmtProto.HostConfig_UDP,
} }
expectedTurnsConfig := &mgmtProto.ProtectedHostConfig{ expectedTurnsConfig := &mgmtProto.ProtectedHostConfig{
HostConfig: &mgmtProto.HostConfig{ HostConfig: &mgmtProto.HostConfig{
Uri: "turn:stun.wiretrustee.com:3468", Uri: "turn:stun.netbird.io:3468",
Protocol: mgmtProto.HostConfig_UDP, Protocol: mgmtProto.HostConfig_UDP,
}, },
User: "some_user", User: "some_user",
Password: "some_password", Password: "some_password",
} }
Expect(decryptedResp.GetWiretrusteeConfig().Signal).To(BeEquivalentTo(expectedSignalConfig)) Expect(decryptedResp.GetNetbirdConfig().Signal).To(BeEquivalentTo(expectedSignalConfig))
Expect(decryptedResp.GetWiretrusteeConfig().Stuns).To(ConsistOf(expectedStunsConfig)) Expect(decryptedResp.GetNetbirdConfig().Stuns).To(ConsistOf(expectedStunsConfig))
Expect(decryptedResp.GetWiretrusteeConfig().Turns).To(ConsistOf(expectedTurnsConfig)) Expect(decryptedResp.GetNetbirdConfig().Turns).To(ConsistOf(expectedTurnsConfig))
}) })
}) })
}) })
@ -455,7 +455,7 @@ func loginPeerWithValidSetupKey(serverPubKey wgtypes.Key, key wgtypes.Key, clien
Core: "core", Core: "core",
Platform: "platform", Platform: "platform",
Kernel: "kernel", Kernel: "kernel",
WiretrusteeVersion: "", NetbirdVersion: "",
} }
message, err := encryption.EncryptMessage(serverPubKey, key, &mgmtProto.LoginRequest{SetupKey: ValidSetupKey, Meta: meta}) message, err := encryption.EncryptMessage(serverPubKey, key, &mgmtProto.LoginRequest{SetupKey: ValidSetupKey, Meta: meta})
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())

View File

@ -1099,13 +1099,13 @@ func TestToSyncResponse(t *testing.T) {
assert.Equal(t, "192.168.1.1/24", response.PeerConfig.Address) assert.Equal(t, "192.168.1.1/24", response.PeerConfig.Address)
assert.Equal(t, "peer1.example.com", response.PeerConfig.Fqdn) assert.Equal(t, "peer1.example.com", response.PeerConfig.Fqdn)
assert.Equal(t, true, response.PeerConfig.SshConfig.SshEnabled) assert.Equal(t, true, response.PeerConfig.SshConfig.SshEnabled)
// assert wiretrustee config // assert netbird config
assert.Equal(t, "signal.uri", response.WiretrusteeConfig.Signal.Uri) assert.Equal(t, "signal.uri", response.NetbirdConfig.Signal.Uri)
assert.Equal(t, proto.HostConfig_HTTPS, response.WiretrusteeConfig.Signal.GetProtocol()) assert.Equal(t, proto.HostConfig_HTTPS, response.NetbirdConfig.Signal.GetProtocol())
assert.Equal(t, "stun.uri", response.WiretrusteeConfig.Stuns[0].Uri) assert.Equal(t, "stun.uri", response.NetbirdConfig.Stuns[0].Uri)
assert.Equal(t, "turn.uri", response.WiretrusteeConfig.Turns[0].HostConfig.GetUri()) assert.Equal(t, "turn.uri", response.NetbirdConfig.Turns[0].HostConfig.GetUri())
assert.Equal(t, "turn-user", response.WiretrusteeConfig.Turns[0].User) assert.Equal(t, "turn-user", response.NetbirdConfig.Turns[0].User)
assert.Equal(t, "turn-pass", response.WiretrusteeConfig.Turns[0].Password) assert.Equal(t, "turn-pass", response.NetbirdConfig.Turns[0].Password)
// assert RemotePeers // assert RemotePeers
assert.Equal(t, 1, len(response.RemotePeers)) assert.Equal(t, 1, len(response.RemotePeers))
assert.Equal(t, "192.168.1.2/32", response.RemotePeers[0].AllowedIps[0]) assert.Equal(t, "192.168.1.2/32", response.RemotePeers[0].AllowedIps[0])

View File

@ -2,7 +2,7 @@
"Stuns": [ "Stuns": [
{ {
"Proto": "udp", "Proto": "udp",
"URI": "stun:stun.wiretrustee.com:3468", "URI": "stun:stun.netbird.io:3468",
"Username": "", "Username": "",
"Password": null "Password": null
} }
@ -11,7 +11,7 @@
"Turns": [ "Turns": [
{ {
"Proto": "udp", "Proto": "udp",
"URI": "turn:stun.wiretrustee.com:3468", "URI": "turn:stun.netbird.io:3468",
"Username": "some_user", "Username": "some_user",
"Password": "some_password" "Password": "some_password"
} }
@ -22,7 +22,7 @@
}, },
"Signal": { "Signal": {
"Proto": "http", "Proto": "http",
"URI": "signal.wiretrustee.com:10000", "URI": "signal.netbird.io:10000",
"Username": "", "Username": "",
"Password": null "Password": null
}, },

View File

@ -199,7 +199,7 @@ func (m *TimeBasedAuthSecretsManager) pushNewTURNAndRelayTokens(ctx context.Cont
} }
update := &proto.SyncResponse{ update := &proto.SyncResponse{
WiretrusteeConfig: &proto.WiretrusteeConfig{ NetbirdConfig: &proto.NetbirdConfig{
Turns: turns, Turns: turns,
}, },
} }
@ -208,7 +208,7 @@ func (m *TimeBasedAuthSecretsManager) pushNewTURNAndRelayTokens(ctx context.Cont
if m.relayCfg != nil { if m.relayCfg != nil {
token, err := m.GenerateRelayToken() token, err := m.GenerateRelayToken()
if err == nil { if err == nil {
update.WiretrusteeConfig.Relay = &proto.RelayConfig{ update.NetbirdConfig.Relay = &proto.RelayConfig{
Urls: m.relayCfg.Addresses, Urls: m.relayCfg.Addresses,
TokenPayload: token.Payload, TokenPayload: token.Payload,
TokenSignature: token.Signature, TokenSignature: token.Signature,
@ -228,7 +228,7 @@ func (m *TimeBasedAuthSecretsManager) pushNewRelayTokens(ctx context.Context, pe
} }
update := &proto.SyncResponse{ update := &proto.SyncResponse{
WiretrusteeConfig: &proto.WiretrusteeConfig{ NetbirdConfig: &proto.NetbirdConfig{
Relay: &proto.RelayConfig{ Relay: &proto.RelayConfig{
Urls: m.relayCfg.Addresses, Urls: m.relayCfg.Addresses,
TokenPayload: string(relayToken.Payload), TokenPayload: string(relayToken.Payload),

View File

@ -18,7 +18,7 @@ import (
var TurnTestHost = &Host{ var TurnTestHost = &Host{
Proto: UDP, Proto: UDP,
URI: "turn:turn.wiretrustee.com:77777", URI: "turn:turn.netbird.io:77777",
Username: "username", Username: "username",
Password: "", Password: "",
} }
@ -124,7 +124,7 @@ loop:
var firstRelayUpdate, secondRelayUpdate *proto.RelayConfig var firstRelayUpdate, secondRelayUpdate *proto.RelayConfig
for _, update := range updates { for _, update := range updates {
if turns := update.Update.GetWiretrusteeConfig().GetTurns(); len(turns) > 0 { if turns := update.Update.GetNetbirdConfig().GetTurns(); len(turns) > 0 {
turnUpdates++ turnUpdates++
if turnUpdates == 1 { if turnUpdates == 1 {
firstTurnUpdate = turns[0] firstTurnUpdate = turns[0]
@ -132,9 +132,9 @@ loop:
secondTurnUpdate = turns[0] secondTurnUpdate = turns[0]
} }
} }
if relay := update.Update.GetWiretrusteeConfig().GetRelay(); relay != nil { if relay := update.Update.GetNetbirdConfig().GetRelay(); relay != nil {
// avoid updating on turn updates since they also send relay credentials // avoid updating on turn updates since they also send relay credentials
if update.Update.GetWiretrusteeConfig().GetTurns() == nil { if update.Update.GetNetbirdConfig().GetTurns() == nil {
relayUpdates++ relayUpdates++
if relayUpdates == 1 { if relayUpdates == 1 {
firstRelayUpdate = relay firstRelayUpdate = relay

View File

@ -2,13 +2,13 @@
export PATH=$PATH:/usr/local/bin:/opt/homebrew/bin export PATH=$PATH:/usr/local/bin:/opt/homebrew/bin
# check if wiretrustee is installed # check if netbird is installed
WT_BIN=$(which wiretrustee) NB_BIN=$(which netbird)
if [ -n "$WT_BIN" ] if [ -n "$NB_BIN" ]
then then
echo "Stopping and uninstalling Wiretrustee daemon" echo "Stopping and uninstalling Netbird daemon"
wiretrustee service stop || true netbird service stop || true
wiretrustee service uninstall || true netbird service uninstall || true
fi fi
# check if netbird is installed # check if netbird is installed

View File

@ -263,16 +263,16 @@ install_netbird() {
add_aur_repo add_aur_repo
;; ;;
brew) brew)
# Remove Wiretrustee if it had been installed using Homebrew before # Remove Netbird if it had been installed using Homebrew before
if brew ls --versions wiretrustee >/dev/null 2>&1; then if brew ls --versions netbird >/dev/null 2>&1; then
echo "Removing existing wiretrustee client" echo "Removing existing netbird client"
# Stop and uninstall daemon service: # Stop and uninstall daemon service:
wiretrustee service stop netbird service stop
wiretrustee service uninstall netbird service uninstall
# Unlik the app # Unlik the app
brew unlink wiretrustee brew unlink netbird
fi fi
brew install netbirdio/tap/netbird brew install netbirdio/tap/netbird

View File

@ -60,7 +60,7 @@ subdomain sub.mydomain.com).
```bash ```bash
# create a volume # create a volume
docker volume create wiretrustee-signal docker volume create netbird-signal
# run the docker container # run the docker container
docker run -d --name netbird-signal \ docker run -d --name netbird-signal \
-p 10000:10000 \ -p 10000:10000 \