trzsz

package
v1.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2023 License: MIT Imports: 34 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetAffectedByWindows added in v1.1.3

func SetAffectedByWindows(affected bool)

SetAffectedByWindows set whether trzsz is affected by Windows.

func TrzMain

func TrzMain() int

TrzMain is the main function of `trz` binary.

func TrzszMain

func TrzszMain() int

TrzszMain is the main function of `trzsz` binary.

func TszMain

func TszMain() int

TszMain is the main function of `tsz` binary.

Types

type TrzszFilter added in v1.1.1

type TrzszFilter struct {
	// contains filtered or unexported fields
}

TrzszFilter is a filter that supports trzsz ( trz / tsz ).

func NewTrzszFilter added in v1.1.1

func NewTrzszFilter(clientIn io.Reader, clientOut io.WriteCloser,
	serverIn io.WriteCloser, serverOut io.Reader, options TrzszOptions) *TrzszFilter

NewTrzszFilter create a TrzszFilter to support trzsz ( trz / tsz ).

┌────────┐ ClientIn ┌─────────────┐ ServerIn ┌────────┐ │ ├─────────────►│ ├─────────────►│ │ │ Client │ │ TrzszFilter │ │ Server │ │ │◄─────────────┤ │◄─────────────┤ │ └────────┘ ClientOut └─────────────┘ ServerOut └────────┘

Specify the columns of the terminal in options.TerminalColumns.

func (*TrzszFilter) IsTransferringFiles added in v1.1.1

func (filter *TrzszFilter) IsTransferringFiles() bool

IsTransferringFiles returns whether trzsz is transferring files.

func (*TrzszFilter) SetDefaultDownloadPath added in v1.1.6

func (filter *TrzszFilter) SetDefaultDownloadPath(downloadPath string)

SetDefaultDownloadPath set the path to automatically save while downloading files.

func (*TrzszFilter) SetDefaultUploadPath added in v1.1.6

func (filter *TrzszFilter) SetDefaultUploadPath(uploadPath string)

SetDefaultUploadPath set the default open path while choosing upload files.

func (*TrzszFilter) SetTerminalColumns added in v1.1.1

func (filter *TrzszFilter) SetTerminalColumns(columns int32)

SetTerminalColumns set the latest columns of the terminal.

func (*TrzszFilter) SetTunnelConnector added in v1.1.6

func (filter *TrzszFilter) SetTunnelConnector(connector func(int) net.Conn)

SetTunnelConnector set the connector for tunnel transferring.

func (*TrzszFilter) StopTransferringFiles added in v1.1.1

func (filter *TrzszFilter) StopTransferringFiles(stopAndDelete bool)

StopTransferringFiles tell trzsz to stop if it is transferring files.

func (*TrzszFilter) UploadFiles added in v1.1.1

func (filter *TrzszFilter) UploadFiles(filePaths []string) error

UploadFiles try to upload the files and directories asynchronously.

Returns nil means added to the upload queue, not mean that the upload is successful. Returns error if an error occurs before adding to the upload queue.

type TrzszOptions added in v1.1.1

type TrzszOptions struct {
	// TerminalColumns is the columns of the terminal.
	TerminalColumns int32
	// DetectDragFile is an optional feature.
	// If DetectDragFile is true, will detect the user input to determine whether user is dragging to upload.
	DetectDragFile bool
	// DetectTraceLog is for debugging.
	// If DetectTraceLog is true, will detect the server output to determine whether to enable trace logging.
	DetectTraceLog bool
	// EnableZmodem enable zmodem lrzsz ( rz / sz ) feature.
	EnableZmodem bool
}

TrzszOptions specify the options to create a TrzszFilter.

type TrzszRelay added in v1.1.0

type TrzszRelay struct {
	// contains filtered or unexported fields
}

TrzszRelay is a relay that supports trzsz ( trz / tsz ).

func NewTrzszRelay added in v1.1.0

func NewTrzszRelay(clientIn io.Reader, clientOut io.WriteCloser,
	serverIn io.WriteCloser, serverOut io.Reader, options TrzszOptions) *TrzszRelay

NewTrzszRelay create a TrzszRelay to support trzsz through a jump server.

┌────────┐ ClientIn ┌────────────┐ ServerIn ┌────────┐ │ ├─────────────►│ ├─────────────►│ │ │ Client │ │ TrzszRelay │ │ Server │ │ │◄─────────────┤ │◄─────────────┤ │ └────────┘ ClientOut └────────────┘ ServerOut └────────┘

func (*TrzszRelay) SetTunnelConnector added in v1.1.6

func (r *TrzszRelay) SetTunnelConnector(connector func(int) net.Conn)

SetTunnelConnector set the connector for tunnel transferring.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL