Giter Site home page Giter Site logo

veeso / termscp Goto Github PK

View Code? Open in Web Editor NEW
1.3K 11.0 41.0 26.26 MB

๐Ÿ–ฅ A feature rich terminal UI file transfer and explorer with support for SCP/SFTP/FTP/S3/SMB

Home Page: https://termscp.veeso.dev

License: MIT License

Rust 94.35% Shell 1.22% CSS 0.33% HTML 3.59% JavaScript 0.51%
rust rust-lang rust-crate scp ssh-client sftp-client ftp-client utility terminal-app terminal

termscp's Introduction

termscp

termscp logo

~ A feature rich terminal file transfer ~

Website ยท Installation ยท User manual

English ย  Deutsch ย  Espaรฑol ย  Franรงais ย  Italiano ย  ็ฎ€ไฝ“ไธญๆ–‡

Developed by @veeso

Current version: 0.13.0 (03/03/2024)

License-MIT Repo stars Downloads counter Latest version Ko-fi

Linux CI MacOS CI Windows CI Coveralls


About termscp ๐Ÿ–ฅ

Termscp is a feature rich terminal file transfer and explorer, with support for SCP/SFTP/FTP/S3. So basically is a terminal utility with an TUI to connect to a remote server to retrieve and upload files and to interact with the local file system. It is Linux, MacOS, FreeBSD, NetBSD and Windows compatible.

Explorer


Features ๐ŸŽ

  • ๐Ÿ“ Different communication protocols
    • SFTP
    • SCP
    • FTP and FTPS
    • S3
    • SMB
    • WebDAV
  • ๐Ÿ–ฅ Explore and operate on the remote and on the local machine file system with a handy UI
    • Create, remove, rename, search, view and edit files
  • โญ Connect to your favourite hosts through built-in bookmarks and recent connections
  • ๐Ÿ“ View and edit files with your favourite applications
  • ๐Ÿ’ SFTP/SCP authentication with SSH keys and username/password
  • ๐Ÿง Compatible with Windows, Linux, FreeBSD, NetBSD and MacOS
  • ๐ŸŽจ Make it yours!
    • Themes
    • Custom file explorer format
    • Customizable text editor
    • Customizable file sorting
    • and many other parameters...
  • ๐Ÿ“ซ Get notified via Desktop Notifications when a large file has been transferred
  • ๐Ÿ”ญ Keep file changes synchronized with the remote host
  • ๐Ÿ” Save your password in your operating system key vault
  • ๐Ÿฆ€ Rust-powered
  • ๐Ÿ‘€ Developed keeping an eye on performance
  • ๐Ÿฆ„ Frequent awesome updates

Get started ๐Ÿš€

If you're considering to install termscp I want to thank you ๐Ÿ’œ ! I hope you will enjoy termscp!
If you want to contribute to this project, don't forget to check out our contribute guide.

If you are a Linux, a FreeBSD or a MacOS user this simple shell script will install termscp on your system with a single command:

curl --proto '=https' --tlsv1.2 -sSLf "https://git.io/JBhDb" | sh

โ— MacOs installation requires Homebrew, otherwise the Rust compiler will be installed

while if you're a Windows user, you can install termscp with Chocolatey:

choco install termscp

NetBSD users can install termscp from the official repositories.

pkgin install termscp

For more information or other platforms, please visit termscp.veeso.dev to view all installation methods.

โš ๏ธ If you're looking on how to update termscp just run termscp from CLI with: (sudo) termscp --update โš ๏ธ

Requirements โ—

  • Linux users:
    • libdbus-1
    • pkg-config
    • libsmbclient
  • FreeBSD or, NetBSD users:
    • dbus
    • pkgconf
    • libsmbclient

Optional Requirements โœ”๏ธ

These requirements are not forced required to run termscp, but to enjoy all of its features

  • Linux/FreeBSD users:
    • To open files via V (at least one of these)
      • xdg-open
      • gio
      • gnome-open
      • kde-open
  • Linux users:
  • WSL users
    • To open files via V (at least one of these)

Support the developer โ˜•

If you like termscp and you're grateful for the work I've done, please consider a little donation ๐Ÿฅณ

You can make a donation with one of these platforms:

ko-fi PayPal


User manual ๐Ÿ“š

The user manual can be found on the termscp's website or on Github.


Upcoming Features ๐Ÿงช

For 2023 there will be two major updates during the year.

Along to new features, termscp developments is now focused on UX and performance improvements, so if you have any suggestion, feel free to open an issue.


Contributing and issues ๐Ÿค๐Ÿป

Contributions, bug reports, new features and questions are welcome! ๐Ÿ˜‰ If you have any question or concern, or you want to suggest a new feature, or you want just want to improve termscp, feel free to open an issue or a PR.

An appreciated contribution would be a translation of the user manual and readme in other languages

Please follow our contributing guidelines


Changelog โณ

View termscp's changelog HERE


Powered by ๐Ÿ’ช

termscp is powered by these awesome projects:


Gallery ๐ŸŽฌ

Termscp Home

Auth

Bookmarks

Bookmarks

Setup

Setup

Text editor

TextEditor


License ๐Ÿ“ƒ

termscp is licensed under the MIT license.

You can read the entire license HERE

termscp's People

Contributors

0323pin avatar 529 avatar byron avatar delta2force avatar ericsmoon avatar fenex avatar flashlab avatar imgbotapp avatar maelvls avatar pascal-so avatar piradata avatar rakerzh avatar sakhmatd avatar thebrenny avatar tonakai-s avatar veeso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

termscp's Issues

[Feature Request] - Default remote folder for bookmarks

Description

Can you add the possibility to change the remote folder (by default home directory) and/or possibility to navigate in whole file system?

Changes

When connect the default remote folder is home directory, you can't go up with TermSCP unlike FileZilla, WinSCP or classic SSH cli.
Can you change this?

[BUG] AUR package sha265sum mismatch

Hi! Is the 256 checksum still correct in the AUR PKGBUILD for the latest release? I'm getting a conflict. The PKGBUILD says 7a8c70add8306a2cb3f2ee1d075a00fef143fc9aad4199797c7462bab1649296 but I consistently get 04a827ebeac48f0c181617acfa9f2a674e7ac91117a85bf4e68ec6ce31ee4077 when manually downloading from source.

Thanks!

[Feature Request] - ECDSA & EDSA SSH Key Support For SCP

Description

While RSA is still used, it's old, has been subject to several vulnerabilities, and is gradually being phased out in favor of superior cryptography. I would propose support for the following two SSH key types that are supported by OpenSSH, OpenSSL, and GnuTLS:

  1. ECDSA (ecdsa-sha2-nistp256): This is the NIST standard for FIPS compliant systems.
  2. EDSA (ed25519): This high performance implementation is extremely secure and favored by many modern applications. (e.g. Wireguard, Facebook Messenger, iOS, TOR, WhatsApp, Monero, etc.) It will also comply with FIPS 186-5.

cargo install is broken on macOS

Description

cargo install termscp is broken at least on macOS.

Steps to reproduce

Run cargo install termscp on macOS.

Expected behaviour

Installed termscp binary.

Environment

  • OS: macOS 11.5.2
  • apple silicon m1
  • rustc 1.55.0 (c8dfcfe04 2021-09-06)
  • v0.6.1
  • NA
  • NA

Log

error[E0432]: unresolved imports `tui_realm_stdlib::input`, `tui_realm_stdlib::radio`
  --> /Users/tosha/.cargo/registry/src/github.com-1ecc6299db9ec823/termscp-0.6.1/src/ui/activities/auth/bookmarks.rs:35:24
   |
35 | use tui_realm_stdlib::{input::InputPropsBuilder, radio::RadioPropsBuilder};
   |                        ^^^^^                     ^^^^^ could not find `radio` in `tui_realm_stdlib`
   |                        |
   |                        could not find `input` in `tui_realm_stdlib`

error[E0432]: unresolved imports `tui_realm_stdlib::input`, `tui_realm_stdlib::label`, `tui_realm_stdlib::list`, `tui_realm_stdlib::paragraph`, `tui_realm_stdlib::radio`, `tui_realm_stdlib::span`, `tui_realm_stdlib::textarea`
  --> /Users/tosha/.cargo/registry/src/github.com-1ecc6299db9ec823/termscp-0.6.1/src/ui/activities/auth/view.rs:34:5
   |
34 |     input::{Input, InputPropsBuilder},
   |     ^^^^^ could not find `input` in `tui_realm_stdlib`
35 |     label::{Label, LabelPropsBuilder},
   |     ^^^^^ could not find `label` in `tui_realm_stdlib`
36 |     list::{List, ListPropsBuilder},
   |     ^^^^ could not find `list` in `tui_realm_stdlib`
37 |     paragraph::{Paragraph, ParagraphPropsBuilder},
   |     ^^^^^^^^^ could not find `paragraph` in `tui_realm_stdlib`
38 |     radio::{Radio, RadioPropsBuilder},
   |     ^^^^^ could not find `radio` in `tui_realm_stdlib`
39 |     span::{Span, SpanPropsBuilder},
   |     ^^^^ could not find `span` in `tui_realm_stdlib`
40 |     textarea::{Textarea, TextareaPropsBuilder},
   |     ^^^^^^^^ could not find `textarea` in `tui_realm_stdlib`

error[E0432]: unresolved import `tui_realm_stdlib::progress_bar`
  --> /Users/tosha/.cargo/registry/src/github.com-1ecc6299db9ec823/termscp-0.6.1/src/ui/activities/filetransfer/update.rs:45:23
   |
45 | use tui_realm_stdlib::progress_bar::ProgressBarPropsBuilder;
   |                       ^^^^^^^^^^^^ could not find `progress_bar` in `tui_realm_stdlib`

error[E0432]: unresolved imports `tui_realm_stdlib::input`, `tui_realm_stdlib::list`, `tui_realm_stdlib::paragraph`, `tui_realm_stdlib::progress_bar`, `tui_realm_stdlib::radio`, `tui_realm_stdlib::span`, `tui_realm_stdlib::table`
  --> /Users/tosha/.cargo/registry/src/github.com-1ecc6299db9ec823/termscp-0.6.1/src/ui/activities/filetransfer/view.rs:43:5
   |
43 |     input::{Input, InputPropsBuilder},
   |     ^^^^^ could not find `input` in `tui_realm_stdlib`
44 |     list::{List, ListPropsBuilder},
   |     ^^^^ could not find `list` in `tui_realm_stdlib`
45 |     paragraph::{Paragraph, ParagraphPropsBuilder},
   |     ^^^^^^^^^ could not find `paragraph` in `tui_realm_stdlib`
46 |     progress_bar::{ProgressBar, ProgressBarPropsBuilder},
   |     ^^^^^^^^^^^^ could not find `progress_bar` in `tui_realm_stdlib`
47 |     radio::{Radio, RadioPropsBuilder},
   |     ^^^^^ could not find `radio` in `tui_realm_stdlib`
48 |     span::{Span, SpanPropsBuilder},
   |     ^^^^ could not find `span` in `tui_realm_stdlib`
49 |     table::{Table, TablePropsBuilder},
   |     ^^^^^ could not find `table` in `tui_realm_stdlib`

Decouple file transfers into a separate crate

TermSCP's generic file transfer implementation is extremely well developed and one of a kind! AFAIK, there isn't a single crate dedicated to supporting a generic impl of multiple file transfer protocols over the network. Decoupling this would hopefully establish a general ground in the Rust ecosystem and encourage the community to implement their own protocols.

I'm sure this isn't a top priority, but nevertheless, it is definitely something that should be considered.

Auth with private key

Hi and thank you for this project!

I'm trying to authenticate to a server using a private key, but termscp seems to always ask for a password?
Is it possible to authenticate with a private key? The documentation mentions how to add SSH keys but there doesn't seem to be anything about using them for authenticating.

Many thanks and happy new year!

[BUG] - Can't enter @ character in password input box

Description

Can't type @ character in password box

Steps to reproduce

Set your SSH password with a @ character
Try to input your password in password box
Password is always invalid because @ character is escaped in TUI

Expected behaviour

Enable @ character as a part of a password and make it inputable in password box

Environment

  • OS: Windows 10 21H1
  • Architecture: 64bits
  • Rust version: unknow
  • termscp version: 0.6.1
  • Protocol used: SCP
  • Remote server version and name: N/A

Log

Additional information

FYI it's works if you provide the password with @ character in the CLI with the -P option

Nice app ;-)

[QUESTION] - MacOS HomeBrew Invalid formula

It can not be installed on my macbook air x86 (not m1).
"Expected to find class TermscpM1, but only found: Termscp."

โ‹Š> ~ curl --proto '=https' --tlsv1.2 -sSLf "https://git.io/JBhDb" | sh


  Termscp configuration
> Platform:      macos
> Arch:          x86_64

? Install termscp 0.8.1? [y/N] y
> Installing termscpโ€ฆ
Running `brew update --preinstall`...
==> Tapping veeso/termscp
Cloning into '/usr/local/Homebrew/Library/Taps/veeso/homebrew-termscp'...
remote: Enumerating objects: 120, done.
remote: Counting objects: 100% (120/120), done.
remote: Compressing objects: 100% (67/67), done.
remote: Total 120 (delta 30), reused 111 (delta 27), pack-reused 0
Receiving objects: 100% (120/120), 14.14 KiB | 804.00 KiB/s, done.
Resolving deltas: 100% (30/30), done.
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/veeso/homebrew-termscp/Formula/termscp-m1.rb
No available formula with the name "termscp-m1". Did you mean termscp?
In formula file: /usr/local/Homebrew/Library/Taps/veeso/homebrew-termscp/Formula/termscp-m1.rb
Expected to find class TermscpM1, but only found: Termscp.
Error: Cannot tap veeso/termscp: invalid syntax in tap!

extremely slow file transfer

Description

i'm facing a very slow file transfer, i don't know if i'm missing anything, but scp and my dart implementation using libssh manages to finish the transfer much faster.

Steps to reproduce

fn main() {
    //configure log
    CombinedLogger::init(
        vec![
            TermLogger::new(LevelFilter::Debug, Config::default(), TerminalMode::Mixed, ColorChoice::Auto),           
        ]
    ).unwrap();
    //configure host
    let localhost = Localhost::new(PathBuf::from(r"C:\MyRustProjects\fsbackup_engine")).unwrap();

    //connection setup
    let config = ProtocolParams::Generic(GenericProtocolParams {
        address: "192.168.133.13".to_string(),
        port: 22,
        username: Some(String::from("isaque.neves")),
        password: Some(String::from("Ins257257")),
    });

    let mut activity = FileTransferActivity::new(localhost, FileTransferProtocol::Scp, config);
    activity.connect();

    //let file_to_download = FsEntry::File(FsFile::from_str("/var/www/.profile")); //this work
    let dir_to_download = FsEntry::Directory(FsDirectory::from_str("/var/www/html/Alex"));
    let dest_dir_path = r"C:\MyRustProjects\fsbackup_engine\download";
    let destiny= PathBuf::from(dest_dir_path);
    //create directory if it doesn't exist
    std::fs::create_dir_all(dest_dir_path).expect(format!("Failed to create directory: {}", dest_dir_path).as_str());

    match activity.filetransfer_recv(TransferPayload::Any(dir_to_download), &destiny, None) {
        Ok(result) => {
            println!("result: {:?}", result);
        }
        Err(e) => {
            println!("error: {}", e);//eprintln!()
            process::exit(0);//1
        }
    }
}

Expected behaviour

the expected behavior should be copying the directory without any errors

Environment

  • OS: Linux Debian 10 to Windows 11
  • Architecture [x86_64]
  • Rust version rustc 1.56.1 (59eed8a2a 2021-11-01)
  • termscp version last
  • Protocol used SCP
  • Remote server version and name Linux Debian 10

Additional information

With SCP: 14 seconds

image

With rust + lib ssh2: 132.175213 seconds

image
image

image

in dart + libssh

PS C:\MyDartProjects\fsbackup\packages\libssh_binding> .\example\main.exe 
scpDownloadDirectory: total size: 48958110 in bytes | 46.69009208679199 megabytes of directory /var/www/html/portalPmro
scpDownloadDirectory: end of directories
scpDownloadDirectory: total size: 48958110 | copied: 48958110

0:00:10.203692

image

[Feature Request] - Some recommended changes to the user interface

Description

Some recommended improvements to the interface.

Changes

Key bindings:

  • Home key should go to top of file list
  • End key should go to bottom of file list
  • Tab should switch between local and remote list, use another key bind to go to the log view.

For everyone used to Midnight Commander, Total Commander, FMan, etc, this would be really nice:

  • F5 key should also download/upload like Space
  • Shift-F6 key should also rename
  • F7 should also create directory
  • F8 should also delete

File/directory names should have more space, right now names are cropped even though there is plenty of space to the right.

In the browsing view when connected to remote it would be nice with a hint to using H to show available keys. It took me quite a while to figure out that pressing Space key would copy. Had to find the website manual which really shouldn't be necessary.

  • ...

[QUESTION] - can termscp be used in command line for automation via scripts?

can termscp be used in command line for automation via scripts?

I couldn't locate in help on how to transfer or copy a file?

termscp --help
Usage: termscp [options]... [protocol://user@address:port:wrkdir] [local-wrkdir]

Options:
-P, --password
Provide password from CLI (use at your own risk)
-T, --ticks Set UI ticks; default 10ms
-v, --version
-h, --help Print this menu

[BUG] - Help window content is not fully visible

Description

There are too many keybindings now. Help window must be reimplemented as a scrolling paragraph.

Steps to reproduce

Press <H>

Expected behaviour

If the window is too small, the user should still be able to see the help window content.

[BUG] - Install DEB package show raw html

Description

Preview install DEB package show raw html (see screenshot)

Steps to reproduce

Installing DEB package

Expected behaviour

Having clear text and description/image when installing DEB package

Environment

  • OS: GNU/Linux Mint 20.2 Cinnamon with 5.11 kernel
  • Architecture: 64bits
  • Rust version:
  • termscp version: 0.6.1
  • Protocol used:
  • Remote server version and name:

Log

Additional information

Please see screenshot
Termscp_DEB

[BUG] - Unable to quit the running task such as "search"

Description

A clear and concise description of what the bug is.

When I connect to my ftp client successfully, I try to search a keyword in it using F, but it gets stuck in the Searching for "xxx" window, and I cannot quit the job or use other command like F10|Q or F1|H, I have to kill termcp process from other temrinal.

Steps to reproduce

Steps to reproduce the bug you encountered

  1. Connect to a client through FTP
  2. navigate to the client directory
  3. F to search something
  4. it gets stuck, unable to do anything else, have to kill it in other terminal

Expected behaviour

A clear and concise description of what you expected to happen.

It should successfully find or not_find the files/directories instead of getting stuck, and it should not prevent other commands

Environment

  • OS: [e.g. GNU/Linux Debian 10] Arch Linux
  • Architecture [Arm, x86_64, ...] x86_x64
  • Rust version: rustc 1.62.0 (a8314ef7d 2022-06-27)
  • termscp version: 0.9.0
  • Protocol used : FTP
  • Remote server version and name: Android Smart Phone, not sure the version and name

Log

Report the snippet of the log file containing the unexpected behaviour.
If there is any information you consider to be confidential, shadow it.

Additional information

Add any other context about the problem here.

[BUG] - Unable to remove non-empty directories with FTP

Description

It's impossible to remove directories which are not empty using FTP

Steps to reproduce

Make a directory, fill it and then try to remove it.

Expected behaviour

Recursive deletion should work.

Environment

  • 1.52.1
  • 0.5.0
  • FTP
  • pure-ftpd

Log

Could not delete file "/christian.visintin": Not enough permissions (Not enough permissions (FTP InvalidResponse: Expected code [250], got response: 550 Could not delete ca.crt: No such file or directory

Maybe the path is relative?

[BUG] Every FTP transfers are made in ASCII mode

Pure-FTPd under Ubuntu and termscp under Windows 10:

Every FTP transfers are made in ASCII mode, which is very dangerous since it modifies every files !
Only the binary mode shall be used in FTP.

[BUG] Could not start activity manager: Could not access file: No such file or directory (os error 2)

Hey!

Thanks for the quick response on my other ticket -- yay install worked fine after you updated the checksum.

I've got it installed now, but I'm getting an error on launch... regardless of what arguments I include, I always get Could not start activity manager: Could not access file: No such file or directory (os error 2)

I'm running Manjaro 21, not pure Arch, but that normally doesn't make a difference.

[BUG] Still some problems with symlinks

Hello,

I've tested your solution for the symlinks hash and backslash characters.
It's better but there are still some problems with symlinks.

Tested with FTP (Pure-FTPd) under Ubuntu and termscp under Windows 10:

  • I still can't enter inside symlinks but it works with the Goto command
  • I can now browse and enter inside the directories

Tested with SFTP (OpenSSH) under Ubuntu and termscp under Windows 10:

  • I can't enter inside symlinks at all and they are now considered like files
    so the Goto command doesn't work
    (I can enter the symlinks using the Goto command without your solution)

[BUG] - Can't type any AltGr character in password box

Description

Can't type any AltGr character in password box

Steps to reproduce

Set your SSH password with a @ # character
Try to input your password in password box
Password is always invalid because @ # characters are escaped in TUI

Expected behaviour

Make AltGr character inputable in password box

Environment

OS: Windows 10 21H2
Architecture: 64bits
termscp version: 0.8.0

Additional information

FYI it's works if you provide the password with an AltGr character in the CLI with the -P option

Same bug was present in version 0.6.1, not in 0.7.0 and reintroduced (?) in 0.8.0

[COPY] - Chinese README documentation

Report

/docs/zh-CN/README.md

Hi, I'm a Chinese developer interested in Rust. Also, a newbie to open source projects. I found that the Chinese README documentation is a little bit raw in translation, can I open a PR to re-translate it?

If there is a subsequent need for translation of the Chinese documentation, I would be happy to help.

Additional information

โ— Report LANGUAGE checks only if it concerns the documents above
โ— If the documents concerns more than one language, copy paste the checks below for each check you want to report
โ— The PR mention regards the indicated language. If you check the box, I may add you to a PR where I need to translate a new section of the user manual/README or other documents. I promise I won't stress you anyway.

  • I am C1/C2 speaker for this language: LANGUAGE
    • You can mention me in a PR in case a review for translations is needed

[BUG] - Compile error when running the provided install script

Description

Fails to compile with install script

Steps to reproduce

Run the provided install script:
curl --proto '=https' --tlsv1.2 -sSLf "https://git.io/JBhDb" | sh

Expected behaviour

Should install the termscp program

Environment

  • OS: GNU/Linux 5.15.32-1-MANJARO
  • Architecture x86_64
  • Rust version: rustup 1.24.3, rustc 1.62.0
  • termscp version 0.9

Log

error[E0432]: unresolved import `cache::UsersCache`
   --> /home/REDACTED/.cargo/registry/src/github.com-1ecc6299db9ec823/users-0.11.0/src/lib.rs:145:9
    |
145 | pub use cache::UsersCache;
    |         ^^^^^^^^^^^^^^^^^ no `UsersCache` in `cache`

For more information about this error, try `rustc --explain E0432`.
error: could not compile `users` due to previous error
warning: build failed, waiting for other jobs to finish...
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: termscp

Additional information

First I got this error:

error[E0583]: file not found for module `cache`
   --> /home/REDACTED/.cargo/registry/src/github.com-1ecc6299db9ec823/users-0.11.0/src/lib.rs:142:1
    |
142 | pub mod cache;
    | ^^^^^^^^^^^^^^
    |
    = help: to create the module `cache`, create file "/home/REDACTED/.cargo/registry/src/github.com-1ecc6299db9ec823/users-0.11.0/src/cache.rs" or "/home/REDACTED/.cargo/registry/src/github.com-1ecc6299db9ec823/users-0.11.0/src/cache/mod.rs"

error[E0432]: unresolved import `cache::UsersCache`
   --> /home/REDACTED/.cargo/registry/src/github.com-1ecc6299db9ec823/users-0.11.0/src/lib.rs:145:9
    |
145 | pub use cache::UsersCache;
    |         ^^^^^^^^^^^^^^^^^ no `UsersCache` in `cache`

Some errors have detailed explanations: E0432, E0583.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `users` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: termscp

So I tried to create the cache.rs file with touch. Not sure that's what you need to do? So that error went away, but now I got the other error in the above Log section.

[BUG] - Panics when displaying long non-ascii filenames

Description

When displaying files with long non-ascii filenames (locally or remotely), termscp panics. Presumably this is due to incorrect line-wrap / ellipsis handling?

Especially, if PWD contains files with long non-ascii filename, then termscp immediately panics on startup.

Steps to reproduce

$ mkdir -p /tmp/termscp-test
$ cd /tmp/termscp-test
$ echo > ๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ต
# With a narrow terminal
$ termscp
thread 'main' panicked at 'byte index 23 is not a char boundary; it is inside 'ๅ–ต' (bytes 21..24) of `ๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ต`', /root/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/termscp-0.8.1/src/explorer/formatter.rs:308:37
                            note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Expected behaviour

Should not panic when display any filename.

Environment

  • OS: ArchLinux in WSL2
  • Architecture x86_64
  • Rust version: rustc 1.59.0-nightly (f1ce0e6a0 2022-01-05)
  • termscp version: 0.8.1
  • Protocol used: scp
  • Remote server version and name: Multiple OpenSSH. One of them is "OpenSSH_7.6p1 Ubuntu-4ubuntu0.5, OpenSSL 1.0.2n 7 Dec 2017"

Log

(I tested in /root/tmp)

2022-03-29T16:32:05+0000 [INFO] Reading directory /root/tmp
2022-03-29T16:32:05+0000 [INFO] Stating file /root/tmp/ๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ตๅ–ต

[BUG] - SCP/FTP regex fails to parse when user or group contains symbols

Description

I'm trying to use your lib/code to transfer a folder from the remote server to my local machine, and it's failing because there's a bug with the regular expression you use to parse the output of the "ls -la" command. the regex cannot handle this output
"-rwxrwxrwx 1 www-data www-data 890524 Mar 14 2018 CIENTE.mdj"

Steps to reproduce

fn main() {
    //configure log
    CombinedLogger::init(
        vec![
            TermLogger::new(LevelFilter::Debug, Config::default(), TerminalMode::Mixed, ColorChoice::Auto),           
        ]
    ).unwrap();
    //configure host
    let localhost = Localhost::new(PathBuf::from(r"C:\MyRustProjects\fsbackup_engine")).unwrap();

    //connection setup
    let config = ProtocolParams::Generic(GenericProtocolParams {
        address: "192.168.133.13".to_string(),
        port: 22,
        username: Some(String::from("isaque.neves")),
        password: Some(String::from("Ins257257")),
    });

    let mut activity = FileTransferActivity::new(localhost, FileTransferProtocol::Scp, config);
    activity.connect();

    //let file_to_download = FsEntry::File(FsFile::from_str("/var/www/.profile")); //this work
    let dir_to_download = FsEntry::Directory(FsDirectory::from_str("/var/www/html/Alex"));
    let dest_dir_path = r"C:\MyRustProjects\fsbackup_engine\download";
    let destiny= PathBuf::from(dest_dir_path);
    //create directory if it doesn't exist
    std::fs::create_dir_all(dest_dir_path).expect(format!("Failed to create directory: {}", dest_dir_path).as_str());

    match activity.filetransfer_recv(TransferPayload::Any(dir_to_download), &destiny, None) {
        Ok(result) => {
            println!("result: {:?}", result);
        }
        Err(e) => {
            println!("error: {}", e);//eprintln!()
            process::exit(0);//1
        }
    }
}

Expected behaviour

the expected behavior should be copying the directory without any errors

Environment

  • OS: Linux Debian 10 to Windows 11
  • Architecture [x86_64]
  • Rust version rustc 1.56.1 (59eed8a2a 2021-11-01)
  • termscp version last
  • Protocol used SCP
  • Remote server version and name Linux Debian 10

Log

C:/rust/cargo/bin/cargo.exe run --color=always --package fsbackup_engine --bin fsbackup_engine
    Finished dev [unoptimized + debuginfo] target(s) in 0.12s
     Running `target\debug\fsbackup_engine.exe`
17:40:28 [DEBUG] (1) fsbackup_engine::host: Initializing localhost at C:\MyRustProjects\fsbackup_engine
17:40:28 [INFO] Localhost initialized with success
17:40:28 [INFO] Connecting to 192.168.133.13:22
17:40:28 [DEBUG] (1) fsbackup_engine::filetransfer::transfer::scp: Trying socket address 192.168.133.13:22
17:40:28 [DEBUG] (1) fsbackup_engine::filetransfer::transfer::scp: 192.168.133.13:22 succeded
17:40:28 [DEBUG] (1) fsbackup_engine::filetransfer::transfer::scp: Initializing handshake
17:40:28 [DEBUG] (1) fsbackup_engine::filetransfer::transfer::scp: Authenticating with username isaque.neves and password *********
17:40:28 [DEBUG] (1) fsbackup_engine::filetransfer::transfer::scp: Connection established: SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2
17:40:28 [DEBUG] (1) fsbackup_engine::filetransfer::transfer::scp: Getting working directory...
17:40:28 [DEBUG] (1) fsbackup_engine::filetransfer::transfer::scp: Running command: pwd
17:40:28 [DEBUG] (1) fsbackup_engine::filetransfer::transfer::scp: Command output: /home/isaque.neves

17:40:28 [INFO] Connection established; working directory: /home/isaque.neves
17:40:28 [INFO] Established connection with '192.168.133.13': "SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2"
17:40:28 [INFO] Getting file entries in /var/www/html/Alex
17:40:28 [DEBUG] (1) fsbackup_engine::filetransfer::transfer::scp: Running command: cd "/home/isaque.neves"; unset LANG; ls -la "/var/www/html/Alex/"
17:40:29 [DEBUG] (1) fsbackup_engine::filetransfer::transfer::scp: Command output: total 2472
drwxrwxrwx  2 www-data www-data    4096 Nov 25 13:34 .
drwxrwxrwx 88 www-data www-data    4096 Nov 25 10:42 ..
-rwxrwxrwx  1 www-data www-data  890524 Mar 14  2018 CIENTE.mdj
-rwxrwxrwx  1 www-data www-data  149234 Aug  2  2017 permisao_cetil.xlsx
-rwxrwxrwx  1 www-data www-data 1477161 Mar  6  2018 pmro_padrao.mdj

17:40:29 [DEBUG] (1) fsbackup_engine::filetransfer::transfer::scp: parsed FsEntry:  Err(())
17:40:29 [DEBUG] (1) fsbackup_engine::filetransfer::transfer::scp: parsed FsEntry:  Err(())
17:40:29 [DEBUG] (1) fsbackup_engine::filetransfer::transfer::scp: parsed FsEntry:  Err(())
17:40:29 [DEBUG] (1) fsbackup_engine::filetransfer::transfer::scp: parsed FsEntry:  Err(())
17:40:29 [DEBUG] (1) fsbackup_engine::filetransfer::transfer::scp: parsed FsEntry:  Err(())
17:40:29 [DEBUG] (1) fsbackup_engine::filetransfer::transfer::scp: parsed FsEntry:  Err(())
17:40:29 [INFO] Found 0 out of 6 valid file entries
17:40:29 [DEBUG] (1) fsbackup_engine::activities::filetransfer_activiy: Get local_dir_path: C:\MyRustProjects\fsbackup_engine\download
17:40:29 [DEBUG] (1) fsbackup_engine::activities::filetransfer_activiy: Get dst_name: None
17:40:29 [INFO] Making directory C:\MyRustProjects\fsbackup_engine\download\Alex
17:40:29 [INFO] Created directory "C:\MyRustProjects\fsbackup_engine\download\Alex"
17:40:29 [INFO] Getting file entries in /var/www/html/Alex
17:40:29 [DEBUG] (1) fsbackup_engine::filetransfer::transfer::scp: Running command: cd "/home/isaque.neves"; unset LANG; ls -la "/var/www/html/Alex/"
17:40:29 [DEBUG] (1) fsbackup_engine::filetransfer::transfer::scp: Command output: total 2472
drwxrwxrwx  2 www-data www-data    4096 Nov 25 13:34 .
drwxrwxrwx 88 www-data www-data    4096 Nov 25 10:42 ..
-rwxrwxrwx  1 www-data www-data  890524 Mar 14  2018 CIENTE.mdj
-rwxrwxrwx  1 www-data www-data  149234 Aug  2  2017 permisao_cetil.xlsx
-rwxrwxrwx  1 www-data www-data 1477161 Mar  6  2018 pmro_padrao.mdj

17:40:29 [DEBUG] (1) fsbackup_engine::filetransfer::transfer::scp: parsed FsEntry:  Err(())
17:40:29 [DEBUG] (1) fsbackup_engine::filetransfer::transfer::scp: parsed FsEntry:  Err(())
17:40:29 [DEBUG] (1) fsbackup_engine::filetransfer::transfer::scp: parsed FsEntry:  Err(())
17:40:29 [DEBUG] (1) fsbackup_engine::filetransfer::transfer::scp: parsed FsEntry:  Err(())
17:40:29 [DEBUG] (1) fsbackup_engine::filetransfer::transfer::scp: parsed FsEntry:  Err(())
17:40:29 [DEBUG] (1) fsbackup_engine::filetransfer::transfer::scp: parsed FsEntry:  Err(())
17:40:29 [INFO] Found 0 out of 6 valid file entries
fn notify_transfer_completed
result: ()

Process finished with exit code 0

Additional information

[QUESTION] - Launch termscp from ssh session

Hi there. As the title says: is it possible to launch termscp from a ssh session? I've tried to launch the program through a ssh shell into a remote server (Windows 10 OS) but nothing happens. thank you.

[BUG] - Possible to upload a directory that already exists on remote

Is it wanted behavior that you can't upload a directory from local to remote if the directory (with the same name) already exists on the remote server? It is of course more secure this way, but sometimes there's a need to just bulk upload and replace a folder and its contents. Or am I the only one getting an error when trying this?

[ERROR]: Failed to create directory "/xxxx/xxxxx/xxxxx/xxxxx": Failed to create file ([SFTP(4)] failure)

[BUG] - Hidden UI elements when window height is too small

Description

If the window height gets too small, elements are hidden without indication (e.g. invisible password field). They can still be accessed with the keyboard and accept inputs.

Screenshot

Steps to reproduce

Reduce the window height.

Expected behaviour

If UI elements do not fit the window, there should be a way to reveal them by scrolling. A scroll indicator should indicate that some elements are not visible.

Environment

  • OS: Arch Linux, i3
  • Architecture: x86_64
  • termscp version: 0.5.0

[BUG] - prebuilt binary cannot run under macos 11

Description

I downloaded the prebuilt binary from releases page, and got below error when execute it.

dyld: Library not loaded: /usr/local/opt/[email protected]/lib/libssl.1.1.dylib
  Referenced from: /Users/mac/Desktop/./termscp
  Reason: image not found
Abort trap: 6

Steps to reproduce

curl -LO https://github.com/veeso/termscp/releases/download/v0.9.0/termscp-v0.9.0-x86_64-apple-darwin.tar.gz
tar -xf termscp-v0.9.0-x86_64-apple-darwin.tar.gz
./termscp

Expected behaviour

application run success

Environment

  • OS: macos 11.6.7
  • Architecture x86_64
  • termscp version

[Feature Request] - Parse the SSH config file

Description

Hello. As I see from the description, this project uses libssh as the SSH protocol implementation. It would be really nice if termscp could parse the SSH config file and apply SFTP/SCP session settings according to the parsed parameters.

For example, it would allow a public key authentication, control sockets support to speed up connections, a known_hosts file support for hosts' keys verification etc.

Changes

The following changes to the application are expected

  • Parse the SSH config file
  • Apply SFTP/SCP session settings

Implementation

https://api.libssh.org/master/group__libssh__session.html

[BUG] - Progress bar not visibile when editing remote files

Description

When downloading / uploading files with single file method, progress bar is not being shown.

Steps to reproduce

  • edit a remote file

Expected behaviour

The progress bar should be visible

Environment

  • 1.52.1
  • 0.5.0

Log

N.A.

Additional information

N.A.

Fix

wrap send_file function with a function which does something similar to the one which sends multiple files.

[BUG] - FTP: can't move files to other directories

Description

It seems that FTP is using relative names, so it is not possible to rename directories

Steps to reproduce

Just try to rename a file to another paths.

Expected behaviour

The file should be moved somewhere else

[BUG] - Panick message when closing Termscp

Description

When exiting Termscp Windows version got the message:
thread 'main' panicked at 'Original console mode not set: TryFromIntError(())', C:\Users\chris.cargo\regist
ry\src\github.com-1ecc6299db9ec823\crossterm-0.20.0\src\event\sys\windows.rs:36:10
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Steps to reproduce

Use Termscp Windows version
Open Termscp in native command prompt or WSL
Exiting Termscp with ESC key
Got panick message

Expected behaviour

Not having panick message ;-)

Environment

  • OS: Windows 10 21H1
  • Architecture: 64bits
  • Rust version:
  • termscp version: 0.6.1
  • Protocol used:
  • Remote server version and name:

Log

Termscp.log attached with RUST_BACKTRACE=1 environment variable set

Additional information

termscp.log

Parsing SSH config + identity files

Hi, I noticed that #77 / #84 implemented parsing a SSH config.

I built master and then I added the following to my termscp config but nothing seems to happen?

[remote]
ssh_config = "/etc/ssh/ssh_config"

That file has a Host section so I was expecting to see that host as a bookmark in termscp, maybe I'm misunderstanding what was implemented?

Also my ssh_config has a IdentityFile directive for the Host section so I was hoping to use this to avoid having to "import" the SSH key into termscp manually, but it seems https://github.com/veeso/ssh2-config doesn't support IdentityFile? It seems to support pretty much everything else so maybe there's a reason for this?

In the end I'd love it if I could just run termscp my_host and have termscp read all config from my ssh config file.

[BUG] - Chinese file error

Description

When my computer container a filename with a Chinese text, the termscp just crashed

Steps to reproduce

Create a file container Chinese text, then connect to server

Expected behaviour

TermSCP do not crash

Environment

  • OS: [MacOS]
  • Architecture [x86_64]
  • termscp version 0.8.1
  • Protocol used SFTP

Log

thread 'main' panicked at 'byte index 23 is not a char boundary; it is inside '็ปˆ' (bytes 21..24) of `ใ€Œๆฑ‰ๅญ—ไน‹่ถฃใ€ๆœ€็ปˆ็‰ˆ.pptx`', src/explorer/formatter.rs:
308:37
      note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Additional information

No additional information

[Feature Request] Keyring-rs to store secrets

Premise

TermSCP uses an AES 256 byte key to encrypt secrets/passwords in bookmarks.
At the moment the AES key is stored in one of the following paths, based on the user's operating system:

  • Linux: /home/alice/.config/termscp/.ssh/
  • MacOS: /Users/Alice/Library/Application Support/termscp/.ssh/
  • Windows: C:\Users\Alice\AppData\Roaming\termscp\.ssh\

This method is quite safe, since anyway, keys are located in a path which is accessible only by the current user.

The Keyring solution

The optimal solution to store the secret would probably be to use keyring-rs which allows the user to store the termscp secret in the operating system vault.
The solution is actually quite simple, since just in a few lines of code, this crates provides a way to do so:

extern crate keyring;
extern crate whoami; // whoami is already in termscp, so only keyring must be added

use keyring::Keyring;

let service: String = String::from("termscp");
let secret: String = generate_key(); // Generates a 256 Bytes random key
let username: String = whoami::username();
let storage: Keyring = Keyring::new(service.as_str(), username.as_str());
// Save password into the storage
if let Err(err) = storage.set_password(secret.as_str()) {
    // Handle error...
}
// ...
// Retrieve password from the storage to decrypt
let secret: String = match storage.get_password() {
    Ok(s) => s,
    Err(e) => { /* Handle error */ },
};

Unfortunately, if on one side this makes safer to handle secrets, at the same time adds a lot of issues.

The BSD compatibility break

Keyring-rs just doesn't support BSD, which would break the compatibility with it. So it must be a feature for BSD

The D-BUS dilemma

On Linux keyring-rs uses D-BUS and requires a service which provides org.freedesktop.secrets. And there are three issues with that.

  1. Some DE doesn't provide any org.freedesktop.secrets service. As a Manjaro/KDE user, I wasn't able to find any service running which provides it, making me unable to use it. I haven't checked how many DE actually supports it, GNOME supports it for sure.
  2. the D-BUS low-level dependency: unfortunately, building keyring-rs on Linux, requires to have the libdbus installed, which is totally MEH. There is no problem if you use a real GNU/Linux operating systems, but what about for example WSL? My WSL doesn't have libdbus installed, since it is not supported, and I haven't any intention to install it. In addition personally, I'm not a huge fan of forcing users to install C libraries to make an application to work. Personally when I see a crate which requires a particular C library to be installed, I give up installing it, not because it's complicated, but just because it's annoying.
  3. The application name is bounded torust-keyring. I'm not 100% sure this means the only service you can use is actually rust-keyring, but if it so, for me it's totally a big no no.

Implementation

After the analysis of the issues introduced by the crate, I haven't given up in implementing this feature, indeed I've actually decided I will implement it in 0.3.1/0.3.2.

The implementation consists in adding a new trait Keystorage which provides these methods:

  • get_secret() -> &str
  • set_secret(secret: &str) -> Result
  • supported() -> bool (static)

and I will implement two providers: KeyringStorage which uses keyring-rs and FileStorage which uses the current implementation.

The keyring-rs crate will be available on Windows and MacOS only, while on Linux, at least until libdbus will be required, I won't be supported. I know it's a pity, considering that probably a big slice of the audience of termscp are Linux/WSL users, but this would introduce many compatibility issues and would remove the coverage for many users (wsl users in particular).

[BUG] - Build on termux(aarch64) failed in building 'keyrings'

Description

Termscp can't build and errors while building keyrings, error like 'error[E0425]: cannot find function `xxx` in module `platform`'

Steps to reproduce

cd to cloned git repo
run 'cargo build'

Expected behaviour

Termcscp can be build successfully and I can install it.

Environment

  • OS: Termux on HarmonyOS (Android 10)
  • Architecture aarch64
  • Rust version cargo 1.61.0 rustc 1.61.0
  • termscp version newtest
  • Protocol used none
  • Remote server version and name none

Log

โฏ cargo rustc
   Compiling keyring v1.1.2
   Compiling proc-macro2 v1.0.40
   Compiling quote v1.0.20
   Compiling syn v1.0.98
   Compiling lock_api v0.4.7
   Compiling num-integer v0.1.45
   Compiling indexmap v1.9.0
   Compiling libdbus-sys v0.2.2
error[E0583]: file not found for module `platform`
  --> /data/data/com.termux/files/home/.cargo/registry/src/github.com-1ecc6299db9ec823/keyring-1.1.2/src/lib.rs:75:1
   |
75 | mod platform;
   | ^^^^^^^^^^^^^
   |
   = help: to create the module `platform`, create file "/data/data/com.termux/files/home/.cargo/registry/src/github.com-1ecc6299db9ec823/keyring-1.1.2/src/platform.rs" or "/data/data/com.termux/files/home/.cargo/registry/src/github.com-1ecc6299db9ec823/keyring-1.1.2/src/platform/mod.rs"

   Compiling instant v0.1.12
   Compiling memchr v2.5.0
   Compiling openssl-sys v0.9.74
   Compiling typenum v1.15.0
error[E0412]: cannot find type `Error` in module `crate::platform`
  --> /data/data/com.termux/files/home/.cargo/registry/src/github.com-1ecc6299db9ec823/keyring-1.1.2/src/error.rs:15:38
   |
15 |     PlatformFailure(crate::platform::Error),
   |                                      ^^^^^ not found in `crate::platform`
   |
help: consider importing one of these items
   |
7  | use core::fmt::Error;
   |
7  | use crate::Error;
   |
7  | use std::error::Error;
   |
7  | use std::fmt::Error;
   |
     and 1 other candidate

error[E0412]: cannot find type `Error` in module `crate::platform`
  --> /data/data/com.termux/files/home/.cargo/registry/src/github.com-1ecc6299db9ec823/keyring-1.1.2/src/error.rs:21:38
   |
21 |     NoStorageAccess(crate::platform::Error),
   |                                      ^^^^^ not found in `crate::platform`
   |
help: consider importing one of these items
   |
7  | use core::fmt::Error;
   |
7  | use crate::Error;
   |
7  | use std::error::Error;
   |
7  | use std::fmt::Error;
   |
     and 1 other candidate

error[E0425]: cannot find function `platform` in module `platform`
  --> /data/data/com.termux/files/home/.cargo/registry/src/github.com-1ecc6299db9ec823/keyring-1.1.2/src/lib.rs:67:15
   |
67 |     platform::platform()
   |               ^^^^^^^^ not found in `platform`

error[E0425]: cannot find function `set_password` in module `platform`
   --> /data/data/com.termux/files/home/.cargo/registry/src/github.com-1ecc6299db9ec823/keyring-1.1.2/src/lib.rs:118:19
    |
118 |         platform::set_password(&self.target, password)
    |                   ^^^^^^^^^^^^ not found in `platform`

error[E0425]: cannot find function `get_password` in module `platform`
   --> /data/data/com.termux/files/home/.cargo/registry/src/github.com-1ecc6299db9ec823/keyring-1.1.2/src/lib.rs:125:19
    |
125 |         platform::get_password(&mut map)
    |                   ^^^^^^^^^^^^ not found in `platform`

error[E0425]: cannot find function `get_password` in module `platform`
   --> /data/data/com.termux/files/home/.cargo/registry/src/github.com-1ecc6299db9ec823/keyring-1.1.2/src/lib.rs:134:34
    |
134 |         let password = platform::get_password(&mut map)?;
    |                                  ^^^^^^^^^^^^ not found in `platform`

error[E0425]: cannot find function `delete_password` in module `platform`
   --> /data/data/com.termux/files/home/.cargo/registry/src/github.com-1ecc6299db9ec823/keyring-1.1.2/src/lib.rs:142:19
    |
142 |         platform::delete_password(&self.target)
    |                   ^^^^^^^^^^^^^^^ not found in `platform`

Some errors have detailed explanations: E0412, E0425, E0583.
For more information about an error, try `rustc --explain E0412`.
   Compiling generic-array v0.14.5
   Compiling tracing-core v0.1.27
error: could not compile `keyring` due to 8 previous errors
warning: build failed, waiting for other jobs to finish...

Additional information

How to solve it? Install a package of do something else? Or android really can't build this f*** thing.

[BUG] Some problems with symlinks, slash and backlash characters

Hello,

I'm using Pure-FTPd under Ubuntu 20.10 and termscp 0.4.0 under Windows 10
and there are some problems with symlinks, slash and backlash characters:

1- [INFO ]: Established connection with '192.168.1.212': "220 This is a private system"
2- [INFO ]: Changed directory on remote: /Documents
3- [ERROR]: Could not change working directory: Connection error (FTP InvalidResponse: Expected code [250], got response: 553 Prohibited file name: /Documents\HOUSE)
4- [INFO ]: Changed directory on remote: /Documents/HOUSE

1- It connects correctly and show correctly the symlink Documents but I can't enter it
2- So I try the Goto command and type Documents and it works
3- Then I try to enter the HOUSE directory but it fails since termscp is sending /Documents\HOUSE instead of /Documents/HOUSE
4- So I try the Goto command again and type /Documents/HOUSE and it works

[Feature Request] - Keyring-rs to store secrets on Linux

Description

This is the linux implementation related to the keyring storage feature described in issue #2.

The reasons which caused linux not being supported for keyring-rs, were basically these:

  1. D-BUS as C-binding

    • Basically keyring-rs on Linux requires a service on D-BUS which provides org.freedesktop.secrets
    • libdbus must be installed on target system. This is not a problem, since almost all linux distro have D-BUS nowadays (except WSL)
    • There must a way to keep supporting WSL
  2. Lack of services providing org.freedesktop.secrets: there are few services providing it, and basically exception made for GNOME, all the others distros doesn't provide an implementation of it by default. It must be considered that 80% of the Linux audience of termscp uses arch linux, so they probably don't use GNOME. A list of services implementing the DBUS endpoint must be provided and in case there's nothing providing it, termscp must keep using the old ssh key file.

Changes

The following changes to the application are expected

  • Add keyring-rs as dependency to linux
  • keyring as a feature (always on for Windows/MacOS)
  • A new build for WSL in deploy must be provided that doesn't use keyring (UNLESS LIBDBUS IS ACTUALLY SUPPORTED IN WSL AND DOESN'T CREATE ANY ISSUE)
  • In case a WSL distro is made, in install.sh must be handled WSL
  • In case a WSL distro is made, update website with wsl installation.

Implementation requirements

Fulfill report with outcomes before starting implementation

  • Provide a list of services implementing org.freedesktop.secrets

  • Verify that keyring-rs actually works on Linux as expected (with all candidates services)

    • KeePassXC: not really easy to use; a guide must be provided to users ๐Ÿ”ฅ
    • GNOME Keyring
  • Verify that libdbus works on WSL

  • Verify that keyring-rs works on WSL/Linux reporting no such service org.freedesktop.secrets

    Not exactly; reports SecretServiceError

Implementation

  • Add a new wno-keyring feature to build without keyring (enabled for tests by default)
  • Report new feature in documentation
  • Report how to setup KeepassXC on Linux
  • Make available for all operating systems except BSD keyring
  • Report installation of dbus on different operating systems:
    • Debian: libdbus-1-3; cargo: libdbus-1-dev
    • Arch: lib32-dbus
    • RPM: libdbus; libdbus-devel
  • Update dockerfiles for automatic builds

[BUG] - Colours not reset after editor

Description

When I open my editor (vim) which has a background colour set, the colours are not fully reset when switching back to the filetransfer view.

See this GIF with exaggerated colours for a demonstration:

colour

Steps to reproduce

  1. Set a .vimrc with a background colour that is noticeably different from your normal terminal background. Example .vimrc used for the gif:

    highlight Normal ctermbg=darkblue
  2. open termscp

  3. edit a file (make sure your editor is set to vim)

  4. close the editor (:q)

  5. enjoy

Expected behaviour

I'd expect the interface to retain the visuals from before I opened the editor.

Environment

  • OS: Arch Linux (5.15.13-arch1-1)
  • Architecture: x86_64
  • Rust version: 1.57.0
  • termscp version: reproduced with both AUR packaged version 0.8.0 and latest main (d1457253c480cbd852b3461389508437ee03240d)
  • Protocol used: ftp / sftp
  • Remote server version and name: docker image panubo/vsftpd:latest

[BUG] - MacOS HomeBrew Invalid formula

Description

I follow the install steps run the command: curl --proto '=https' --tlsv1.2 -sSLf "https://git.io/JBhDb" | sh and let it install.

Steps to reproduce

Just install termscp on the intel chip macOS machine

Expected behaviour

I just want let it install!

Environment

  • OS: [macOS 12.3.1 21E258]
  • Architecture [x86_64]

Log

  Termscp configuration
> Platform:      macos
> Arch:          x86_64

? Install termscp 0.8.1? [y/N] y
> Installing termscpโ€ฆ
==> Tapping veeso/termscp
Cloning into '/usr/local/Homebrew/Library/Taps/veeso/homebrew-termscp'...
remote: Enumerating objects: 120, done.
remote: Counting objects: 100% (120/120), done.
remote: Compressing objects: 100% (67/67), done.
remote: Total 120 (delta 30), reused 111 (delta 27), pack-reused 0
Receiving objects: 100% (120/120), 14.14 KiB | 1.57 MiB/s, done.
Resolving deltas: 100% (30/30), done.
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/veeso/homebrew-termscp/Formula/termscp-m1.rb
No available formula with the name "termscp-m1". Did you mean termscp?
In formula file: /usr/local/Homebrew/Library/Taps/veeso/homebrew-termscp/Formula/termscp-m1.rb
Expected to find class TermscpM1, but only found: Termscp.
Error: Cannot tap veeso/termscp: invalid syntax in tap!

Additional information

No additional information

[BUG] - Transfer size is wrong when transferring selected files

Description

When downloading or uploading files using selections, the transfer size is applied to the individual file in transfer, instead that on the entire transfer.
An analysis have to be done in order to solve this issue.

Steps to reproduce

transfer a group of files.

Expected behaviour

The transfer size should actually be the sum of the files' size.

Environment

N.A.

Log

N.A.

Additional information

N.A.

[Feature Request] - Support UseKeychain in ssh config file

Description

My SSH keys are themselves passphrase protected, and MacOS stores those passphrases in the Keychain so I don't have to enter them everytime

Description from man ssh_config:

On macOS, specifies whether the system should search for passphrases in the user's keychain when attempting to use a particular key. When the passphrase is provided by the user, this option also specifies whether the
passphrase should be stored into the keychain once it has been verified to be correct. The argument must be โ€œyesโ€ or โ€œnoโ€. The default is โ€œnoโ€.

Changes

The following changes to the application are expected

  • If I run termscp my_host it should work connect just as if I ran ssh my_host
  • At the very least, allow the config parser to fail silently on this particular config variable. It otherwise fails to use the config file at all

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.