Files
FlClash/core/dial_socket.go
T
chen08209 2fa2f7f816 feat(core): bind the Android Core with gomobile
Changelog: Share link import and mrs rule sets
2026-10-11 12:28:52 +08:00

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))
}