Skip to content

Commit

Permalink
add test coverage for go proxy (#460)
Browse files Browse the repository at this point in the history
* add coverage for go proxy

* Refactor CLI flag name for allowed proxy addresses
  • Loading branch information
tg123 authored Oct 18, 2024
1 parent e6388b6 commit 4ad8e77
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/sshpiperd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions e2e/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ../
Expand Down

0 comments on commit 4ad8e77

Please sign in to comment.