forked from quic-go/quic-go
more the PublicHeader to the wire package
This commit is contained in:
@@ -7,8 +7,8 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/lucas-clemente/quic-go"
|
||||
"github.com/lucas-clemente/quic-go/protocol"
|
||||
"github.com/lucas-clemente/quic-go/wire"
|
||||
)
|
||||
|
||||
// Connection is a UDP connection
|
||||
@@ -165,7 +165,7 @@ func (p *QuicProxy) runProxy() error {
|
||||
atomic.AddUint64(&conn.incomingPacketCounter, 1)
|
||||
|
||||
r := bytes.NewReader(raw)
|
||||
hdr, err := quic.ParsePublicHeader(r, protocol.PerspectiveClient, protocol.VersionWhatever)
|
||||
hdr, err := wire.ParsePublicHeader(r, protocol.PerspectiveClient, protocol.VersionWhatever)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -202,7 +202,7 @@ func (p *QuicProxy) runConnection(conn *connection) error {
|
||||
|
||||
// TODO: Switch back to using the public header once Chrome properly sets the type byte.
|
||||
// r := bytes.NewReader(raw)
|
||||
// , err := quic.ParsePublicHeader(r, protocol.PerspectiveServer)
|
||||
// , err := wire.ParsePublicHeader(r, protocol.PerspectiveServer)
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
|
||||
"fmt"
|
||||
|
||||
"github.com/lucas-clemente/quic-go"
|
||||
"github.com/lucas-clemente/quic-go/protocol"
|
||||
"github.com/lucas-clemente/quic-go/wire"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
@@ -22,7 +22,7 @@ var _ = Describe("QUIC Proxy", func() {
|
||||
|
||||
makePacket := func(p protocol.PacketNumber, payload []byte) []byte {
|
||||
b := &bytes.Buffer{}
|
||||
hdr := quic.PublicHeader{
|
||||
hdr := wire.PublicHeader{
|
||||
PacketNumber: p,
|
||||
PacketNumberLen: protocol.PacketNumberLen6,
|
||||
ConnectionID: 1337,
|
||||
|
||||
Reference in New Issue
Block a user