import (
"encoding/binary"
- "golang.org/x/sys/windows"
"unsafe"
+
+ "golang.org/x/sys/windows"
)
const (
import (
"errors"
- "golang.org/x/net/ipv4"
- "golang.org/x/net/ipv6"
"net"
"strings"
+
+ "golang.org/x/net/ipv4"
+ "golang.org/x/net/ipv6"
)
const (
import (
"errors"
- "golang.org/x/sys/unix"
- "golang.zx2c4.com/wireguard/rwcancel"
"net"
"strconv"
"sync"
"syscall"
"unsafe"
+
+ "golang.org/x/sys/unix"
+ "golang.zx2c4.com/wireguard/rwcancel"
)
const (
import (
"crypto/hmac"
"crypto/rand"
- "golang.org/x/crypto/blake2s"
- "golang.org/x/crypto/chacha20poly1305"
"sync"
"time"
+
+ "golang.org/x/crypto/blake2s"
+ "golang.org/x/crypto/chacha20poly1305"
)
type CookieChecker struct {
package device
import (
- "golang.zx2c4.com/wireguard/ratelimiter"
- "golang.zx2c4.com/wireguard/tun"
"runtime"
"sync"
"sync/atomic"
"time"
+
+ "golang.zx2c4.com/wireguard/ratelimiter"
+ "golang.zx2c4.com/wireguard/tun"
)
const (
import (
"encoding/hex"
- "golang.org/x/crypto/blake2s"
"testing"
+
+ "golang.org/x/crypto/blake2s"
)
type KDFTest struct {
import (
"crypto/cipher"
- "golang.zx2c4.com/wireguard/replay"
"sync"
"time"
+
+ "golang.zx2c4.com/wireguard/replay"
)
/* Due to limitations in Go and /x/crypto there is currently
package device
import (
- "golang.org/x/sys/unix"
"runtime"
+
+ "golang.org/x/sys/unix"
)
var fwmarkIoctl int
"crypto/hmac"
"crypto/rand"
"crypto/subtle"
+ "hash"
+
"golang.org/x/crypto/blake2s"
"golang.org/x/crypto/curve25519"
- "hash"
)
/* KDF related functions.
import (
"errors"
+ "sync"
+ "time"
+
"golang.org/x/crypto/blake2s"
"golang.org/x/crypto/chacha20poly1305"
"golang.org/x/crypto/poly1305"
"golang.zx2c4.com/wireguard/tai64n"
- "sync"
- "time"
)
const (
"crypto/subtle"
"encoding/hex"
"errors"
+
"golang.org/x/crypto/chacha20poly1305"
)
import (
"bytes"
"encoding/binary"
- "golang.org/x/crypto/chacha20poly1305"
- "golang.org/x/net/ipv4"
- "golang.org/x/net/ipv6"
"net"
"strconv"
"sync"
"sync/atomic"
"time"
+
+ "golang.org/x/crypto/chacha20poly1305"
+ "golang.org/x/net/ipv4"
+ "golang.org/x/net/ipv6"
)
type QueueHandshakeElement struct {
import (
"bytes"
"encoding/binary"
- "golang.org/x/crypto/chacha20poly1305"
- "golang.org/x/net/ipv4"
- "golang.org/x/net/ipv6"
"net"
"sync"
"sync/atomic"
"time"
+
+ "golang.org/x/crypto/chacha20poly1305"
+ "golang.org/x/net/ipv4"
+ "golang.org/x/net/ipv6"
)
/* Outbound flow
package device
import (
- "golang.zx2c4.com/wireguard/tun"
"sync/atomic"
+
+ "golang.zx2c4.com/wireguard/tun"
)
const DefaultMTU = 1420
import (
"bufio"
"fmt"
- "golang.zx2c4.com/wireguard/ipc"
"io"
"net"
"strconv"
"strings"
"sync/atomic"
"time"
+
+ "golang.zx2c4.com/wireguard/ipc"
)
type IPCError struct {
import (
"errors"
"fmt"
- "golang.org/x/sys/unix"
"net"
"os"
"path"
"unsafe"
+
+ "golang.org/x/sys/unix"
)
var socketDirectory = "/var/run/wireguard"
import (
"errors"
"fmt"
- "golang.org/x/sys/unix"
- "golang.zx2c4.com/wireguard/rwcancel"
"net"
"os"
"path"
+
+ "golang.org/x/sys/unix"
+ "golang.zx2c4.com/wireguard/rwcancel"
)
var socketDirectory = "/var/run/wireguard"
package ipc
import (
- "github.com/Microsoft/go-winio"
"net"
+
+ "github.com/Microsoft/go-winio"
)
//TODO: replace these with actual standard windows error numbers from the win package
import (
"fmt"
- "golang.zx2c4.com/wireguard/device"
- "golang.zx2c4.com/wireguard/ipc"
- "golang.zx2c4.com/wireguard/tun"
"os"
"os/signal"
"runtime"
"strconv"
"syscall"
+
+ "golang.zx2c4.com/wireguard/device"
+ "golang.zx2c4.com/wireguard/ipc"
+ "golang.zx2c4.com/wireguard/tun"
)
const (
import (
"fmt"
- "golang.zx2c4.com/wireguard/device"
- "golang.zx2c4.com/wireguard/ipc"
"os"
"os/signal"
"syscall"
+ "golang.zx2c4.com/wireguard/device"
+ "golang.zx2c4.com/wireguard/ipc"
+
"golang.zx2c4.com/wireguard/tun"
)
import (
"errors"
- "golang.org/x/sys/unix"
"os"
"syscall"
+
+ "golang.org/x/sys/unix"
)
func max(a, b int) int {
import (
"bytes"
"errors"
- "golang.zx2c4.com/wireguard/tun"
"os"
"testing"
+
+ "golang.zx2c4.com/wireguard/tun"
)
/* Helpers for writing unit tests
import (
"fmt"
- "golang.org/x/net/ipv6"
- "golang.org/x/sys/unix"
"io/ioutil"
"net"
"os"
"syscall"
"unsafe"
+
+ "golang.org/x/net/ipv6"
+ "golang.org/x/sys/unix"
)
const utunControlName = "com.apple.net.utun_control"
"bytes"
"errors"
"fmt"
- "golang.org/x/net/ipv6"
- "golang.org/x/sys/unix"
"net"
"os"
"syscall"
"unsafe"
+
+ "golang.org/x/net/ipv6"
+ "golang.org/x/sys/unix"
)
// _TUNSIFHEAD, value derived from sys/net/{if_tun,ioccom}.h
"bytes"
"errors"
"fmt"
- "golang.org/x/net/ipv6"
- "golang.org/x/sys/unix"
- "golang.zx2c4.com/wireguard/rwcancel"
"net"
"os"
"sync"
"syscall"
"time"
"unsafe"
+
+ "golang.org/x/net/ipv6"
+ "golang.org/x/sys/unix"
+ "golang.zx2c4.com/wireguard/rwcancel"
)
const (
import (
"fmt"
- "golang.org/x/net/ipv6"
- "golang.org/x/sys/unix"
"io/ioutil"
"net"
"os"
"syscall"
"unsafe"
+
+ "golang.org/x/net/ipv6"
+ "golang.org/x/sys/unix"
)
// Structure for iface mtu get/set ioctls
)
var (
- modnetshell = windows.NewLazySystemDLL("netshell.dll")
+ modnetshell = windows.NewLazySystemDLL("netshell.dll")
procHrRenameConnection = modnetshell.NewProc("HrRenameConnection")
)