mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-06-07 03:34:57 +03:00
Add grpc compatibility test
This commit is contained in:
@@ -145,15 +145,15 @@ func (h *Trojan) Close() error {
|
||||
)
|
||||
}
|
||||
|
||||
func (h *Trojan) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error {
|
||||
if h.tlsConfig != nil {
|
||||
conn = tls.Server(conn, h.tlsConfig.Config())
|
||||
}
|
||||
return h.service.NewConnection(adapter.WithContext(log.ContextWithNewID(ctx), &metadata), conn, adapter.UpstreamMetadata(metadata))
|
||||
func (h *Trojan) newTransportConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error {
|
||||
h.injectTCP(conn)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (h *Trojan) newTransportConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error {
|
||||
metadata = h.createMetadata(conn, metadata)
|
||||
func (h *Trojan) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error {
|
||||
if h.tlsConfig != nil && h.transport == nil {
|
||||
conn = tls.Server(conn, h.tlsConfig.Config())
|
||||
}
|
||||
return h.service.NewConnection(adapter.WithContext(log.ContextWithNewID(ctx), &metadata), conn, adapter.UpstreamMetadata(metadata))
|
||||
}
|
||||
|
||||
|
||||
@@ -125,15 +125,15 @@ func (h *VMess) Close() error {
|
||||
)
|
||||
}
|
||||
|
||||
func (h *VMess) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error {
|
||||
if h.tlsConfig != nil {
|
||||
conn = tls.Server(conn, h.tlsConfig.Config())
|
||||
}
|
||||
return h.service.NewConnection(adapter.WithContext(log.ContextWithNewID(ctx), &metadata), conn, adapter.UpstreamMetadata(metadata))
|
||||
func (h *VMess) newTransportConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error {
|
||||
h.injectTCP(conn)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (h *VMess) newTransportConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error {
|
||||
metadata = h.createMetadata(conn, metadata)
|
||||
func (h *VMess) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error {
|
||||
if h.tlsConfig != nil && h.transport == nil {
|
||||
conn = tls.Server(conn, h.tlsConfig.Config())
|
||||
}
|
||||
return h.service.NewConnection(adapter.WithContext(log.ContextWithNewID(ctx), &metadata), conn, adapter.UpstreamMetadata(metadata))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user