moby / vpnkit

A toolkit for embedding VPN capabilities in your application
Apache License 2.0
1.1k stars 187 forks source link

transport: work around Unix socket path lengths on Darwin #506

Closed djs55 closed 4 years ago

djs55 commented 4 years ago

On Darwin a Unix socket path can only be 104 bytes long. We use long paths when talking to hyperkit (~/Library/Containers/com.docker.docker/...) so we often hit this limit if the user has a long username.

A common workaround is to chdir into the ~/Library/Containers/com.docker.docker folder (as would happen naturally if running in a macOS sandbox) and then use relative paths.

This patch checks the path lengths and constructs a relative path if necessary.

Signed-off-by: David Scott dave@recoil.org

djs55 commented 4 years ago

Sadly yes appveyor and circleci are broken :( The good news is that travis tests the Go code 😅