dae/component/outbound/dialer/block.go

21 lines
397 B
Go
Raw Normal View History

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