├── .gitignore ├── images ├── edit.png ├── plus.png ├── delete.png ├── favicon.ico ├── favicon.png ├── netmaker.png ├── netmaker2.png ├── network.png ├── refresh.png └── netmaker-small.png ├── screenshots ├── netmaker-gui-ui.png ├── netmaker-gui-phone.png └── netmaker-gui-browser.png ├── Dockerfile.dev ├── go.mod ├── Dockerfile ├── .github ├── dependabot.yml └── workflows │ ├── publish-docker.yml │ └── codeql-analysis.yml ├── .do └── deploy.template.yaml ├── html ├── sidebar.html ├── layout.html ├── rightsidebar.html ├── login.html ├── buttonbar2.html ├── networks.html ├── dns.html ├── buttonbar.html ├── new.html ├── keys.html ├── edit.html ├── extclient.html ├── header.html ├── script.html └── nodes.html ├── file_handler.go ├── dns_handlers.go ├── key_handlers.go ├── compose └── docker-compose.yml ├── README.md ├── node_handlers.go ├── user_handlers.go ├── handlers.go ├── network_handlers.go ├── gateway_handlers.go ├── extclient_handlers.go ├── types.go ├── main.go ├── LICENSE └── go.sum /.gitignore: -------------------------------------------------------------------------------- 1 | *.bak 2 | netmaker-gui 3 | config/* 4 | data/* 5 | files/* 6 | -------------------------------------------------------------------------------- /images/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattkasun/netmaker-gui/HEAD/images/edit.png -------------------------------------------------------------------------------- /images/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattkasun/netmaker-gui/HEAD/images/plus.png -------------------------------------------------------------------------------- /images/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattkasun/netmaker-gui/HEAD/images/delete.png -------------------------------------------------------------------------------- /images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattkasun/netmaker-gui/HEAD/images/favicon.ico -------------------------------------------------------------------------------- /images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattkasun/netmaker-gui/HEAD/images/favicon.png -------------------------------------------------------------------------------- /images/netmaker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattkasun/netmaker-gui/HEAD/images/netmaker.png -------------------------------------------------------------------------------- /images/netmaker2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattkasun/netmaker-gui/HEAD/images/netmaker2.png -------------------------------------------------------------------------------- /images/network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattkasun/netmaker-gui/HEAD/images/network.png -------------------------------------------------------------------------------- /images/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattkasun/netmaker-gui/HEAD/images/refresh.png -------------------------------------------------------------------------------- /images/netmaker-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattkasun/netmaker-gui/HEAD/images/netmaker-small.png -------------------------------------------------------------------------------- /screenshots/netmaker-gui-ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattkasun/netmaker-gui/HEAD/screenshots/netmaker-gui-ui.png -------------------------------------------------------------------------------- /screenshots/netmaker-gui-phone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattkasun/netmaker-gui/HEAD/screenshots/netmaker-gui-phone.png -------------------------------------------------------------------------------- /screenshots/netmaker-gui-browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattkasun/netmaker-gui/HEAD/screenshots/netmaker-gui-browser.png -------------------------------------------------------------------------------- /Dockerfile.dev: -------------------------------------------------------------------------------- 1 | FROM golang:1.16-alpine 2 | WORKDIR / 3 | COPY *.go go.* ./ 4 | RUN GOOS=linux go build -v . 5 | ADD /images/* images/ 6 | ADD /html/* html/ 7 | CMD ["./netmaker-gui"] 8 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/mattkasun/netmaker-gui 2 | 3 | go 1.16 4 | 5 | require ( 6 | github.com/gin-contrib/sessions v0.0.4 7 | github.com/gin-gonic/gin v1.7.4 8 | github.com/gravitl/netmaker v0.8.4 9 | github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e 10 | ) 11 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:latest as builder 2 | ARG VERSION=dev 3 | WORKDIR /build 4 | COPY *.go go.* ./ 5 | RUN GOOS=linux go build -ldflags="-X 'main.version=${VERSION}'" . 6 | 7 | 8 | FROM gcr.io/distroless/base 9 | WORKDIR / 10 | COPY --from=builder /build/netmaker-gui . 11 | ADD /images/* images/ 12 | ADD /html/* html/ 13 | CMD ["./netmaker-gui"] 14 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Basic dependabot.yml file with minimum configuration for gomod. 2 | 3 | version: 2 4 | updates: 5 | # Enable version updates for netmaker-gui 6 | - package-ecosystem: "gomod" 7 | directory: "/" 8 | # Check for updates every day (weekdays) 9 | schedule: 10 | interval: "weekly" 11 | target-branch: "develop" 12 | -------------------------------------------------------------------------------- /.do/deploy.template.yaml: -------------------------------------------------------------------------------- 1 | spec: 2 | name: netmaker-gui 3 | services: 4 | - http_port: 8080 5 | image: 6 | registry: nusak 7 | registry_type: DOCKER_HUB 8 | repository: netmaker-gui 9 | tag: v0.2 10 | instance_count: 1 11 | instance_size_slug: basic-xxs 12 | name: netmaker-gui 13 | routes: 14 | - path: / 15 | source_dir: / 16 | -------------------------------------------------------------------------------- /html/sidebar.html: -------------------------------------------------------------------------------- 1 | {{define "Sidebar"}} 2 |
3 | 7 |
8 | {{end}} 9 | 10 | {{define "SideBarContent"}} 11 |
12 | 13 | {{ range .Networks }} 14 | 15 | {{ end }} 16 |
17 | {{end}} 18 | 19 | -------------------------------------------------------------------------------- /html/layout.html: -------------------------------------------------------------------------------- 1 | {{define "layout"}} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | {{template "Header" . }} 12 | {{template "buttonbar" . }} 13 | {{template "Content" . }} 14 | {{ template "script" }} 15 | 16 | 17 | {{end}} 18 | 19 | {{define "Content"}} 20 |
21 | {{template "SideBarContent" .}} 22 |
23 |
24 | {{template "Networks" .}} 25 | {{template "Nodes" .}} 26 | {{template "Keys" .}} 27 | {{template "DNS" . }} 28 | {{template "ExtClient" .}} 29 |
30 | 31 | {{end}} 32 | 33 | 34 | -------------------------------------------------------------------------------- /file_handler.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | "net/http" 7 | "os" 8 | 9 | "github.com/gin-gonic/gin" 10 | ) 11 | 12 | func FileAuth(c *gin.Context) { 13 | auth := c.Request.Header.Get("Authorization") 14 | if auth != "Bearer secretkey" { 15 | c.Abort() 16 | c.JSON(http.StatusUnauthorized, gin.H{"message": "You are not authorized to view this endpoing"}) 17 | return 18 | } 19 | c.Next() 20 | } 21 | 22 | func FileUpload(c *gin.Context) { 23 | filename := c.Param("file") 24 | //although this is using user provided input, it is not a security issue as routing will result in 404 error if path elements are included in filename 25 | file, err := os.Create("./files/" + filename) 26 | if err != nil { 27 | c.JSON(http.StatusBadRequest, gin.H{"err": err.Error()}) 28 | return 29 | } 30 | n, err := io.Copy(file, c.Request.Body) 31 | if err != nil { 32 | c.String(http.StatusBadRequest, fmt.Sprintf("upload file err: %s", err.Error())) 33 | return 34 | } 35 | c.String(http.StatusOK, fmt.Sprintf("upload %d bytes to file %s", n, filename)) 36 | } 37 | -------------------------------------------------------------------------------- /html/rightsidebar.html: -------------------------------------------------------------------------------- 1 | {{define "Rightsidebar"}} 2 | 16 | {{end}} 17 | -------------------------------------------------------------------------------- /html/login.html: -------------------------------------------------------------------------------- 1 | {{define "Login"}} 2 | 3 | 4 | 5 | 6 | Login 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
  15 |
16 |
17 |
18 |

Login Form

19 |

{{.message}}

20 |

Please log in

21 | 22 | 23 |

24 | 25 |

26 |

27 | 28 |
29 |
30 | 31 | 32 | {{end}} 33 | -------------------------------------------------------------------------------- /dns_handlers.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | 7 | "github.com/gin-gonic/gin" 8 | controller "github.com/gravitl/netmaker/controllers" 9 | "github.com/gravitl/netmaker/dnslogic" 10 | "github.com/gravitl/netmaker/models" 11 | ) 12 | 13 | //CreateDNS add new custom dns entry 14 | func CreateDNS(c *gin.Context) { 15 | var entry models.DNSEntry 16 | entry.Network = c.PostForm("network") 17 | entry.Name = c.PostForm("name") 18 | entry.Address = c.PostForm("address") 19 | if err := controller.ValidateDNSCreate(entry); err != nil { 20 | fmt.Println("validation err dns: ", err) 21 | ReturnError(c, http.StatusBadRequest, err, "DNS") 22 | return 23 | } 24 | _, err := controller.CreateDNS(entry) 25 | if err != nil { 26 | fmt.Println("err dns: ", err) 27 | ReturnError(c, http.StatusBadRequest, err, "DNS") 28 | return 29 | } 30 | ReturnSuccess(c, "DNS", "DNS Entry for "+entry.Name+" created") 31 | } 32 | 33 | //DeleteDNS deletes custom DNS entry 34 | func DeleteDNS(c *gin.Context) { 35 | network := c.Param("net") 36 | name := c.Param("name") 37 | if err := controller.DeleteDNS(name, network); err != nil { 38 | fmt.Println("err dns delete", err) 39 | ReturnError(c, http.StatusBadRequest, err, "DNS") 40 | return 41 | } 42 | if err := dnslogic.SetDNS(); err != nil { 43 | fmt.Println("err set dns", err) 44 | ReturnError(c, http.StatusBadRequest, err, "DNS") 45 | return 46 | } 47 | ReturnSuccess(c, "DNS", "DNS Entry deleted") 48 | } 49 | -------------------------------------------------------------------------------- /.github/workflows/publish-docker.yml: -------------------------------------------------------------------------------- 1 | name: Publish Docker 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | tag: 7 | description: 'docker tag' 8 | required: true 9 | release: 10 | types: [published] 11 | 12 | jobs: 13 | docker: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: Set tag 17 | id: set_tag 18 | run: | 19 | if [[ -n "${{ github.event.inputs.tag }}" ]]; then 20 | TAG=${{ github.event.inputs.tag }} 21 | elif [[ "$GITHUB_EVENT_NAME" == 'release' ]]; then 22 | TAG="$GITHUB_REF_NAME" 23 | else 24 | TAG="${{ github.base_ref }}" 25 | fi 26 | echo "TAG=${TAG}" >> $GITHUB_ENV 27 | echo ${TAG} 28 | - name: Checkout 29 | uses: actions/checkout@v2 30 | - name: Set up QEMU 31 | uses: docker/setup-qemu-action@v1 32 | - name: Set up Docker Buildx 33 | uses: docker/setup-buildx-action@v1 34 | - name: Login to DockerHub 35 | uses: docker/login-action@v1 36 | with: 37 | username: ${{ secrets.DOCKERHUB_USERNAME }} 38 | password: ${{ secrets.DOCKERHUB_TOKEN }} 39 | - name: Build and push latest 40 | uses: docker/build-push-action@v2 41 | with: 42 | context: . 43 | platforms: linux/amd64, linux/arm64 44 | push: true 45 | tags: nusak/netmaker-gui:${{ env.TAG }} 46 | build-args: | 47 | VERSION=${{ env.TAG }} 48 | -------------------------------------------------------------------------------- /html/buttonbar2.html: -------------------------------------------------------------------------------- 1 | {{define "buttonbar2"}} 2 | 8 | 9 | 15 | 16 |
17 | 18 | 19 |
20 |

My Page

21 |
22 |
23 | 24 |
25 |

In this example, we demonstrate how to use two side navigations.

26 |

We have created two "menu" buttons: one to open the side navigation from the left and one to open it from the right.

27 |
28 | {{end}} 29 | -------------------------------------------------------------------------------- /html/networks.html: -------------------------------------------------------------------------------- 1 | {{ define "Networks" }} 2 |
3 | {{range .Networks}} 4 |

5 | {{template "NetDetails" .}} 6 | {{end}} 7 |
8 | {{end}} 9 | 10 | 11 | 12 | {{define "NetDetails"}} 13 |
14 |
15 |
16 | {{.NetID}} 17 |
18 |
19 |
20 | 21 | Last Modified 22 | 23 |
24 | 25 |
26 |
27 |
28 | 29 |
30 | 31 |
32 |
33 |
34 | 35 |
36 |
37 |
38 | {{ end }} 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /key_handlers.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | "strconv" 7 | 8 | "github.com/gin-gonic/gin" 9 | controller "github.com/gravitl/netmaker/controllers" 10 | "github.com/gravitl/netmaker/models" 11 | ) 12 | 13 | //RefreshKeys refreshs keys for network 14 | func RefreshKeys(c *gin.Context) { 15 | net := c.Param("net") 16 | _, err := controller.KeyUpdate(net) 17 | if err != nil { 18 | ReturnError(c, http.StatusBadRequest, err, "Keys") 19 | return 20 | } 21 | ReturnSuccess(c, "Networks", "Keys for "+net+" network updated") 22 | } 23 | 24 | //NewKey will generate a new key for a network 25 | func NewKey(c *gin.Context) { 26 | var key models.AccessKey 27 | var err error 28 | net := c.PostForm("network") 29 | key.Name = c.PostForm("name") 30 | key.Uses, err = strconv.Atoi(c.PostForm("uses")) 31 | if err != nil { 32 | key.Uses = 1 33 | } 34 | network, err := controller.GetNetwork(net) 35 | if err != nil { 36 | fmt.Println("error retrieving network ", err) 37 | ReturnError(c, http.StatusBadRequest, err, "Keys") 38 | return 39 | } 40 | _, err = controller.CreateAccessKey(key, network) 41 | if err != nil { 42 | fmt.Println("error creating key", err) 43 | ReturnError(c, http.StatusBadRequest, err, "Keys") 44 | return 45 | } 46 | ReturnSuccess(c, "Keys", "") 47 | } 48 | 49 | //DeleteKey delete network keys 50 | func DeleteKey(c *gin.Context) { 51 | net := c.PostForm("net") 52 | name := c.PostForm("key") 53 | fmt.Println("Delete Key params: ", net, name) 54 | if err := controller.DeleteKey(name, net); err != nil { 55 | fmt.Println("error deleting key", err) 56 | ReturnError(c, http.StatusBadRequest, err, "Keys") 57 | return 58 | } 59 | ReturnSuccess(c, "Keys", "") 60 | } 61 | -------------------------------------------------------------------------------- /compose/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.4" 2 | 3 | services: 4 | rqlite: 5 | container_name: rqlite 6 | image: rqlite/rqlite 7 | network_mode: host 8 | restart: always 9 | volumes: 10 | - sqldata:/rqlite/file/data 11 | netmaker: 12 | depends_on: 13 | - rqlite 14 | privileged: true 15 | container_name: netmaker 16 | image: gravitl/netmaker:v0.7.3 17 | volumes: 18 | - ./:/local 19 | - /etc/netclient:/etc/netclient 20 | - /usr/bin/wg:/usr/bin/wg 21 | - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket 22 | - /run/systemd/system:/run/systemd/system 23 | - /etc/systemd/system:/etc/systemd/system 24 | - /sys/fs/cgroup:/sys/fs/cgroup 25 | cap_add: 26 | - NET_ADMIN 27 | - SYS_MODULE 28 | restart: always 29 | network_mode: host 30 | environment: 31 | SERVER_HOST: "132.145.97.5" 32 | DNS_MODE: "off" 33 | SERVER_API_CONN_STRING: "api.netmaker.nusak.ca:443" 34 | SERVER_GRPC_CONN_STRING: "grpc.netmaker.nusak.ca:443" 35 | GRPC_SSL: "on" 36 | SERVER_HTTP_HOST: "api.netmaker.nusak.ca" 37 | SERVER_GRPC_HOST: "grpc.netmaker.nusak.ca" 38 | API_PORT: "8081" 39 | GRPC_PORT: "50051" 40 | CLIENT_MODE: "on" 41 | MASTER_KEY: "secretkey" 42 | SERVER_GRPC_WIREGUARD: "off" 43 | CORS_ALLOWED_ORIGIN: "*" 44 | netmaker-ui: 45 | container_name: netmaker-gui 46 | depends_on: 47 | - rqlite 48 | image: nusak/netmaker-gui:latest 49 | links: 50 | - "netmaker:api" 51 | ports: 52 | - "8888:80" 53 | environment: 54 | BACKEND_URL: "https://api.netmaker.nusak.ca" 55 | MASTER_KEY: "secretkey" 56 | volumes: 57 | sqldata: {} 58 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Project Archived 2 | 3 | # netmaker-gui 4 | A responsive alternative UI for netmaker (https://github.com/gravitl/netmaker) 5 | 6 | 7 | Built with go and html/templates. 8 | Missing following features compared to netmaker-ui (https://github.com/gravitl/netmaker-ui) 9 | - Oauth Suppport 10 | 11 | You can use netmaker-gui at the same time as netmaker-ui. For example, one one running as dashboard.netmaker.example.com and the other at control.netmaker.example.com 12 | 13 | ![both](https://github.com/mattkasun/netmaker-gui/raw/develop/screenshots/netmaker-gui-ui.png "GUI and UI") 14 | 15 | 16 | ## Installation: 17 | 18 | To use along side of your existing netmaker installation insert the following to your docker-compose.yml file 19 | 20 | CLIENT_MODE must be set to off for netmaker-gui to create networks properly; netmaker functionality is not dictated by this setting, it is controlled by the CLIENT_MODE setting for the netmaker container. 21 | 22 | ``` 23 | netmaker-gui 24 | container-name: netmaker-gui 25 | image: nusak/netmaker-gui:v0.6.3 26 | restart: unless-stopped 27 | ports: 28 | - "8080:8080" 29 | environment: 30 | DATABASE: sqlite 31 | CLIENT_MODE: "off" 32 | volumes: 33 | - dnsconfig:/config/dnsconfig 34 | - sqldata:/data 35 | ``` 36 | 37 | and add an appropriate entry to your proxy relay. 38 | 39 | ## Screenshots 40 | ### Browser 41 | ![netmaker-gui with browser](https://github.com/mattkasun/netmaker-gui/raw/develop/screenshots/netmaker-gui-browser.png "Netmaker-GUI with Browser") 42 | 43 | ### Mobile 44 | ![netmaker-gui with phone](https://github.com/mattkasun/netmaker-gui/raw/develop/screenshots/netmaker-gui-phone.png "Netmaker-GUI with Phone") 45 | 46 | ## Third Party Tools 47 | - CSS - W3Schools https://w3.schools.com/w3css 48 | - Icons - Material Icons https://fonts.google.com/icons 49 | - Netmaker https://github.com/gravitl/netmaker 50 | -------------------------------------------------------------------------------- /html/dns.html: -------------------------------------------------------------------------------- 1 | {{ define "DNS" }} 2 | 33 | 34 |
35 |
36 |
37 |

Create New DNS Entry

38 |
39 | 40 | 41 | 42 | 43 | 48 | 49 |
50 | 51 |
52 |
53 |
54 | {{end}} 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /html/buttonbar.html: -------------------------------------------------------------------------------- 1 | {{define "buttonbar"}} 2 |
3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 | {{/*NewNetwork*/}} 15 |
16 |
17 |

18 | × 19 | 20 |
21 |
22 | 23 | 24 | 25 | 26 |
27 | Use Dual Stack
28 | Is Local
29 | Use UDP Hole Punching

30 |
31 | 32 |
33 |
34 | 35 |
36 | 37 | 38 |
39 | 40 |
41 |
42 |
43 | 44 | {{end}} 45 | -------------------------------------------------------------------------------- /html/new.html: -------------------------------------------------------------------------------- 1 | {{define "new"}} 2 | 3 | 4 | 5 | New Admin User 6 | 7 | 84 | 85 | 86 |

Netmaker

87 |

Create a new admin user

88 |

89 |
90 | 91 | 92 | 93 | 94 | 95 | 96 |
97 | 98 | 99 | {{end}} 100 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ master ] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [ master ] 20 | schedule: 21 | - cron: '22 9 * * 3' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: ubuntu-latest 27 | permissions: 28 | actions: read 29 | contents: read 30 | security-events: write 31 | 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | language: [ 'go' ] 36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] 37 | # Learn more: 38 | # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed 39 | 40 | steps: 41 | - name: Checkout repository 42 | uses: actions/checkout@v2 43 | 44 | # Initializes the CodeQL tools for scanning. 45 | - name: Initialize CodeQL 46 | uses: github/codeql-action/init@v1 47 | with: 48 | languages: ${{ matrix.language }} 49 | # If you wish to specify custom queries, you can do so here or in a config file. 50 | # By default, queries listed here will override any specified in a config file. 51 | # Prefix the list here with "+" to use these queries and those in the config file. 52 | # queries: ./path/to/local/query, your-org/your-repo/queries@main 53 | 54 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 55 | # If this step fails, then you should remove it and run the build manually (see below) 56 | - name: Autobuild 57 | uses: github/codeql-action/autobuild@v1 58 | 59 | # ℹ️ Command-line programs to run using the OS shell. 60 | # 📚 https://git.io/JvXDl 61 | 62 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines 63 | # and modify them (or add more) to build your code if your project 64 | # uses a compiled language 65 | 66 | #- run: | 67 | # make bootstrap 68 | # make release 69 | 70 | - name: Perform CodeQL Analysis 71 | uses: github/codeql-action/analyze@v1 72 | -------------------------------------------------------------------------------- /html/keys.html: -------------------------------------------------------------------------------- 1 | {{ define "Keys" }} 2 |
3 |
4 |

Please select a specific network to view its access keys.

5 |
6 | {{ range .Networks }} 7 |
8 | 10 | {{.DisplayName}} 11 | {{ range .AccessKeys }} 12 |
13 | {{.Name}} 14 |
15 | 16 | 17 | 18 |
19 | 20 |
21 |
22 |
23 | 24 |
25 |
26 | {{end}} {{/*end range Keys */}} 27 |
28 | {{end}} {{/* end range Network */}} 29 |
30 | 31 | {{/*NewKey*/}} 32 |
33 |
34 |

35 | × 36 | 37 |
38 | 39 |
40 | 41 | 42 | 43 | 44 | 45 |
46 |
47 | 48 |
49 | 50 |
51 |
52 |
53 |
54 | 55 | 56 | {{end}} 57 | -------------------------------------------------------------------------------- /node_handlers.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | "time" 7 | 8 | "github.com/gin-gonic/gin" 9 | controller "github.com/gravitl/netmaker/controllers" 10 | "github.com/gravitl/netmaker/functions" 11 | "github.com/gravitl/netmaker/models" 12 | ) 13 | 14 | //EditNode display a form to update a node 15 | func EditNode(c *gin.Context) { 16 | network := c.PostForm("network") 17 | mac := c.PostForm("mac") 18 | var node models.Node 19 | node, err := controller.GetNode(mac, network) 20 | if err != nil { 21 | fmt.Println("error getting node details \n", err) 22 | ReturnError(c, http.StatusBadRequest, err, "Nodes") 23 | return 24 | } 25 | c.HTML(http.StatusOK, "EditNode", node) 26 | } 27 | 28 | //DeleteNode delele node 29 | func DeleteNode(c *gin.Context) { 30 | mac := c.PostForm("mac") 31 | net := c.PostForm("net") 32 | fmt.Println("deleting node ", mac, net) 33 | err := controller.DeleteNode(mac+"###"+net, false) 34 | if err != nil { 35 | ReturnError(c, http.StatusBadRequest, err, "Nodes") 36 | return 37 | } 38 | ReturnSuccess(c, "Nodes", "node deleted") 39 | } 40 | 41 | //UpdateNode updates a node 42 | func UpdateNode(c *gin.Context) { 43 | var node *models.Node 44 | if err := c.ShouldBind(&node); err != nil { 45 | fmt.Println("should bind") 46 | ReturnError(c, http.StatusBadRequest, err, "Nodes") 47 | return 48 | } 49 | net := c.Param("net") 50 | mac := c.Param("mac") 51 | fmt.Printf("=============%T %T %T %v %v %v", net, mac, node, net, mac, node) 52 | oldnode, err := functions.GetNodeByMacAddress(net, mac) 53 | if err != nil { 54 | fmt.Println("Get node with mac ", mac, " and Network ", net) 55 | ReturnError(c, http.StatusBadRequest, err, "Nodes") 56 | return 57 | } 58 | if err = oldnode.Update(node); err != nil { 59 | fmt.Println("update network") 60 | ReturnError(c, http.StatusBadRequest, err, "Nodes") 61 | return 62 | } 63 | ReturnSuccess(c, "Nodes", "node updated") 64 | } 65 | 66 | //NodeHealth return the last checkin time including health status 67 | //and color code for all nodes 68 | func NodeHealth(c *gin.Context) { 69 | nodes, err := models.GetAllNodes() 70 | if err != nil { 71 | c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()}) 72 | return 73 | } 74 | var response []NodeStatus 75 | var nodeHealth NodeStatus 76 | for _, node := range nodes { 77 | nodeHealth.Mac = node.MacAddress 78 | nodeHealth.Network = node.Network 79 | lastupdate := time.Now().Sub(time.Unix(node.LastCheckIn, 0)) 80 | if lastupdate.Minutes() > 15.0 { 81 | nodeHealth.Status = "Error: Node last checked in more than 15 minutes ago: " 82 | nodeHealth.Color = "w3-deep-orange" 83 | } else if lastupdate.Minutes() > 5.0 { 84 | nodeHealth.Status = "Warning: Node last checked in more than 5 minutes ago: " 85 | nodeHealth.Color = "w3-khaki" 86 | } else { 87 | nodeHealth.Status = "Healthy: Node checked in within the last 5 minutes: " 88 | nodeHealth.Color = "w3-teal" 89 | } 90 | response = append(response, nodeHealth) 91 | } 92 | c.JSON(http.StatusOK, response) 93 | return 94 | } 95 | -------------------------------------------------------------------------------- /user_handlers.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | "net/http" 7 | "net/url" 8 | 9 | "github.com/gin-contrib/sessions" 10 | "github.com/gin-gonic/gin" 11 | controller "github.com/gravitl/netmaker/controllers" 12 | "github.com/gravitl/netmaker/models" 13 | ) 14 | 15 | //CreateUser creates a new user from 16 | func CreateUser(c *gin.Context) { 17 | var user models.User 18 | fmt.Println("creating new user") 19 | user.UserName = c.PostForm("user") 20 | user.Password = c.PostForm("pass") 21 | if c.PostForm("admin") == "true" { 22 | user.IsAdmin = true 23 | } else { 24 | user.IsAdmin = false 25 | } 26 | user.Networks, _ = c.GetPostFormArray("network[]") 27 | fmt.Println("networks: ", user.Networks) 28 | _, err := controller.CreateUser(user) 29 | if err != nil { 30 | ReturnError(c, http.StatusBadRequest, err, "Networks") 31 | return 32 | } 33 | ReturnSuccess(c, "Networks", "New user "+user.UserName+" created") 34 | } 35 | 36 | //DeleteUser delete a user 37 | func DeleteUser(c *gin.Context) { 38 | user := c.PostForm("user") 39 | success, err := controller.DeleteUser(user) 40 | if !success { 41 | ReturnError(c, http.StatusBadRequest, err, "Networks") 42 | return 43 | } 44 | ReturnSuccess(c, "Networks", "user "+user+" deleted") 45 | } 46 | 47 | //EditUser displays form to update current user 48 | func EditUser(c *gin.Context) { 49 | session := sessions.Default(c) 50 | username := session.Get("username").(string) 51 | user, err := controller.GetUser(username) 52 | if err != nil { 53 | ReturnError(c, http.StatusBadRequest, err, "Networks") 54 | return 55 | } 56 | c.HTML(http.StatusOK, "EditUser", user) 57 | } 58 | 59 | //UpdateUser updates user from EditUser form 60 | func UpdateUser(c *gin.Context) { 61 | var new models.User 62 | username := c.Param("user") 63 | user, err := controller.GetUserInternal(username) 64 | if err != nil { 65 | ReturnError(c, http.StatusBadRequest, err, "Networks") 66 | return 67 | } 68 | new.UserName = c.PostForm("username") 69 | new.Password = c.PostForm("password") 70 | _, err = controller.UpdateUser(new, user) 71 | if err != nil { 72 | ReturnError(c, http.StatusBadRequest, err, "Networks") 73 | return 74 | } 75 | ReturnSuccess(c, "Networks", "user has been updated") 76 | } 77 | 78 | //NewUser creates a new user; will fail if user with admin 79 | //permissions already exists 80 | func NewUser(c *gin.Context) { 81 | var user models.User 82 | user.UserName = c.PostForm("user") 83 | user.Password = c.PostForm("pass") 84 | user.IsAdmin = true 85 | hasAdmin, err := controller.HasAdmin() 86 | if err != nil { 87 | ReturnError(c, http.StatusInternalServerError, err, "") 88 | return 89 | } 90 | if hasAdmin { 91 | ReturnError(c, http.StatusUnauthorized, errors.New("Admin Exists"), "") 92 | return 93 | } 94 | _, err = controller.CreateUser(user) 95 | if err != nil { 96 | ReturnError(c, http.StatusUnauthorized, err, "") 97 | return 98 | } 99 | location := url.URL{Path: "/"} 100 | c.Redirect(http.StatusFound, location.RequestURI()) 101 | } 102 | -------------------------------------------------------------------------------- /handlers.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | "net/url" 7 | 8 | "github.com/gin-contrib/sessions" 9 | "github.com/gin-gonic/gin" 10 | controller "github.com/gravitl/netmaker/controllers" 11 | "github.com/gravitl/netmaker/models" 12 | ) 13 | 14 | func ProcessLogin(c *gin.Context) { 15 | fmt.Println("Processing Login") 16 | var AuthRequest models.UserAuthParams 17 | AuthRequest.UserName = c.PostForm("user") 18 | AuthRequest.Password = c.PostForm("pass") 19 | session := sessions.Default(c) 20 | //don't need the jwt 21 | _, err := controller.VerifyAuthRequest(AuthRequest) 22 | if err != nil { 23 | fmt.Println("error verifying AuthRequest: ", err) 24 | session.Set("message", err.Error()) 25 | session.Set("loggedIn", false) 26 | c.HTML(http.StatusUnauthorized, "Login", gin.H{"message": err}) 27 | } else { 28 | session.Set("loggedIn", true) 29 | //init message 30 | session.Set("message", "") 31 | session.Options(sessions.Options{MaxAge: 28800}) 32 | user, err := controller.GetUser(AuthRequest.UserName) 33 | if err != nil { 34 | fmt.Println("err retrieving user: ", err) 35 | } 36 | session.Set("username", user.UserName) 37 | session.Set("isAdmin", user.IsAdmin) 38 | session.Set("networks", user.Networks) 39 | session.Save() 40 | location := url.URL{Path: "/"} 41 | c.Redirect(http.StatusFound, location.RequestURI()) 42 | } 43 | } 44 | 45 | func DisplayLanding(c *gin.Context) { 46 | var data PageData 47 | var message string 48 | page := "" 49 | session := sessions.Default(c) 50 | if session.Get("page") != nil { 51 | page = session.Get("page").(string) 52 | } 53 | if session.Get("message") != nil { 54 | message = session.Get("message").(string) 55 | } 56 | fmt.Println("Initialializing PageData for page ", page, "with message ", message) 57 | if page != "" { 58 | data.Init(c, page, message) 59 | } else { 60 | data.Init(c, "Networks", message) 61 | } 62 | //clear message 63 | session.Set("message", "") 64 | session.Save() 65 | c.HTML(http.StatusOK, "layout", data) 66 | } 67 | 68 | func LogOut(c *gin.Context) { 69 | session := sessions.Default(c) 70 | session.Set("loggedIn", false) 71 | session.Set("message", "") 72 | session.Save() 73 | fmt.Println("User Logged Out", session.Get("loggedIn")) 74 | location := url.URL{Path: "/"} 75 | c.Redirect(http.StatusFound, location.RequestURI()) 76 | } 77 | 78 | 79 | func ReturnSuccess(c *gin.Context, page, message string) { 80 | session := sessions.Default(c) 81 | session.Set("messsge", message) 82 | session.Set("page", page) 83 | session.Save() 84 | location := url.URL{Path: "/"} 85 | c.Redirect(http.StatusFound, location.RequestURI()) 86 | } 87 | 88 | func ReturnError(c *gin.Context, status int, err error, page string) { 89 | var data PageData 90 | session := sessions.Default(c) 91 | session.Set("message", err.Error()) 92 | session.Set("page", page) 93 | session.Save() 94 | if page != "" { 95 | data.Init(c, page, err.Error()) 96 | } else { 97 | data.Init(c, "Networks", err.Error()) 98 | } 99 | c.HTML(status, "layout", data) 100 | } 101 | -------------------------------------------------------------------------------- /html/edit.html: -------------------------------------------------------------------------------- 1 | {{define "EditNet"}} 2 | 3 | 4 | 5 | 6 | 11 | 12 | 13 | 14 | 15 | {{template "Header"}} 16 |
17 |
18 |

Edit Network {{.NetID}}

19 |
20 | 21 | Address Range:

22 | {{if eq .IsDualStack "yes"}} 23 | Address Range(IPv6):

24 | {{end}} 25 | Local Range:

26 | Display Name:

27 | Default Interface:

28 | Default Port:

29 | Default PostUp:

30 | Default PostDown:

31 | Default Keepalive:

32 | Default CheckinInterval:

33 | {{ if eq .IsDualStack "yes"}} 34 | Dual Stack 39 | {{ if eq .DefaultSaveConfig "yes" }} 40 | Default SaveConfig
45 | 46 | {{ if eq .DefaultUDPHolePunch "yes" }} 47 | UDP Hole Punch 52 | 53 | {{ if eq .AllowManualSignUp "yes" }} 54 | Allow Node Signup Without Keys
59 | 60 |
61 | 62 |
63 | 64 |
65 |
66 | 67 | 68 | {{end}} 69 | 70 | 71 | -------------------------------------------------------------------------------- /html/extclient.html: -------------------------------------------------------------------------------- 1 | {{ define "ExtClient" }} 2 |
3 |
4 |

Available Ingress Gateways 5 | {{range .Nodes}} 6 |

7 | {{if eq .IsIngressGateway "yes"}} 8 |
9 |

@ 10 |

11 |
12 | {{end}} 13 |
14 | {{end}} 15 |
16 | 17 | 18 |
19 |

External Clients

20 | {{range .ExtClients}} 21 |
22 | {{template "ExtClientDetails" .}} 23 |
24 | {{end}} 25 |
26 |
27 | {{end}} 28 | 29 | {{define "ExtClientDetails"}} 30 | 31 | 32 |
33 |

34 |

35 |
36 |
37 | 38 | 39 |
40 |
41 | 42 |
43 |
44 | 45 |
46 |
47 | 48 |
49 |
50 |
51 | {{end}} 52 | 53 | {{ define "EditExtClient" }} 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | {{template "Header"}} 63 | 64 |
65 |
66 |
67 |
68 |
69 |

Editing client:{{.ClientID}}

70 |

71 |
72 | 73 |
74 | 75 |
76 |
77 |
78 | 79 | 80 | {{end}} 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /network_handlers.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | "strconv" 7 | 8 | "github.com/gin-gonic/gin" 9 | controller "github.com/gravitl/netmaker/controllers" 10 | "github.com/gravitl/netmaker/functions" 11 | "github.com/gravitl/netmaker/models" 12 | ) 13 | 14 | func CreateNetwork(c *gin.Context) { 15 | var net models.Network 16 | 17 | net.NetID = c.PostForm("name") 18 | net.AddressRange = c.PostForm("address") 19 | net.IsDualStack = c.PostForm("dual") 20 | net.IsLocal = c.PostForm("local") 21 | net.DefaultUDPHolePunch = c.PostForm("udp") 22 | err := controller.CreateNetwork(net) 23 | if err != nil { 24 | ReturnError(c, http.StatusBadRequest, err, "Networks") 25 | return 26 | } 27 | ReturnSuccess(c, "Networks", "Network "+net.NetID+" created") 28 | } 29 | 30 | func EditNetwork(c *gin.Context) { 31 | network := c.PostForm("network") 32 | fmt.Println("editing network ", network) 33 | var Data models.Network 34 | Data, err := controller.GetNetwork(network) 35 | if err != nil { 36 | fmt.Println("error getting net details \n", err) 37 | ReturnError(c, http.StatusBadRequest, err, "Networks") 38 | return 39 | } 40 | c.HTML(http.StatusOK, "EditNet", Data) 41 | } 42 | 43 | func DeleteNetwork(c *gin.Context) { 44 | network := c.PostForm("network") 45 | err := controller.DeleteNetwork(network) 46 | if err != nil { 47 | ReturnError(c, http.StatusBadRequest, err, "Networks") 48 | return 49 | } 50 | ReturnSuccess(c, "Networks", "Network "+network+" deleted") 51 | } 52 | 53 | func UpdateNetwork(c *gin.Context) { 54 | var network models.Network 55 | net := c.PostForm("NetID") 56 | network.NetID = c.PostForm("NetID") 57 | network.AddressRange = c.PostForm("Address") 58 | network.LocalRange = c.PostForm("Local") 59 | network.DisplayName = c.PostForm("Name") 60 | network.DefaultInterface = c.PostForm("Interface") 61 | port, err := strconv.Atoi(c.PostForm("Port")) 62 | if err != nil { 63 | fmt.Println("error converting port", err) 64 | } 65 | network.DefaultListenPort = int32(port) 66 | network.DefaultPostUp = c.PostForm("PostUp") 67 | network.DefaultPostDown = c.PostForm("PostDown") 68 | keep, err := strconv.Atoi(c.PostForm("Keepalive")) 69 | if err != nil { 70 | fmt.Println("error converting keepalive", err) 71 | } 72 | network.DefaultKeepalive = int32(keep) 73 | check, err := strconv.Atoi(c.PostForm("CheckinInterval")) 74 | if err != nil { 75 | fmt.Println("error converting check interval", err) 76 | } 77 | network.DefaultCheckInInterval = int32(check) 78 | network.IsDualStack = c.PostForm("DualStack") 79 | if network.IsDualStack == "" { 80 | network.IsDualStack = "no" 81 | } 82 | network.DefaultSaveConfig = c.PostForm("DefaultSaveConfig") 83 | if network.DefaultSaveConfig == "" { 84 | network.DefaultSaveConfig = "no" 85 | } 86 | network.DefaultUDPHolePunch = c.PostForm("UDPHolePunching") 87 | if network.DefaultUDPHolePunch == "" { 88 | network.DefaultUDPHolePunch = "no" 89 | } 90 | network.AllowManualSignUp = c.PostForm("AllowManualSignup") 91 | if network.AllowManualSignUp == "" { 92 | network.AllowManualSignUp = "no" 93 | } 94 | if network.LocalRange == "" { 95 | network.IsLocal = "no" 96 | } else { 97 | network.IsLocal = "yes" 98 | } 99 | if network.AddressRange6 == "" { 100 | network.IsIPv6 = "no" 101 | } else { 102 | network.IsIPv6 = "yes" 103 | } 104 | if network.AddressRange == "" { 105 | network.IsIPv4 = "no" 106 | } else { 107 | network.IsIPv4 = "yes" 108 | } 109 | network.IsGRPCHub = "no" 110 | oldnetwork, err := controller.GetNetwork(net) 111 | if err != nil { 112 | fmt.Println("error getting network ", err) 113 | } 114 | updaterange, updatelocal, err := oldnetwork.Update(&network) 115 | if err != nil { 116 | fmt.Println("error updating network ", err) 117 | ReturnError(c, http.StatusBadRequest, err, "Networks") 118 | return 119 | } 120 | if updaterange { 121 | err = functions.UpdateNetworkNodeAddresses(network.NetID) 122 | if err != nil { 123 | fmt.Println("error updating network Node Addresses", err) 124 | ReturnError(c, http.StatusBadRequest, err, "Networks") 125 | return 126 | } 127 | } 128 | if updatelocal { 129 | err = functions.UpdateNetworkLocalAddresses(network.NetID) 130 | if err != nil { 131 | fmt.Println("error updating network Local Addresses", err) 132 | ReturnError(c, http.StatusBadRequest, err, "Networks") 133 | return 134 | } 135 | } 136 | ReturnSuccess(c, "Networks", "Network "+network.NetID+" updated") 137 | } 138 | -------------------------------------------------------------------------------- /gateway_handlers.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | "net/url" 7 | "strings" 8 | 9 | "github.com/gin-contrib/sessions" 10 | "github.com/gin-gonic/gin" 11 | controller "github.com/gravitl/netmaker/controllers" 12 | "github.com/gravitl/netmaker/logic" 13 | "github.com/gravitl/netmaker/models" 14 | ) 15 | 16 | // ProcessEgress adds the node as an Egress Gateway 17 | func ProcessEgress(c *gin.Context) { 18 | var egress models.EgressGatewayRequest 19 | egress.NodeID = c.Param("mac") 20 | egress.NetID = c.Param("net") 21 | egress.Ranges = strings.Split(c.PostForm("ranges"), ",") 22 | egress.Interface = c.PostForm("interface") 23 | node, err := controller.CreateEgressGateway(egress) 24 | if err != nil { 25 | ReturnError(c, http.StatusBadRequest, err, "Nodes") 26 | return 27 | } 28 | session := sessions.Default(c) 29 | session.Set("message", node.Name+" is now an egress gateway") 30 | session.Set("page", "Nodes") 31 | session.Save() 32 | location := url.URL{Path: "/"} 33 | c.Redirect(http.StatusFound, location.RequestURI()) 34 | } 35 | 36 | // CreateEggress displays modal for Egress Gateway Creation 37 | func CreateEgress(c *gin.Context) { 38 | net := c.Param("net") 39 | mac := c.Param("mac") 40 | node, err := controller.GetNode(mac, net) 41 | if err != nil { 42 | ReturnError(c, http.StatusBadRequest, err, "Nodes") 43 | return 44 | } 45 | c.HTML(http.StatusOK, "Egress", node) 46 | } 47 | 48 | // DeleteEgress removes the node as an Egress Gateway 49 | func DeleteEgress(c *gin.Context) { 50 | net := c.Param("net") 51 | mac := c.Param("mac") 52 | _, err := controller.DeleteEgressGateway(net, mac) 53 | if err != nil { 54 | fmt.Println(err) 55 | ReturnError(c, http.StatusBadRequest, err, "Nodes") 56 | return 57 | } 58 | session := sessions.Default(c) 59 | session.Set("message", "Egress Gateway has been deleted") 60 | session.Set("page", "Nodes") 61 | session.Save() 62 | location := url.URL{Path: "/"} 63 | c.Redirect(http.StatusFound, location.RequestURI()) 64 | } 65 | 66 | // CreateIngress add the node as an Ingress Gateway 67 | func CreateIngress(c *gin.Context) { 68 | net := c.Param("net") 69 | mac := c.Param("mac") 70 | node, err := controller.CreateIngressGateway(net, mac) 71 | if err != nil { 72 | ReturnError(c, http.StatusBadRequest, err, "Nodes") 73 | return 74 | } 75 | session := sessions.Default(c) 76 | session.Set("message", node.Name+" is now an ingress gateway") 77 | session.Set("page", "Nodes") 78 | session.Save() 79 | location := url.URL{Path: "/"} 80 | c.Redirect(http.StatusFound, location.RequestURI()) 81 | } 82 | 83 | func DeleteIngress(c *gin.Context) { 84 | net := c.Param("net") 85 | mac := c.Param("mac") 86 | _, err := controller.DeleteIngressGateway(net, mac) 87 | if err != nil { 88 | fmt.Println(err) 89 | ReturnError(c, http.StatusBadRequest, err, "Nodes") 90 | return 91 | } 92 | c.JSON(http.StatusOK, gin.H{"message": "Ingress Gateway Deleted"}) 93 | } 94 | 95 | func CreateRelay(c *gin.Context) { 96 | var relayData Relay 97 | mac := c.Param("mac") 98 | net := c.Param("net") 99 | node, err := controller.GetNode(mac, net) 100 | if err != nil { 101 | ReturnError(c, http.StatusBadRequest, err, "Nodes") 102 | return 103 | } 104 | nodes, err := logic.GetNetworkNodes(node.Network) 105 | if err != nil { 106 | ReturnError(c, http.StatusBadRequest, err, "Nodes") 107 | return 108 | } 109 | relayData.Node = node 110 | relayData.Nodes = nodes 111 | c.HTML(http.StatusOK, "CreateRelay", relayData) 112 | } 113 | 114 | func ProcessRelayCreation(c *gin.Context) { 115 | var request models.RelayRequest 116 | request.NodeID = c.Param("mac") 117 | request.NetID = c.Param("net") 118 | request.RelayAddrs = c.PostFormArray("address") 119 | _, err := controller.CreateRelay(request) 120 | if err != nil { 121 | ReturnError(c, http.StatusBadRequest, err, "Nodes") 122 | return 123 | } 124 | session := sessions.Default(c) 125 | session.Set("message", "Relay Gateway Created") 126 | session.Set("page", "Nodes") 127 | session.Save() 128 | location := url.URL{Path: "/"} 129 | c.Redirect(http.StatusFound, location.RequestURI()) 130 | } 131 | 132 | func DeleteRelay(c *gin.Context) { 133 | net := c.Param("net") 134 | mac := c.Param("mac") 135 | _, err := controller.DeleteRelay(net, mac) 136 | if err != nil { 137 | fmt.Println(err) 138 | ReturnError(c, http.StatusBadRequest, err, "Nodes") 139 | return 140 | } 141 | session := sessions.Default(c) 142 | session.Set("message", "Relay Gateway Deleted") 143 | session.Set("page", "Nodes") 144 | session.Save() 145 | location := url.URL{Path: "/"} 146 | c.Redirect(http.StatusFound, location.RequestURI()) 147 | } 148 | -------------------------------------------------------------------------------- /extclient_handlers.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | "strconv" 7 | 8 | "github.com/gin-gonic/gin" 9 | controller "github.com/gravitl/netmaker/controllers" 10 | "github.com/gravitl/netmaker/functions" 11 | "github.com/gravitl/netmaker/models" 12 | "github.com/skip2/go-qrcode" 13 | ) 14 | 15 | func CreateIngressClient(c *gin.Context) { 16 | var client models.ExtClient 17 | client.Network = c.Param("net") 18 | client.IngressGatewayID = c.Param("mac") 19 | node, err := functions.GetNodeByMacAddress(client.Network, client.IngressGatewayID) 20 | if err != nil { 21 | fmt.Println(err) 22 | ReturnError(c, http.StatusBadRequest, err, "Nodes") 23 | return 24 | } 25 | client.IngressGatewayEndpoint = node.Endpoint + ":" + strconv.FormatInt(int64(node.ListenPort), 10) 26 | 27 | err = controller.CreateExtClient(client) 28 | if err != nil { 29 | fmt.Println(err) 30 | ReturnError(c, http.StatusBadRequest, err, "Nodes") 31 | return 32 | } 33 | ReturnSuccess(c, "ExtClients", "external client has been created") 34 | } 35 | 36 | func DeleteIngressClient(c *gin.Context) { 37 | net := c.Param("net") 38 | id := c.Param("id") 39 | err := controller.DeleteExtClient(net, id) 40 | if err != nil { 41 | fmt.Println(err) 42 | ReturnError(c, http.StatusBadRequest, err, "Nodes") 43 | return 44 | } 45 | ReturnSuccess(c, "ExtClients", "external client "+id+" @ "+net+" has been deleted") 46 | } 47 | 48 | //EditIngressClient displays a form to update name of external client 49 | func EditIngressClient(c *gin.Context) { 50 | net := c.Param("net") 51 | id := c.Param("id") 52 | client, err := controller.GetExtClient(id, net) 53 | if err != nil { 54 | fmt.Println(err) 55 | ReturnError(c, http.StatusBadRequest, err, "Nodes") 56 | return 57 | } 58 | c.HTML(http.StatusOK, "EditExtClient", client) 59 | } 60 | 61 | func GetQR(c *gin.Context) { 62 | net := c.Param("net") 63 | id := c.Param("id") 64 | config, err := GetConf(net, id) 65 | if err != nil { 66 | fmt.Println(err) 67 | ReturnError(c, http.StatusBadRequest, err, "ExtClient") 68 | return 69 | } 70 | b, err := qrcode.Encode(config, qrcode.Medium, 220) 71 | if err != nil { 72 | fmt.Println(err) 73 | ReturnError(c, http.StatusBadRequest, err, "ExtClient") 74 | return 75 | } 76 | c.Header("Content-Type", "image/png") 77 | c.Data(http.StatusOK, "application/octet-strean", b) 78 | } 79 | 80 | func GetConf(net, id string) (string, error) { 81 | client, err := controller.GetExtClient(id, net) 82 | if err != nil { 83 | return "", err 84 | } 85 | gwnode, err := functions.GetNodeByMacAddress(client.Network, client.IngressGatewayID) 86 | if err != nil { 87 | return "", err 88 | } 89 | network, err := functions.GetParentNetwork(client.Network) 90 | if err != nil { 91 | return "", err 92 | } 93 | keepalive := "" 94 | if network.DefaultKeepalive != 0 { 95 | keepalive = "PersistentKeepalive = " + strconv.Itoa(int(network.DefaultKeepalive)) 96 | } 97 | gwendpoint := gwnode.Endpoint + ":" + strconv.Itoa(int(gwnode.ListenPort)) 98 | newAllowedIPs := network.AddressRange 99 | if egressGatewayRanges, err := client.GetEgressRangesOnNetwork(); err == nil { 100 | for _, egressGatewayRange := range egressGatewayRanges { 101 | newAllowedIPs += "," + egressGatewayRange 102 | } 103 | } 104 | defaultDNS := "" 105 | if network.DefaultExtClientDNS != "" { 106 | defaultDNS = "DNS = " + network.DefaultExtClientDNS 107 | } 108 | 109 | config := fmt.Sprintf(`[Interface] 110 | Address = %s 111 | PrivateKey = %s 112 | %s 113 | 114 | [Peer] 115 | PublicKey = %s 116 | AllowedIPs = %s 117 | Endpoint = %s 118 | %s 119 | 120 | `, client.Address+"/32", 121 | client.PrivateKey, 122 | defaultDNS, 123 | gwnode.PublicKey, 124 | newAllowedIPs, 125 | gwendpoint, 126 | keepalive) 127 | 128 | return config, nil 129 | } 130 | 131 | func GetClientConfig(c *gin.Context) { 132 | net := c.Param("net") 133 | id := c.Param("id") 134 | config, err := GetConf(net, id) 135 | b := []byte(config) 136 | if err != nil { 137 | fmt.Println(err) 138 | ReturnError(c, http.StatusBadRequest, err, "ExtClient") 139 | return 140 | } 141 | filename := id + ".conf" 142 | //c.FileAttachment(filepath, filename) 143 | c.Header("Content-Description", "File Transfer") 144 | c.Header("Content-Disposition", "attachment: filename="+filename) 145 | c.Data(http.StatusOK, "application/octet-stream", b) 146 | } 147 | 148 | //UpdateClient updates name of external Client 149 | func UpdateClient(c *gin.Context) { 150 | net := c.Param("net") 151 | id := c.Param("id") 152 | newid := c.PostForm("newid") 153 | client, err := controller.GetExtClient(id, net) 154 | if err != nil { 155 | fmt.Println(err) 156 | ReturnError(c, http.StatusBadRequest, err, "ExtClient") 157 | return 158 | } 159 | _, err = controller.UpdateExtClient(newid, net, client) 160 | if err != nil { 161 | fmt.Println(err) 162 | ReturnError(c, http.StatusBadRequest, err, "ExtClient") 163 | return 164 | } 165 | ReturnSuccess(c, "ExtClients", "external client has been updated") 166 | } 167 | -------------------------------------------------------------------------------- /html/header.html: -------------------------------------------------------------------------------- 1 | {{define "HeaderIcons"}} 2 |
3 | 4 | 5 |
6 |
Netmaker Makes Networks
7 |
8 |
9 |
Netmaker Makes Networks
10 |
11 |
12 | 13 | {{end}} 14 | 15 | 16 | {{define "Header"}} 17 | {{template "Sidebar" .}} 18 | {{template "Rightsidebar" .}} 19 | {{template "HeaderIcons"}} 20 | 21 | 22 | 23 | 24 |
25 |
26 |
27 |

An Alternate UI for Netmaker

28 | github.com/gravitl/netmaker 29 |

©2021 Matthew R Kasun

30 | mkasun@nusak.ca
31 | github.com/mattkasun/netmaker-gui 32 |

33 |

Version

34 |
Netmaker Backend: {{ .Version.Backend }} Netmaker-Gui: {{ .Version.Mine }} 35 | 36 |
37 |
38 |
39 | 40 |
41 |
42 |

Create New User

43 |
44 |
45 | 46 | 47 | 48 |
49 | Grant Admin Access 50 |
51 |

Select Accessible Networks

52 | {{range .Networks}} 53 | {{/*{{.NetID}}*/}} 54 | {{.NetID}}
55 | 56 | {{end}} 57 |
58 | 59 |
60 | 61 | 62 |
63 |
64 | 65 |
66 |
67 |
68 |

Delete User

69 |
70 | 75 | 76 |
77 | 78 |
79 |
80 |
81 | 82 | 83 | {{end}} 84 | 85 | {{define "EditUser"}} 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | {{template "Header"}} 95 |
96 |
97 |

Updating User {{.UserName}}

98 |
99 |

100 |

101 |

102 | 103 |

104 | 105 |
106 |
107 | {{ template "script" }} 108 | 109 | 110 | 111 | {{end}} 112 | -------------------------------------------------------------------------------- /types.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | "net/http" 7 | 8 | "github.com/gin-contrib/sessions" 9 | "github.com/gin-gonic/gin" 10 | "github.com/gravitl/netmaker/config" 11 | controller "github.com/gravitl/netmaker/controllers" 12 | "github.com/gravitl/netmaker/dnslogic" 13 | "github.com/gravitl/netmaker/functions" 14 | "github.com/gravitl/netmaker/models" 15 | ) 16 | 17 | var version = "v0.3" 18 | var backend = "https://api.nusak.ca/" 19 | var authorization = "secretkey" 20 | 21 | type NodeStatus struct { 22 | Mac string 23 | Network string 24 | Status string 25 | Color string 26 | } 27 | 28 | type Relay struct { 29 | Node models.Node 30 | Nodes []models.Node 31 | } 32 | 33 | type Version struct { 34 | Backend string 35 | Mine string 36 | } 37 | 38 | //PageData -contains data for html template 39 | type PageData struct { 40 | Page string 41 | Message string 42 | Admin bool 43 | Networks []models.Network 44 | Nodes []models.Node 45 | Users []models.ReturnUser 46 | ExtClients []models.ExtClient 47 | DNS []models.DNSEntry 48 | CustomDNS []models.DNSEntry 49 | Version Version 50 | } 51 | 52 | // Init fetches page data from backend 53 | func (data *PageData) Init(c *gin.Context, page, message string) { 54 | data.Page = page 55 | data.Message = message 56 | session := sessions.Default(c) 57 | user := session.Get("username").(string) 58 | isAdmin := session.Get("isAdmin").(bool) 59 | data.Admin = isAdmin 60 | allowedNets := session.Get("networks").([]string) 61 | networks, err := models.GetNetworks() 62 | if err != nil { 63 | //panic(err) 64 | fmt.Println("error geting network data", err) 65 | } 66 | extclients, err := functions.GetAllExtClients() 67 | if err != nil { 68 | fmt.Println("error getting external client data", err) 69 | } 70 | nodes, err := models.GetAllNodes() 71 | if err != nil { 72 | fmt.Println("error getting node data", err) 73 | } 74 | users, err := controller.GetUsers() 75 | if err != nil { 76 | fmt.Println("error getting user data", err) 77 | } 78 | var dnsEntries []models.DNSEntry 79 | var customDnsEntries []models.DNSEntry 80 | for _, net := range networks { 81 | entries, err := controller.GetNodeDNS(net.NetID) 82 | if err != nil { 83 | fmt.Println("error getting dns data", err) 84 | } 85 | dnsEntries = append(dnsEntries, entries...) 86 | entries, err = dnslogic.GetCustomDNS(net.NetID) 87 | if err != nil { 88 | fmt.Println("error getting custom dns data", err) 89 | } 90 | customDnsEntries = append(customDnsEntries, entries...) 91 | } 92 | if isAdmin { 93 | data.Networks = networks 94 | data.Nodes = nodes 95 | data.Users = users 96 | data.ExtClients = extclients 97 | data.DNS = dnsEntries 98 | data.CustomDNS = customDnsEntries 99 | } else { 100 | var nets []models.Network 101 | for _, network := range networks { 102 | if SliceContains(allowedNets, network.NetID) { 103 | nets = append(nets, network) 104 | } 105 | data.Networks = nets 106 | } 107 | var hosts []models.Node 108 | for _, node := range nodes { 109 | if SliceContains(allowedNets, node.Network) { 110 | hosts = append(hosts, node) 111 | } 112 | data.Nodes = hosts 113 | } 114 | user := models.ReturnUser{user, allowedNets, isAdmin} 115 | data.Users = append([]models.ReturnUser{}, user) 116 | 117 | var clients []models.ExtClient 118 | for _, client := range extclients { 119 | if SliceContains(allowedNets, client.Network) { 120 | clients = append(clients, client) 121 | } 122 | data.ExtClients = clients 123 | } 124 | var userdns []models.DNSEntry 125 | for _, dns := range dnsEntries { 126 | if SliceContains(allowedNets, dns.Network) { 127 | userdns = append(userdns, dns) 128 | } 129 | data.DNS = userdns 130 | } 131 | var customdns []models.DNSEntry 132 | for _, dns := range customDnsEntries { 133 | if SliceContains(allowedNets, dns.Network) { 134 | customdns = append(customdns, dns) 135 | } 136 | data.CustomDNS = customdns 137 | } 138 | 139 | } 140 | data.Version.Backend = GetBackendVersion() 141 | data.Version.Mine = version 142 | } 143 | 144 | func GetBackendVersion() string { 145 | request, err := http.NewRequest(http.MethodGet, backend+"api/server/getconfig", nil) 146 | if err != nil { 147 | fmt.Println("error creating http request ", err) 148 | return "" 149 | } 150 | request.Header.Set("Authorization", "Bearer "+authorization) 151 | client := http.Client{} 152 | response, err := client.Do(request) 153 | if err != nil { 154 | fmt.Println("error from backend ", err) 155 | return "" 156 | } 157 | var config config.ServerConfig 158 | json.NewDecoder(response.Body).Decode(&config) 159 | return config.Version 160 | } 161 | 162 | func GetAllExtClients() []models.ExtClient { 163 | var clients []models.ExtClient 164 | var client models.ExtClient 165 | client.ClientID = "clientid" 166 | client.Description = "description" 167 | client.PrivateKey = "private key" 168 | client.PublicKey = "my public key" 169 | client.Network = "net" 170 | client.Address = "10.2.2.23" 171 | client.IngressGatewayID = "tbd" 172 | 173 | clients = append(clients, client) 174 | return clients 175 | } 176 | 177 | func SliceContains(s []string, x string) bool { 178 | if len(s) == 0 { 179 | return false 180 | } 181 | for i := range s { 182 | if s[i] == x { 183 | return true 184 | } 185 | } 186 | return false 187 | } 188 | -------------------------------------------------------------------------------- /html/script.html: -------------------------------------------------------------------------------- 1 | {{define "script"}} 2 | 177 | {{end}} 178 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | //Copyright ©2021 Matthew R Kasun mkasun@nusak.ca 2 | 3 | //Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 4 | 5 | // http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | //Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 8 | 9 | package main 10 | 11 | import ( 12 | "fmt" 13 | "html/template" 14 | "log" 15 | "net/http" 16 | _ "net/http/pprof" 17 | "os" 18 | "time" 19 | 20 | "github.com/gin-contrib/sessions" 21 | "github.com/gin-contrib/sessions/memstore" 22 | "github.com/gin-gonic/gin" 23 | controller "github.com/gravitl/netmaker/controllers" 24 | "github.com/gravitl/netmaker/database" 25 | "github.com/gravitl/netmaker/models" 26 | "github.com/gravitl/netmaker/servercfg" 27 | ) 28 | 29 | func init() { 30 | backend = os.Getenv("BACKEND") 31 | if len(backend) == 0 { 32 | backend = "https://api.nusak.ca/" 33 | } 34 | authorization = os.Getenv("MASTERKEY") 35 | if len(authorization) == 0 { 36 | authorization = "secretkey" 37 | } 38 | fmt.Println("Env Updated Set") 39 | } 40 | 41 | func main() { 42 | go func() { 43 | log.Println(http.ListenAndServe("localhost:6060", nil)) 44 | }() 45 | router := SetupRouter() 46 | router.Run(":8080") 47 | } 48 | 49 | func SetupRouter() *gin.Engine { 50 | funcMap := template.FuncMap{ 51 | "printTimestamp": PrintTimestamp, 52 | "wrapRelayNetwork": WrapRelayNetwork, 53 | } 54 | fmt.Println("using database: ", servercfg.GetDB()) 55 | if err := database.InitializeDatabase(); err != nil { 56 | log.Fatal("Error connecting to Database:\n", err) 57 | } 58 | router := gin.Default() 59 | store := memstore.NewStore([]byte("secret")) 60 | 61 | router.Use(sessions.Sessions("netmaker", store)) 62 | //router.LoadHTMLGlob("html/*") 63 | templates := template.Must(template.New("").Funcs(funcMap).ParseGlob("html/*")) 64 | router.SetHTMLTemplate(templates) 65 | router.Static("images", "./images") 66 | router.StaticFile("favicon.ico", "./images/favicon.png") 67 | router.POST("/newuser", NewUser) 68 | router.POST("/login", ProcessLogin) 69 | //use authorization middleware 70 | private := router.Group("/", AuthRequired) 71 | { 72 | //router.Use(AuthRequired) 73 | private.GET("/", DisplayLanding) 74 | //network handlers 75 | private.POST("/create_network", CreateNetwork) 76 | private.POST("/delete_network", DeleteNetwork) 77 | private.POST("/edit_network", EditNetwork) 78 | private.POST("/update_network", UpdateNetwork) 79 | private.GET("/refreshkeys/:net", RefreshKeys) 80 | //key handlers 81 | private.POST("/create_key", NewKey) 82 | private.POST("/delete_key", DeleteKey) 83 | //user handlers 84 | private.POST("/create_user", CreateUser) 85 | private.POST("/delete_user", DeleteUser) 86 | private.GET("/edit_user", EditUser) 87 | private.POST("/update_user/:user", UpdateUser) 88 | //node handlers 89 | private.POST("/edit_node", EditNode) 90 | private.POST("/delete_node", DeleteNode) 91 | private.POST("/update_node/:net/:mac", UpdateNode) 92 | private.GET("/node_health", NodeHealth) 93 | //gateway handlers 94 | private.POST("/create_egress/:net/:mac", CreateEgress) 95 | private.POST("/process_egress/:net/:mac", ProcessEgress) 96 | private.POST("/delete_egress/:net/:mac", DeleteEgress) 97 | private.POST("/create_ingress/:net/:mac", CreateIngress) 98 | private.POST("/delete_ingress/:net/:mac", DeleteIngress) 99 | private.POST("/create_relay/:net/:mac", CreateRelay) 100 | private.POST("/delete_relay/:net/:mac", DeleteRelay) 101 | private.POST("/process_relay/:net/:mac", ProcessRelayCreation) 102 | //ext client handlers 103 | private.POST("/create_ingress_client/:net/:mac", CreateIngressClient) 104 | private.POST("/delete_ingress_client/:net/:id", DeleteIngressClient) 105 | private.POST("/edit_ingress_client/:net/:id", EditIngressClient) 106 | private.POST("/get_qr/:net/:id", GetQR) 107 | private.POST("/get_client_config/:net/:id", GetClientConfig) 108 | private.POST("/update_client/:net/:id", UpdateClient) 109 | //dns handlers 110 | private.POST("/create_dns", CreateDNS) 111 | private.POST("/delete_dns/:net/:name/:address", DeleteDNS) 112 | //logout 113 | private.GET("/logout", LogOut) 114 | } 115 | files := router.Group("/file", FileAuth) 116 | { 117 | files.StaticFS("", http.Dir("file")) 118 | files.POST(":file", FileUpload) 119 | } 120 | return router 121 | } 122 | 123 | func PrintTimestamp(t int64) string { 124 | time := time.Unix(t, 0) 125 | return time.String() 126 | } 127 | 128 | func WrapRelayNetwork(network string, data models.Node) map[string]interface{} { 129 | return map[string]interface{}{ 130 | "NetworkToUse": network, 131 | "Data": data, 132 | } 133 | } 134 | 135 | func AuthRequired(c *gin.Context) { 136 | session := sessions.Default(c) 137 | 138 | loggedIn := session.Get("loggedIn") 139 | fmt.Println("loggedIn status: ", loggedIn) 140 | if loggedIn != true { 141 | adminExists, err := controller.HasAdmin() 142 | fmt.Println("response from HasAdmin(): ", adminExists, err) 143 | if err != nil { 144 | fmt.Println("error checking for admin") 145 | c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) 146 | c.Abort() 147 | } 148 | if !adminExists { 149 | fmt.Println("no admin") 150 | c.HTML(http.StatusOK, "new", nil) 151 | c.Abort() 152 | } else { 153 | message := session.Get("error") 154 | fmt.Println("user exists --- message\n", message) 155 | c.HTML(http.StatusUnauthorized, "Login", gin.H{"messge": message}) 156 | c.Abort() 157 | } 158 | } 159 | fmt.Println("authorized - good to go") 160 | } 161 | -------------------------------------------------------------------------------- /html/nodes.html: -------------------------------------------------------------------------------- 1 | {{ define "Nodes" }} 2 |
3 | {{range .Nodes}} 4 |

5 | {{template "NodeDetails" .}} 6 | {{end}} 7 |
8 | {{end}} 9 | 10 | {{define "NodeDetails"}} 11 |
12 |
13 | {{.Name }} 14 |
15 | 16 | 17 | 18 |
19 | 20 |
21 |
22 |
23 |
24 |
25 | 26 | 27 | 28 |
29 | {{if eq .IsEgressGateway "yes" }} 30 | 31 |
32 | 33 |
34 | {{ else }} 35 |
36 | 37 |
38 | {{end}} 39 | {{if eq .IsIngressGateway "yes"}} 40 | 41 |
42 | 43 | {{ else }} 44 |
45 |
46 | 47 |
48 | {{end}} 49 | {{if eq .IsRelay "yes"}} 50 |
51 | 52 |
53 | {{ else }} 54 |
55 | 56 |
57 | {{end}} 58 |
59 |
60 | {{ end }} 61 | 62 | {{define "CreateRelay"}} 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | {{template "HeaderIcons"}} 73 | 74 |
75 |
76 |
77 |

Create Relay

78 |
79 |
80 |

select nodes to relay

81 | {{ $Net := .Node.Network}} 82 | {{range .Nodes }} 83 | {{ if eq .Network $Net}} 84 | {{.Name}} 85 | {{end}} {{end}} 86 |
87 | 88 |
89 | 90 |
91 |
92 | 93 | {{end}} 94 | 95 | 96 | 97 | 98 | {{ define "Egress" }} 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | {{template "Header"}} 108 | 109 |
110 |
111 |
112 |

Make {{.Name}} into Gateway

113 |
114 | 119 |
120 |
121 |
122 |

123 |

124 |

125 |

126 | 127 |

128 | 129 |
130 | 131 |
132 |
133 |
134 | {{template "script"}} 135 | {{end}} 136 | 137 | {{define "EditNode"}} 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | {{template "Header"}} 147 |
148 |
149 |

Edit Node {{.Name}}

150 |
151 | Address:

152 | Address Range(IPv6):

153 | Local Range:

154 | Name:

155 | Listen Port:

156 | PublicKey:

157 | EndPoint:

158 | PostUp:

159 | PostDown:

160 | Persistent Keepalive:

161 | Save Config:

162 | Interface:

163 | Last Modified:

164 | Last CheckIn:

165 | MacAddress:

166 | Network:

167 | Local Address:

168 | Egress Gateway Ranges:

169 | Allowed IPs:

170 | UDP Hole Punch:

171 | Static:

172 | IsRelay:

173 |
174 | 175 |
176 | 177 |
178 |
179 | 180 | 181 | {{end}} 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 2 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 3 | github.com/antonlindstrom/pgstore v0.0.0-20200229204646-b08ebf1105e0/go.mod h1:2Ti6VUHVxpC0VSmTZzEvpzysnaGAfGBOoMIz5ykPyyw= 4 | github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= 5 | github.com/boj/redistore v0.0.0-20180917114910-cd5dcc76aeff/go.mod h1:+RTT1BOk5P97fT2CiHkbFQwkK3mjsFAP6zCYV2aXtjw= 6 | github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= 7 | github.com/bradleypeabody/gorilla-sessions-memcache v0.0.0-20181103040241-659414f458e1/go.mod h1:dkChI7Tbtx7H1Tj7TqGSZMOeGpMP5gLHtjroHd4agiI= 8 | github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= 9 | github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 10 | github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= 11 | github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= 12 | github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= 13 | github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= 14 | github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= 15 | github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= 16 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 17 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 18 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 19 | github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= 20 | github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= 21 | github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= 22 | github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= 23 | github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= 24 | github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= 25 | github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= 26 | github.com/gin-contrib/sessions v0.0.4 h1:gq4fNa1Zmp564iHP5G6EBuktilEos8VKhe2sza1KMgo= 27 | github.com/gin-contrib/sessions v0.0.4/go.mod h1:pQ3sIyviBBGcxgyR8mkeJuXbeV3h3NYmhJADQTq5+Vo= 28 | github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= 29 | github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= 30 | github.com/gin-gonic/gin v1.7.4 h1:QmUZXrvJ9qZ3GfWvQ+2wnW/1ePrTEJqPKMYEU3lD/DM= 31 | github.com/gin-gonic/gin v1.7.4/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= 32 | github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= 33 | github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= 34 | github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= 35 | github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= 36 | github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= 37 | github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= 38 | github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= 39 | github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= 40 | github.com/go-playground/validator/v10 v10.5.0 h1:X9rflw/KmpACwT8zdrm1upefpvdy6ur8d1kWyq6sg3E= 41 | github.com/go-playground/validator/v10 v10.5.0/go.mod h1:xm76BBt941f7yWdGnI2DVPFFg1UK3YY04qifoXU3lOk= 42 | github.com/golang-jwt/jwt/v4 v4.0.0 h1:RAqyYixv1p7uEnocuy8P1nru5wprCh/MH2BIlW5z5/o= 43 | github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= 44 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= 45 | github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 46 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 47 | github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 48 | github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= 49 | github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= 50 | github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= 51 | github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= 52 | github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= 53 | github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= 54 | github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= 55 | github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 56 | github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= 57 | github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= 58 | github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= 59 | github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= 60 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= 61 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 62 | github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 63 | github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 64 | github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 65 | github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 66 | github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 67 | github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= 68 | github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 69 | github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 70 | github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 71 | github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= 72 | github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= 73 | github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= 74 | github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= 75 | github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= 76 | github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= 77 | github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= 78 | github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= 79 | github.com/gorilla/sessions v1.1.1/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w= 80 | github.com/gorilla/sessions v1.2.0 h1:S7P+1Hm5V/AT9cjEcUD5uDaQSX0OE577aCXgoaKpYbQ= 81 | github.com/gorilla/sessions v1.2.0/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= 82 | github.com/gravitl/netmaker v0.8.4 h1:fPbKDnwQxj+tTb0Pt2q8/DVPrrwoIVtfRwIl30YZXi8= 83 | github.com/gravitl/netmaker v0.8.4/go.mod h1:izdhL5a1m8QmCc2ABjO4poy9Y88CnEb8sxF5HaCbHjI= 84 | github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= 85 | github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= 86 | github.com/josharian/native v0.0.0-20200817173448-b6b71def0850 h1:uhL5Gw7BINiiPAo24A2sxkcDI0Jt/sqp1v5xQCniEFA= 87 | github.com/josharian/native v0.0.0-20200817173448-b6b71def0850/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w= 88 | github.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= 89 | github.com/jsimonetti/rtnetlink v0.0.0-20200117123717-f846d4f6c1f4/go.mod h1:WGuG/smIU4J/54PblvSbh+xvCZmpJnFgr3ds6Z55XMQ= 90 | github.com/jsimonetti/rtnetlink v0.0.0-20201009170750-9c6f07d100c1/go.mod h1:hqoO/u39cqLeBLebZ8fWdE96O7FxrAsRYhnVOdgHxok= 91 | github.com/jsimonetti/rtnetlink v0.0.0-20201216134343-bde56ed16391/go.mod h1:cR77jAZG3Y3bsb8hF6fHJbFoyFukLFOkQ98S0pQz3xw= 92 | github.com/jsimonetti/rtnetlink v0.0.0-20201220180245-69540ac93943/go.mod h1:z4c53zj6Eex712ROyh8WI0ihysb5j2ROyV42iNogmAs= 93 | github.com/jsimonetti/rtnetlink v0.0.0-20210122163228-8d122574c736/go.mod h1:ZXpIyOK59ZnN7J0BV99cZUPmsqDRZ3eq5X+st7u/oSA= 94 | github.com/jsimonetti/rtnetlink v0.0.0-20210212075122-66c871082f2b h1:c3NTyLNozICy8B4mlMXemD3z/gXgQzVXZS/HqT+i3do= 95 | github.com/jsimonetti/rtnetlink v0.0.0-20210212075122-66c871082f2b/go.mod h1:8w9Rh8m+aHZIG69YPGGem1i5VzoyRC8nw2kA8B+ik5U= 96 | github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns= 97 | github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 98 | github.com/kidstuff/mongostore v0.0.0-20181113001930-e650cd85ee4b/go.mod h1:g2nVr8KZVXJSS97Jo8pJ0jgq29P6H7dG0oplUA86MQw= 99 | github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= 100 | github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= 101 | github.com/lib/pq v1.10.3 h1:v9QZf2Sn6AmjXtQeFpdoq/eaNtYP6IN+7lcrygsIAtg= 102 | github.com/lib/pq v1.10.3/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= 103 | github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= 104 | github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= 105 | github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= 106 | github.com/mattn/go-sqlite3 v1.14.8 h1:gDp86IdQsN/xWjIEmr9MF6o9mpksUgh0fu+9ByFxzIU= 107 | github.com/mattn/go-sqlite3 v1.14.8/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= 108 | github.com/mdlayher/ethtool v0.0.0-20210210192532-2b88debcdd43 h1:WgyLFv10Ov49JAQI/ZLUkCZ7VJS3r74hwFIGXJsgZlY= 109 | github.com/mdlayher/ethtool v0.0.0-20210210192532-2b88debcdd43/go.mod h1:+t7E0lkKfbBsebllff1xdTmyJt8lH37niI6kwFk9OTo= 110 | github.com/mdlayher/genetlink v1.0.0 h1:OoHN1OdyEIkScEmRgxLEe2M9U8ClMytqA5niynLtfj0= 111 | github.com/mdlayher/genetlink v1.0.0/go.mod h1:0rJ0h4itni50A86M2kHcgS85ttZazNt7a8H2a2cw0Gc= 112 | github.com/mdlayher/netlink v0.0.0-20190409211403-11939a169225/go.mod h1:eQB3mZE4aiYnlUsyGGCOpPETfdQq4Jhsgf1fk3cwQaA= 113 | github.com/mdlayher/netlink v1.0.0/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M= 114 | github.com/mdlayher/netlink v1.1.0/go.mod h1:H4WCitaheIsdF9yOYu8CFmCgQthAPIWZmcKp9uZHgmY= 115 | github.com/mdlayher/netlink v1.1.1/go.mod h1:WTYpFb/WTvlRJAyKhZL5/uy69TDDpHHu2VZmb2XgV7o= 116 | github.com/mdlayher/netlink v1.2.0/go.mod h1:kwVW1io0AZy9A1E2YYgaD4Cj+C+GPkU6klXCMzIJ9p8= 117 | github.com/mdlayher/netlink v1.2.1/go.mod h1:bacnNlfhqHqqLo4WsYeXSqfyXkInQ9JneWI68v1KwSU= 118 | github.com/mdlayher/netlink v1.2.2-0.20210123213345-5cc92139ae3e/go.mod h1:bacnNlfhqHqqLo4WsYeXSqfyXkInQ9JneWI68v1KwSU= 119 | github.com/mdlayher/netlink v1.3.0/go.mod h1:xK/BssKuwcRXHrtN04UBkwQ6dY9VviGGuriDdoPSWys= 120 | github.com/mdlayher/netlink v1.4.0 h1:n3ARR+Fm0dDv37dj5wSWZXDKcy+U0zwcXS3zKMnSiT0= 121 | github.com/mdlayher/netlink v1.4.0/go.mod h1:dRJi5IABcZpBD2A3D0Mv/AiX8I9uDEu5oGkAVrekmf8= 122 | github.com/memcachier/mc v2.0.1+incompatible/go.mod h1:7bkvFE61leUBvXz+yxsOnGBQSZpBSPIMUQSmmSHvuXc= 123 | github.com/mikioh/ipaddr v0.0.0-20190404000644-d465c8ab6721 h1:RlZweED6sbSArvlE924+mUcZuXKLBHA35U7LN621Bws= 124 | github.com/mikioh/ipaddr v0.0.0-20190404000644-d465c8ab6721/go.mod h1:Ickgr2WtCLZ2MDGd4Gr0geeCH5HybhRJbonOgQpvSxc= 125 | github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= 126 | github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= 127 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= 128 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 129 | github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLDQ0W1YjYsBW+p8U2u7vzgW2SQVmlNazg= 130 | github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 131 | github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= 132 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 133 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 134 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 135 | github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 136 | github.com/quasoft/memstore v0.0.0-20191010062613-2bce066d2b0b h1:aUNXCGgukb4gtY99imuIeoh8Vr0GSwAlYxPAhqZrpFc= 137 | github.com/quasoft/memstore v0.0.0-20191010062613-2bce066d2b0b/go.mod h1:wTPjTepVu7uJBYgZ0SdWHQlIas582j6cn2jgk4DDdlg= 138 | github.com/rqlite/gorqlite v0.0.0-20210514125552-08ff1e76b22f h1:BSnJgAfHzEp7o8PYJ7YfwAVHhqu7BYUTggcn/LGlUWY= 139 | github.com/rqlite/gorqlite v0.0.0-20210514125552-08ff1e76b22f/go.mod h1:UW/gxgQwSePTvL1KA8QEHsXeYHP4xkoXgbDdN781p34= 140 | github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= 141 | github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= 142 | github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= 143 | github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0= 144 | github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M= 145 | github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= 146 | github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= 147 | github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= 148 | github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= 149 | github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= 150 | github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= 151 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 152 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 153 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 154 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 155 | github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= 156 | github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 157 | github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= 158 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 159 | github.com/txn2/txeh v1.3.0 h1:vnbv63htVMZCaQgLqVBxKvj2+HHHFUzNW7I183zjg3E= 160 | github.com/txn2/txeh v1.3.0/go.mod h1:O7M6gUTPeMF+vsa4c4Ipx3JDkOYrruB1Wry8QRsMcw8= 161 | github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= 162 | github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= 163 | github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= 164 | github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= 165 | github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= 166 | github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= 167 | github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= 168 | golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= 169 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 170 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 171 | golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= 172 | golang.org/x/crypto v0.0.0-20210503195802-e9a32991a82e/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= 173 | golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 h1:/UOmuWzQfxxo9UtlXMwuQU8CMgg1eZXqTRwkSQJWKOI= 174 | golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 175 | golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 176 | golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 177 | golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= 178 | golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 179 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 180 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 181 | golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 182 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 183 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 184 | golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 185 | golang.org/x/net v0.0.0-20191007182048-72f939374954/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 186 | golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 187 | golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 188 | golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 189 | golang.org/x/net v0.0.0-20201216054612-986b41b23924/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 190 | golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 191 | golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 192 | golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 193 | golang.org/x/net v0.0.0-20210504132125-bbd867fde50d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 194 | golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985 h1:4CSI6oo7cOjJKajidEljs9h+uP0rRZBPPPhcCbj5mw8= 195 | golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 196 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 197 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 198 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 199 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 200 | golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 201 | golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 202 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 203 | golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 204 | golang.org/x/sys v0.0.0-20190411185658-b44545bcd369/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 205 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 206 | golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 207 | golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 208 | golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 209 | golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 210 | golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 211 | golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 212 | golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 213 | golang.org/x/sys v0.0.0-20201118182958-a01c418693c7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 214 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 215 | golang.org/x/sys v0.0.0-20201218084310-7d0127a74742/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 216 | golang.org/x/sys v0.0.0-20210110051926-789bb1bd4061/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 217 | golang.org/x/sys v0.0.0-20210123111255-9b0068b26619/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 218 | golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 219 | golang.org/x/sys v0.0.0-20210216163648-f7da38b97c65/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 220 | golang.org/x/sys v0.0.0-20210309040221-94ec62e08169/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 221 | golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 222 | golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 223 | golang.org/x/sys v0.0.0-20210503173754-0981d6026fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 224 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 225 | golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e h1:XMgFehsDnnLGtjvjOfqWSUzt0alpTR1RSEuznObga2c= 226 | golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 227 | golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= 228 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 229 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 230 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= 231 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 232 | golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 233 | golang.org/x/text v0.3.7-0.20210524175448-3115f89c4b99 h1:ZEXtoJu1S0ie/EmdYnjY3CqaCCZxnldL+K1ftMITD2Q= 234 | golang.org/x/text v0.3.7-0.20210524175448-3115f89c4b99/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= 235 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 236 | golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 237 | golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= 238 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 239 | golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 240 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 241 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= 242 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 243 | golang.zx2c4.com/wireguard v0.0.0-20210427022245-097af6e1351b/go.mod h1:a057zjmoc00UN7gVkaJt2sXVK523kMJcogDTEvPIasg= 244 | golang.zx2c4.com/wireguard v0.0.0-20210805125648-3957e9b9dd19 h1:ab2jcw2W91Rz07eHAb8Lic7sFQKO0NhBftjv6m/gL/0= 245 | golang.zx2c4.com/wireguard v0.0.0-20210805125648-3957e9b9dd19/go.mod h1:laHzsbfMhGSobUmruXWAyMKKHSqvIcrqZJMyHD+/3O8= 246 | golang.zx2c4.com/wireguard/wgctrl v0.0.0-20210913210325-91d1988e44de h1:M9Jc92kgqmVmidpnOeegP2VgO2DfHEcsUWtWMmBwNFQ= 247 | golang.zx2c4.com/wireguard/wgctrl v0.0.0-20210913210325-91d1988e44de/go.mod h1:+1XihzyZUBJcSc5WO9SwNA7v26puQwOEDwanaxfNXPQ= 248 | google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= 249 | google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 250 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= 251 | google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 252 | google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= 253 | google.golang.org/genproto v0.0.0-20210201151548-94839c025ad4 h1:HPkKL4eEh/nemF/FRzYMrFsAh1ZPm5t8NqKBI/Ejlg0= 254 | google.golang.org/genproto v0.0.0-20210201151548-94839c025ad4/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 255 | google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= 256 | google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= 257 | google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= 258 | google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 259 | google.golang.org/grpc v1.35.0 h1:TwIQcH3es+MojMVojxxfQ3l3OF2KzlRxML2xZq0kRo8= 260 | google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= 261 | google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= 262 | google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= 263 | google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= 264 | google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= 265 | google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= 266 | google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 267 | google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 268 | google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 269 | google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= 270 | google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= 271 | google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= 272 | google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= 273 | google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= 274 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= 275 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 276 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 277 | gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 278 | gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= 279 | gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 280 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= 281 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 282 | honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 283 | honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 284 | --------------------------------------------------------------------------------