dae/component/outbound/dialer/block.go
2023-01-28 02:35:18 +08:00

21 lines
397 B
Go

/*
* SPDX-License-Identifier: AGPL-3.0-only
* Copyright (c) since 2023, mzz2017 <mzz@tuta.io>
*/
package dialer
import (
"net"
)
type blockDialer struct{}
func (*blockDialer) Dial(network string, addr string) (c net.Conn, err error) {
return nil, net.ErrClosed
}
func NewBlockDialer(option *GlobalOption) *Dialer {
return newDialer(&blockDialer{}, option, true, "block", "block", "")
}