mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-12-23 07:35:39 +00:00
Don't use 0-RTT for QUIC
This commit is contained in:
parent
0d676c6a3b
commit
39c4b24395
@ -24,7 +24,7 @@ type linkQUICStream struct {
|
||||
}
|
||||
|
||||
type linkQUICListener struct {
|
||||
*quic.EarlyListener
|
||||
*quic.Listener
|
||||
ch <-chan *linkQUICStream
|
||||
}
|
||||
|
||||
@ -50,11 +50,11 @@ func (l *links) newLinkQUIC() *linkQUIC {
|
||||
}
|
||||
|
||||
func (l *linkQUIC) dial(ctx context.Context, url *url.URL, info linkInfo, options linkOptions) (net.Conn, error) {
|
||||
qc, err := quic.DialAddrEarly(ctx, url.Host, l.tlsconfig, l.quicconfig)
|
||||
qc, err := quic.DialAddr(ctx, url.Host, l.tlsconfig, l.quicconfig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
qs, err := qc.OpenStream()
|
||||
qs, err := qc.OpenStreamSync(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -65,13 +65,13 @@ func (l *linkQUIC) dial(ctx context.Context, url *url.URL, info linkInfo, option
|
||||
}
|
||||
|
||||
func (l *linkQUIC) listen(ctx context.Context, url *url.URL, _ string) (net.Listener, error) {
|
||||
ql, err := quic.ListenAddrEarly(url.Host, l.tlsconfig, l.quicconfig)
|
||||
ql, err := quic.ListenAddr(url.Host, l.tlsconfig, l.quicconfig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ch := make(chan *linkQUICStream)
|
||||
lql := &linkQUICListener{
|
||||
EarlyListener: ql,
|
||||
Listener: ql,
|
||||
ch: ch,
|
||||
}
|
||||
go func() {
|
||||
|
Loading…
Reference in New Issue
Block a user