mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 21:04:02 +03:00
Use native dialer to communicate with fronting domain
This commit is contained in:
+4
-1
@@ -279,13 +279,16 @@ func (p *Proxy) doDomainFronting(ctx *streamContext, conn *connRewind) {
|
||||
p.eventStream.Send(p.ctx, NewEventDomainFronting(ctx.streamID))
|
||||
conn.Rewind()
|
||||
|
||||
frontConn, err := p.network.DialContext(ctx, "tcp", p.DomainFrontingAddress())
|
||||
nativeDialer := p.network.NativeDialer()
|
||||
fConn, err := nativeDialer.DialContext(ctx, "tcp", p.DomainFrontingAddress())
|
||||
if err != nil {
|
||||
p.logger.WarningError("cannot dial to the fronting domain", err)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
frontConn := essentials.WrapNetConn(fConn)
|
||||
|
||||
if p.domainFrontingProxyProtocol {
|
||||
frontConn = newConnProxyProtocol(ctx.clientConn, frontConn)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user