* Refactor plugin.proto and pluginbase.go to add support for metadata in connection context
* go fmt
* move test plugin out
* Refactor Dockerfile to build test plugin in e2e/testplugin directory
* mv testplugin -> testgrpcplugin
* add test for connection metadata
* enable logging to stdout
* Refactor Dockerfile to build test plugin in e2e/testplugin directory
* Fix grpc.Dial usage in sshpiperd
* fix dns not found
* Update dependencies in go.mod and go.sum files
* Refactor grpc.NewClient to remove unnecessary grpc.WithBlock() option
* feat: Add support for allowed proxy addresses
This commit adds support for allowed proxy addresses, which allows only connections from these IP ranges to send a proxy header based on the PROXY protocol. If the allowed proxy addresses are empty, the PROXY protocol support is disabled.
* Update cmd/sshpiperd/main.go
Co-authored-by: Peter G <97112726+pgibson1-godaddy@users.noreply.github.com>
---------
Co-authored-by: Peter G <97112726+pgibson1-godaddy@users.noreply.github.com>
* Make the log formatter configurable
The change lets us configure the deamon and the plugins to output logs
in the JSON format, which is easier to parse/filter by log processing
tools.
* Add validation for the log-format flag
* Add PipeCreateErrorCallback to handle pipe creation errors
* Add test for FailtobanPipeCreateFail
* Fix missing newline at end of file in pluginbase.go
Package `term` provides support functions for dealing with terminals, cross-compatible with Unix,darwin and windows.
The low leve const `unix.TCGETS` is not defined in Darwin arch, ad prevent shspiper to buil and run on osx