From 96baad84471a4e621eff4a45165bdc275020c105 Mon Sep 17 00:00:00 2001 From: yanghao Date: Mon, 22 Apr 2024 08:57:12 -0400 Subject: [PATCH 1/2] feat: change proxyproto pkg to support proxy proto v2 --- accepter_test.go | 2 +- acceptor.go | 2 +- go.mod | 1 + go.sum | 2 ++ 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/accepter_test.go b/accepter_test.go index 0d9f6487b..54bfff845 100644 --- a/accepter_test.go +++ b/accepter_test.go @@ -21,7 +21,7 @@ import ( "github.com/quickfixgo/quickfix/config" - proxyproto "github.com/armon/go-proxyproto" + proxyproto "github.com/pires/go-proxyproto" "github.com/stretchr/testify/assert" ) diff --git a/acceptor.go b/acceptor.go index 879cdb17f..968be9efb 100644 --- a/acceptor.go +++ b/acceptor.go @@ -25,7 +25,7 @@ import ( "strconv" "sync" - proxyproto "github.com/armon/go-proxyproto" + proxyproto "github.com/pires/go-proxyproto" "github.com/quickfixgo/quickfix/config" ) diff --git a/go.mod b/go.mod index 2f5cf33c4..2b50e4c02 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.21 require ( github.com/armon/go-proxyproto v0.1.0 github.com/mattn/go-sqlite3 v1.14.18 + github.com/pires/go-proxyproto v0.7.0 github.com/pkg/errors v0.9.1 github.com/shopspring/decimal v1.3.1 github.com/stretchr/testify v1.8.4 diff --git a/go.sum b/go.sum index f3c70cab6..d178baaab 100644 --- a/go.sum +++ b/go.sum @@ -23,6 +23,8 @@ github.com/mattn/go-sqlite3 v1.14.18/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/montanaflynn/stats v0.6.6 h1:Duep6KMIDpY4Yo11iFsvyqJDyfzLF9+sndUKT+v64GQ= github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= +github.com/pires/go-proxyproto v0.7.0 h1:IukmRewDQFWC7kfnb66CSomk2q/seBuilHBYFwyq0Hs= +github.com/pires/go-proxyproto v0.7.0/go.mod h1:Vz/1JPY/OACxWGQNIRY2BeyDmpoaWmEP40O9LbuiFR4= 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= From 1518a203051b33370b28586a75a842eb844bd366 Mon Sep 17 00:00:00 2001 From: yanghao Date: Mon, 22 Apr 2024 09:25:05 -0400 Subject: [PATCH 2/2] fix: try to fix linter failed --- validation_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/validation_test.go b/validation_test.go index 85bbaf4a2..861dd863e 100644 --- a/validation_test.go +++ b/validation_test.go @@ -928,10 +928,10 @@ func tcMultipleRepeatingGroupFields() validateTest { dict, _ := datadictionary.Parse("spec/FIX43.xml") validator := NewValidator(defaultValidatorSettings, dict, nil) return validateTest{ - TestName: "Multiple repeating group fields in a message", - Validator: validator, - MessageBytes: []byte("8=FIX.4.39=17635=D34=249=TW52=20140329-22:38:4556=ISLD11=ID453=2448=PARTYID452=3523=SUBID448=PARTYID2452=378=179=ACCOUNT80=121=140=154=138=20055=INTC60=20140329-22:38:4510=178"), - DoNotExpectReject: true, + TestName: "Multiple repeating group fields in a message", + Validator: validator, + MessageBytes: []byte("8=FIX.4.39=17635=D34=249=TW52=20140329-22:38:4556=ISLD11=ID453=2448=PARTYID452=3523=SUBID448=PARTYID2452=378=179=ACCOUNT80=121=140=154=138=20055=INTC60=20140329-22:38:4510=178"), + DoNotExpectReject: true, } }