@@ -38,7 +38,7 @@ type Transport struct {
38
38
serverAddr M.Socksaddr
39
39
tlsConfig tls.Config
40
40
access sync.Mutex
41
- connection quic.EarlyConnection
41
+ connection * quic.Conn
42
42
}
43
43
44
44
func NewQUIC (ctx context.Context , logger log.ContextLogger , tag string , options option.RemoteTLSDNSServerOptions ) (adapter.DNSTransport , error ) {
@@ -88,7 +88,7 @@ func (t *Transport) Close() error {
88
88
89
89
func (t * Transport ) Exchange (ctx context.Context , message * mDNS.Msg ) (* mDNS.Msg , error ) {
90
90
var (
91
- conn quic.Connection
91
+ conn * quic.Conn
92
92
err error
93
93
response * mDNS.Msg
94
94
)
@@ -110,7 +110,7 @@ func (t *Transport) Exchange(ctx context.Context, message *mDNS.Msg) (*mDNS.Msg,
110
110
return nil , err
111
111
}
112
112
113
- func (t * Transport ) openConnection () (quic.EarlyConnection , error ) {
113
+ func (t * Transport ) openConnection () (* quic.Conn , error ) {
114
114
connection := t .connection
115
115
if connection != nil && ! common .Done (connection .Context ()) {
116
116
return connection , nil
@@ -139,7 +139,7 @@ func (t *Transport) openConnection() (quic.EarlyConnection, error) {
139
139
return earlyConnection , nil
140
140
}
141
141
142
- func (t * Transport ) exchange (ctx context.Context , message * mDNS.Msg , conn quic.Connection ) (* mDNS.Msg , error ) {
142
+ func (t * Transport ) exchange (ctx context.Context , message * mDNS.Msg , conn * quic.Conn ) (* mDNS.Msg , error ) {
143
143
stream , err := conn .OpenStreamSync (ctx )
144
144
if err != nil {
145
145
return nil , err
0 commit comments