bigeagle / gohop

A VPN implemention in golang, with crypto and obfuscation in nature.
1.34k stars 193 forks source link

can not run on mac os? #13

Closed zh4n7wm closed 8 years ago

zh4n7wm commented 8 years ago

get gohop

$ go get github.com/bigeagle/gohop
package code.google.com/p/gcfg: Get https://code.google.com/p/gcfg/source/checkout?repo=: dial tcp 216.58.199.110:443: i/o timeout

fix:

diff --git a/hop/config.go b/hop/config.go
index 88eceb0..c5e0e50 100644
--- a/hop/config.go
+++ b/hop/config.go
@@ -3,7 +3,7 @@ package hop
 import (
        "errors"

-       "code.google.com/p/gcfg"
+       "gopkg.in/gcfg.v1"
 )

 // Server Config

re-run go get

$ go get github.com/bigeagle/gohop

# github.com/bigeagle/water
../water/if.go:22: undefined: createInterface
../water/if.go:22: undefined: cIFF_TAP
../water/if.go:22: undefined: cIFF_NO_PI
../water/if.go:38: undefined: createInterface
../water/if.go:38: undefined: cIFF_TUN
../water/if.go:38: undefined: cIFF_NO_PI
zh4n7wm commented 8 years ago

fixed: replace bigeagle/water with songgao/water

$ git diff | cat -
diff --git a/hop/client.go b/hop/client.go
index 98330e3..ea7a0ed 100644
--- a/hop/client.go
+++ b/hop/client.go
@@ -32,7 +32,7 @@ import (
        "syscall"
        "time"

-       "github.com/bigeagle/water"
+       "github.com/songgao/water"
 )

 var net_gateway, net_nic string
diff --git a/hop/config.go b/hop/config.go
index 88eceb0..c5e0e50 100644
--- a/hop/config.go
+++ b/hop/config.go
@@ -3,7 +3,7 @@ package hop
 import (
        "errors"

-       "code.google.com/p/gcfg"
+       "gopkg.in/gcfg.v1"
 )

 // Server Config
diff --git a/hop/iface.go b/hop/iface.go
index 5ac2e4e..3ba71aa 100644
--- a/hop/iface.go
+++ b/hop/iface.go
@@ -31,7 +31,7 @@ import (
        "strconv"
        "strings"

-       "github.com/bigeagle/water"
+       "github.com/songgao/water"
 )

 var invalidAddr = errors.New("Invalid device ip address")
diff --git a/hop/server.go b/hop/server.go
index e522762..7d82aa0 100644
--- a/hop/server.go
+++ b/hop/server.go
@@ -32,8 +32,8 @@ import (
        "syscall"
        "time"

-       "github.com/bigeagle/water"
-       "github.com/bigeagle/water/waterutil"
+       "github.com/songgao/water"
+       "github.com/songgao/water/waterutil"
 )

 // a udpPacket
bigeagle commented 8 years ago

Hi, thanks for the patch. Do you mind sending a pull request?

zh4n7wm commented 8 years ago

Hello, I've sent a pull request: https://github.com/ox0spy/gohop/commit/e68425556224a9d474b02790b21a4eeaa956ac6c

tlindquist commented 8 years ago

Do these changes mean that gohop runs on Mac now? Are any special configuration settings needed? I'd like to try it.