Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wireguard: move wireguard code to wireguard dir #35

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion conn/bind_windows.go → wireguard/conn/bind_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

"golang.org/x/sys/windows"

"github.com/bepass-org/wireguard-go/conn/winrio"
"github.com/bepass-org/wireguard-go/wireguard/conn/winrio"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"net/netip"
"os"

"github.com/bepass-org/wireguard-go/conn"
"github.com/bepass-org/wireguard-go/wireguard/conn"
)

type ChannelBind struct {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion device/bind_test.go → wireguard/device/bind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package device
import (
"errors"

"github.com/bepass-org/wireguard-go/conn"
"github.com/bepass-org/wireguard-go/wireguard/conn"
)

type DummyDatagram struct {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions device/device.go → wireguard/device/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"sync/atomic"
"time"

"github.com/bepass-org/wireguard-go/conn"
"github.com/bepass-org/wireguard-go/ratelimiter"
"github.com/bepass-org/wireguard-go/rwcancel"
"github.com/bepass-org/wireguard-go/tun"
"github.com/bepass-org/wireguard-go/wireguard/conn"
"github.com/bepass-org/wireguard-go/wireguard/ratelimiter"
"github.com/bepass-org/wireguard-go/wireguard/rwcancel"
"github.com/bepass-org/wireguard-go/wireguard/tun"
)

type Device struct {
Expand Down
8 changes: 4 additions & 4 deletions device/device_test.go → wireguard/device/device_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (
"testing"
"time"

"github.com/bepass-org/wireguard-go/conn"
"github.com/bepass-org/wireguard-go/conn/bindtest"
"github.com/bepass-org/wireguard-go/tun"
"github.com/bepass-org/wireguard-go/tun/tuntest"
"github.com/bepass-org/wireguard-go/wireguard/conn"
"github.com/bepass-org/wireguard-go/wireguard/conn/bindtest"
"github.com/bepass-org/wireguard-go/wireguard/tun"
"github.com/bepass-org/wireguard-go/wireguard/tun/tuntest"
)

// uapiCfg returns a string that contains cfg formatted use with IpcSet.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion device/keypair.go → wireguard/device/keypair.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"sync/atomic"
"time"

"github.com/bepass-org/wireguard-go/replay"
"github.com/bepass-org/wireguard-go/wireguard/replay"
)

/* Due to limitations in Go and /x/crypto there is currently
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"golang.org/x/crypto/chacha20poly1305"
"golang.org/x/crypto/poly1305"

"github.com/bepass-org/wireguard-go/tai64n"
"github.com/bepass-org/wireguard-go/wireguard/tai64n"
)

type handshakeState int
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions device/noise_test.go → wireguard/device/noise_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"encoding/binary"
"testing"

"github.com/bepass-org/wireguard-go/conn"
"github.com/bepass-org/wireguard-go/tun/tuntest"
"github.com/bepass-org/wireguard-go/wireguard/conn"
"github.com/bepass-org/wireguard-go/wireguard/tun/tuntest"
)

func TestCurveWrappers(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion device/peer.go → wireguard/device/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"sync/atomic"
"time"

"github.com/bepass-org/wireguard-go/conn"
"github.com/bepass-org/wireguard-go/wireguard/conn"
)

type Peer struct {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

package device

import "github.com/bepass-org/wireguard-go/conn"
import "github.com/bepass-org/wireguard-go/wireguard/conn"

/* Reduce memory consumption for Android */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

package device

import "github.com/bepass-org/wireguard-go/conn"
import "github.com/bepass-org/wireguard-go/wireguard/conn"

const (
QueueStagedSize = conn.IdealBatchSize
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion device/receive.go → wireguard/device/receive.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"sync"
"time"

"github.com/bepass-org/wireguard-go/conn"
"github.com/bepass-org/wireguard-go/wireguard/conn"
"golang.org/x/crypto/chacha20poly1305"
"golang.org/x/net/ipv4"
"golang.org/x/net/ipv6"
Expand Down
4 changes: 2 additions & 2 deletions device/send.go → wireguard/device/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"sync"
"time"

"github.com/bepass-org/wireguard-go/conn"
"github.com/bepass-org/wireguard-go/tun"
"github.com/bepass-org/wireguard-go/wireguard/conn"
"github.com/bepass-org/wireguard-go/wireguard/tun"
"golang.org/x/crypto/chacha20poly1305"
"golang.org/x/net/ipv4"
"golang.org/x/net/ipv6"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
package device

import (
"github.com/bepass-org/wireguard-go/conn"
"github.com/bepass-org/wireguard-go/rwcancel"
"github.com/bepass-org/wireguard-go/wireguard/conn"
"github.com/bepass-org/wireguard-go/wireguard/rwcancel"
)

func (device *Device) startRouteListener(bind conn.Bind) (*rwcancel.RWCancel, error) {
Expand Down
4 changes: 2 additions & 2 deletions device/sticky_linux.go → wireguard/device/sticky_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (

"golang.org/x/sys/unix"

"github.com/bepass-org/wireguard-go/conn"
"github.com/bepass-org/wireguard-go/rwcancel"
"github.com/bepass-org/wireguard-go/wireguard/conn"
"github.com/bepass-org/wireguard-go/wireguard/rwcancel"
)

func (device *Device) startRouteListener(bind conn.Bind) (*rwcancel.RWCancel, error) {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion device/tun.go → wireguard/device/tun.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package device
import (
"fmt"

"github.com/bepass-org/wireguard-go/tun"
"github.com/bepass-org/wireguard-go/wireguard/tun"
)

const DefaultMTU = 1420
Expand Down
2 changes: 1 addition & 1 deletion device/uapi.go → wireguard/device/uapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"sync"
"time"

"github.com/bepass-org/wireguard-go/ipc"
"github.com/bepass-org/wireguard-go/wireguard/ipc"
)

type IPCError struct {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"testing"
"time"

"github.com/bepass-org/wireguard-go/ipc/namedpipe"
"github.com/bepass-org/wireguard-go/wireguard/ipc/namedpipe"
"golang.org/x/sys/windows"
)

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion ipc/uapi_linux.go → wireguard/ipc/uapi_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"net"
"os"

"github.com/bepass-org/wireguard-go/rwcancel"
"github.com/bepass-org/wireguard-go/wireguard/rwcancel"
"golang.org/x/sys/unix"
)

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion ipc/uapi_windows.go → wireguard/ipc/uapi_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package ipc
import (
"net"

"github.com/bepass-org/wireguard-go/ipc/namedpipe"
"github.com/bepass-org/wireguard-go/wireguard/ipc/namedpipe"
"golang.org/x/sys/windows"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"net/http"
"net/netip"

"github.com/bepass-org/wireguard-go/conn"
"github.com/bepass-org/wireguard-go/device"
"github.com/bepass-org/wireguard-go/tun/netstack"
"github.com/bepass-org/wireguard-go/wireguard/conn"
"github.com/bepass-org/wireguard-go/wireguard/device"
"github.com/bepass-org/wireguard-go/wireguard/tun/netstack"
)

func main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
"net/http"
"net/netip"

"github.com/bepass-org/wireguard-go/conn"
"github.com/bepass-org/wireguard-go/device"
"github.com/bepass-org/wireguard-go/tun/netstack"
"github.com/bepass-org/wireguard-go/wireguard/conn"
"github.com/bepass-org/wireguard-go/wireguard/device"
"github.com/bepass-org/wireguard-go/wireguard/tun/netstack"
)

func main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import (
"golang.org/x/net/icmp"
"golang.org/x/net/ipv4"

"github.com/bepass-org/wireguard-go/conn"
"github.com/bepass-org/wireguard-go/device"
"github.com/bepass-org/wireguard-go/tun/netstack"
"github.com/bepass-org/wireguard-go/wireguard/conn"
"github.com/bepass-org/wireguard-go/wireguard/device"
"github.com/bepass-org/wireguard-go/wireguard/tun/netstack"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion tun/netstack/tun.go → wireguard/tun/netstack/tun.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"syscall"
"time"

"github.com/bepass-org/wireguard-go/tun"
"github.com/bepass-org/wireguard-go/wireguard/tun"

"golang.org/x/net/dns/dnsmessage"
"gvisor.dev/gvisor/pkg/buffer"
Expand Down
2 changes: 1 addition & 1 deletion tun/offload_linux.go → wireguard/tun/offload_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"io"
"unsafe"

"github.com/bepass-org/wireguard-go/conn"
"github.com/bepass-org/wireguard-go/wireguard/conn"
"golang.org/x/sys/unix"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"net/netip"
"testing"

"github.com/bepass-org/wireguard-go/conn"
"github.com/bepass-org/wireguard-go/wireguard/conn"
"golang.org/x/sys/unix"
"gvisor.dev/gvisor/pkg/tcpip"
"gvisor.dev/gvisor/pkg/tcpip/header"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tun/tun_linux.go → wireguard/tun/tun_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"time"
"unsafe"

"github.com/bepass-org/wireguard-go/conn"
"github.com/bepass-org/wireguard-go/rwcancel"
"github.com/bepass-org/wireguard-go/wireguard/conn"
"github.com/bepass-org/wireguard-go/wireguard/rwcancel"
"golang.org/x/sys/unix"
)

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"net/netip"
"os"

"github.com/bepass-org/wireguard-go/tun"
"github.com/bepass-org/wireguard-go/wireguard/tun"
)

func Ping(dst, src netip.Addr) []byte {
Expand Down
4 changes: 2 additions & 2 deletions wiresocks/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

"github.com/bepass-org/proxy/pkg/mixed"
"github.com/bepass-org/proxy/pkg/statute"
"github.com/bepass-org/wireguard-go/device"
"github.com/bepass-org/wireguard-go/tun/netstack"
"github.com/bepass-org/wireguard-go/wireguard/device"
"github.com/bepass-org/wireguard-go/wireguard/tun/netstack"
)

// VirtualTun stores a reference to netstack network and DNS configuration
Expand Down
6 changes: 3 additions & 3 deletions wiresocks/wiresocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"fmt"
"net/netip"

"github.com/bepass-org/wireguard-go/conn"
"github.com/bepass-org/wireguard-go/device"
"github.com/bepass-org/wireguard-go/tun/netstack"
"github.com/bepass-org/wireguard-go/wireguard/conn"
"github.com/bepass-org/wireguard-go/wireguard/device"
"github.com/bepass-org/wireguard-go/wireguard/tun/netstack"
)

// DeviceSetting contains the parameters for setting up a tun interface
Expand Down
Loading