march1993 / go-softether

a minimal macOS SoftEther client written in Golang
GNU Affero General Public License v3.0
8 stars 0 forks source link
golang softether softether-macos-client

go-softether

go-softether is a minimal proof of concept(poc) SoftEther macOS client written in Golang. It is a minimal client since,

Get Started

  1. clone the repository

    git clone https://github.com/march1993/go-softether.git
  2. 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
  3. 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
  4. run

    go build .
    sudo ./vpnclient

Trouble shooting

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.

Reference