Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated go-proxyproto dependency version. #367

Merged
merged 1 commit into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions fleetspeak/src/e2etesting/balancer/proxyproto/proxyproto.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,10 @@ func WriteFirstProxyMessage(w io.Writer, srcAddr, dstAddr string) error {
return fmt.Errorf("Failed to parse destination (server) address: %v", err)
}
header := proxyproto.Header{
Version: 1,
TransportProtocol: proxyproto.TCPv4,
SourceAddress: srcHost,
DestinationAddress: dstHost,
SourcePort: srcPort,
DestinationPort: dstPort,
Version: 1,
TransportProtocol: proxyproto.TCPv4,
SourceAddr: &net.TCPAddr{IP: srcHost, Port: int(srcPort)},
DestinationAddr: &net.TCPAddr{IP: dstHost, Port: int(dstPort)},
}
_, err = header.WriteTo(w)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions fleetspeak/src/server/components/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"github.com/prometheus/client_golang/prometheus/promhttp"

cpb "github.com/google/fleetspeak/fleetspeak/src/server/components/proto/fleetspeak_components"
spb "github.com/google/fleetspeak/fleetspeak/src/server/proto/fleetspeak_server"
sgrpc "github.com/google/fleetspeak/fleetspeak/src/server/proto/fleetspeak_server"
)

// MakeComponents creates server components from a given config.
Expand Down Expand Up @@ -91,7 +91,7 @@
return nil, fmt.Errorf("failed to listen on [%v]: %v", cfg.HttpsConfig.ListenAddress, err)
}
if cfg.ProxyProtocol {
l = &chttps.ProxyListener{l}

Check failure on line 94 in fleetspeak/src/server/components/components.go

View workflow job for this annotation

GitHub Actions / build-test-linux

github.com/google/fleetspeak/fleetspeak/src/server/components/https.ProxyListener struct literal uses unkeyed fields

Check failure on line 94 in fleetspeak/src/server/components/components.go

View workflow job for this annotation

GitHub Actions / build-test-linux

github.com/google/fleetspeak/fleetspeak/src/server/components/https.ProxyListener struct literal uses unkeyed fields
}
comm, err = https.NewCommunicator(https.Params{
Listener: l,
Expand Down Expand Up @@ -126,7 +126,7 @@
if acfg != nil {
as := admin.NewServer(db, nn)
admSrv := grpc.NewServer()
spb.RegisterAdminServer(admSrv, as)
sgrpc.RegisterAdminServer(admSrv, as)
aas, err := net.ResolveTCPAddr("tcp", acfg.ListenAddress)
if err != nil {
return nil, fmt.Errorf("failed to initialize admin server: %v", err)
Expand Down
2 changes: 1 addition & 1 deletion fleetspeak/src/server/components/https/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (l *ProxyListener) Accept() (net.Conn, error) {
return &proxyConn{
Conn: c,
reader: r,
remote: &net.TCPAddr{IP: h.SourceAddress, Port: int(h.SourcePort)},
remote: h.SourceAddr,
}, nil
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95
github.com/kolide/osquery-go v0.0.0-20190904034940-a74aa860032d
github.com/mattn/go-sqlite3 v1.11.0
github.com/pires/go-proxyproto v0.0.0-20190615163442-2c19fd512994
github.com/pires/go-proxyproto v0.6.2
github.com/prometheus/client_golang v1.7.1
github.com/shirou/gopsutil v3.20.12+incompatible
golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/pires/go-proxyproto v0.0.0-20190615163442-2c19fd512994 h1:3ssKn22MN6oLH+l2iimsBdCliSgELXTBWWR+yooB2lQ=
github.com/pires/go-proxyproto v0.0.0-20190615163442-2c19fd512994/go.mod h1:6/gX3+E/IYGa0wMORlSMla999awQFdbaeQCHjSMKIzY=
github.com/pires/go-proxyproto v0.6.2 h1:KAZ7UteSOt6urjme6ZldyFm4wDe/z0ZUP0Yv0Dos0d8=
github.com/pires/go-proxyproto v0.6.2/go.mod h1:Odh9VFOZJCf9G8cLW5o435Xf1J95Jw9Gw5rnCjcwzAY=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
Expand Down
Loading