66 Commits

Author SHA1 Message Date
appleboy
cc35c73edd
feat: expand proxy configuration with new flags and env support
- Add multiple new proxy-related flags, including protocol, username, password, SSH key, key path, SSH passphrase, connection timeout, ciphers, use of insecure ciphers, and fingerprint
- Enable proxy configuration using environment variables for each new flag
- Set default values for several proxy options (e.g., protocol defaults to tcp, username defaults to root)

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2025-04-27 11:41:44 +08:00
Bo-Yi Wu
05df7845ab
feat: integrate godump for enhanced debugging functionality
- Add `github.com/yassinebenaid/godump` dependency in `go.mod`
- Import `github.com/yassinebenaid/godump` in `main.go`
- Add debug dump functionality using `godump` in `run` function

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2025-04-15 11:29:31 +08:00
appleboy
eb083b1019
docs: enhance documentation and streamline configuration options
- Update usage descriptions for better clarity and detail
- Remove various proxy-related flags, streamlining the configuration options
- Add comments to indicate unchanged proxy settings
- Improve descriptions of tar-related flags for better understanding

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2025-03-10 22:16:39 +08:00
Bo-Yi Wu
2decbc4a77
feat: refactor protocol configuration handling in main and plugin
- Add protocol configuration to the `run` function in `main.go`
- Remove redundant protocol configuration from the `run` function in `main.go`
- Add proxy protocol configuration to the `run` function in `main.go`
- Add protocol configuration to the `removeAllDestFile` function in `plugin.go`
- Add proxy protocol configuration to the `removeAllDestFile` function in `plugin.go`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-07-19 07:50:09 +08:00
Xiaotong Liu
79beba5443
fix(parameter): missing protocol argument (#193)
* fix host split

* rm .idea
2024-07-19 07:43:10 +08:00
Bo-Yi Wu
052d6e71bc
feat: load environment variables from /run/drone/env file
- Add check for `/run/drone/env` file and load environment variables if it exists

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-07-14 22:10:19 +08:00
Bo-Yi Wu
fe4a745be0
feat: enhance plugin networking capabilities support IPV6 (#191)
* feat: enhance plugin networking capabilities

- Enable SSH server to listen on all interfaces by uncommenting relevant lines in `sshd_config`
- Add new `protocol` and `proxy.protocol` flags to `main.go` with usage information and default values
- Change the `Port` field type from `string` to `int` in `plugin.go` and `plugin_test.go`
- Refactor variable name from `host` to `h` and add `port` variable in `plugin.go` loop
- Remove commented-out code and refactor `hostPort` function in `plugin.go`
- Add import for `io` package in `plugin_test.go`
- Add new test function `TestPlugin_hostPort` with multiple test cases in `plugin_test.go`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* update

Signed-off-by: appleboy <appleboy.tw@gmail.com>

* update

Signed-off-by: appleboy <appleboy.tw@gmail.com>

* update

Signed-off-by: appleboy <appleboy.tw@gmail.com>

---------

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-06-01 11:40:23 +08:00
Bo-Yi Wu
bd2ddc2b6c chore: improve recordings, API, tests, and actions
- Add "strconv" import to main.go
- Update app.Copyright to use the current year dynamically

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-05-05 08:14:24 +08:00
Bo-Yi.Wu
30279a3e8d refactor: refactor command line flags in main function
- Remove the `t` alias from the `main` function&#39;s flags.

Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2023-04-15 07:16:23 +08:00
Bo-Yi.Wu
b9cdc20c14 chore(config): align with drone-ssh
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2023-04-15 07:02:58 +08:00
Bo-Yi.Wu
cb8f851d7b refactor: refactor command execution configuration
- Remove 12 lines of code related to proxy configuration
- Remove 5 lines of code related to cipher configuration
- Add 18 lines of code related to proxy configuration
- Add a command timeout flag with a default value of 10 minutes

Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2023-04-15 06:29:32 +08:00
Bo-Yi Wu
fb4058bc55
chore(main): remove unused variable (#175) 2023-04-15 01:49:26 +08:00
Bo-Yi Wu
6fd87e0460
refactor: add dereference flag (#169)
- Add a `--dereference` flag to use with tar

fix https://github.com/appleboy/drone-scp/issues/112
2023-04-09 15:49:32 +08:00
teutates
6d8c114979
feat(tar): add unlink-first flag (#141) 2022-12-29 21:15:21 +08:00
Bo-Yi.Wu
c5c8b4021f chore(cli): add alias
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-12-29 21:13:47 +08:00
Bo-Yi Wu
6ddf21aca4 chore(action): wrong variable name
see https://github.com/appleboy/scp-action/issues/30

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-10-23 18:23:13 +08:00
Bo-Yi Wu
f0867af189 chore: remove auto load .env file
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-06-15 15:55:32 +08:00
Bo-Yi Wu
4457897da5
chore: Support UseInsecureCipher (#115) 2020-05-24 14:17:43 +08:00
Bo-Yi Wu
2ff51f00ff
chore: support Fingerprint (#114) 2020-05-21 23:08:17 +08:00
Bo-Yi Wu
b0f9b5b277 remove load env file from urfave/cli
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-05-05 09:36:22 +08:00
Bo-Yi Wu
457861ab2a chore(ssh): support Ciphers
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-05-04 10:27:02 +08:00
techknowlogick
1996e5d780
Add option to use file for host info (#113) 2020-04-29 14:22:30 +08:00
Daniel Bingham
3d36432240
Fix typo in EnvVars for ssh-passphrase (#109) 2020-02-27 08:58:49 +08:00
Bo-Yi Wu
177625c6e7
chore: support passphrase (#107)
* chore: support passphrase
2020-01-20 22:34:16 +08:00
Bo-Yi Wu
e5eae442c3 chore: update urfave/cli to v2 2020-01-19 23:38:47 +08:00
Bo-Yi Wu
b73ec894ab chore: update default timeout to 10 minutes 2019-11-30 23:08:26 +08:00
Bo-Yi Wu
c85ca1ffd2
feat(tar): add Overwrite flag (#102)
* feat(tar): add Overwrite flag

* chore: remove

* chore: output

* chore: output
2019-09-28 16:59:01 +08:00
Ivo Nunes
933b45bc15 Add variable to set temporary tar upload path (#100) 2019-09-28 16:36:05 +08:00
Bo-Yi Wu
8a0b0f3c0c chore(GitHub): support actions parameter. 2019-09-28 10:30:15 +08:00
Bo-Yi Wu
66579b6dae chore: add proxy variable 2019-05-11 19:51:39 +08:00
Bo-Yi Wu
06609f35cf add key variable
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-05-11 16:50:50 +08:00
Bo-Yi Wu
c9771cce78 chore: add variable 2019-05-11 16:49:20 +08:00
Bo-Yi Wu
813faf56be chore: remove build number 2019-03-10 23:43:06 +08:00
Bo-Yi Wu
4117d2ca30
fix: trigger build fail if error (#94)
fix #93
2019-03-10 23:41:21 +08:00
Bo-Yi Wu
15bd1a11e4
chore: change command timeout flag (#92)
* chore: change command timeout flag

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* docs: update setting

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* doc: update readme.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-03-07 13:56:40 +08:00
Bo-Yi Wu
699675c8fa
add debug command. (#87)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-01-18 16:06:22 +08:00
natlibfi-arlehiko
d798a8cc75 Add TarExec parameter (#82)
Add TarExec parameter to provide an alternative tar-command (E.g. On old non-Linux systems it may be necessary to use gtar).
2018-11-05 15:11:00 +08:00
Bo-Yi Wu
147005589b
support user key. 2018-11-05 09:05:34 +08:00
Bo-Yi Wu
43d4f0d781 fix(error): show error log. 2017-12-22 11:38:13 +08:00
Bo-Yi Wu
f22cd46f46 Add some ssh env (#73) 2017-07-28 09:03:38 +08:00
Bo-Yi Wu
35c2f7a14c feat: support strip components flag for tar command (#65)
Remove the specified number of leading path elements.
2017-04-30 23:18:22 +08:00
Bo-Yi Wu
d326bfe5a4 feat: update easyssh-proxy to 1.1.1 (#54) 2017-03-25 22:46:03 +08:00
Bo-Yi Wu
72c123f390 feat: Support scp files from proxy command. (#47)
* feat: Support scp files from proxy command.
2017-03-06 14:43:52 +08:00
Bo-Yi Wu
04c639cfa8 feat: upgrade to easyssh-proxy package. (#45)
* feat: upgrade to easyssh-proxy package.

* add command timeout flag
* upgrade easyssh to easyssh-proxy
2017-03-06 12:35:57 +08:00
Bo-Yi Wu
212aa456c6 fix: duplicate of -t flag 2017-01-30 16:31:38 +08:00
Bo-Yi Wu
57d83dcfe0 feat: Add timeout flag. (#26) 2017-01-29 13:56:23 +08:00
Bo-Yi Wu
28824dfd1a fix: golint error: missing ',' before newline 2017-01-07 11:33:51 +08:00
Bo-Yi Wu
f20fc0b114 fix: GOMAXPROCS set to the number of cores available in 1.5 2017-01-04 16:10:33 +08:00
Bo-Yi Wu
ed00c6ef85 docs: [ci skip] update doc 2017-01-04 10:47:40 +08:00
Bo-Yi Wu
cc822cd578 update commmand line.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-01-04 10:36:04 +08:00