add test coverage for go proxy (#460)

* add coverage for go proxy

* Refactor CLI flag name for allowed proxy addresses
This commit is contained in:
Boshi Lian 2024-10-18 13:28:18 -07:00 committed by GitHub
parent e6388b66b2
commit 4ad8e77e3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View file

@ -173,9 +173,10 @@ func main() {
EnvVars: []string{"SSHPIPERD_DROP_HOSTKEYS_MESSAGE"},
},
&cli.StringSliceFlag{
Name: "allowed-proxy-addresses",
Value: cli.NewStringSlice(),
Usage: "allowed proxy addresses, only connections from these ip ranges are allowed to send a proxy header based on the PROXY protocol, empty will disable the PROXY protocol support",
Name: "allowed-proxy-addresses",
Value: cli.NewStringSlice(),
Usage: "allowed proxy addresses, only connections from these ip ranges are allowed to send a proxy header based on the PROXY protocol, empty will disable the PROXY protocol support",
EnvVars: []string{"SSHPIPERD_ALLOWED_PROXY_ADDRESSES"},
},
},
Action: func(ctx *cli.Context) error {

View file

@ -83,6 +83,7 @@ services:
- SSHPIPERD_LOG_LEVEL=trace
- SSHPIPERD_E2E_TEST=1
- SSHPIPERD_DEBUG=${SSHPIPERD_DEBUG}
- SSHPIPERD_ALLOWED_PROXY_ADDRESSES=0.0.0.0/0
- DOCKER_API_VERSION=1.40
build:
context: ../