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

can u provide executable file on mac os? #1

Open
luckypoem opened this issue Sep 15, 2019 · 10 comments
Open

can u provide executable file on mac os? #1

luckypoem opened this issue Sep 15, 2019 · 10 comments

Comments

@luckypoem
Copy link

hi.

i ran "go get github.com/zreigz/ws-vpn",but failed.
can u provide executable file on mac os?

@zreigz
Copy link
Owner

zreigz commented Sep 16, 2019

I've never tried this on mac. Can you build from sources:

$ go build ./

@luckypoem
Copy link
Author

luckypoem commented Sep 18, 2019

it doesn't work.

and,

yudeMacBook-Air:~ brite$ cd $GOPATH
yudeMacBook-Air:gopath brite$ go get -u -v github.com/zreigz/ws-vpn
github.com/zreigz/ws-vpn (download)

cd /Users/brite/go1.10.2/go/gopath/src/github.com/zreigz/ws-vpn; git submodule update --init --recursive

No submodule mapping found in .gitmodules for path 'vendor/github.com/gorilla/websocket'
package github.com/zreigz/ws-vpn: exit status 1
yudeMacBook-Air:gopath brite$

how to fix it?tks

@zreigz
Copy link
Owner

zreigz commented Sep 18, 2019

After this command: go get -u -v github.com/zreigz/ws-vpn
you should find executable binary ws-vpn in the directory: /Users/brite/go1.10.2/go/gopath/bin/
You can try:

$ /Users/brite/go1.10.2/go/gopath/bin/ws-vpn

If not you should try to compile it:
$ cd /Users/brite/go1.10.2/go/gopath/src/github.com/zreigz/ws-vpn
$ go get github.com/gorilla/websocket
$ go build ./

@luckypoem
Copy link
Author

hi.
cd /Users/brite/go1.10.2/go/gopath/src/github.com/zreigz/ws-vpn
go get github.com/gorilla/websocket
go get github.com/scalingdata/gcfg
go get github.com/op/go-logging
go get github.com/songgao/water

then,
yudeMacBook-Air:ws-vpn brite$ go build

github.com/zreigz/ws-vpn/vpn

vpn/interface.go:40:15: undefined: water.NewTUN
yudeMacBook-Air:ws-vpn brite$ go build .

github.com/zreigz/ws-vpn/vpn

vpn/interface.go:40:15: undefined: water.NewTUN
yudeMacBook-Air:ws-vpn brite$

how to fix the "undefined: water.NewTUN"?

@zreigz
Copy link
Owner

zreigz commented Sep 18, 2019

I've added new commit. You can rebase the code try the build again.

@zreigz
Copy link
Owner

zreigz commented Sep 18, 2019

you can also execute before:

go get -u github.com/songgao/water
go get -u github.com/songgao/water/waterutil

@luckypoem
Copy link
Author

in $GOPATH/src/github.com/zreigz/ws-vpn/ ,
git pull
go build

under $GOPATH/src/github.com/zreigz/ws-vpn/ ,there generated the executable file ws-vpn,
tks

@luckypoem
Copy link
Author

hi.

yudeMacBook-Air:ws-vpn brite$ sudo ./ws-vpn -config client.ini
Password:
[19-09-18 22:21:48][INFO] using config file: client.ini
[19-09-18 22:21:48][INFO] interface %v created utun1
[19-09-18 22:21:48][INFO] ip %s link set dev utun1 up mtu 1400 qlen 100
[19-09-18 22:21:48][ERROR] Net gateway error
[19-09-18 22:21:48][ERROR] open /proc/net/route: no such file or directory
yudeMacBook-Air:ws-vpn brite$

how to fix the "open /proc/net/route: no such file or directory" issue?

@zreigz
Copy link
Owner

zreigz commented Sep 19, 2019

First, check if it's a permission problem or you don't have this file: $ sudo cat /proc/net/route

@luckypoem
Copy link
Author

hi,

actually,the concept /proc/net/route doesn't apply to mac os x.

yudeMacBook-Air:~ brite$ ip link set dev utun1 up
Executing: /usr/bin/sudo /sbin/ifconfig utun1 up
Password:
ifconfig: interface utun1 does not exist
Usage: ip link show [ DEVICE ]
ip link set dev DEVICE
[ { up | down } ]
[ address { LLADDR | factory | random } ]
[ mtu MTU ]
yudeMacBook-Air:~ brite$

how to create the interface utun1 ? it's a headache for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants