change imports to personal fork
This commit is contained in:
parent
a626b268ba
commit
4f8b7857f9
@ -17,7 +17,7 @@ import (
|
|||||||
|
|
||||||
"golang.org/x/sys/windows"
|
"golang.org/x/sys/windows"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/conn/winrio"
|
"gitea.hbanafa.com/hesham/wireguard-go/conn/winrio"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -12,7 +12,7 @@ import (
|
|||||||
"net/netip"
|
"net/netip"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"gitea.hbanafa.com/hesham/wireguard-go/conn"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ChannelBind struct {
|
type ChannelBind struct {
|
||||||
|
@ -8,7 +8,7 @@ package device
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"gitea.hbanafa.com/hesham/wireguard-go/conn"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DummyDatagram struct {
|
type DummyDatagram struct {
|
||||||
|
@ -11,10 +11,10 @@ import (
|
|||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"gitea.hbanafa.com/hesham/wireguard-go/conn"
|
||||||
"golang.zx2c4.com/wireguard/ratelimiter"
|
"gitea.hbanafa.com/hesham/wireguard-go/ratelimiter"
|
||||||
"golang.zx2c4.com/wireguard/rwcancel"
|
"gitea.hbanafa.com/hesham/wireguard-go/rwcancel"
|
||||||
"golang.zx2c4.com/wireguard/tun"
|
"gitea.hbanafa.com/hesham/wireguard-go/tun"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Device struct {
|
type Device struct {
|
||||||
|
@ -20,10 +20,10 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"gitea.hbanafa.com/hesham/wireguard-go/conn"
|
||||||
"golang.zx2c4.com/wireguard/conn/bindtest"
|
"gitea.hbanafa.com/hesham/wireguard-go/conn/bindtest"
|
||||||
"golang.zx2c4.com/wireguard/tun"
|
"gitea.hbanafa.com/hesham/wireguard-go/tun"
|
||||||
"golang.zx2c4.com/wireguard/tun/tuntest"
|
"gitea.hbanafa.com/hesham/wireguard-go/tun/tuntest"
|
||||||
)
|
)
|
||||||
|
|
||||||
// uapiCfg returns a string that contains cfg formatted use with IpcSet.
|
// uapiCfg returns a string that contains cfg formatted use with IpcSet.
|
||||||
|
@ -11,7 +11,7 @@ import (
|
|||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/replay"
|
"gitea.hbanafa.com/hesham/wireguard-go/replay"
|
||||||
)
|
)
|
||||||
|
|
||||||
/* Due to limitations in Go and /x/crypto there is currently
|
/* Due to limitations in Go and /x/crypto there is currently
|
||||||
|
@ -15,7 +15,7 @@ import (
|
|||||||
"golang.org/x/crypto/chacha20poly1305"
|
"golang.org/x/crypto/chacha20poly1305"
|
||||||
"golang.org/x/crypto/poly1305"
|
"golang.org/x/crypto/poly1305"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/tai64n"
|
"gitea.hbanafa.com/hesham/wireguard-go/tai64n"
|
||||||
)
|
)
|
||||||
|
|
||||||
type handshakeState int
|
type handshakeState int
|
||||||
|
@ -10,8 +10,8 @@ import (
|
|||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"gitea.hbanafa.com/hesham/wireguard-go/conn"
|
||||||
"golang.zx2c4.com/wireguard/tun/tuntest"
|
"gitea.hbanafa.com/hesham/wireguard-go/tun/tuntest"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCurveWrappers(t *testing.T) {
|
func TestCurveWrappers(t *testing.T) {
|
||||||
|
@ -12,7 +12,7 @@ import (
|
|||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"gitea.hbanafa.com/hesham/wireguard-go/conn"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Peer struct {
|
type Peer struct {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
package device
|
package device
|
||||||
|
|
||||||
import "golang.zx2c4.com/wireguard/conn"
|
import "gitea.hbanafa.com/hesham/wireguard-go/conn"
|
||||||
|
|
||||||
/* Reduce memory consumption for Android */
|
/* Reduce memory consumption for Android */
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
package device
|
package device
|
||||||
|
|
||||||
import "golang.zx2c4.com/wireguard/conn"
|
import "gitea.hbanafa.com/hesham/wireguard-go/conn"
|
||||||
|
|
||||||
const (
|
const (
|
||||||
QueueStagedSize = conn.IdealBatchSize
|
QueueStagedSize = conn.IdealBatchSize
|
||||||
|
@ -16,7 +16,7 @@ import (
|
|||||||
"golang.org/x/crypto/chacha20poly1305"
|
"golang.org/x/crypto/chacha20poly1305"
|
||||||
"golang.org/x/net/ipv4"
|
"golang.org/x/net/ipv4"
|
||||||
"golang.org/x/net/ipv6"
|
"golang.org/x/net/ipv6"
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"gitea.hbanafa.com/hesham/wireguard-go/conn"
|
||||||
)
|
)
|
||||||
|
|
||||||
type QueueHandshakeElement struct {
|
type QueueHandshakeElement struct {
|
||||||
|
@ -17,8 +17,8 @@ import (
|
|||||||
"golang.org/x/crypto/chacha20poly1305"
|
"golang.org/x/crypto/chacha20poly1305"
|
||||||
"golang.org/x/net/ipv4"
|
"golang.org/x/net/ipv4"
|
||||||
"golang.org/x/net/ipv6"
|
"golang.org/x/net/ipv6"
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"gitea.hbanafa.com/hesham/wireguard-go/conn"
|
||||||
"golang.zx2c4.com/wireguard/tun"
|
"gitea.hbanafa.com/hesham/wireguard-go/tun"
|
||||||
)
|
)
|
||||||
|
|
||||||
/* Outbound flow
|
/* Outbound flow
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
package device
|
package device
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"gitea.hbanafa.com/hesham/wireguard-go/conn"
|
||||||
"golang.zx2c4.com/wireguard/rwcancel"
|
"gitea.hbanafa.com/hesham/wireguard-go/rwcancel"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (device *Device) startRouteListener(bind conn.Bind) (*rwcancel.RWCancel, error) {
|
func (device *Device) startRouteListener(bind conn.Bind) (*rwcancel.RWCancel, error) {
|
||||||
|
@ -20,8 +20,8 @@ import (
|
|||||||
|
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"gitea.hbanafa.com/hesham/wireguard-go/conn"
|
||||||
"golang.zx2c4.com/wireguard/rwcancel"
|
"gitea.hbanafa.com/hesham/wireguard-go/rwcancel"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (device *Device) startRouteListener(bind conn.Bind) (*rwcancel.RWCancel, error) {
|
func (device *Device) startRouteListener(bind conn.Bind) (*rwcancel.RWCancel, error) {
|
||||||
|
@ -8,7 +8,7 @@ package device
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/tun"
|
"gitea.hbanafa.com/hesham/wireguard-go/tun"
|
||||||
)
|
)
|
||||||
|
|
||||||
const DefaultMTU = 1420
|
const DefaultMTU = 1420
|
||||||
|
@ -18,7 +18,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/ipc"
|
"gitea.hbanafa.com/hesham/wireguard-go/ipc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type IPCError struct {
|
type IPCError struct {
|
||||||
|
@ -21,7 +21,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"golang.org/x/sys/windows"
|
"golang.org/x/sys/windows"
|
||||||
"golang.zx2c4.com/wireguard/ipc/namedpipe"
|
"gitea.hbanafa.com/hesham/wireguard-go/ipc/namedpipe"
|
||||||
)
|
)
|
||||||
|
|
||||||
func randomPipePath() string {
|
func randomPipePath() string {
|
||||||
|
@ -10,7 +10,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
|
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
"golang.zx2c4.com/wireguard/rwcancel"
|
"gitea.hbanafa.com/hesham/wireguard-go/rwcancel"
|
||||||
)
|
)
|
||||||
|
|
||||||
type UAPIListener struct {
|
type UAPIListener struct {
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
|
|
||||||
"golang.org/x/sys/windows"
|
"golang.org/x/sys/windows"
|
||||||
"golang.zx2c4.com/wireguard/ipc/namedpipe"
|
"gitea.hbanafa.com/hesham/wireguard-go/ipc/namedpipe"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO: replace these with actual standard windows error numbers from the win package
|
// TODO: replace these with actual standard windows error numbers from the win package
|
||||||
|
8
main.go
8
main.go
@ -15,10 +15,10 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"gitea.hbanafa.com/hesham/wireguard-go/conn"
|
||||||
"golang.zx2c4.com/wireguard/device"
|
"gitea.hbanafa.com/hesham/wireguard-go/device"
|
||||||
"golang.zx2c4.com/wireguard/ipc"
|
"gitea.hbanafa.com/hesham/wireguard-go/ipc"
|
||||||
"golang.zx2c4.com/wireguard/tun"
|
"gitea.hbanafa.com/hesham/wireguard-go/tun"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -12,11 +12,11 @@ import (
|
|||||||
|
|
||||||
"golang.org/x/sys/windows"
|
"golang.org/x/sys/windows"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"gitea.hbanafa.com/hesham/wireguard-go/conn"
|
||||||
"golang.zx2c4.com/wireguard/device"
|
"gitea.hbanafa.com/hesham/wireguard-go/device"
|
||||||
"golang.zx2c4.com/wireguard/ipc"
|
"gitea.hbanafa.com/hesham/wireguard-go/ipc"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/tun"
|
"gitea.hbanafa.com/hesham/wireguard-go/tun"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -13,9 +13,9 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"net/netip"
|
"net/netip"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"gitea.hbanafa.com/hesham/wireguard-go/conn"
|
||||||
"golang.zx2c4.com/wireguard/device"
|
"gitea.hbanafa.com/hesham/wireguard-go/device"
|
||||||
"golang.zx2c4.com/wireguard/tun/netstack"
|
"gitea.hbanafa.com/hesham/wireguard-go/tun/netstack"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -14,9 +14,9 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"net/netip"
|
"net/netip"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"gitea.hbanafa.com/hesham/wireguard-go/conn"
|
||||||
"golang.zx2c4.com/wireguard/device"
|
"gitea.hbanafa.com/hesham/wireguard-go/device"
|
||||||
"golang.zx2c4.com/wireguard/tun/netstack"
|
"gitea.hbanafa.com/hesham/wireguard-go/tun/netstack"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -17,9 +17,9 @@ import (
|
|||||||
"golang.org/x/net/icmp"
|
"golang.org/x/net/icmp"
|
||||||
"golang.org/x/net/ipv4"
|
"golang.org/x/net/ipv4"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"gitea.hbanafa.com/hesham/wireguard-go/conn"
|
||||||
"golang.zx2c4.com/wireguard/device"
|
"gitea.hbanafa.com/hesham/wireguard-go/device"
|
||||||
"golang.zx2c4.com/wireguard/tun/netstack"
|
"gitea.hbanafa.com/hesham/wireguard-go/tun/netstack"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -22,7 +22,7 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/tun"
|
"gitea.hbanafa.com/hesham/wireguard-go/tun"
|
||||||
|
|
||||||
"golang.org/x/net/dns/dnsmessage"
|
"golang.org/x/net/dns/dnsmessage"
|
||||||
"gvisor.dev/gvisor/pkg/buffer"
|
"gvisor.dev/gvisor/pkg/buffer"
|
||||||
|
@ -13,7 +13,7 @@ import (
|
|||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"gitea.hbanafa.com/hesham/wireguard-go/conn"
|
||||||
)
|
)
|
||||||
|
|
||||||
const tcpFlagsOffset = 13
|
const tcpFlagsOffset = 13
|
||||||
|
@ -10,7 +10,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"gitea.hbanafa.com/hesham/wireguard-go/conn"
|
||||||
"gvisor.dev/gvisor/pkg/tcpip"
|
"gvisor.dev/gvisor/pkg/tcpip"
|
||||||
"gvisor.dev/gvisor/pkg/tcpip/header"
|
"gvisor.dev/gvisor/pkg/tcpip/header"
|
||||||
)
|
)
|
||||||
|
@ -18,8 +18,8 @@ import (
|
|||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"gitea.hbanafa.com/hesham/wireguard-go/conn"
|
||||||
"golang.zx2c4.com/wireguard/rwcancel"
|
"gitea.hbanafa.com/hesham/wireguard-go/rwcancel"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -11,7 +11,7 @@ import (
|
|||||||
"net/netip"
|
"net/netip"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/tun"
|
"gitea.hbanafa.com/hesham/wireguard-go/tun"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Ping(dst, src netip.Addr) []byte {
|
func Ping(dst, src netip.Addr) []byte {
|
||||||
|
Loading…
Reference in New Issue
Block a user