replace with proxy protocol listener

This commit is contained in:
Boshi Lian 2022-07-08 01:58:22 +00:00
parent 21f61c5bcd
commit 2ddd69876a
5 changed files with 9 additions and 4 deletions

View file

@ -69,9 +69,9 @@ func (d *daemon) install(plugins ...*plugin.GrpcPlugin) error {
return fmt.Errorf("no plugins found")
}
// if len(plugins) == 1 {
// return plugins[0].InstallPiperConfig(d.config)
// }
if len(plugins) == 1 {
return plugins[0].InstallPiperConfig(d.config)
}
m := plugin.ChainPlugins{}

View file

@ -7,9 +7,9 @@ import (
"runtime/debug"
"time"
"github.com/pires/go-proxyproto"
log "github.com/sirupsen/logrus"
"github.com/tg123/sshpiper/cmd/sshpiperd/internal/plugin"
"github.com/urfave/cli/v2"
)
@ -138,6 +138,8 @@ func main() {
return err
}
d.lis = &proxyproto.Listener{Listener: d.lis}
var plugins []*plugin.GrpcPlugin
args := ctx.Args().Slice()

BIN
cmd/sshpiperd/sshpiperd Executable file

Binary file not shown.