Documentation ¶
Index ¶
- func SetAffectedByWindows(affected bool)
- func TrzMain() int
- func TrzszMain() int
- func TszMain() int
- type TrzszFilter
- func (filter *TrzszFilter) IsTransferringFiles() bool
- func (filter *TrzszFilter) SetDefaultDownloadPath(path string)
- func (filter *TrzszFilter) SetDefaultUploadPath(path string)
- func (filter *TrzszFilter) SetDragFileUploadCommand(command string)
- func (filter *TrzszFilter) SetProgressColorPair(colorPair string)
- func (filter *TrzszFilter) SetTerminalColumns(columns int32)
- func (filter *TrzszFilter) SetTunnelConnector(connector func(int) net.Conn)
- func (filter *TrzszFilter) StopTransferringFiles(stopAndDelete bool)
- func (filter *TrzszFilter) UploadFiles(filePaths []string) error
- type TrzszOptions
- type TrzszRelay
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetAffectedByWindows ¶
func SetAffectedByWindows(affected bool)
SetAffectedByWindows set whether trzsz is affected by Windows.
Types ¶
type TrzszFilter ¶
type TrzszFilter struct {
// contains filtered or unexported fields
}
TrzszFilter is a filter that supports trzsz ( trz / tsz ).
func NewTrzszFilter ¶
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 ¶
func (filter *TrzszFilter) IsTransferringFiles() bool
IsTransferringFiles returns whether trzsz is transferring files.
func (*TrzszFilter) SetDefaultDownloadPath ¶
func (filter *TrzszFilter) SetDefaultDownloadPath(path string)
SetDefaultDownloadPath set the path to automatically save while downloading files.
func (*TrzszFilter) SetDefaultUploadPath ¶
func (filter *TrzszFilter) SetDefaultUploadPath(path string)
SetDefaultUploadPath set the default open path while choosing upload files.
func (*TrzszFilter) SetDragFileUploadCommand ¶
func (filter *TrzszFilter) SetDragFileUploadCommand(command string)
SetDragFileUploadCommand set the command to execute while dragging files to upload.
func (*TrzszFilter) SetProgressColorPair ¶
func (filter *TrzszFilter) SetProgressColorPair(colorPair string)
SetProgressColorPair set the color pair for the progress bar.
func (*TrzszFilter) SetTerminalColumns ¶
func (filter *TrzszFilter) SetTerminalColumns(columns int32)
SetTerminalColumns set the latest columns of the terminal.
func (*TrzszFilter) SetTunnelConnector ¶
func (filter *TrzszFilter) SetTunnelConnector(connector func(int) net.Conn)
SetTunnelConnector set the connector for tunnel transferring.
func (*TrzszFilter) StopTransferringFiles ¶
func (filter *TrzszFilter) StopTransferringFiles(stopAndDelete bool)
StopTransferringFiles tell trzsz to stop if it is transferring files.
func (*TrzszFilter) UploadFiles ¶
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 ¶
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 // EnableOSC52 enable OSC52 clipboard feature. EnableOSC52 bool }
TrzszOptions specify the options to create a TrzszFilter.
type TrzszRelay ¶
type TrzszRelay struct {
// contains filtered or unexported fields
}
TrzszRelay is a relay that supports trzsz ( trz / tsz ).
func NewTrzszRelay ¶
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 ¶
func (r *TrzszRelay) SetTunnelConnector(connector func(int) net.Conn)
SetTunnelConnector set the connector for tunnel transferring.