@@ -38,7 +38,7 @@ type Transport struct {
3838 serverAddr M.Socksaddr
3939 tlsConfig tls.Config
4040 access sync.Mutex
41- connection quic.EarlyConnection
41+ connection * quic.Conn
4242}
4343
4444func NewQUIC (ctx context.Context , logger log.ContextLogger , tag string , options option.RemoteTLSDNSServerOptions ) (adapter.DNSTransport , error ) {
@@ -88,7 +88,7 @@ func (t *Transport) Close() error {
8888
8989func (t * Transport ) Exchange (ctx context.Context , message * mDNS.Msg ) (* mDNS.Msg , error ) {
9090 var (
91- conn quic.Connection
91+ conn * quic.Conn
9292 err error
9393 response * mDNS.Msg
9494 )
@@ -110,7 +110,7 @@ func (t *Transport) Exchange(ctx context.Context, message *mDNS.Msg) (*mDNS.Msg,
110110 return nil , err
111111}
112112
113- func (t * Transport ) openConnection () (quic.EarlyConnection , error ) {
113+ func (t * Transport ) openConnection () (* quic.Conn , error ) {
114114 connection := t .connection
115115 if connection != nil && ! common .Done (connection .Context ()) {
116116 return connection , nil
@@ -139,7 +139,7 @@ func (t *Transport) openConnection() (quic.EarlyConnection, error) {
139139 return earlyConnection , nil
140140}
141141
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 ) {
143143 stream , err := conn .OpenStreamSync (ctx )
144144 if err != nil {
145145 return nil , err
0 commit comments