Skip to content

Commit ec9d02e

Browse files
committed
missing Ciphers config
Signed-off-by: Bo-Yi Wu <[email protected]>
1 parent 9c9e791 commit ec9d02e

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/appleboy/drone-ssh
33
go 1.14
44

55
require (
6-
github.com/appleboy/easyssh-proxy v1.3.3
6+
github.com/appleboy/easyssh-proxy v1.3.4
77
github.com/joho/godotenv v1.3.0
88
github.com/stretchr/testify v1.3.0
99
github.com/urfave/cli v1.22.4

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
22
github.com/ScaleFT/sshkeys v0.0.0-20181112160850-82451a803681 h1:JS2rl38kZmHgWa0xINSaSYH0Whtvem64/4+Ef0+Y5pE=
33
github.com/ScaleFT/sshkeys v0.0.0-20181112160850-82451a803681/go.mod h1:WfDateMPQ/55dPbZRp5Zxrux5WiEaHsjk9puUhz0KgY=
4-
github.com/appleboy/easyssh-proxy v1.3.3 h1:x++oaFLft5hWjAli7IgALQr+OwrzmXzHmLdPrjTRE2w=
5-
github.com/appleboy/easyssh-proxy v1.3.3/go.mod h1:Kk57I3w7OCafOjp5kgZFvxk2fO8Tca5CriBTOsbSbjY=
4+
github.com/appleboy/easyssh-proxy v1.3.4 h1:yNgzsJ9qaDNGzQILDXEK4boioJMmUUaTUsxYtCTSGqo=
5+
github.com/appleboy/easyssh-proxy v1.3.4/go.mod h1:Kk57I3w7OCafOjp5kgZFvxk2fO8Tca5CriBTOsbSbjY=
66
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
77
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
88
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=

main.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ func main() {
151151
Usage: "proxy connection timeout",
152152
EnvVar: "PLUGIN_PROXY_TIMEOUT,PROXY_SSH_TIMEOUT,INPUT_PROXY_TIMEOUT",
153153
},
154+
cli.StringSliceFlag{
155+
Name: "proxy.ciphers",
156+
Usage: "The allowed cipher algorithms. If unspecified then a sensible",
157+
EnvVar: "PLUGIN_PROXY_CIPHERS,SSH_PROXY_CIPHERS,PROXY_CIPHERS,INPUT_PROXY_CIPHERS",
158+
Value: &defaultCiphers,
159+
},
154160
cli.StringSliceFlag{
155161
Name: "envs",
156162
Usage: "pass environment variable to shell script",
@@ -232,6 +238,7 @@ func run(c *cli.Context) error {
232238
Server: c.String("proxy.host"),
233239
Port: c.String("proxy.port"),
234240
Timeout: c.Duration("proxy.timeout"),
241+
Ciphers: c.StringSlice("proxy.ciphers"),
235242
},
236243
},
237244
Writer: os.Stdout,

plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func (p Plugin) exec(host string, wg *sync.WaitGroup, errChannel chan error) {
7373
KeyPath: p.Config.Proxy.KeyPath,
7474
Passphrase: p.Config.Proxy.Passphrase,
7575
Timeout: p.Config.Proxy.Timeout,
76-
Ciphers: p.Config.Ciphers,
76+
Ciphers: p.Config.Proxy.Ciphers,
7777
},
7878
}
7979

0 commit comments

Comments
 (0)