Git Product home page Git Product logo

seashell / drago Goto Github PK

View Code? Open in Web Editor NEW
1.1K 32.0 59.0 65.98 MB

☁️ Securely connect anything with WireGuard® and manage all your networks from a single place.

Home Page: https://seashell.github.io/drago

License: Apache License 2.0

Go 63.38% Shell 0.01% JavaScript 30.92% HTML 0.25% Makefile 0.74% Ruby 0.13% CSS 4.46% HCL 0.11%
wireguard wg-quick cloud edge-computing vpn networking configuration golang api linux

drago's People

Contributors

edufschmidt avatar mkwinter avatar prigotti avatar sruffilli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

drago's Issues

[question] Routing all traffic through one peer

I've spent a good few hours trying to figure out how I can configure Drago to route one peer's traffic through another to reach the internet, yet I haven't managed to figure it out thus far. Could anyone point me in the right direction?

Custom interface names

Is your feature request related to a problem? Please describe.
I would like to set a custom and static interface name for the client to use with firewall rules

Describe the solution you'd like
An additional option here:
image
Would work great in my opinion.

Describe alternatives you've considered
None

Add --dev flag to agent command

Is your feature request related to a problem? Please describe.
I'd like to be able to run the agent in dev mode, i.e., running both the Drago server and the client.

Describe the solution you'd like
I'd like a flag to be added to the drago agent command (--dev), which causes both the server and the client to be launched with default configurations so that the server runs on localhost, and the client is able to connect to it. No authentication should be enforced, as this is primarily meant for developing and testing.

make container DOCKER=1 not working centos 7

Describe the bug
Attempting to build the docker image on centos 7 results in an error, see screenshot for build output

To Reproduce
On Centos 7
$ git clone https://github.com/seashell/drago.git drago
$

Expected behavior
Successful build of docker image.

Screenshots
Full attempted build output:

sudo make container DOCKER=1
make[1]: Entering directory `/home/paul/drago'
==> Building Web UI...
docker run --rm -v /home/paul/drago:/home/paul/drago --workdir=/home/paul/drago drago_builder \
/bin/sh -c "go generate"
go: downloading github.com/caarlos0/env v3.5.0+incompatible
go: downloading github.com/dimiro1/banner v1.1.0
go: downloading github.com/hashicorp/hcl/v2 v2.9.1
go: downloading github.com/joho/godotenv v1.3.0
go: downloading github.com/rodaine/table v1.0.1
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/fatih/color v1.10.0
go: downloading github.com/common-nighthawk/go-figure v0.0.0-20200609044655-c4b36f998cf2
go: downloading github.com/mattn/go-isatty v0.0.12
go: downloading github.com/hashicorp/go-cleanhttp v0.5.2
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/mattn/go-colorable v0.1.8
go: downloading golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae
go: downloading github.com/agext/levenshtein v1.2.1
go: downloading github.com/apparentlymart/go-textseg/v13 v13.0.0
go: downloading github.com/apparentlymart/go-textseg v1.0.0
go: downloading github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7
go: downloading github.com/zclconf/go-cty v1.8.0
go: downloading github.com/go-playground/validator/v10 v10.4.1
go: downloading golang.org/x/text v0.3.5
go: downloading github.com/google/go-cmp v0.4.0
go: downloading github.com/vmihailenco/msgpack v4.0.4+incompatible
go: downloading github.com/vishvananda/netlink v1.1.1-0.20200604160102-dc0e1b988c57
go: downloading golang.zx2c4.com/wireguard/wgctrl v0.0.0-20200609130330-bd2cb7843e1b
go: downloading golang.zx2c4.com/wireguard v0.0.20200121
go: downloading go.etcd.io/bbolt v1.3.5
go: downloading go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738
go: downloading github.com/imdario/mergo v0.3.12
go: downloading github.com/go-playground/universal-translator v0.17.0
go: downloading github.com/leodido/go-urn v1.2.0
go: downloading golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
go: downloading github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df
go: downloading github.com/google/uuid v1.0.0
go: downloading go.uber.org/zap v1.16.0
go: downloading google.golang.org/grpc v1.23.1
go: downloading github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf
go: downloading github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
go: downloading github.com/grpc-ecosystem/grpc-gateway v1.9.5
go: downloading github.com/soheilhy/cmux v0.1.4
go: downloading github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8
go: downloading golang.org/x/net v0.0.0-20200301022130-244492dfa37a
go: downloading sigs.k8s.io/yaml v1.1.0
go: downloading github.com/go-playground/locales v0.13.0
go: downloading github.com/mdlayher/genetlink v1.0.0
go: downloading github.com/mdlayher/netlink v1.1.0
go: downloading github.com/gogo/protobuf v1.2.1
go: downloading github.com/golang/protobuf v1.3.4
go: downloading github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7
go: downloading go.uber.org/atomic v1.6.0
go: downloading go.uber.org/multierr v1.5.0
go: downloading google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8
go: downloading github.com/prometheus/client_golang v1.0.0
go: downloading github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c
go: downloading github.com/sirupsen/logrus v1.8.1
go: downloading github.com/coreos/go-semver v0.2.0
go: downloading github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4
go: downloading github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2
go: downloading golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2
go: downloading github.com/jonboulle/clockwork v0.1.0
go: downloading github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4
go: downloading gopkg.in/yaml.v2 v2.3.0
go: downloading github.com/beorn7/perks v1.0.0
go: downloading github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90
go: downloading github.com/prometheus/common v0.4.1
go: downloading github.com/prometheus/procfs v0.0.2
go: downloading github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: downloading github.com/google/btree v1.0.0
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
go: downloading github.com/json-iterator/go v1.1.7
go: downloading github.com/modern-go/reflect2 v1.0.1
go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
yarn install v1.22.15
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > @reach/[email protected]" has incorrect peer dependency "[email protected] || 16.x || 16.4.0-alpha.0911da3".
warning " > @reach/[email protected]" has incorrect peer dependency "[email protected] || 16.x || 16.4.0-alpha.0911da3".
warning "@reach/router > [email protected]" has incorrect peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0".
warning " > [email protected]" has unmet peer dependency "qs@>=6".
warning " > [email protected]" has incorrect peer dependency "react@^16.8.0".
warning " > [email protected]" has incorrect peer dependency "react@^15.0.0 || ^16.0.0".
warning " > [email protected]" has incorrect peer dependency "react@^17.0.0 | ^16.14.0".
warning " > [email protected]" has incorrect peer dependency "react@^16.4.1".
warning " > [email protected]" has incorrect peer dependency "react@^15.6.0 || ^16.0.0".
warning " > [email protected]" has incorrect peer dependency "react@^0.14 || ^15 || ^16".
warning " > [email protected]" has incorrect peer dependency "react-dom@^0.14 || ^15 || ^16".
warning "react-scripts > @typescript-eslint/eslint-plugin > [email protected]" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
warning " > [email protected]" has incorrect peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0".
warning " > [email protected]" has incorrect peer dependency "react-dom@^0.14.0 || ^15.0.0 || ^16.0.0".
warning " > [email protected]" has incorrect peer dependency "react@^15.0.0 || ^16.0.0".
warning " > [email protected]" has incorrect peer dependency "react-dom@^15.0.0 || ^16.0.0".
warning " > [email protected]" has incorrect peer dependency "react@^16.8.0".
warning " > [email protected]" has incorrect peer dependency "react-dom@^16.8.0".
warning " > [email protected]" has incorrect peer dependency "react@^15.3.0 || ^16.0.0-alpha".
warning " > [email protected]" has incorrect peer dependency "react-dom@^15.3.0 || ^16.0.0-alpha".
warning " > [email protected]" has incorrect peer dependency "react@^15.3.0 || ^16.0.0-alpha".
warning " > [email protected]" has incorrect peer dependency "react-dom@^15.3.0 || ^16.0.0-alpha".
warning " > [email protected]" has incorrect peer dependency "react@^15.0.0 || ^16.0.0".
warning " > [email protected]" has incorrect peer dependency "react-dom@^15.0.0 || ^16.0.0".
warning "recharts > [email protected]" has incorrect peer dependency "react@^0.14.7 || ^15.0.0 || ^16.0.0".
warning "recharts > [email protected]" has incorrect peer dependency "react@^15.0.0 || ^16.0.0".
warning "recharts > [email protected]" has incorrect peer dependency "react-dom@^15.0.0 || ^16.0.0".
warning " > [email protected]" has incorrect peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0".
warning " > [email protected]" has unmet peer dependency "react-is@>= 16.8.0".
warning " > [email protected]" has incorrect peer dependency "react@^16.9.0".
warning " > [email protected]" has incorrect peer dependency "react-dom@^16.9.0".
warning " > [email protected]" has unmet peer dependency "webpack@>=1.11.0".
warning " > [email protected]" has incorrect peer dependency "[email protected] || 3.x".
warning "react-app-rewire-styled-components > [email protected]" has incorrect peer dependency "react-scripts@^1.0.14".
[4/4] Building fresh packages...
Done in 98.08s.
yarn run v1.22.15
$ react-app-rewired build
Creating an optimized production build...
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
Compiled successfully.

File sizes after gzip:

  254.21 KB  build/static/js/2.63d1b46f.chunk.js
  78.11 KB   build/static/js/main.5d8f5566.chunk.js
  1.94 KB    build/static/css/2.e37103c0.chunk.css
  1.47 KB    build/static/css/main.8c8a6e54.chunk.css
  774 B      build/static/js/runtime-main.96e6ffe6.js

The project was built assuming it is hosted at /ui/.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.

Find out more about deployment here:

  https://cra.link/deployment

Done in 105.87s.
bash: go: command not found
bash: go: command not found
make[2]: *** No rule to make target `_'.  Stop.
make[1]: *** [dev] Error 2
make[1]: Leaving directory `/home/paul/drago'
make: *** [container] Error 2

Server (please complete the following information):

  • OS: Centos 7
  • uname -r
    3.10.0-1160.45.1.el7.centos.plus.x86_64

Atomic transactions

As of now, the Drago server interacts with the repositories without any consistency guarantee. In other words, failures during the execution of more complex operations involving multiple repositories e.g., joining a network, might result in inconsistencies.

This can be overcome by the introduction of atomic transactions, which ensure that operations either succeed completely or fail completely. Etcd, Drago's storage backend, already offers support to transactions, and the very same client already used in the project (https://pkg.go.dev/go.etcd.io/etcd/clientv3) can be used for implementing this enhancement.

Error with adduser command when building the dockerfile

Hi,

When I try to build the Dockerfile, I have the following error:

➜  build git:(master) docker build -f Dockerfile.builder .
[+] Building 48.4s (7/7) FINISHED
 => [internal] load build definition from Dockerfile.builder                                                     0.0s
 => => transferring dockerfile: 887B                                                                             0.0s
 => [internal] load .dockerignore                                                                                0.0s
 => => transferring context: 2B                                                                                  0.0s
 => [internal] load metadata for docker.io/library/golang:1.16.2-stretch                                         1.1s
 => CACHED [1/4] FROM docker.io/library/golang:1.16.2-stretch@sha256:1bf98b13aa56635f0a69bdb9bc35cba11a672fd65f  0.0s
 => [2/4] RUN curl -sS http://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&     echo "deb http://dl.yarn  39.9s
 => [3/4] RUN apt-get install -y gcc-arm-linux-gnueabihf libc6-dev-armhf-cross                        gcc-aarch  7.0s
 => ERROR [4/4] RUN if [ "" != "root" ]; then     (adduser -q --gecos "" --home /home/ --disabled-password -u    0.3s
------
 > [4/4] RUN if [ "" != "root" ]; then     (adduser -q --gecos "" --home /home/ --disabled-password -u       && chown -R ":" /home/);     fi:
#6 0.292 adduser [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID]
#6 0.292 [--firstuid ID] [--lastuid ID] [--gecos GECOS] [--ingroup GROUP | --gid ID]
#6 0.292 [--disabled-password] [--disabled-login] [--add_extra_groups] USER
#6 0.292    Add a normal user
#6 0.292
#6 0.292 adduser --system [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID]
#6 0.292 [--gecos GECOS] [--group | --ingroup GROUP | --gid ID] [--disabled-password]
#6 0.292 [--disabled-login] [--add_extra_groups] USER
#6 0.292    Add a system user
#6 0.292
#6 0.292 adduser --group [--gid ID] GROUP
#6 0.292 addgroup [--gid ID] GROUP
#6 0.292    Add a user group
#6 0.292
#6 0.292 addgroup --system [--gid ID] GROUP
#6 0.292    Add a system group
#6 0.292
#6 0.292 adduser USER GROUP
#6 0.292    Add an existing user to an existing group
#6 0.292
#6 0.292 general options:
#6 0.292   --quiet | -q      don't give process information to stdout
#6 0.292   --force-badname   allow usernames which do not match the
#6 0.292                     NAME_REGEX configuration variable
#6 0.292   --help | -h       usage message
#6 0.292   --version | -v    version number and copyright
#6 0.292   --conf | -c FILE  use FILE as configuration file
#6 0.292
#6 0.292 Option uid requires an argument
------
executor failed running [/bin/sh -c if [ "${HOST_USER}" != "root" ]; then     (adduser -q --gecos "" --home /home/${HOST_USER} --disabled-password -u ${HOST_UID} ${HOST_USER}     && chown -R "${HOST_UID}:${HOST_UID}" /home/${HOST_USER});     fi]: exit code: 1

To Reproduce

  • cd build
  • docker build -f Dockerfile.builder .

Desktop :

  • OS: MacOS 11.4
  • Docker 20.10.7

`make container DOCKER=1` fails due to lack of support for stretch by NodeSource

Describe the bug
When trying to build the docker container via the make container DOCKER=1 command, the build fails while trying to get node_15.x from nodesource.com due to:

## Your distribution, identified as "stretch", is not currently supported, please contact NodeSource at https://github.com/nodesource/distributions/issues if you think this is incorrect or would like your distribution to be considered for support

To Reproduce
Run: make container DOCKER=1

Expected behavior
Container builds successfully.

Desktop (please complete the following information):

  • OS: Ubuntu 16.04.7

Full Error below:

## Confirming "stretch" is supported...

+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_15.x/dists/stretch/Release'

## Your distribution, identified as "stretch", is not currently supported, please contact NodeSource at https://github.com/nodesource/distributions/issues if you think this is incorrect or would like your distribution to be considered for support

The command '/bin/sh -c curl -sS http://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&     echo "deb http://dl.yarnpkg.com/debian/ stable main" |  tee /etc/apt/sources.list.d/yarn.list &&     curl -sL http://deb.nodesource.com/setup_15.x | bash - &&     apt-get install -y nodejs &&     apt-get update &&     apt-get remove cmdtest &&     apt-get install -y yarn' returned a non-zero code: 1
Makefile:113: recipe for target 'ui' failed
make[1]: *** [ui] Error 1
make[1]: Leaving directory '/home/jrgilman/drago'
Makefile:62: recipe for target 'container' failed
make: *** [container] Error 2

Implement pagination or infinite scrolling on the UI

Is your feature request related to a problem? Please describe.
This feature would allow the frontend to fetch data from the backend as needed, in an efficient way.

Describe the solution you'd like
Pagination: For every screen in which a list of resources (i.e., networks, hosts, interfaces, and links) is shown, I'd like to be able to select how many entries will be included in each page fetched and displayed at a time, and also the current page.
Infinite scrolling: As I scroll down, I'd like the frontend to asynchronously fetch more data from the backend and display it in the UI.

Describe alternatives you've considered
react-paginate, react-infinite-scroll-component, or a similar alternative in conjunction with Apollo client.

Client not connecting to server

Trying to setup Drago, got the server up and running currently. On my other host (VM) I'm trying to setup a client with this configuration:

name = "docker2"
ports {
    http = 8181
    rpc = 8282
}

client {
    enabled = true
    servers = ["10.0.10.2:8080"]
}

It's called docker2 since that's the name of the host, but the client is currently not running in docker

I get this output when starting my client (this is the 2nd or 3rd run) and it says it has registered successfully, but I can't see it inside the UI under clients (which is where I expect it to appear).

==> Loading configurations from: [config.hcl]
==> Starting Drago agent...
==> Drago agent configuration:

Bind Addrs: HTTP: 0.0.0.0:8181; RPC: 0.0.0.0:8282
Advertise Addrs: Peer: 0.0.0.0; Server: 0.0.0.0:8282
Log Level: DEBUG
Client: true
Server: true
Version: dev
Acl Enabled: false
Data Dir: /tmp/drago

[DEBUG] server: rpc server started at 0.0.0.0:8282
[INFO] client: using state directory /tmp/drago
[DEBUG] client: interface updates: (created: 0, deleted: 0, updated: 0, unchanged: 0)
[INFO] client: started client node 63c6db4a-192b-88ea-d329-1f796c77ed3e
[DEBUG] agent: http server started at [::]:8181
[DEBUG] client: registering node (client -> server)
[DEBUG] client: running node
[DEBUG] client: updating interface status (client -> server)
[DEBUG] client: updating interface configuration (server -> client)
[DEBUG] client: interface updates: (created: 0, deleted: 0, updated: 0, unchanged: 0)
[DEBUG] server: node 63c6db4a-192b-88ea-d329-1f796c77ed3e already registered.
[DEBUG] client: heartbeating (client -> server)
[DEBUG] client: updating node status (client -> server)
[DEBUG] server: heartbeat from node 63c6db4a-192b-88ea-d329-1f796c77ed3e
[DEBUG] client: updating interface status (client -> server)

Something I'm missing?

Mock HTTP API for UI development

As a developer, I would like to be able to work on the web UI without having to rely on the agent to serve the HTTP API.

In other words, I would like to be able to run the Web UI in development mode in such a way that all the data needed for testing it is served by a mock API. Ideally, I would like this process to be as seamless as possible, and not require complex configuration to switch from consuming data served by the Drago agent to consuming data from the mock API.

miragejs seems like a promising solution.

Network topology graph

As a user, I would like to be able to see a topology graph of each network managed by Drago, with nodes and edges corresponding to interfaces and connections, respectively.

Possibly, there could be a global graph showing data from multiple networks (e.g., in scenarios in which a node has more than one interface).

See react-force-graph, and the implementation present in Drago version 0.1.0.

Missing documentation

This will serve as a list over the documentation that's missing, feel free to mention more and I'll add it to the list.

To help contribute to the docs, look at docs. This issue can also be used for coordination.

  • Installing Drago
    • Overview - Add go generate
    • Quickstart - Docker/makefile?
  • Configuration
    • Add new page for "top-level" configurations; data-dir, ports, name etc. (config)
    • ACL - Explain what the ACL system is for or link to HTTP API - Overview?
    • Client - Add missing options (config)
  • HTTP API
    • ACL Policies
    • ACL Tokens
    • Connections
    • Interfaces
    • Networks - Missing example
    • Nodes
    • Status
    • UI
  • Running Drago
    • Running in Docker

Comment any issues with the list.

Integrate plugin system for non-essential functionality

In order to keep the Drago core functionality as lean as possible, it would be interesting to integrate a plugin system so that the leasing service (and future non-core features) can be implemented as a plugin. The go-plugin package by Hashicorp seems to be a good candidate due to the very loose coupling between the host and the plugin, and simple build process.

One idea is to have Drago trigger functions/hooks, defined in an interface implemented by each plugin, on specific situations (resource created, resource deleted, etc), and to which plugins can respond.

Node pre-registration

As a user, I would like to be able to (pre-)register nodes so that they can be configured (i.e, join networks, connect to peers, etc) before they go online.

The steps below should serve as a starting point:

  1. User requests the pre-registration of a new node, either via CLI or web UI.
  2. A node is created in the server, as if it had automatically registered, and a secret S is returned.
  3. The node can be arbitrarily configured, as if it were a regular node.
  4. The secret S is then passed to a client node, via configuration file, flag, etc.
  5. When a client node tries to register to the server and presents the secret S, it is immediately associated with the pre-registered client, and the secret is rendered useless.

Base URL option

Wanting to try Drago in my setup I've created my own docker image to spin up (based on the build process found here), but it won't do API calls properly.

The issue is that it's expecting it to be run from localhost, so all API calls in the UI is trying to send to http://localhost:8080 - so it seems you can only use the UI if you're actually running it locally, and accessing UI locally.

Is there an option to change this in some way? I can't find it in the docs at least. Because if not I don't see how I'd get it working with my proxy either.

Rename project

It was pointed out in this Reddit thread that Dragos is the name of a company in the IT security space, with people suggesting that the project is renamed. This issue is meant to discuss name ideas, and whether renaming Drago makes sense.

Panic on `drago interface update`

Describe the bug
When running drago interface update:

interface update flag redefined: address

================================================================================
Drago has encountered a fatal error. This is a bug!
We would appreciate a report: https://github.com/seashell/drago/issues/
Please provide all of the below text in your report.
================================================================================
Drago Version:       dev
Go Version:          go1.16.5
Go Compiler:         gc
Architecture:        amd64
Operating System:    linux
Panic:               interface update flag redefined: address

goroutine 1 [running]:
runtime/debug.Stack(0xc0004299b8, 0x10a3de0, 0xc0003242e0)
        /opt/hostedtoolcache/go/1.16.5/x64/src/runtime/debug/stack.go:24 +0x9f
main.panicHandler()
        /home/runner/work/drago/drago/main.go:30 +0x76
panic(0x10a3de0, 0xc0003242e0)
        /opt/hostedtoolcache/go/1.16.5/x64/src/runtime/panic.go:965 +0x1b9
github.com/spf13/pflag.(*FlagSet).AddFlag(0xc0001ae000, 0xc000304500)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/flag.go:848 +0x825
github.com/spf13/pflag.(*FlagSet).VarPF(0xc0001ae000, 0x228f400, 0xc00013a1c0, 0x126e29a, 0x7, 0x0, 0x0, 0x0, 0x0, 0xc000324270)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/flag.go:831 +0x10b
github.com/spf13/pflag.(*FlagSet).VarP(...)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/flag.go:837
github.com/spf13/pflag.(*FlagSet).StringVar(0xc0001ae000, 0xc00013a1c0, 0x126e29a, 0x7, 0x0, 0x0, 0x0, 0x0)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/string.go:37 +0x9b
github.com/seashell/drago/command.(*InterfaceUpdateCommand).FlagSet(0xc00013a190, 0xc000429e00)
        /home/runner/work/drago/drago/command/interface_update.go:32 +0xdd
github.com/seashell/drago/command.(*InterfaceUpdateCommand).Run(0xc00013a190, 0x2296490, 0xc0001227c0, 0xc00003a190, 0x0, 0x0, 0x72f129)
        /home/runner/work/drago/drago/command/interface_update.go:51 +0x2f
github.com/seashell/drago/pkg/cli.(*CLI).Run(0xc000117680, 0x2296490, 0xc0001227c0, 0xc00003a190, 0x2, 0x2, 0xc000052060, 0x70, 0x10000c00004e138)
        /home/runner/work/drago/drago/pkg/cli/cli.go:134 +0x165
main.run(0xc00003a190, 0x2, 0x2, 0x0)
        /home/runner/work/drago/drago/main.go:74 +0x195
main.main()
        /home/runner/work/drago/drago/main.go:53 +0x65

Desktop (please complete the following information):

  • OS: openSUSE Tumbleweed

Support for FreeBSD

There are plenty of network devices based on FreeBSD. pfSence and OPNSence are primary example. Not to mention that support for pure FreeBSD box will increase potential install base and open way to use it on Apple MACs ( this will be complicated).

Big problem with FreeBSD is lack of single implementation of WireGuard protocol. There are 2 exists

  1. User-space written on ruby and available for all versions
  2. Kernel module which after pfSence drama failed to get to to latest version of FreeBSD , but eventually will be there.

Both versions are using same set of userspace tools.

So implementation for 1 will give better immediate coverage, option 2 is future proof.

If you can make code to work under FreeBSD I will happily package it for you.

Multi-select in network/connection modal

Is your feature request related to a problem? Please describe.
When adding hosts to networks or adding connections, one might want to add multiple at a time. This is currently not possible through the web UI (and I assume the API too because the CLI also allows adding one connection/network per command, but that makes sense in this case) but would make the process of configuring networks much quicker and simpler.

Describe the solution you'd like
The API may need to be modified to accept multiple connection/network changes at a time if this is not yet the case, for the sake of efficiency. Otherwise, converting the radio buttons in the modal to checkboxes ui-wise would solve the problem nicely. A "select all" option would also be useful.

Describe alternatives you've considered
None

Additional context
None

[WARN] client: could not update wireguard interface: wglinux: invalid endpoint IP: <nil>

Describe the bug
On the latest dev build, on startup and whenever I change any interface properties, the line from the issue title appears in the logs and the interface is not created correctly. That is, it's not visible in ifconfig while ip addr reports the following:

4: drago-9579b5: <POINTOPOINT,NOARP> mtu 1420 qdisc noqueue state DOWN group default qlen 1000
    link/none

Expected behavior
The interface should be created and configured correctly

Desktop (please complete the following information):

  • OS: openSUSE Tumbleweed / openSUSE Leap 15.3

Additional context
Add any other context about the problem here.

Alliance

Hello, my name is Alfonso Hernandez. I work for the Astian Foundation, a non-profit organization that offers free software and technologies.

We are the organization responsible for development and maintenance of Midori Browser, a popular browser, light, fast, secure and open source.

We are developing a service called K-LamarVPN using WireGuard, which we hope to link with Midori. We would like to establish an alliance with the project to implement it.

What do you think?

support drago managing a subset of wireguard devices on a client

At the moment Drago agent on the client deletes all defined wireguard devices during the reconciliation loop

So if a client, say a windows desktop user, wishes to use use Drago in addition to another VPN solution that also uses wireguard, Drago will delete their connection.

One idea could be for the client to prefix all Drago managed devices with drago_. The server won't know about the prefix.

What's the project status?

Hi!

First of all - awesome idea, exactly the solution we need. Thank you for coming up with this!

I wonder what's the status of the project? I see the only release was RC and already some time ago, but at the same time there is something going on on dev branch regularly - so I guess it's not dead, just release cycle is very long? Or was it just some kind of PoC? Do you recommend using it in production environments? Do you know/recommend any alternatives to Drago?

Additionally, I was able to configure it only after accidentally finding out "demo" directory. Before, I had to scan all of the source code to find out what are the possibilities, configuration options etc.. Unfortunately, docs page is empty. Are you looking for contribution when it comes to the documentation?
After playing with Drago a little bit, I'd also have some issues to open - but as with the documentation, I'm not sure whether you are expecting it or not.

Looking forward to hear from you and, once again - great project!

Feedback - this is a great idea

I couldn't find any other forum to post feedback so I though I would leave a comment here.

I think that drago is a fantastic idea.

Id like to build something based on drago to run in my bare metal kube cluster and use https://metallb.universe.tf/ to expose services to developers.

Also, using a tool like drago as a base for implementing a VPN will mean no more having to update peer configs on all the peers when a new peer is added - fantastic.

Would be great to combine this with https://github.com/asticode/go-astilectron and https://github.com/kardianos/service to make a cross platform GUI VPN client

Are there plans to implement auth for the management api endpoints, something like oidc ?

Plugin ideas

This issue is meant for discussing and specifying plugin ideas for Drago. As of now, we are working with the following possibilities:

  • Leasing plugin: plugin capable of automatically assigning IP addresses to nodes when they join a network;
  • Meshing plugin: plugin responsible for automatically creating connections between nodes in a network in order to establish a mesh;
  • Admission plugin: plugin responsible for handling node registration requests, possibly delegating the responsibility to a third-party;
  • Notification plugin: plugin for notifying users via email/Telegram/Slack (?) whenever an important event occurs (e.g., when a node joins/leaves a network, when a node goes online/offline).

Feel free to add any plugins you think would be useful to the list :)

Web UI only allows one connection per host

Describe the bug
The only way to add connections to hosts is via a button which disappears when there are connections. This effectively means that one can only add a single connection through the web UI per host. See below:

image
^ With no connections, a button appears to add one

image
^ Unlike the networks, when connections are present, there no longer is a button to add more

Expected behavior
Like with networks, there should always be a button to add more connections as they are supported (you can connect multiple peers to one and then it will have multiple connections).

Client in docker unable to create interface

Describe the bug
When running a client in Docker, it is unable to create an interface to route traffic through.

To Reproduce
Steps to reproduce the behavior:

  1. Run the docker image as a client
  2. Connect to a network
  3. Notice a lack of Drago interface

Expected behavior
The interface should be created regardless

Additional context
I believe this is purely down to a lack of some volumes being passed through to the container, in which case this is just a small documentation issue. This could be of use: https://github.com/gravitl/netmaker/blob/master/compose/docker-compose.reference.yml#L15

Dockerfile or pre-compiled docker images support

Thank you for your efforts on this project. It looks like a great idea! Could you provide a Dockerfile for compiling the whole project? Or are there any provide a pre-compiled docker images? I just want to try a demo :)

Update showcase video

The current GIF in the README.md is outdated, and needs to be replaced with a new version that reflects the recent changes made to the UI.

Status of this project?

After seashell, the company, seems to be in liquidation, what is the status of this project?

Default network always re-created on restart

Describe the bug
When the Drago service is restarted, the default network is always re-created even when previously deleted.

To Reproduce
Steps to reproduce the behavior:

  1. Delete default network
  2. Restart Drago service
  3. Notice default network is back

Expected behavior
The default network should not be re-created if other networks exist/are available.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.