Skip to content

Commit

Permalink
feat: update to quic-go v0.37.1, module renamed to github.com/apernet…
Browse files Browse the repository at this point in the history
…/quic-go
  • Loading branch information
tobyxdd committed Aug 1, 2023
1 parent b62ef83 commit c64b36b
Show file tree
Hide file tree
Showing 15 changed files with 33 additions and 47 deletions.
7 changes: 2 additions & 5 deletions app/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ require (
)

require (
github.com/apernet/quic-go v0.37.2-0.20230731235018-6dccf9f8de2c // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
Expand All @@ -33,9 +34,7 @@ require (
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/qtls-go1-19 v0.3.2 // indirect
github.com/quic-go/qtls-go1-20 v0.2.2 // indirect
github.com/quic-go/quic-go v0.0.0-00010101000000-000000000000 // indirect
github.com/quic-go/qtls-go1-20 v0.3.0 // indirect
github.com/spf13/afero v1.9.3 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
Expand All @@ -57,8 +56,6 @@ require (
rsc.io/qr v0.2.0 // indirect
)

replace github.com/quic-go/quic-go => github.com/apernet/quic-go v0.36.1-0.20230627042819-0a89ea8e4c8d

replace github.com/apernet/hysteria/core => ../core

replace github.com/apernet/hysteria/extras => ../extras
10 changes: 4 additions & 6 deletions app/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/apernet/quic-go v0.36.1-0.20230627042819-0a89ea8e4c8d h1:Yp2jez75QOlxae26CzyY3pmZzqRf/6C7b/DD8PSegPw=
github.com/apernet/quic-go v0.36.1-0.20230627042819-0a89ea8e4c8d/go.mod h1:zPetvwDlILVxt15n3hr3Gf/I3mDf7LpLKPhR4Ez0AZQ=
github.com/apernet/quic-go v0.37.2-0.20230731235018-6dccf9f8de2c h1:kl+p4uqk9sc/A9D0rgQ4IQxWMRVa3nSUFpvJ8/IQhe0=
github.com/apernet/quic-go v0.37.2-0.20230731235018-6dccf9f8de2c/go.mod h1:tKbqlrErvfl0qmDz6L0qpAGEZ/WduGkn4lwNTT7HyXg=
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/caddyserver/certmagic v0.17.2 h1:o30seC1T/dBqBCNNGNHWwj2i5/I/FMjBbTAhjADP3nE=
Expand Down Expand Up @@ -179,10 +179,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo=
github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A=
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/quic-go/qtls-go1-20 v0.3.0 h1:NrCXmDl8BddZwO67vlvEpBTwT89bJfKYygxv4HQvuDk=
github.com/quic-go/qtls-go1-20 v0.3.0/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
Expand Down
6 changes: 3 additions & 3 deletions core/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/apernet/hysteria/core/internal/protocol"
"github.com/apernet/hysteria/core/internal/utils"

"github.com/quic-go/quic-go"
"github.com/quic-go/quic-go/http3"
"github.com/apernet/quic-go"
"github.com/apernet/quic-go/http3"
)

const (
Expand Down Expand Up @@ -270,7 +270,7 @@ type udpIOImpl struct {

func (io *udpIOImpl) ReceiveMessage() (*protocol.UDPMessage, error) {
for {
msg, err := io.Conn.ReceiveMessage()
msg, err := io.Conn.ReceiveMessage(context.Background())
if err != nil {
// Connection error, this will stop the session manager
return nil, err
Expand Down
3 changes: 2 additions & 1 deletion core/client/udp.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import (
"math/rand"
"sync"

"github.com/apernet/quic-go"

coreErrs "github.com/apernet/hysteria/core/errors"
"github.com/apernet/hysteria/core/internal/frag"
"github.com/apernet/hysteria/core/internal/protocol"
"github.com/quic-go/quic-go"
)

const (
Expand Down
7 changes: 2 additions & 5 deletions core/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/apernet/hysteria/core
go 1.20

require (
github.com/quic-go/quic-go v0.0.0-00010101000000-000000000000
github.com/apernet/quic-go v0.37.2-0.20230731235018-6dccf9f8de2c
github.com/stretchr/testify v1.8.4
go.uber.org/goleak v1.2.1
golang.org/x/time v0.3.0
Expand All @@ -19,8 +19,7 @@ require (
github.com/onsi/ginkgo/v2 v2.9.5 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/qtls-go1-19 v0.3.2 // indirect
github.com/quic-go/qtls-go1-20 v0.2.2 // indirect
github.com/quic-go/qtls-go1-20 v0.3.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
golang.org/x/crypto v0.4.0 // indirect
golang.org/x/exp v0.0.0-20221205204356-47842c84f3db // indirect
Expand All @@ -33,5 +32,3 @@ require (
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/quic-go/quic-go => github.com/apernet/quic-go v0.36.1-0.20230627042819-0a89ea8e4c8d
10 changes: 4 additions & 6 deletions core/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/apernet/quic-go v0.36.1-0.20230627042819-0a89ea8e4c8d h1:Yp2jez75QOlxae26CzyY3pmZzqRf/6C7b/DD8PSegPw=
github.com/apernet/quic-go v0.36.1-0.20230627042819-0a89ea8e4c8d/go.mod h1:zPetvwDlILVxt15n3hr3Gf/I3mDf7LpLKPhR4Ez0AZQ=
github.com/apernet/quic-go v0.37.2-0.20230731235018-6dccf9f8de2c h1:kl+p4uqk9sc/A9D0rgQ4IQxWMRVa3nSUFpvJ8/IQhe0=
github.com/apernet/quic-go v0.37.2-0.20230731235018-6dccf9f8de2c/go.mod h1:tKbqlrErvfl0qmDz6L0qpAGEZ/WduGkn4lwNTT7HyXg=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
Expand Down Expand Up @@ -32,10 +32,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo=
github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A=
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/quic-go/qtls-go1-20 v0.3.0 h1:NrCXmDl8BddZwO67vlvEpBTwT89bJfKYygxv4HQvuDk=
github.com/quic-go/qtls-go1-20 v0.3.0/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
Expand Down
2 changes: 1 addition & 1 deletion core/internal/congestion/brutal.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package congestion
import (
"time"

"github.com/quic-go/quic-go/congestion"
"github.com/apernet/quic-go/congestion"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion core/internal/congestion/pacer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"math"
"time"

"github.com/quic-go/quic-go/congestion"
"github.com/apernet/quic-go/congestion"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions core/internal/integration_tests/masq_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"github.com/apernet/hysteria/core/internal/protocol"
"github.com/apernet/hysteria/core/server"

"github.com/quic-go/quic-go"
"github.com/quic-go/quic-go/http3"
"github.com/apernet/quic-go"
"github.com/apernet/quic-go/http3"
)

// TestServerMasquerade is a test to ensure that the server behaves as a normal
Expand Down
2 changes: 1 addition & 1 deletion core/internal/protocol/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/apernet/hysteria/core/errors"

"github.com/quic-go/quic-go/quicvarint"
"github.com/apernet/quic-go/quicvarint"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion core/internal/utils/qstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"time"

"github.com/quic-go/quic-go"
"github.com/apernet/quic-go"
)

// QStream is a wrapper of quic.Stream that handles Close() in a way that
Expand Down
6 changes: 3 additions & 3 deletions core/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"net/http"
"sync"

"github.com/quic-go/quic-go"
"github.com/quic-go/quic-go/http3"
"github.com/apernet/quic-go"
"github.com/apernet/quic-go/http3"

"github.com/apernet/hysteria/core/internal/congestion"
"github.com/apernet/hysteria/core/internal/protocol"
Expand Down Expand Up @@ -238,7 +238,7 @@ type udpIOImpl struct {

func (io *udpIOImpl) ReceiveMessage() (*protocol.UDPMessage, error) {
for {
msg, err := io.Conn.ReceiveMessage()
msg, err := io.Conn.ReceiveMessage(context.Background())
if err != nil {
// Connection error, this will stop the session manager
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion core/server/udp.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"
"time"

"github.com/quic-go/quic-go"
"github.com/apernet/quic-go"

"github.com/apernet/hysteria/core/internal/frag"
"github.com/apernet/hysteria/core/internal/protocol"
Expand Down
7 changes: 2 additions & 5 deletions extras/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@ require (
)

require (
github.com/apernet/quic-go v0.37.2-0.20230731235018-6dccf9f8de2c // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect
github.com/onsi/ginkgo/v2 v2.9.5 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/qtls-go1-19 v0.3.2 // indirect
github.com/quic-go/qtls-go1-20 v0.2.2 // indirect
github.com/quic-go/quic-go v0.0.0-00010101000000-000000000000 // indirect
github.com/quic-go/qtls-go1-20 v0.3.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
golang.org/x/exp v0.0.0-20221205204356-47842c84f3db // indirect
golang.org/x/mod v0.10.0 // indirect
Expand All @@ -29,6 +28,4 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/quic-go/quic-go => github.com/apernet/quic-go v0.36.1-0.20230627042819-0a89ea8e4c8d

replace github.com/apernet/hysteria/core => ../core
10 changes: 4 additions & 6 deletions extras/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/apernet/quic-go v0.36.1-0.20230627042819-0a89ea8e4c8d h1:Yp2jez75QOlxae26CzyY3pmZzqRf/6C7b/DD8PSegPw=
github.com/apernet/quic-go v0.36.1-0.20230627042819-0a89ea8e4c8d/go.mod h1:zPetvwDlILVxt15n3hr3Gf/I3mDf7LpLKPhR4Ez0AZQ=
github.com/apernet/quic-go v0.37.2-0.20230731235018-6dccf9f8de2c h1:kl+p4uqk9sc/A9D0rgQ4IQxWMRVa3nSUFpvJ8/IQhe0=
github.com/apernet/quic-go v0.37.2-0.20230731235018-6dccf9f8de2c/go.mod h1:tKbqlrErvfl0qmDz6L0qpAGEZ/WduGkn4lwNTT7HyXg=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
Expand All @@ -25,10 +25,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo=
github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A=
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/quic-go/qtls-go1-20 v0.3.0 h1:NrCXmDl8BddZwO67vlvEpBTwT89bJfKYygxv4HQvuDk=
github.com/quic-go/qtls-go1-20 v0.3.0/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
Expand Down

0 comments on commit c64b36b

Please sign in to comment.