mirror of
https://github.com/KusakabeShi/EtherGuard-VPN.git
synced 2025-08-19 13:14:09 +02:00
rename module
This commit is contained in:
@@ -16,7 +16,7 @@ import (
|
|||||||
|
|
||||||
"golang.org/x/sys/windows"
|
"golang.org/x/sys/windows"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/conn/winrio"
|
"github.com/KusakabeSi/EtherGuardVPN/conn/winrio"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@@ -12,7 +12,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"github.com/KusakabeSi/EtherGuardVPN/conn"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ChannelBind struct {
|
type ChannelBind struct {
|
||||||
|
@@ -8,7 +8,7 @@ package device
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"github.com/KusakabeSi/EtherGuardVPN/conn"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DummyDatagram struct {
|
type DummyDatagram struct {
|
||||||
|
@@ -11,10 +11,10 @@ import (
|
|||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"github.com/KusakabeSi/EtherGuardVPN/conn"
|
||||||
"golang.zx2c4.com/wireguard/ratelimiter"
|
"github.com/KusakabeSi/EtherGuardVPN/ratelimiter"
|
||||||
"golang.zx2c4.com/wireguard/rwcancel"
|
"github.com/KusakabeSi/EtherGuardVPN/rwcancel"
|
||||||
"golang.zx2c4.com/wireguard/tun"
|
"github.com/KusakabeSi/EtherGuardVPN/tun"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Device struct {
|
type Device struct {
|
||||||
|
@@ -19,9 +19,9 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"github.com/KusakabeSi/EtherGuardVPN/conn"
|
||||||
"golang.zx2c4.com/wireguard/conn/bindtest"
|
"github.com/KusakabeSi/EtherGuardVPN/conn/bindtest"
|
||||||
"golang.zx2c4.com/wireguard/tun/tuntest"
|
"github.com/KusakabeSi/EtherGuardVPN/tun/tuntest"
|
||||||
)
|
)
|
||||||
|
|
||||||
// uapiCfg returns a string that contains cfg formatted use with IpcSet.
|
// uapiCfg returns a string that contains cfg formatted use with IpcSet.
|
||||||
|
@@ -12,7 +12,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/replay"
|
"github.com/KusakabeSi/EtherGuardVPN/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"
|
"github.com/KusakabeSi/EtherGuardVPN/tai64n"
|
||||||
)
|
)
|
||||||
|
|
||||||
type handshakeState int
|
type handshakeState int
|
||||||
|
@@ -10,8 +10,8 @@ import (
|
|||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"github.com/KusakabeSi/EtherGuardVPN/conn"
|
||||||
"golang.zx2c4.com/wireguard/tun/tuntest"
|
"github.com/KusakabeSi/EtherGuardVPN/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"
|
"github.com/KusakabeSi/EtherGuardVPN/conn"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Peer struct {
|
type Peer struct {
|
||||||
|
@@ -18,7 +18,7 @@ import (
|
|||||||
"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"
|
"github.com/KusakabeSi/EtherGuardVPN/conn"
|
||||||
)
|
)
|
||||||
|
|
||||||
type QueueHandshakeElement struct {
|
type QueueHandshakeElement struct {
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
package device
|
package device
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"github.com/KusakabeSi/EtherGuardVPN/conn"
|
||||||
"golang.zx2c4.com/wireguard/rwcancel"
|
"github.com/KusakabeSi/EtherGuardVPN/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"
|
"github.com/KusakabeSi/EtherGuardVPN/conn"
|
||||||
"golang.zx2c4.com/wireguard/rwcancel"
|
"github.com/KusakabeSi/EtherGuardVPN/rwcancel"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (device *Device) startRouteListener(bind conn.Bind) (*rwcancel.RWCancel, error) {
|
func (device *Device) startRouteListener(bind conn.Bind) (*rwcancel.RWCancel, error) {
|
||||||
|
@@ -9,7 +9,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/tun"
|
"github.com/KusakabeSi/EtherGuardVPN/tun"
|
||||||
)
|
)
|
||||||
|
|
||||||
const DefaultMTU = 1420
|
const DefaultMTU = 1420
|
||||||
|
@@ -18,7 +18,7 @@ import (
|
|||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/ipc"
|
"github.com/KusakabeSi/EtherGuardVPN/ipc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type IPCError struct {
|
type IPCError struct {
|
||||||
|
2
go.mod
2
go.mod
@@ -1,4 +1,4 @@
|
|||||||
module golang.zx2c4.com/wireguard
|
module github.com/KusakabeSi/EtherGuardVPN
|
||||||
|
|
||||||
go 1.16
|
go 1.16
|
||||||
|
|
||||||
|
@@ -10,7 +10,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
|
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
"golang.zx2c4.com/wireguard/rwcancel"
|
"github.com/KusakabeSi/EtherGuardVPN/rwcancel"
|
||||||
)
|
)
|
||||||
|
|
||||||
type UAPIListener struct {
|
type UAPIListener struct {
|
||||||
|
@@ -10,7 +10,7 @@ import (
|
|||||||
|
|
||||||
"golang.org/x/sys/windows"
|
"golang.org/x/sys/windows"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/ipc/winpipe"
|
"github.com/KusakabeSi/EtherGuardVPN/ipc/winpipe"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 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
|
||||||
|
@@ -22,7 +22,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"golang.org/x/sys/windows"
|
"golang.org/x/sys/windows"
|
||||||
"golang.zx2c4.com/wireguard/ipc/winpipe"
|
"github.com/KusakabeSi/EtherGuardVPN/ipc/winpipe"
|
||||||
)
|
)
|
||||||
|
|
||||||
func randomPipePath() string {
|
func randomPipePath() string {
|
||||||
|
8
main.go
8
main.go
@@ -15,10 +15,10 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"github.com/KusakabeSi/EtherGuardVPN/conn"
|
||||||
"golang.zx2c4.com/wireguard/device"
|
"github.com/KusakabeSi/EtherGuardVPN/device"
|
||||||
"golang.zx2c4.com/wireguard/ipc"
|
"github.com/KusakabeSi/EtherGuardVPN/ipc"
|
||||||
"golang.zx2c4.com/wireguard/tun"
|
"github.com/KusakabeSi/EtherGuardVPN/tun"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@@ -11,11 +11,11 @@ import (
|
|||||||
"os/signal"
|
"os/signal"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"github.com/KusakabeSi/EtherGuardVPN/conn"
|
||||||
"golang.zx2c4.com/wireguard/device"
|
"github.com/KusakabeSi/EtherGuardVPN/device"
|
||||||
"golang.zx2c4.com/wireguard/ipc"
|
"github.com/KusakabeSi/EtherGuardVPN/ipc"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/tun"
|
"github.com/KusakabeSi/EtherGuardVPN/tun"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@@ -13,9 +13,9 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"github.com/KusakabeSi/EtherGuardVPN/conn"
|
||||||
"golang.zx2c4.com/wireguard/device"
|
"github.com/KusakabeSi/EtherGuardVPN/device"
|
||||||
"golang.zx2c4.com/wireguard/tun/netstack"
|
"github.com/KusakabeSi/EtherGuardVPN/tun/netstack"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@@ -13,9 +13,9 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/conn"
|
"github.com/KusakabeSi/EtherGuardVPN/conn"
|
||||||
"golang.zx2c4.com/wireguard/device"
|
"github.com/KusakabeSi/EtherGuardVPN/device"
|
||||||
"golang.zx2c4.com/wireguard/tun/netstack"
|
"github.com/KusakabeSi/EtherGuardVPN/tun/netstack"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@@ -18,7 +18,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/tun"
|
"github.com/KusakabeSi/EtherGuardVPN/tun"
|
||||||
|
|
||||||
"golang.org/x/net/dns/dnsmessage"
|
"golang.org/x/net/dns/dnsmessage"
|
||||||
"gvisor.dev/gvisor/pkg/tcpip"
|
"gvisor.dev/gvisor/pkg/tcpip"
|
||||||
|
@@ -21,7 +21,7 @@ import (
|
|||||||
"golang.org/x/net/ipv6"
|
"golang.org/x/net/ipv6"
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/rwcancel"
|
"github.com/KusakabeSi/EtherGuardVPN/rwcancel"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@@ -17,7 +17,7 @@ import (
|
|||||||
|
|
||||||
"golang.org/x/sys/windows"
|
"golang.org/x/sys/windows"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/tun/wintun"
|
"github.com/KusakabeSi/EtherGuardVPN/tun/wintun"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@@ -11,7 +11,7 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/tun"
|
"github.com/KusakabeSi/EtherGuardVPN/tun"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Ping(dst, src net.IP) []byte {
|
func Ping(dst, src net.IP) []byte {
|
||||||
|
@@ -15,7 +15,7 @@ import (
|
|||||||
|
|
||||||
"golang.org/x/sys/windows"
|
"golang.org/x/sys/windows"
|
||||||
|
|
||||||
"golang.zx2c4.com/wireguard/tun/wintun/memmod"
|
"github.com/KusakabeSi/EtherGuardVPN/tun/wintun/memmod"
|
||||||
)
|
)
|
||||||
|
|
||||||
type lazyDLL struct {
|
type lazyDLL struct {
|
||||||
|
Reference in New Issue
Block a user