mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-13 14:43:19 +00:00
safesocket: remove ConnectionStrategy (#10662)
This type seems to be a migration shim for TCP tailscaled sockets (instead of unix/windows pipes). The `port` field was never set, so it was effectively used as a string (`path` field). Remove the whole type and simplify call sites to pass the socket path directly to `safesocket.Connect`. Updates #cleanup Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
This commit is contained in:
@@ -16,11 +16,11 @@ import (
|
||||
"runtime"
|
||||
)
|
||||
|
||||
func connect(s *ConnectionStrategy) (net.Conn, error) {
|
||||
func connect(path string) (net.Conn, error) {
|
||||
if runtime.GOOS == "js" {
|
||||
return nil, errors.New("safesocket.Connect not yet implemented on js/wasm")
|
||||
}
|
||||
return net.Dial("unix", s.path)
|
||||
return net.Dial("unix", path)
|
||||
}
|
||||
|
||||
func listen(path string) (net.Listener, error) {
|
||||
|
Reference in New Issue
Block a user