go-softether is a minimal proof of concept(poc) SoftEther macOS client written in Golang. It is a minimal client since,
- Only username and password authentication is supported
- Only one tcp stream is used
- No udp acceleration support yet
- No auto-reconnect when connection broken
- Only macOS is supported
- clone the repository
git clone https://github.com/march1993/go-softether.git
- copy the magic feth golang api to
goroot
make darwin_hack
# make darwin_unhack
or you can do it yourself
ln -s `pwd`/hack/darwin_syscall/syscall_darwin_hack.go $(GOROOT)/src/syscall
- make yourself a configuration file
cd cmd/vpnclient
cp config.example.json config.json
- Username: username
- HashedPassword: hashed password, you may use a helper program in
cmd/genpwdhash
- Host: server hostname
- Port: server port
- HubName: hub name
- InsecureSkipVerify: if your server hasn't a valid certificate or you don't know what it is, keep it
false
- LocalAdapterMAC: make yourself a random MAC address, it would be better to keep
5e
(SE) as the prefix
- run
go build .
sudo ./vpnclient
If you encounter problem related with SSL communication, please try add the following line in session.go
,
s.WTFWriteRaw([]byte{0, 1, 2, 3, 4})
I don't why I need it to operate on my machine, maybe it is openssl version related since there is no problem when I build softether on my own debian machine with openssl 1.1.1.