wireguard-go
vendor
+.gopath
+ireallywantobuildon_linux.go
-# This was generated by ./generate-vendor.sh
+# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
+
+
[[projects]]
branch = "master"
name = "golang.org/x/crypto"
+ packages = [
+ "blake2s",
+ "chacha20poly1305",
+ "curve25519",
+ "internal/chacha20",
+ "poly1305"
+ ]
revision = "1a580b3eff7814fc9b40602fd35256c63b50f491"
[[projects]]
branch = "master"
name = "golang.org/x/net"
- revision = "8e0cdda24ed423affc8f35c241e5e9b16180338e"
+ packages = [
+ "bpf",
+ "internal/iana",
+ "internal/socket",
+ "ipv4",
+ "ipv6"
+ ]
+ revision = "9ef9f5bb98a1fdc41f8cf6c250a4404b4085e389"
[[projects]]
branch = "master"
name = "golang.org/x/sys"
- revision = "7f59abf37be6a6007f075af1bc7f16f137bc176b"
+ packages = [
+ "cpu",
+ "unix"
+ ]
+ revision = "88eb85aaee56831ad49eaf7aa80d73de9814cde2"
+[solve-meta]
+ analyzer-name = "dep"
+ analyzer-version = 1
+ inputs-digest = "d85ae9d2b4afafc3d7535505c46368cbbbec350cf876616302c1bcf44f6ec103"
+ solver-name = "gps-cdcl"
+ solver-version = 1
-# This was generated by ./generate-vendor.sh
[[constraint]]
branch = "master"
name = "golang.org/x/crypto"
branch = "master"
name = "golang.org/x/sys"
+[prune]
+ go-tests = true
+ unused-packages = true
ifeq ($(shell go env GOOS),linux)
ifeq ($(wildcard .git),)
$(error Do not build this for Linux. Instead use the Linux kernel module. See wireguard.com/install/ for more info.)
+else
+$(shell printf 'package main\nconst UseTheKernelModuleInstead = 0xdeadbabe\n' > ireallywantobuildon_linux.go)
endif
endif
all: wireguard-go
-wireguard-go: $(wildcard *.go) $(wildcard */*.go)
- go build -v -o $@
+export GOPATH := $(CURDIR)/.gopath
+export PATH := $(PATH):$(CURDIR)/.gopath/bin
+GO_IMPORT_PATH := git.zx2c4.com/wireguard-go
+
+.gopath/.created:
+ rm -rf .gopath
+ mkdir -p $(dir .gopath/src/$(GO_IMPORT_PATH))
+ ln -s ../../.. .gopath/src/$(GO_IMPORT_PATH)
+ touch $@
+
+vendor/.created: Gopkg.toml Gopkg.lock .gopath/.created
+ command -v dep >/dev/null || go get -v github.com/golang/dep/cmd/dep
+ cd .gopath/src/$(GO_IMPORT_PATH) && dep ensure -vendor-only -v
+ touch $@
+
+wireguard-go: $(wildcard *.go) $(wildcard */*.go) .gopath/.created vendor/.created
+ go build $(GO_BUILD_EXTRA_ARGS) -v $(GO_IMPORT_PATH)
install: wireguard-go
- @install -v -d "$(DESTDIR)$(BINDIR)" && install -m 0755 -v wireguard-go "$(DESTDIR)$(BINDIR)/wireguard-go"
+ @install -v -d "$(DESTDIR)$(BINDIR)" && install -v -m 0755 wireguard-go "$(DESTDIR)$(BINDIR)/wireguard-go"
clean:
rm -f wireguard-go
-.PHONY: clean install
+update-dep:
+ command -v dep >/dev/null || go get -v github.com/golang/dep/cmd/dep
+ cd .gopath/src/$(GO_IMPORT_PATH) && dep ensure -update -v
+
+.PHONY: clean install update-dep
## Building
-You can satisfy dependencies with either `go get -d -v` or `dep ensure -vendor-only`. Then run `make`. As this is a Go project, a `GOPATH` is required. For example, wireguard-go can be built with:
+This requires an installation of [go](https://golang.org) and of [dep](https://github.com/golang/dep). If dep is not installed, it will be downloaded and built as part of the build process.
```
$ git clone https://git.zx2c4.com/wireguard-go
$ cd wireguard-go
-$ export GOPATH="$PWD/gopath"
-$ go get -d -v
$ make
```
package main
import (
- "./rwcancel"
+ "git.zx2c4.com/wireguard-go/rwcancel"
"errors"
"golang.org/x/sys/unix"
"net"
package main
import (
- "./xchacha20poly1305"
+ "git.zx2c4.com/wireguard-go/xchacha20poly1305"
"crypto/hmac"
"crypto/rand"
"golang.org/x/crypto/blake2s"
package main
import (
- "./ratelimiter"
- "./tun"
+ "git.zx2c4.com/wireguard-go/ratelimiter"
+ "git.zx2c4.com/wireguard-go/tun"
"runtime"
"sync"
"sync/atomic"
--- /dev/null
+// +build !android
+
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2017-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
+ */
+
+package main
+
+const DoNotUseThisProgramOnLinux = UseTheKernelModuleInstead
+
+// --------------------------------------------------------
+// Do not use this on Linux. Instead use the kernel module.
+// See wireguard.com/install for more information.
+// --------------------------------------------------------
+++ /dev/null
-#!/bin/bash
-
-echo "# This was generated by ./generate-vendor.sh" > Gopkg.lock
-echo "# This was generated by ./generate-vendor.sh" > Gopkg.toml
-
-while read -r package; do
- cat >> Gopkg.lock <<-_EOF
- [[projects]]
- branch = "master"
- name = "$package"
- revision = "$(< "$GOPATH/src/$package/.git/refs/heads/master")"
-
- _EOF
- cat >> Gopkg.toml <<-_EOF
- [[constraint]]
- branch = "master"
- name = "$package"
-
- _EOF
-done < <(sed -n 's/.*"\(golang.org\/x\/[^/]\+\)\/\?.*".*/\1/p' *.go */*.go | sort | uniq)
package main
import (
- "./replay"
+ "git.zx2c4.com/wireguard-go/replay"
"crypto/cipher"
"sync"
"time"
package main
import (
- "./tun"
+ "git.zx2c4.com/wireguard-go/tun"
"fmt"
"os"
"os/signal"
package main
import (
- "./tai64n"
+ "git.zx2c4.com/wireguard-go/tai64n"
"errors"
"golang.org/x/crypto/blake2s"
"golang.org/x/crypto/chacha20poly1305"
package main
import (
- "./tun"
+ "git.zx2c4.com/wireguard-go/tun"
"sync/atomic"
)
package tun
import (
- "../rwcancel"
+ "git.zx2c4.com/wireguard-go/rwcancel"
"errors"
"fmt"
"golang.org/x/net/ipv6"
package tun
import (
- "../rwcancel"
+ "git.zx2c4.com/wireguard-go/rwcancel"
"bytes"
"errors"
"fmt"
*/
import (
- "../rwcancel"
+ "git.zx2c4.com/wireguard-go/rwcancel"
"bytes"
"errors"
"fmt"
package tun
import (
- "../rwcancel"
+ "git.zx2c4.com/wireguard-go/rwcancel"
"errors"
"fmt"
"golang.org/x/net/ipv6"
package main
import (
- "./rwcancel"
+ "git.zx2c4.com/wireguard-go/rwcancel"
"errors"
"fmt"
"golang.org/x/sys/unix"