mirror of
https://github.com/netbirdio/wireguard-go.git
synced 2026-05-22 17:08:51 -07:00
global: begin modularization
This commit is contained in:
@@ -24,10 +24,10 @@ MAKEFLAGS += --no-print-directory
|
||||
generate-version-and-build:
|
||||
@export GIT_CEILING_DIRECTORIES="$(realpath $(CURDIR)/..)" && \
|
||||
tag="$$(git describe --dirty 2>/dev/null)" && \
|
||||
ver="$$(printf 'package main\nconst WireGuardGoVersion = "%s"\n' "$$tag")" && \
|
||||
[ "$$(cat version.go 2>/dev/null)" != "$$ver" ] && \
|
||||
echo "$$ver" > version.go && \
|
||||
git update-index --assume-unchanged version.go || true
|
||||
ver="$$(printf 'package device\nconst WireGuardGoVersion = "%s"\n' "$$tag")" && \
|
||||
[ "$$(cat device/version.go 2>/dev/null)" != "$$ver" ] && \
|
||||
echo "$$ver" > device/version.go && \
|
||||
git update-index --assume-unchanged device/version.go || true
|
||||
@$(MAKE) wireguard-go
|
||||
|
||||
wireguard-go: $(wildcard *.go) $(wildcard */*.go)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2017-2019 WireGuard LLC. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package main
|
||||
package device
|
||||
|
||||
import (
|
||||
"errors"
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2017-2019 WireGuard LLC. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package main
|
||||
package device
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2017-2019 WireGuard LLC. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package main
|
||||
package device
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2017-2019 WireGuard LLC. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package main
|
||||
package device
|
||||
|
||||
import "errors"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2017-2019 WireGuard LLC. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package main
|
||||
package device
|
||||
|
||||
import (
|
||||
"errors"
|
||||
@@ -177,4 +177,4 @@ func (device *Device) BindClose() error {
|
||||
err := unsafeCloseBind(device)
|
||||
device.net.Unlock()
|
||||
return err
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2017-2019 WireGuard LLC. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package main
|
||||
package device
|
||||
|
||||
import (
|
||||
"net"
|
||||
@@ -14,7 +14,7 @@
|
||||
* So this code is remains platform dependent.
|
||||
*/
|
||||
|
||||
package main
|
||||
package device
|
||||
|
||||
import (
|
||||
"errors"
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2017-2019 WireGuard LLC. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package main
|
||||
package device
|
||||
|
||||
import (
|
||||
"time"
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2017-2019 WireGuard LLC. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package main
|
||||
package device
|
||||
|
||||
import (
|
||||
"crypto/hmac"
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2017-2019 WireGuard LLC. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package main
|
||||
package device
|
||||
|
||||
import (
|
||||
"testing"
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2017-2019 WireGuard LLC. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package main
|
||||
package device
|
||||
|
||||
import (
|
||||
"golang.zx2c4.com/wireguard/ratelimiter"
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2017-2019 WireGuard LLC. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package main
|
||||
package device
|
||||
|
||||
/* Create two device instances and simulate full WireGuard interaction
|
||||
* without network dependencies
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2017-2019 WireGuard LLC. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package main
|
||||
package device
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2017-2019 WireGuard LLC. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package main
|
||||
package device
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2017-2019 WireGuard LLC. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package main
|
||||
package device
|
||||
|
||||
import (
|
||||
"net"
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2017-2019 WireGuard LLC. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package main
|
||||
package device
|
||||
|
||||
import (
|
||||
"encoding/hex"
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2017-2019 WireGuard LLC. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package main
|
||||
package device
|
||||
|
||||
import (
|
||||
"crypto/cipher"
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2017-2019 WireGuard LLC. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package main
|
||||
package device
|
||||
|
||||
import (
|
||||
"io"
|
||||
@@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2017-2019 WireGuard LLC. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package main
|
||||
package device
|
||||
|
||||
func (bind *NativeBind) SetMark(mark uint32) error {
|
||||
return nil
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user