aprilsh

module
v0.0.0-...-2b3c0fb Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT

README

Aprilsh: remote shell support intermittent or mobile network. inspired by mosh and zutty. aprilsh is a remote shell based on UDP, authenticate user via openssh.

Install

reqirement
Alpine linux
wget -P /etc/apk/keys/ https://ericwq.github.io/alpine/packager-663ebf9b.rsa.pub    # add public key
echo "https://ericwq.github.io/alpine/v3.19/testing" >> /etc/apk/repositories       # add private repository
apk update                                                                          # update repositories metadata
apk add aprilsh                                                                     # install client and server
rc-service apshd start                                                              # start server

Note: aprilsh is still waiting for aports approval. For now please use the following private repository. The private repository only provide x86_64 packages.

when aports finally approve aprilsh, the above private repository will be replaced by testing repositories. The testing repositories will provide all architecture packages.

echo "https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories  # add testing repositories

if you want to build it manually, please refer to this document

Fedora, CentOS, Redhat linux
rpm --import https://ericwq.codeberg.page/RPM-GPG-KEY-wangqi            # import public key to rpm DB
dnf config-manager --add-repo https://ericwq.codeberg.page/aprilsh.repo # add new repo to dnf
dnf install aprilsh                                                     # install client and server

Note: This is a private yum/dnf repositories, it only provides x86_64 packages.

MacOS
brew tap ericwq/utils       # add tap to homebrew
brew install aprilsh        # only install aprilsh client

Motivation

openSSH is excellent. While mosh provides better keystroke prediction/latency and is capable of handle WiFi/cellular mobile network roaming. But mosh project is not active anymore and no release sine 2017. Such a good project like mosh should keeps developing.

After read through mosh source code, I decide to rewrite it with golang. Go is my first choice because the C++ syntax is too complex. Go also has excellent support for UTF-8 and multithreaded programming. The last reason: go compiler is faster than c++ compiler.

There are several rules for this project:

  • Keep the base design of mosh: SSP, UDP, keystroke prediction.
  • Use 3rd party library as less as possible to keep it clean.

There are also some goals for this project:

  • Full UTF-8 support, including emoji and flag support.
  • Support the terminal 24bit color.
  • Upgrade to proto3
  • Use terminfo database for better compatibility.
  • Prove golang is a good choice for terminal developing.

The project name Aprilsh is derived from April+sh. This project started in shanghai April 2022, and it's a remote shell. Use the above command to add musl locales support and utmps support for alpine. Note alpine only support UTF-8 charmap.

Architecture view

aprilsh.svg

  • The green part is provided by the system/terminal emulator. Such as alacritty or kitty.
  • The cyan part is provided by Aprilsh.
  • The yellow part is our target terminal application. In the above diagram it's neovim.
  • Actually the yellow part can be any terminal based application: emcas, neovim, htop, etc.
  • The rest part is provided by the system.

Changelog

Ready for early acess. The missing part is prediction engine tuning. Check here for history deatil.

Reference

Need some time to figure out how to support CSI u in aprilsh.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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