-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #724 from mysteriumnetwork/sonatype-backport
Disable wireguard for windows
- Loading branch information
Showing
5 changed files
with
110 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// +build !android | ||
// +build !android,!windows | ||
|
||
/* | ||
* Copyright (C) 2018 The "MysteriumNetwork/node" Authors. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// +build windows | ||
|
||
/* | ||
* Copyright (C) 2019 The "MysteriumNetwork/node" Authors. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package cmd | ||
|
||
import ( | ||
"github.com/mysteriumnetwork/node/core/node" | ||
) | ||
|
||
func (di *Dependencies) registerConnections(nodeOptions node.Options) { | ||
di.registerOpenvpnConnection(nodeOptions) | ||
di.registerNoopConnection() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// +build darwin linux,!android | ||
|
||
/* | ||
* Copyright (C) 2019 The "MysteriumNetwork/node" Authors. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package cmd | ||
|
||
import ( | ||
"github.com/mysteriumnetwork/node/core/node" | ||
"github.com/mysteriumnetwork/node/core/service" | ||
"github.com/mysteriumnetwork/node/services/wireguard" | ||
wireguard_service "github.com/mysteriumnetwork/node/services/wireguard/service" | ||
) | ||
|
||
// BootstrapServices loads all the components required for running services | ||
func (di *Dependencies) BootstrapServices(nodeOptions node.Options) error { | ||
di.bootstrapServiceComponents(nodeOptions) | ||
|
||
di.bootstrapServiceOpenvpn(nodeOptions) | ||
di.bootstrapServiceNoop(nodeOptions) | ||
di.bootstrapServiceWireguard(nodeOptions) | ||
|
||
return nil | ||
} | ||
|
||
func (di *Dependencies) bootstrapServiceWireguard(nodeOptions node.Options) { | ||
di.ServiceRegistry.Register(wireguard.ServiceType, func(serviceOptions service.Options) (service.Service, error) { | ||
return wireguard_service.NewManager(di.LocationResolver, di.IPResolver, di.NATService), nil | ||
}) | ||
|
||
di.ServiceRunner.Register(wireguard.ServiceType) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// +build windows | ||
|
||
/* | ||
* Copyright (C) 2019 The "MysteriumNetwork/node" Authors. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package cmd | ||
|
||
import ( | ||
"github.com/mysteriumnetwork/node/core/node" | ||
) | ||
|
||
// BootstrapServices loads all the components required for running services | ||
func (di *Dependencies) BootstrapServices(nodeOptions node.Options) error { | ||
di.bootstrapServiceComponents(nodeOptions) | ||
|
||
di.bootstrapServiceOpenvpn(nodeOptions) | ||
di.bootstrapServiceNoop(nodeOptions) | ||
|
||
return nil | ||
} |