Skip to content

Commit

Permalink
Add go 1.20 support (#23)
Browse files Browse the repository at this point in the history
* Add go 1.20 support

Also drop go1.18 support.
Add test for Draft27 version (Facebook)
* [chore] update github tests
  • Loading branch information
jsimonetti authored Apr 17, 2023
1 parent d8a7e2f commit bbbb0bf
Show file tree
Hide file tree
Showing 11 changed files with 239 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
name: Test Linux Integration
strategy:
matrix:
go-version: [1.18.x, 1.19.x]
go-version: [1.19.x, 1.20.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
module github.com/jsimonetti/sniqueue

go 1.18
go 1.19

require (
github.com/Lochnair/go-patricia v2.3.3+incompatible
github.com/florianl/go-nfqueue v1.3.1
github.com/google/go-cmp v0.5.9
github.com/marten-seemann/qtls-go1-18 v0.1.4
github.com/marten-seemann/qtls-go1-19 v0.1.2
github.com/quic-go/qtls-go1-19 v0.3.2
github.com/quic-go/qtls-go1-20 v0.2.2
github.com/shomali11/util v0.0.0-20200329021417-91c54758c87b
golang.org/x/crypto v0.8.0
golang.org/x/crypto v0.4.0
)

require (
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/josharian/native v1.0.0 h1:Ts/E8zCSEsG17dUqv7joXJFybuMLjQfWE04tsBODTxk=
github.com/josharian/native v1.0.0/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w=
github.com/marten-seemann/qtls-go1-18 v0.1.4 h1:ogomB+lWV3Vmwiu6RTwDVTMGx+9j7SEi98e8QB35Its=
github.com/marten-seemann/qtls-go1-18 v0.1.4/go.mod h1:mJttiymBAByA49mhlNZZGrH5u1uXYZJ+RW28Py7f4m4=
github.com/marten-seemann/qtls-go1-19 v0.1.2 h1:ZevAEqKXH0bZmoOBPiqX2h5rhQ7cbZi+X+rlq2JUbCE=
github.com/marten-seemann/qtls-go1-19 v0.1.2/go.mod h1:5HTDWtVudo/WFsHKRNuOhWlbdjrfs5JHrYb0wIJqGpI=
github.com/mdlayher/netlink v1.6.0 h1:rOHX5yl7qnlpiVkFWoqccueppMtXzeziFjWAjLg6sz0=
github.com/mdlayher/netlink v1.6.0/go.mod h1:0o3PlBmGst1xve7wQ7j/hwpNaFaH4qCRyWCdcZk8/vA=
github.com/mdlayher/socket v0.1.1 h1:q3uOGirUPfAV2MUoaC7BavjQ154J7+JOkTWyiV+intI=
Expand All @@ -24,13 +20,17 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/quic-go/qtls-go1-19 v0.3.2 h1:tFxjCFcTQzK+oMxG6Zcvp4Dq8dx4yD3dDiIiyc86Z5U=
github.com/quic-go/qtls-go1-19 v0.3.2/go.mod h1:ySOI96ew8lnoKPtSqx2BlI5wCpUVPT05RMAlajtnyOI=
github.com/quic-go/qtls-go1-20 v0.2.2 h1:WLOPx6OY/hxtTxKV1Zrq20FtXtDEkeY00CGQm8GEa3E=
github.com/quic-go/qtls-go1-20 v0.2.2/go.mod h1:JKtK6mjbAVcUTN/9jZpvLbGxvdWIKS8uT7EiStoU1SM=
github.com/shomali11/parallelizer v0.0.0-20180607005021-e11813c22f20/go.mod h1:HjzvRHgN5PGptIqjrdutIoZq4uCAemBTm/bGgnNLGiY=
github.com/shomali11/util v0.0.0-20200329021417-91c54758c87b h1:vtWV9/bCF2tgRxv1R/tEENMwJaR8bXNhUimLMSUMVXw=
github.com/shomali11/util v0.0.0-20200329021417-91c54758c87b/go.mod h1:89COV+EXrLrwQBk6nTUtYS5qVvTa2R0UMWSvUpHaX0Y=
github.com/stretchr/testify v1.2.1 h1:52QO5WkIUcHGIR7EnGagH88x1bUzqGXTC5/1bDTUQ7U=
github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ=
golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE=
golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8=
golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80=
golang.org/x/net v0.0.0-20210928044308-7d9f5e0b762b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM=
Expand Down
116 changes: 116 additions & 0 deletions internal/parse/quic/header_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
package quic

import (
"bytes"
"testing"

"github.com/google/go-cmp/cmp"
)

func TestParseHeader(t *testing.T) {
tests := []struct {
name string
b *bytes.Reader
want *Header
wantErr bool
}{
{
name: "Draft27 Facebook",
b: bytes.NewReader([]byte{
0xc6, 0xfa, 0xce, 0xb0, 0x02, 0x08, 0x4a, 0xaf, 0x2d, 0x9e, 0xdd, 0xac, 0x80, 0x59, 0x00, 0x00,
0x44, 0xbe, 0x9d, 0x71, 0x8b, 0xa7, 0x87, 0xb4, 0x29, 0x41, 0x49, 0x5b, 0x61, 0x9d, 0xef, 0xec,
0x2f, 0x8b, 0x23, 0x8e, 0x2b, 0xba, 0x22, 0x1c, 0x43, 0x24, 0x61, 0xaf, 0x1f, 0x3a, 0x0f, 0x47,
0xa0, 0x44, 0xea, 0x3a, 0x5f, 0x7c, 0x09, 0xbe, 0x80, 0x5f, 0xdf, 0x7c, 0xe8, 0x7a, 0xd1, 0x3c,
0x61, 0xc1, 0x71, 0x3f, 0x7b, 0x01, 0x27, 0x7b, 0x7c, 0x83, 0xc0, 0x12, 0xeb, 0x62, 0xae, 0x51,
0x64, 0x08, 0xb0, 0x7b, 0x14, 0xe9, 0x52, 0x2c, 0x1c, 0x0d, 0x5d, 0x21, 0x8f, 0xcc, 0x2e, 0xff,
0x7c, 0xf0, 0x89, 0x78, 0xbe, 0x54, 0x89, 0xf3, 0x13, 0x9d, 0x1b, 0xb1, 0x22, 0xba, 0x04, 0xc3,
0x47, 0xcb, 0xd3, 0xbb, 0x99, 0x0c, 0x3d, 0x1b, 0xfd, 0xae, 0x3d, 0x44, 0x30, 0x92, 0x4a, 0xce,
0x96, 0x20, 0x7e, 0x35, 0x6e, 0x25, 0x07, 0x7e, 0x34, 0x93, 0xcb, 0xb0, 0xde, 0x4a, 0xf1, 0xf2,
0xdf, 0xd6, 0x99, 0xfe, 0x54, 0x10, 0x9b, 0x3a, 0x26, 0x4a, 0x16, 0x4c, 0x19, 0x58, 0x77, 0xca,
0xa0, 0xa4, 0x96, 0x5f, 0xd4, 0xba, 0xc7, 0xb1, 0x6e, 0x60, 0x6b, 0x6c, 0xb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, 0x8f, 0x41, 0x72,
0x91, 0x17, 0x74, 0x75, 0x3d, 0xd6, 0xab, 0xb2, 0x5f, 0x38, 0x46, 0x05, 0x38, 0xc1, 0x7a, 0x53,
0xe0, 0xfa, 0x37, 0x58, 0xbc, 0xfa, 0xf5, 0x25, 0x07, 0x02, 0x43, 0x59, 0x75, 0x01, 0x2c, 0x12,
0xcf, 0xa7, 0x53, 0x4c, 0xd8, 0x87, 0x10, 0xd9, 0x22, 0x28, 0xfa, 0x49, 0x27, 0x45, 0xca, 0x29,
0xf5, 0x52, 0x9e, 0x6a, 0xa7, 0xd4, 0x01, 0x40, 0x8c, 0x45, 0xc0, 0x81, 0xac, 0x41, 0x9e, 0x3d,
0x00, 0xd5, 0x5f, 0x48, 0xae, 0x64, 0x23, 0x0c, 0xb7, 0x29, 0x0b, 0x26, 0x92, 0xab, 0xb5, 0xfa,
0x92, 0x4e, 0xb6, 0xe5, 0xf2, 0x36, 0x05, 0xf0, 0xab, 0x00, 0x16, 0x67, 0x7f, 0x99, 0x18, 0xba,
0x93, 0x47, 0x95, 0x01, 0xf4, 0x15, 0x2a, 0x04, 0xad, 0xf0, 0x0a, 0x9c, 0x70, 0xdb, 0x25, 0x1d,
0xdb, 0xf7, 0x04, 0x34, 0x67, 0xee, 0xec, 0xc0, 0xbd, 0x7e, 0x81, 0x54, 0x8a, 0xd9, 0x34, 0x29,
0x38, 0xc3, 0xd1, 0x14, 0x1d, 0xb3, 0x28, 0x23, 0xa1, 0xf6, 0x71, 0x52, 0x04, 0x14, 0xd3, 0xda,
0x98, 0x26, 0x4e, 0x87, 0xd8, 0xc8, 0x84, 0x91, 0x50, 0xb9, 0x35, 0x83, 0x43, 0x57, 0x58, 0x6f,
0x24, 0x53, 0x2c, 0x6f, 0xd2, 0x3f, 0x47, 0x7a, 0x3d, 0x92, 0xf5, 0x2f, 0x07, 0x01, 0x77, 0x2c,
0xe2, 0xf9, 0x6f, 0xb7, 0x38, 0x79, 0x4d, 0xd5, 0x5c, 0xb2, 0xec, 0xfa, 0xb9, 0x82, 0xc1, 0xde,
0x5a, 0xb8, 0x8c, 0x74, 0x32, 0x49, 0x53, 0xa0, 0xfe, 0x8d, 0x0b, 0x86, 0x56, 0x60, 0x90, 0x10,
0x27, 0x1f, 0x4a, 0x19, 0x99, 0xfe, 0x3e, 0x8b, 0xdf, 0x6d, 0x29, 0x3a, 0xbe, 0x7e, 0xf2, 0x88,
0x6a, 0xa6, 0x57, 0xcd, 0x67, 0x5a, 0x11, 0xd3, 0xc4, 0x89, 0xc7, 0xc2, 0xaa, 0xd2, 0x13, 0x04,
0x9b, 0x8f, 0x69, 0x10, 0xc9, 0x34, 0x27, 0x11, 0x9d, 0xc9, 0x24, 0x0e, 0xa9, 0x89, 0x0c, 0xb2,
0x2e, 0x99, 0xae, 0x6a, 0xcf, 0x95, 0x05, 0xba, 0x64, 0x45, 0x92, 0x75, 0x55, 0x1d, 0x02, 0xd9,
0x95, 0x24, 0x2a, 0x8c, 0x13, 0xfb, 0x0f, 0xd3, 0x4c, 0xf7, 0xad, 0x0a, 0x40, 0xee, 0x0c, 0x85,
0xb2, 0x0f, 0x92, 0x20, 0xdf, 0xd8, 0xa9, 0x89, 0xff, 0xb8, 0x52, 0x05, 0x09, 0x2b, 0x45, 0xf5,
0x31, 0x98, 0xfc, 0x7e, 0x91, 0xab, 0xeb, 0x29, 0xf6, 0xac, 0xcd, 0x6b, 0x79, 0x06, 0x07, 0xd3,
}),
wantErr: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := ParseHeader(tt.b)
if (err != nil) != tt.wantErr {
t.Errorf("ParseHeader() error = %v, wantErr %v", err, tt.wantErr)
return
}
if tt.wantErr {
return
}
if diff := cmp.Diff(tt.want, got); diff != "" {
t.Fatalf("unexpected result (-want +got):\n%s", diff)
}
})
}
}
83 changes: 83 additions & 0 deletions internal/parse/quic/quic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,89 @@ func TestQuic_unmarshal(t *testing.T) {
},
wantErr: false,
},
{
name: "Version Draft27 Facebook",
payload: []byte{
0xc6, 0xfa, 0xce, 0xb0, 0x02, 0x08, 0x4a, 0xaf, 0x2d, 0x9e, 0xdd, 0xac, 0x80, 0x59, 0x00, 0x00,
0x44, 0xbe, 0x9d, 0x71, 0x8b, 0xa7, 0x87, 0xb4, 0x29, 0x41, 0x49, 0x5b, 0x61, 0x9d, 0xef, 0xec,
0x2f, 0x8b, 0x23, 0x8e, 0x2b, 0xba, 0x22, 0x1c, 0x43, 0x24, 0x61, 0xaf, 0x1f, 0x3a, 0x0f, 0x47,
0xa0, 0x44, 0xea, 0x3a, 0x5f, 0x7c, 0x09, 0xbe, 0x80, 0x5f, 0xdf, 0x7c, 0xe8, 0x7a, 0xd1, 0x3c,
0x61, 0xc1, 0x71, 0x3f, 0x7b, 0x01, 0x27, 0x7b, 0x7c, 0x83, 0xc0, 0x12, 0xeb, 0x62, 0xae, 0x51,
0x64, 0x08, 0xb0, 0x7b, 0x14, 0xe9, 0x52, 0x2c, 0x1c, 0x0d, 0x5d, 0x21, 0x8f, 0xcc, 0x2e, 0xff,
0x7c, 0xf0, 0x89, 0x78, 0xbe, 0x54, 0x89, 0xf3, 0x13, 0x9d, 0x1b, 0xb1, 0x22, 0xba, 0x04, 0xc3,
0x47, 0xcb, 0xd3, 0xbb, 0x99, 0x0c, 0x3d, 0x1b, 0xfd, 0xae, 0x3d, 0x44, 0x30, 0x92, 0x4a, 0xce,
0x96, 0x20, 0x7e, 0x35, 0x6e, 0x25, 0x07, 0x7e, 0x34, 0x93, 0xcb, 0xb0, 0xde, 0x4a, 0xf1, 0xf2,
0xdf, 0xd6, 0x99, 0xfe, 0x54, 0x10, 0x9b, 0x3a, 0x26, 0x4a, 0x16, 0x4c, 0x19, 0x58, 0x77, 0xca,
0xa0, 0xa4, 0x96, 0x5f, 0xd4, 0xba, 0xc7, 0xb1, 0x6e, 0x60, 0x6b, 0x6c, 0xb4, 0xdc, 0xa1, 0x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
0x91, 0x17, 0x74, 0x75, 0x3d, 0xd6, 0xab, 0xb2, 0x5f, 0x38, 0x46, 0x05, 0x38, 0xc1, 0x7a, 0x53,
0xe0, 0xfa, 0x37, 0x58, 0xbc, 0xfa, 0xf5, 0x25, 0x07, 0x02, 0x43, 0x59, 0x75, 0x01, 0x2c, 0x12,
0xcf, 0xa7, 0x53, 0x4c, 0xd8, 0x87, 0x10, 0xd9, 0x22, 0x28, 0xfa, 0x49, 0x27, 0x45, 0xca, 0x29,
0xf5, 0x52, 0x9e, 0x6a, 0xa7, 0xd4, 0x01, 0x40, 0x8c, 0x45, 0xc0, 0x81, 0xac, 0x41, 0x9e, 0x3d,
0x00, 0xd5, 0x5f, 0x48, 0xae, 0x64, 0x23, 0x0c, 0xb7, 0x29, 0x0b, 0x26, 0x92, 0xab, 0xb5, 0xfa,
0x92, 0x4e, 0xb6, 0xe5, 0xf2, 0x36, 0x05, 0xf0, 0xab, 0x00, 0x16, 0x67, 0x7f, 0x99, 0x18, 0xba,
0x93, 0x47, 0x95, 0x01, 0xf4, 0x15, 0x2a, 0x04, 0xad, 0xf0, 0x0a, 0x9c, 0x70, 0xdb, 0x25, 0x1d,
0xdb, 0xf7, 0x04, 0x34, 0x67, 0xee, 0xec, 0xc0, 0xbd, 0x7e, 0x81, 0x54, 0x8a, 0xd9, 0x34, 0x29,
0x38, 0xc3, 0xd1, 0x14, 0x1d, 0xb3, 0x28, 0x23, 0xa1, 0xf6, 0x71, 0x52, 0x04, 0x14, 0xd3, 0xda,
0x98, 0x26, 0x4e, 0x87, 0xd8, 0xc8, 0x84, 0x91, 0x50, 0xb9, 0x35, 0x83, 0x43, 0x57, 0x58, 0x6f,
0x24, 0x53, 0x2c, 0x6f, 0xd2, 0x3f, 0x47, 0x7a, 0x3d, 0x92, 0xf5, 0x2f, 0x07, 0x01, 0x77, 0x2c,
0xe2, 0xf9, 0x6f, 0xb7, 0x38, 0x79, 0x4d, 0xd5, 0x5c, 0xb2, 0xec, 0xfa, 0xb9, 0x82, 0xc1, 0xde,
0x5a, 0xb8, 0x8c, 0x74, 0x32, 0x49, 0x53, 0xa0, 0xfe, 0x8d, 0x0b, 0x86, 0x56, 0x60, 0x90, 0x10,
0x27, 0x1f, 0x4a, 0x19, 0x99, 0xfe, 0x3e, 0x8b, 0xdf, 0x6d, 0x29, 0x3a, 0xbe, 0x7e, 0xf2, 0x88,
0x6a, 0xa6, 0x57, 0xcd, 0x67, 0x5a, 0x11, 0xd3, 0xc4, 0x89, 0xc7, 0xc2, 0xaa, 0xd2, 0x13, 0x04,
0x9b, 0x8f, 0x69, 0x10, 0xc9, 0x34, 0x27, 0x11, 0x9d, 0xc9, 0x24, 0x0e, 0xa9, 0x89, 0x0c, 0xb2,
0x2e, 0x99, 0xae, 0x6a, 0xcf, 0x95, 0x05, 0xba, 0x64, 0x45, 0x92, 0x75, 0x55, 0x1d, 0x02, 0xd9,
0x95, 0x24, 0x2a, 0x8c, 0x13, 0xfb, 0x0f, 0xd3, 0x4c, 0xf7, 0xad, 0x0a, 0x40, 0xee, 0x0c, 0x85,
0xb2, 0x0f, 0x92, 0x20, 0xdf, 0xd8, 0xa9, 0x89, 0xff, 0xb8, 0x52, 0x05, 0x09, 0x2b, 0x45, 0xf5,
0x31, 0x98, 0xfc, 0x7e, 0x91, 0xab, 0xeb, 0x29, 0xf6, 0xac, 0xcd, 0x6b, 0x79, 0x06, 0x07, 0xd3,
},
wantErr: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down
Loading

0 comments on commit bbbb0bf

Please sign in to comment.