mirror of
https://github.com/daeuniverse/dae.git
synced 2025-08-03 16:49:59 +07:00
feat: add config_parser
This commit is contained in:
21
component/outbound/dialer/block.go
Normal file
21
component/outbound/dialer/block.go
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
* Copyright (c) since 2023, mzz2017 (mzz@tuta.io). All rights reserved.
|
||||
*/
|
||||
|
||||
package dialer
|
||||
|
||||
import (
|
||||
"github.com/sirupsen/logrus"
|
||||
"net"
|
||||
)
|
||||
|
||||
type blockDialer struct{}
|
||||
|
||||
func (*blockDialer) Dial(network string, addr string) (c net.Conn, err error) {
|
||||
return nil, net.ErrClosed
|
||||
}
|
||||
|
||||
func NewBlockDialer(log *logrus.Logger) *Dialer {
|
||||
return newDialer(&blockDialer{}, log, true, "block", "block", "")
|
||||
}
|
Reference in New Issue
Block a user