7 Commits
2.0 ... 2.2

Author SHA1 Message Date
KingToolbox
f1a49022a9 Add a 1024x1024 WindTerm icon. 2021-07-24 02:28:12 +08:00
kingToolbox
d76580bea2 Update features of v2.1 and roadmap of v2.2 2021-07-17 23:45:41 +08:00
KingToolbox
be6e770876 A smart memory pointer. 2021-03-11 23:23:21 +08:00
KingToolbox
44cc3bb57c The timeout was not handled properly when processing the packet. 2021-03-11 23:20:16 +08:00
kingToolbox
99c095a22c Add forgotten "garbage collector". 2021-03-11 23:17:29 +08:00
kingToolbox
3bc1a009d5 Fix typo. 2021-03-11 23:11:50 +08:00
kingToolbox
07b34806ac Update features of v2.0 and roadmap of v2.1 2021-03-11 23:10:31 +08:00
5 changed files with 177 additions and 59 deletions

View File

@@ -1,9 +1,9 @@
# WindTerm
A professional SSH/Telnet/Serial/Shell/Sftp client for DevOps.
A Quicker and better SSH/Telnet/Serial/Shell/Sftp client for DevOps.
_Hello WindTerm :rose:, hello world!_
**We're just beginning! If you want a high performance text editor, you can try [WindEdit](https://www.github.com/kingToolbox/DIGEdit/).**
**We're just beginning! If you want a high performance text editor, you can try [WindEdit](https://www.github.com/kingToolbox/WindEdit/).**
# License
**Completely FREE for commercial and non-commercial use without limitations.**
@@ -15,9 +15,7 @@ See [Intro Videos](https://kingtoolbox.github.io)
# Download
**Linux binary** and **Windows binary**: https://github.com/kingToolbox/WindTerm/releases
(The binary of Macos will be committed later)
**Linux binary**, **MacOS binary** and **Windows binary**: https://github.com/kingToolbox/WindTerm/releases
# Source Code
@@ -52,18 +50,25 @@ DigeWhite Theme:
### SSH, Telnet, Tcp, Shell, Serial
- SSH v2, Telnet, Raw Tcp, Serial, Shell protocols implemented. [Intro Video](https://kingtoolbox.github.io/2020/01/22/new-session/)
- Supports SSH auto execution when session authenticated.
- Supports SSH ProxyCommand or ProxyJump. [Intro Video](https://kingtoolbox.github.io/2021/03/11/proxycommand/)
- Supports SSH agent forwarding. [Intro Video](https://kingtoolbox.github.io/2020/08/22/ssh_agent_forwarding/)
- Supports SSH auto login with password, public-key, keyboard-interactive, gssapi-with-mic. [Intro Video](https://kingtoolbox.github.io/2020/01/23/auto-login/)
- Supports X11 forwarding. [Intro Video](https://kingtoolbox.github.io/2020/07/21/x11_forwarding/)
- Supports direct/local port forwarding, reverse/remote port forwarding and dynamic port forwarding. [Intro Video](https://kingtoolbox.github.io/2020/07/21/port_forwarding/)
- Supports XModem, YModem and ZModem. [Intro Video](https://kingtoolbox.github.io/tags/modem/)
- Integrated sftp, scp client, supports download, upload, remove, rename, make new file/directory and so on. [Intro Video](https://kingtoolbox.github.io/tags/transfer/)
- Integrated local file manager, supports move to, copy to, copy from, remove, rename, make new file/directory and so on.
- Supports Windows Cmd, PowerShell and Cmd, PowerShell as administrator.
- Supports Linux bash, zsh, powershell core and so on.
- Supports MacOS bash, zsh, powershell core and so on.
### GUI
- Session dialog and session tree.
- **Focus Mode.** [Intro Video](https://kingtoolbox.github.io/2021/06/28/ui_focus_mode/)
- **Sync Input.** [Intro Video](https://kingtoolbox.github.io/2021/05/27/sync-input/)
- **Enhanced protection of the session username and password.** [Intro Video](https://kingtoolbox.github.io/2021/03/11/protection-username-password/)
- **Command palette.** [Intro Video](https://kingtoolbox.github.io/tags/command-palette/)
- **Command sender.** [Intro Video](https://kingtoolbox.github.io/tags/sender/)
- **Explorer Pane.** [Intro Video](https://kingtoolbox.github.io/2021/05/27/explorer/)
- **Quick Bar.** [Intro Video](https://kingtoolbox.github.io/2020/08/22/quickbar/)
- **Paste Dialog.** [Intro Video](https://kingtoolbox.github.io/2020/08/22/paste_dialog/)
- **Local and remote modes with vim keybindings. (Using Shift+Enter key to switch between remote and local mode**) [Intro Video](https://kingtoolbox.github.io/2020/06/21/keyboard-modes/)
@@ -74,11 +79,13 @@ DigeWhite Theme:
- Supports highlighting the opening and closing delimiter, such as (), [], {} and the customed delimiters. [Intro Video](https://kingtoolbox.github.io/2020/06/28/pair/)
- Supports changing the UI theme. [Intro Video](https://kingtoolbox.github.io/2020/09/18/theme/)
- Supports setting the tab color. [Intro Video](https://kingtoolbox.github.io/2020/09/18/tabbar-change-tabcolor/)
- Supports searching over the opened tabs. [Intro Video](https://kingtoolbox.github.io/2021/03/11/tabbar-search-tab/)
- Supports closing tabs to the right.
- Supports setting the windows transparency. [Intro video](https://kingtoolbox.github.io/2020/11/13/windows-opacity/)
- Supports select-to-copy and middle-click-to-paste.
- Supports select-to-copy, right-click-to-paste or middle-click-to-paste.
- Supports searching text online with Google, Bing, Github, Stackoverflow, Wikipedia and DuckDuckGo. [Intro video](https://kingtoolbox.github.io/2020/11/13/search-online/)
- Supports hiding mouse cursor while typing.
- **Supports locking screen.** [Intro video](https://kingtoolbox.github.io/2021/04/23/lock-screen/)
### Term
- Supports vt100, vt220, vt340, vt420, vt520, xterm, xterm-256-colors.
- Supports unicode, emojis, true-color, mouse protocol, etc.
@@ -86,7 +93,8 @@ DigeWhite Theme:
- Protocols and terms can be customed.
- All vttest tests have passed except Tektronix 4014.
### Session
- **Supports HTTP and SOCKS5 proxy.** [Intro Video](https://kingtoolbox.github.io/2020/10/17/proxy/)
- **Supports HTTP and SOCKS5 proxy.** [Intro Video](https://kingtoolbox.github.io/2021/03/11/proxy-http-socks5/)
- **Supports Jump Server proxy.** [Intro Video](https://kingtoolbox.github.io/2021/03/11/proxy-jump-server/)
- Supports manual and automated session logging. [Intro Video](https://kingtoolbox.github.io/tags/logging/)
- Rename and duplicate session. [Intro Video](https://kingtoolbox.github.io/tags/tabbar/)
- Restore last sessions and layouts when restart. [Intro Video](https://kingtoolbox.github.io/2020/01/22/restore-sessions/)
@@ -326,70 +334,30 @@ DIGEdit is the text component of WindTerm.
# Shortcuts
| Shortcut | Action |
| --- | --- |
| Alt+D | Show command palette |
| Alt+F | Find |
| Alt+F3 | Find next |
| Alt+Shift+F3 | Find previous |
| Alt+F4 | Exit |
| Alt+M, Alt+F | Toggle full screen |
| Alt+M, Alt+H | Toggle hex view |
| Alt+N | New session |
| Alt+O | Open session |
| Alt+S | Save text |
| Alt+T, Alt+B | Toggle margin blank |
| Alt+T, Alt+F | Toggle margin fold |
| Alt+T, Alt+N | Toggle margin number |
| Alt+T, Alt+S | Toggle margin symbol |
| Alt+W, Alt+D | Close active dock |
| Alt+W, Alt+G | Close active group |
| Alt+W, Alt+H | Split horizontally |
| Alt+W, Alt+L | Show outline pane |
| Alt+W, Alt+V | Split vertically |
| Alt+- | Zoom in |
| Alt++ | Zoom out |
| Alt+\[ | Activate next view |
| Alt+] | Activate previous view |
| Ctrl+. | Jump to next fold |
| Ctrl+, | Jump to previous fold |
| Ctrl+Shift+A | Select all text |
| Ctrl+Shift+T | Reopen closed session |
| Ctrl+Shift+W | Close current session |
| Ctrl+Shift+- | Select current fold text |
| Ctrl+Shift+C | Copy |
| Ctrl+Shift+V | Paste |
| Ctrl+Shift+X | Copy and paste |
| Shift+Del | Copy |
| Shift+End | Jump to document end |
| Shift+Home | Jump to document home |
| Shift+Ins | Paste |
| Shift+PgDown | Jump to next page |
| Shift+PgUp | Jump to previous page |
[Shortcut Keys List](https://kingtoolbox.github.io/tags/keyboard/)
# Roadmap
**Release cycle:**
2-4 weeks.
3-4 weeks.
**Features of version 2.2 (Mid-Augustfor reference only):**
- SSH ControlMaster
- SSH Agent Forwaring
- Global Settings Dialog Box
- Multilingual User Interface
- New memory allocator and manager and garbage collector. (Postponed to v2.3)
- Search in sessions. (Postponed to v2.3)
**Next release (Mid Januaryfor reference only):**
- Mosh
- Git Bash
- SSH
- x11 (Linux Version)
- ProxyCommand
**Featurs of version 2.x:**
- Shell Pane
- External tools
- UI:
- Config dialog
**Todo list:**
- Xmodem, Ymodem, Zmodem(sz, rz)
- Protocols:
- Mosh
- Rlogin
- Terminal:
- MacOs bash
- Session:
- Auto Complete
- Chat mode

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -30,6 +30,10 @@ A quick circular buffer template class.
A very safe encryption class using the PBKDF2-algorithm as defined in RFC 8018. WindTerm uses this class together with the user's master password to protect user data, including passwords, private keys and so on.
## Utility/MemoryPointer.h
A smart memory pointer.
## Utility/ScopeGuard.h
A class of which the sole purpose is to run the function f in its destructor. This is useful for guaranteeing your cleanup code is executed.

140
src/Utility/MemoryPointer.h Normal file
View File

@@ -0,0 +1,140 @@
#ifndef MEMORYPOINTER_H
#define MEMORYPOINTER_H
#pragma once
#include <QtGlobal>
template <typename T>
struct MemoryPointer {
typedef decltype(nullptr) nullptr_t;
public:
MemoryPointer()
: uMemory({ 0 })
{}
MemoryPointer(const MemoryPointer &other) = delete;
MemoryPointer &MemoryPointer::operator=(const MemoryPointer &other) = delete;
MemoryPointer &MemoryPointer::operator=(nullptr_t) noexcept {
free();
uMemory = { 0 };
return (*this);
}
MemoryPointer(MemoryPointer &&other) noexcept {
uMemory = other.uMemory;
other.uMemory = { 0 };
}
MemoryPointer& MemoryPointer::operator=(MemoryPointer &&other) noexcept {
if (this != &other) {
free();
uMemory = other.uMemory;
other.uMemory = { 0 };
}
return (*this);
}
~MemoryPointer() {
free();
}
inline T *data() const {
return static_cast<T *>(uMemory.pointer);
}
inline T *operator->() const {
return data();
}
inline T &operator*() const {
return *data();
}
inline operator T*() const {
return data();
}
inline operator bool() const noexcept {
return data() != nullptr;
}
inline bool isNull() const {
return uMemory.pointer == NULL;
}
private:
void free() {
if (uMemory.alloced) {
::free(reinterpret_cast<void *>(uMemory.pointer));
uMemory = { 0 };
}
}
private:
union MemoryUnion {
quint64 value;
struct {
quint64 alloced : 1;
quint64 pointer : 48;
};
};
MemoryUnion uMemory;
};
template <class T>
inline bool operator==(const T *o, const MemoryPointer<T> &p) {
return o == p.operator->();
}
template<class T>
inline bool operator==(const MemoryPointer<T> &p, const T *o) {
return p.operator->() == o;
}
template <class T>
inline bool operator==(T *o, const MemoryPointer<T> &p) {
return o == p.operator->();
}
template<class T>
inline bool operator==(const MemoryPointer<T> &p, T *o) {
return p.operator->() == o;
}
template<class T>
inline bool operator==(const MemoryPointer<T> &lhs, const MemoryPointer<T> &rhs) {
return lhs.operator->() == rhs.operator->();
}
template <class T>
inline bool operator!=(const T *o, const MemoryPointer<T> &p) {
return o != p.operator->();
}
template<class T>
inline bool operator!= (const MemoryPointer<T> &p, const T *o) {
return p.operator->() != o;
}
template <class T>
inline bool operator!=(T *o, const MemoryPointer<T> &p) {
return o != p.operator->();
}
template<class T>
inline bool operator!= (const MemoryPointer<T> &p, T *o) {
return p.operator->() != o;
}
template<class T>
inline bool operator!= (const MemoryPointer<T> &lhs, const MemoryPointer<T> &rhs) {
return lhs.operator->() != rhs.operator->();
}
#endif // MEMORYPOINTER_H

View File

@@ -2922,6 +2922,12 @@ int ssh_channel_read_timeout(ssh_channel channel,
timeout_ms,
ssh_channel_read_termination,
&ctx);
if (rc == SSH_AGAIN && ssh_is_blocking(session)) {
ssh_set_error(session, SSH_FATAL, "Handle packets timeout.");
return rc;
}
if (rc == SSH_ERROR){
return rc;
}