Skip to content

Commit

Permalink
Merge branch 'release/0.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
nwtgck committed Oct 29, 2020
2 parents 43d9c28 + 69ec120 commit e3b3b33
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)

## [Unreleased]

## [0.2.2] - 2020-10-29
### Added
* Add --s-to-c-buf-size flag to client

## [0.2.1] - 2020-10-18
### Added
* Add --header flag to specify HTTP header
Expand All @@ -22,6 +26,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
### Added
* Initial release

[Unreleased]: https://github.com/nwtgck/go-piping-tunnel/compare/v0.2.1...HEAD
[Unreleased]: https://github.com/nwtgck/go-piping-tunnel/compare/v0.2.2...HEAD
[0.2.2]: https://github.com/nwtgck/go-piping-tunnel/compare/v0.2.1...v0.2.2
[0.2.1]: https://github.com/nwtgck/go-piping-tunnel/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/nwtgck/go-piping-tunnel/compare/v0.1.0...v0.2.0
5 changes: 4 additions & 1 deletion cmd/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ import (
)

var clientHostPort int
var clientServerToClientBuffSize uint

func init() {
RootCmd.AddCommand(clientCmd)
clientCmd.Flags().IntVarP(&clientHostPort, "port", "p", 0, "TCP port of client host")
clientCmd.Flags().UintVarP(&clientServerToClientBuffSize, "s-to-c-buf-size", "", 16, "Buffer size of server-to-client")
}

var clientCmd = &cobra.Command{
Expand Down Expand Up @@ -115,7 +117,8 @@ var clientCmd = &cobra.Command{
if progress != nil {
writer = io.MultiWriter(conn, progress)
}
_, err = io.Copy(writer, res.Body)
var buf = make([]byte, clientServerToClientBuffSize)
_, err = io.CopyBuffer(writer, res.Body, buf)
fmt.Println()
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package version

const Version = "0.2.1"
const Version = "0.2.2"

0 comments on commit e3b3b33

Please sign in to comment.