easyssh-proxy icon indicating copy to clipboard operation
easyssh-proxy copied to clipboard

The default size buf was used to read the command execution result, resulting in an incomplete command execution result.

Open Li4n0 opened this issue 4 years ago • 3 comments

func (ssh_conf *MakeConfig) Stream(command string, timeout ...time.Duration) (<-chan string, <-chan string, <-chan bool, <-chan error, error) {
	... ...
	// combine outputs, create a line-by-line scanner
	stdoutReader := io.MultiReader(outReader)
	stderrReader := io.MultiReader(errReader)
	stdoutScanner := bufio.NewScanner(stdoutReader)
	stderrScanner := bufio.NewScanner(stderrReader)
	... ...

The default buf size is 4096. This results in an incomplete output when the command stdout or stderr is greater than this value

Li4n0 avatar Sep 05 '21 09:09 Li4n0

@appleboy Is this project still being maintained?

Li4n0 avatar Dec 14 '21 12:12 Li4n0

@Li4n0 Yes

appleboy avatar Dec 27 '21 06:12 appleboy

@Li4n0 Yes

So will this problem be solved? @appleboy

Li4n0 avatar Mar 08 '22 08:03 Li4n0

how about add bufsize config?

fatelei avatar Mar 14 '23 03:03 fatelei

fixed in #78

appleboy avatar Jan 22 '24 14:01 appleboy