patch_common.go 458 B

12345678910111213141516171819202122
  1. //go:build !android
  2. package dialer
  3. import (
  4. "context"
  5. "net"
  6. "net/netip"
  7. "syscall"
  8. )
  9. type SocketControl func(network, address string, conn syscall.RawConn) error
  10. var DefaultSocketHook SocketControl
  11. func dialContextHooked(ctx context.Context, network string, destination netip.Addr, port string) (net.Conn, error) {
  12. return nil, nil
  13. }
  14. func listenPacketHooked(ctx context.Context, network, address string) (net.PacketConn, error) {
  15. return nil, nil
  16. }