Add WithMaxTxPacket server option

Add the WithMaxTxPacket and WithRSMaxTxPacket server options to increase
the maximum tx packet size to a value above 32K. This allows to send
bigger chunks of data to the client as response to a read request. As
the client specifies the wanted length, it should be safe to increase
the server maximum value.

This in particular allows the implemented Client with the
MaxPacketUnchecked option to retrieve data in larger chunks.

Signed-off-by: Peter Verraedt <peter@verraedt.be>
5 files changed
tree: 266c5898ed3b1a41f2927b9ef97b70eb45f8416a
  1. .github/
  2. examples/
  3. internal/
  4. server_standalone/
  5. .gitignore
  6. allocator.go
  7. allocator_test.go
  8. attrs.go
  9. attrs_stubs.go
  10. attrs_test.go
  11. attrs_unix.go
  12. client.go
  13. client_integration_darwin_test.go
  14. client_integration_linux_test.go
  15. client_integration_test.go
  16. client_test.go
  17. conn.go
  18. CONTRIBUTORS
  19. debug.go
  20. errno_plan9.go
  21. errno_posix.go
  22. example_test.go
  23. fuzz.go
  24. go.mod
  25. go.sum
  26. LICENSE
  27. ls_formatting.go
  28. ls_formatting_test.go
  29. ls_plan9.go
  30. ls_stub.go
  31. ls_unix.go
  32. Makefile
  33. match.go
  34. packet-manager.go
  35. packet-manager_test.go
  36. packet-typing.go
  37. packet.go
  38. packet_test.go
  39. pool.go
  40. README.md
  41. release.go
  42. request-attrs.go
  43. request-attrs_test.go
  44. request-errors.go
  45. request-example.go
  46. request-interfaces.go
  47. request-plan9.go
  48. request-readme.md
  49. request-server.go
  50. request-server_test.go
  51. request-unix.go
  52. request.go
  53. request_test.go
  54. request_windows.go
  55. server.go
  56. server_integration_test.go
  57. server_nowindows_test.go
  58. server_plan9.go
  59. server_statvfs_darwin.go
  60. server_statvfs_impl.go
  61. server_statvfs_linux.go
  62. server_statvfs_plan9.go
  63. server_statvfs_stubs.go
  64. server_test.go
  65. server_unix.go
  66. server_windows.go
  67. server_windows_test.go
  68. sftp.go
  69. sftp_test.go
  70. stat.go
README.md

sftp

The sftp package provides support for file system operations on remote ssh servers using the SFTP subsystem. It also implements an SFTP server for serving files from the filesystem.

CI Status Go Reference

usage and examples

See https://pkg.go.dev/github.com/pkg/sftp for examples and usage.

The basic operation of the package mirrors the facilities of the os package.

The Walker interface for directory traversal is heavily inspired by Keith Rarick's fs package.

roadmap

  • There is way too much duplication in the Client methods. If there was an unmarshal(interface{}) method this would reduce a heap of the duplication.

contributing

We welcome pull requests, bug fixes and issue reports.

Before proposing a large change, first please discuss your change by raising an issue.

For API/code bugs, please include a small, self contained code example to reproduce the issue. For pull requests, remember test coverage.

We try to handle issues and pull requests with a 0 open philosophy. That means we will try to address the submission as soon as possible and will work toward a resolution. If progress can no longer be made (eg. unreproducible bug) or stops (eg. unresponsive submitter), we will close the bug.

Thanks.