diff --git a/services/wireguard/endpoint/remoteclient/network_darwin.go b/services/wireguard/endpoint/remoteclient/network_darwin.go index e7370812f..1a43dbd7a 100644 --- a/services/wireguard/endpoint/remoteclient/network_darwin.go +++ b/services/wireguard/endpoint/remoteclient/network_darwin.go @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 The "MysteriumNetwork/node" Authors. + * Copyright (C) 2020 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 diff --git a/services/wireguard/endpoint/remoteclient/network_linux.go b/services/wireguard/endpoint/remoteclient/network_linux.go new file mode 100644 index 000000000..4588ba498 --- /dev/null +++ b/services/wireguard/endpoint/remoteclient/network_linux.go @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2020 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 . + */ + +package remoteclient + +import ( + "errors" + "net" +) + +func assignIP(iface string, subnet net.IPNet) error { + return errors.New("not implemented") +} + +func excludeRoute(ip net.IP) error { + return errors.New("not implemented") +} + +func addDefaultRoute(iface string) error { + return errors.New("not implemented") +} diff --git a/services/wireguard/endpoint/remoteclient/tun.go b/services/wireguard/endpoint/remoteclient/tun.go index e65fa4032..6fc1a0ad0 100644 --- a/services/wireguard/endpoint/remoteclient/tun.go +++ b/services/wireguard/endpoint/remoteclient/tun.go @@ -1,7 +1,7 @@ // +build !windows /* - * Copyright (C) 2019 The "MysteriumNetwork/node" Authors. + * Copyright (C) 2020 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 diff --git a/supervisor/client/transport_linux.go b/supervisor/client/transport_linux.go new file mode 100644 index 000000000..651dd127d --- /dev/null +++ b/supervisor/client/transport_linux.go @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2020 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 . + */ + +package client + +import ( + "errors" + "io" +) + +func connect() (io.ReadWriteCloser, error) { + return nil, errors.New("not implemented") +} diff --git a/supervisor/config/const_linux.go b/supervisor/config/const_linux.go new file mode 100644 index 000000000..6a33c866e --- /dev/null +++ b/supervisor/config/const_linux.go @@ -0,0 +1,20 @@ +/* + * Copyright (C) 2020 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 . + */ + +package config + +const confPath = "TODO" diff --git a/supervisor/daemon/myst_linux.go b/supervisor/daemon/myst_linux.go new file mode 100644 index 000000000..284483f51 --- /dev/null +++ b/supervisor/daemon/myst_linux.go @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2020 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 . + */ + +package daemon + +import "errors" + +// RunMyst runs mysterium node daemon. Blocks. +func (d *Daemon) RunMyst() error { + return errors.New("not implemented") +} + +func (d *Daemon) killMyst() error { + return errors.New("not implemented") +} diff --git a/supervisor/daemon/transport/transport_linux.go b/supervisor/daemon/transport/transport_linux.go new file mode 100644 index 000000000..e35955e23 --- /dev/null +++ b/supervisor/daemon/transport/transport_linux.go @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2020 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 . + */ + +package transport + +import "errors" + +// Start starts a listener on a unix domain socket. +// Conversation is handled by the handlerFunc. +func Start(handle handlerFunc) error { + return errors.New("not implemented") +} diff --git a/supervisor/daemon/wireguard/wginterface/interface_linux.go b/supervisor/daemon/wireguard/wginterface/interface_linux.go new file mode 100644 index 000000000..f04668275 --- /dev/null +++ b/supervisor/daemon/wireguard/wginterface/interface_linux.go @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2020 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 . + */ + +package wginterface + +import ( + "errors" +) + +// New creates new WgInterface instance. +func New(requestedInterfaceName string, uid string) (*WgInterface, error) { + return nil, errors.New("not implemented") +} + +// Listen listens for WireGuard configuration changes via user space socket. +func (a *WgInterface) Listen() { + +} + +// Down closes device and user space api socket. +func (a *WgInterface) Down() { + +} diff --git a/supervisor/install/install_linux.go b/supervisor/install/install_linux.go index c073615be..249753a5f 100644 --- a/supervisor/install/install_linux.go +++ b/supervisor/install/install_linux.go @@ -17,8 +17,9 @@ package install -import "fmt" +import "errors" -func Install() { - fmt.Println("Installing...") +// Install installs service for linux. Not implemented yet. +func Install(options Options) error { + return errors.New("not implemented") }