2fa2f7f816
Changelog: Share link import and mrs rule sets
18 lines
266 B
Go
18 lines
266 B
Go
//go:build !android && !windows
|
|
|
|
package core
|
|
|
|
import (
|
|
"fmt"
|
|
"net"
|
|
"strconv"
|
|
)
|
|
|
|
func dial(arg string) (net.Conn, error) {
|
|
_, err := strconv.Atoi(arg)
|
|
if err != nil {
|
|
return net.Dial("unix", arg)
|
|
}
|
|
return net.Dial("tcp", fmt.Sprintf("127.0.0.1:%s", arg))
|
|
}
|