update registry
This commit is contained in:
@ -12,7 +12,7 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
registry.RegisterDialer("ftcp", NewDialer)
|
||||
registry.DialerRegistry().Register("ftcp", NewDialer)
|
||||
}
|
||||
|
||||
type ftcpDialer struct {
|
||||
|
@ -17,7 +17,7 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
registry.RegisterDialer("grpc", NewDialer)
|
||||
registry.DialerRegistry().Register("grpc", NewDialer)
|
||||
}
|
||||
|
||||
type grpcDialer struct {
|
||||
@ -119,7 +119,7 @@ func (d *grpcDialer) dial(ctx context.Context, network, addr string, opts *diale
|
||||
if err != nil {
|
||||
d.options.Logger.Error(err)
|
||||
} else {
|
||||
d.options.Logger.WithFields(map[string]interface{}{
|
||||
d.options.Logger.WithFields(map[string]any{
|
||||
"src": conn.LocalAddr().String(),
|
||||
"dst": addr,
|
||||
}).Debug("dial with dial func")
|
||||
@ -132,7 +132,7 @@ func (d *grpcDialer) dial(ctx context.Context, network, addr string, opts *diale
|
||||
if err != nil {
|
||||
d.options.Logger.Error(err)
|
||||
} else {
|
||||
d.options.Logger.WithFields(map[string]interface{}{
|
||||
d.options.Logger.WithFields(map[string]any{
|
||||
"src": conn.LocalAddr().String(),
|
||||
"dst": addr,
|
||||
}).Debugf("dial direct %s/%s", addr, network)
|
||||
|
@ -15,7 +15,7 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
registry.RegisterDialer("http2", NewDialer)
|
||||
registry.DialerRegistry().Register("http2", NewDialer)
|
||||
}
|
||||
|
||||
type http2Dialer struct {
|
||||
@ -102,7 +102,7 @@ func (d *http2Dialer) dial(ctx context.Context, network, addr string, opts *dial
|
||||
if err != nil {
|
||||
d.logger.Error(err)
|
||||
} else {
|
||||
d.logger.WithFields(map[string]interface{}{
|
||||
d.logger.WithFields(map[string]any{
|
||||
"src": conn.LocalAddr().String(),
|
||||
"dst": addr,
|
||||
}).Debug("dial with dial func")
|
||||
@ -115,7 +115,7 @@ func (d *http2Dialer) dial(ctx context.Context, network, addr string, opts *dial
|
||||
if err != nil {
|
||||
d.logger.Error(err)
|
||||
} else {
|
||||
d.logger.WithFields(map[string]interface{}{
|
||||
d.logger.WithFields(map[string]any{
|
||||
"src": conn.LocalAddr().String(),
|
||||
"dst": addr,
|
||||
}).Debugf("dial direct %s/%s", addr, network)
|
||||
|
@ -20,8 +20,8 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
registry.RegisterDialer("h2", NewTLSDialer)
|
||||
registry.RegisterDialer("h2c", NewDialer)
|
||||
registry.DialerRegistry().Register("h2", NewTLSDialer)
|
||||
registry.DialerRegistry().Register("h2c", NewDialer)
|
||||
}
|
||||
|
||||
type h2Dialer struct {
|
||||
@ -171,7 +171,7 @@ func (d *h2Dialer) dial(ctx context.Context, network, addr string, opts *dialer.
|
||||
if err != nil {
|
||||
d.logger.Error(err)
|
||||
} else {
|
||||
d.logger.WithFields(map[string]interface{}{
|
||||
d.logger.WithFields(map[string]any{
|
||||
"src": conn.LocalAddr().String(),
|
||||
"dst": addr,
|
||||
}).Debug("dial with dial func")
|
||||
@ -184,7 +184,7 @@ func (d *h2Dialer) dial(ctx context.Context, network, addr string, opts *dialer.
|
||||
if err != nil {
|
||||
d.logger.Error(err)
|
||||
} else {
|
||||
d.logger.WithFields(map[string]interface{}{
|
||||
d.logger.WithFields(map[string]any{
|
||||
"src": conn.LocalAddr().String(),
|
||||
"dst": addr,
|
||||
}).Debugf("dial direct %s/%s", addr, network)
|
||||
|
@ -14,8 +14,8 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
registry.RegisterDialer("http3", NewDialer)
|
||||
registry.RegisterDialer("h3", NewDialer)
|
||||
registry.DialerRegistry().Register("http3", NewDialer)
|
||||
registry.DialerRegistry().Register("h3", NewDialer)
|
||||
}
|
||||
|
||||
type http3Dialer struct {
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
registry.RegisterDialer("kcp", NewDialer)
|
||||
registry.DialerRegistry().Register("kcp", NewDialer)
|
||||
}
|
||||
|
||||
type kcpDialer struct {
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
registry.RegisterDialer("ohttp", NewDialer)
|
||||
registry.DialerRegistry().Register("ohttp", NewDialer)
|
||||
}
|
||||
|
||||
type obfsHTTPDialer struct {
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
registry.RegisterDialer("otls", NewDialer)
|
||||
registry.DialerRegistry().Register("otls", NewDialer)
|
||||
}
|
||||
|
||||
type obfsTLSDialer struct {
|
||||
|
@ -14,8 +14,8 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
registry.RegisterDialer("pht", NewDialer)
|
||||
registry.RegisterDialer("phts", NewTLSDialer)
|
||||
registry.DialerRegistry().Register("pht", NewDialer)
|
||||
registry.DialerRegistry().Register("phts", NewTLSDialer)
|
||||
}
|
||||
|
||||
type phtDialer struct {
|
||||
|
@ -16,7 +16,7 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
registry.RegisterDialer("quic", NewDialer)
|
||||
registry.DialerRegistry().Register("quic", NewDialer)
|
||||
}
|
||||
|
||||
type quicDialer struct {
|
||||
|
@ -16,7 +16,7 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
registry.RegisterDialer("ssh", NewDialer)
|
||||
registry.DialerRegistry().Register("ssh", NewDialer)
|
||||
}
|
||||
|
||||
type sshDialer struct {
|
||||
@ -141,7 +141,7 @@ func (d *sshDialer) dial(ctx context.Context, network, addr string, opts *dialer
|
||||
if err != nil {
|
||||
d.logger.Error(err)
|
||||
} else {
|
||||
d.logger.WithFields(map[string]interface{}{
|
||||
d.logger.WithFields(map[string]any{
|
||||
"src": conn.LocalAddr().String(),
|
||||
"dst": addr,
|
||||
}).Debug("dial with dial func")
|
||||
@ -154,7 +154,7 @@ func (d *sshDialer) dial(ctx context.Context, network, addr string, opts *dialer
|
||||
if err != nil {
|
||||
d.logger.Error(err)
|
||||
} else {
|
||||
d.logger.WithFields(map[string]interface{}{
|
||||
d.logger.WithFields(map[string]any{
|
||||
"src": conn.LocalAddr().String(),
|
||||
"dst": addr,
|
||||
}).Debugf("dial direct %s/%s", addr, network)
|
||||
|
@ -15,7 +15,7 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
registry.RegisterDialer("sshd", NewDialer)
|
||||
registry.DialerRegistry().Register("sshd", NewDialer)
|
||||
}
|
||||
|
||||
type sshdDialer struct {
|
||||
@ -138,7 +138,7 @@ func (d *sshdDialer) dial(ctx context.Context, network, addr string, opts *diale
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
} else {
|
||||
log.WithFields(map[string]interface{}{
|
||||
log.WithFields(map[string]any{
|
||||
"src": conn.LocalAddr().String(),
|
||||
"dst": addr,
|
||||
}).Debug("dial with dial func")
|
||||
@ -151,7 +151,7 @@ func (d *sshdDialer) dial(ctx context.Context, network, addr string, opts *diale
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
} else {
|
||||
log.WithFields(map[string]interface{}{
|
||||
log.WithFields(map[string]any{
|
||||
"src": conn.LocalAddr().String(),
|
||||
"dst": addr,
|
||||
}).Debugf("dial direct %s/%s", addr, network)
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
registry.RegisterDialer("tcp", NewDialer)
|
||||
registry.DialerRegistry().Register("tcp", NewDialer)
|
||||
}
|
||||
|
||||
type tcpDialer struct {
|
||||
|
@ -13,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
registry.RegisterDialer("tls", NewDialer)
|
||||
registry.DialerRegistry().Register("tls", NewDialer)
|
||||
}
|
||||
|
||||
type tlsDialer struct {
|
||||
|
@ -16,7 +16,7 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
registry.RegisterDialer("mtls", NewDialer)
|
||||
registry.DialerRegistry().Register("mtls", NewDialer)
|
||||
}
|
||||
|
||||
type mtlsDialer struct {
|
||||
@ -129,7 +129,7 @@ func (d *mtlsDialer) dial(ctx context.Context, network, addr string, opts *diale
|
||||
if err != nil {
|
||||
d.logger.Error(err)
|
||||
} else {
|
||||
d.logger.WithFields(map[string]interface{}{
|
||||
d.logger.WithFields(map[string]any{
|
||||
"src": conn.LocalAddr().String(),
|
||||
"dst": addr,
|
||||
}).Debug("dial with dial func")
|
||||
@ -142,7 +142,7 @@ func (d *mtlsDialer) dial(ctx context.Context, network, addr string, opts *diale
|
||||
if err != nil {
|
||||
d.logger.Error(err)
|
||||
} else {
|
||||
d.logger.WithFields(map[string]interface{}{
|
||||
d.logger.WithFields(map[string]any{
|
||||
"src": conn.LocalAddr().String(),
|
||||
"dst": addr,
|
||||
}).Debugf("dial direct %s/%s", addr, network)
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
registry.RegisterDialer("udp", NewDialer)
|
||||
registry.DialerRegistry().Register("udp", NewDialer)
|
||||
}
|
||||
|
||||
type udpDialer struct {
|
||||
|
@ -15,8 +15,8 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
registry.RegisterDialer("ws", NewDialer)
|
||||
registry.RegisterDialer("wss", NewTLSDialer)
|
||||
registry.DialerRegistry().Register("ws", NewDialer)
|
||||
registry.DialerRegistry().Register("wss", NewTLSDialer)
|
||||
}
|
||||
|
||||
type wsDialer struct {
|
||||
|
@ -18,8 +18,8 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
registry.RegisterDialer("mws", NewDialer)
|
||||
registry.RegisterDialer("mwss", NewTLSDialer)
|
||||
registry.DialerRegistry().Register("mws", NewDialer)
|
||||
registry.DialerRegistry().Register("mwss", NewTLSDialer)
|
||||
}
|
||||
|
||||
type mwsDialer struct {
|
||||
@ -150,7 +150,7 @@ func (d *mwsDialer) dial(ctx context.Context, network, addr string, opts *dialer
|
||||
if err != nil {
|
||||
d.logger.Error(err)
|
||||
} else {
|
||||
d.logger.WithFields(map[string]interface{}{
|
||||
d.logger.WithFields(map[string]any{
|
||||
"src": conn.LocalAddr().String(),
|
||||
"dst": addr,
|
||||
}).Debug("dial with dial func")
|
||||
@ -163,7 +163,7 @@ func (d *mwsDialer) dial(ctx context.Context, network, addr string, opts *dialer
|
||||
if err != nil {
|
||||
d.logger.Error(err)
|
||||
} else {
|
||||
d.logger.WithFields(map[string]interface{}{
|
||||
d.logger.WithFields(map[string]any{
|
||||
"src": conn.LocalAddr().String(),
|
||||
"dst": addr,
|
||||
}).Debugf("dial direct %s/%s", addr, network)
|
||||
|
Reference in New Issue
Block a user