@PACKAGE@ - Version @VERSION@ Packages The various source and binary packages are available at http://www.five-ten-sg.com/@PACKAGE@/packages/. The most recent documentation is available at http://www.five-ten-sg.com/@PACKAGE@/. A Mercurial source code repository for this project is available at http://hg.five-ten-sg.com/@PACKAGE@/. A companion terminal monitor project is available at http://www.five-ten-sg.com/510ConnectbotMonitor Bitcoin donations for this project may be sent to bitcoin:1EkbpYhcbAwmU3L7xXPisHQdwWSyjdaY2A 2019-10-04 Carl Byington 510 Software Group @PACKAGE@ 1 @PACKAGE@ @VERSION@ @PACKAGE@ an android vt320 tn5250 terminal emulator for telnet and ssh connections Build method This is an android project with native code, so "make builder style=debug" should build cleanly. Introduction I belive that the previous connectbot projects are improperly licensed. They contain a mix of Apache 2.0 and GPLv2+ code, and those two licenses are incompatible. I have relicensed this as GPLv3+, since that is compatible with the licenses of all the sub-parts. This fork extends previous Connectbot projects in two ways. It includes tn5250 terminal emulation, in addition to the previous vt320 terminal emulation. It also contains hooks for a separate monitoring process that has access to some of the internal operations in this emulator. Other changes from previous Connectbots The Android SecureRandom bug has been fixed in newer versions of Android, but this code now compensates for that bug in older versions. If you have keys generated on older Android devices, those keys should be discarded, and you should generate new keys. The underlying compression code from jcraft has been updated. The underlying socks proxy code has been updated. The underlying ssh code has been updated from trilead to ganymed. Elliptic curve crypto is now supported, but the NIST curves are placed after the RSA and DH types in the list of key exchange algorithms, so they should only be used if the server does not support RSA or DH. This change is based on on a general lack of trust in NIST curves that have possibly been compromised by the NSA. The soft function keypad now has better labels, and can generate all 24 function keys for 5250 emulation. A hardware button can be configured to display that function keypad. A deployment.connections text file is read (and optionally deleted) on startup. This may be used to preconfigure the global options and to create an initial set of host connections. This is only useful for bulk deployments. The font sizes are now kept with one decimal point, and font size changes are done by scaling by a constant factor of 1.1, rather than the linear additive 2 point factor. On a per-host basis, you can either allow the font size to change the number of rows and columns depending on the visibility of the soft keyboard, or you can fix the number of rows and colums. Using a larger font with a fixed number of rows and columns, you may only be able to see the top left part of the logical screen that is being used by the host system. There is no vertical or horizontal scrolling yet. The configurable hardware buttons can now change the font size. The soft function keypad now includes the cursor movement keys. Help Pages About - including list of credits Hints Physical Keyboard 5250 Keys Screen Gestures Virtual Keyboard Terminal Monitor For every terminal session (local, telnet, ssh or tn5250), this terminal emulator also makes a connection to a terminal monitor process, which can see cursor movement and screen contents, and can inject characters to send to the host. The terminal monitor is invoked by calling an android Intent named "com.five_ten_sg.connectbot.monitor.MonitorService". That ensures that the monitor process is running, and should then be listening on TCP port 6000 for incoming connections. The terminal emulator then connects to the terminal monitor on port 6000. The native android Intent and Service communication mechanisms are not used. The messages exchanged between the terminal emulator and the terminal monitor are arrays of uint16 values in network byte order. Each message starts with a uint16 message length, followed by that many uint16 values. The next uint16 contains the message command value, and the remaining uint16 values are the arguments if any for that command. Any arguments that are characters are represented as 16 bit unicode. Note that the first 256 such characters are identical to the ISO-8859-1 latin character set. There is no provision for handling surrogate pairs as in UTF-16. Keystroke arguments (see DEPRESS) are represented as Microsoft Virtual-Key codes, defined here. INIT = 0 (TE -> Monitor). The argument is a string of uint16 characters. The meaning of these characters is defined by the monitor. It might be a fully qualified path name, or some other data used by the monitor to drive the monitoring of this connection. ACTIVATE = 1 (TE -> Monitor). The first argument is the number of lines. The second argument is the number of columns. That is followed by lines*columns uint16 character codes for the current screen contents. This connection is now the active connection. It is the topmost (or only) window visible to the user - typed keystrokes will be sent to the host on the other end of this connection. KEYSTATE = 2 (TE -> Monitor). The argument is a single uint16 value, 1 for key down, 0 for key up. The TE tracks a single special key for the monitor, and reports key up/down state when it changes. The actual key is configurable. CURSORMOVE = 3 (TE -> Monitor). The first argument is the line number (0..23), the second argument is the column number (0..79), and the third argument is the reason for sending this cursor update. REASON=0 is from a previous CURSORREQUEST command. REASON=1 is a cursor update related to the previous SCREENCHANGE buffer update. REASON=2 is a cursor update caused by user keystrokes. SCREENCHANGE = 4 (TE -> Monitor). The first argument is the number of lines. The second argument is the number of columns. That is followed by lines*columns uint16 character codes for the current screen contents. Every SCREENCHANGE message from the TE will be followed by a CURSORMOVE message. When the TE sends the screen contents as a result of a previous screen watch, the screen watch area is then reset to the entire screen. The monitor is then responsible for sending a screenwatch command to set the watch area to something appropriate for that new screen. Once the monitor has set the watch area to some part of a single line, there is no mechanism for the monitor to reset it to back to the entire screen. That reset only happens when the TE sends the screen contents. FIELDVALUE = 5 (TE -> Monitor). SETFIELD = 5 (Monitor -> TE). The first argument is the line number (0..23) and the second argument is the column number (0..79). That is followed by the field value, a sequence of uint16 character codes from the screen buffer. The field covers N columns, where N = (message length - 4). When sent from the monitor to the emulator, this causes the emulator to send the field codes to the host (for async modes) or to set the specified field contents (for block modes). If the field length is zero, the TE should move the cursor to the specified line/column. This is also used as the reply message from the emulator to the monitor for a previous GETFIELD from the monitor. GETFIELD = 6 (Monitor -> TE). The first argument is the line number (0..23) and the second argument is the starting column number (0..79), and the third argument is the field length in columns. This command causes the emulator to send a FIELDVALUE message back to the monitor. SCREENWATCH = 7 (Monitor -> TE). The first argument is the line number (0..23) and the second argument is the starting column number (0..79), and the third argument is the field length in columns. This command causes the emulator to watch the specified part of the screen for changes. When that part of the screen changes, the emulator will send a SCREENCHANGE message back to the monitor. The initial screen watch area is the entire screen. Subsequent screenwatch requests replace the current one, so the TE has only one watch area at any time. DEPRESS = 8 (Monitor -> TE). The argument is a single uint16 value containing the vk_key value. This command causes the emulator to simulate a keypress for that key. The codes are defined here. SHOWURL = 9 (Monitor -> TE). The single argument is a sequence of uint16 character codes forming a URL to be displayed. SWITCHSESSION = 10 (Monitor -> TE). There are no arguments. The TE should display this session. CURSORREQUEST = 11 (Monitor -> TE). There are no arguments. The TE should send a CURSORMOVE update to the monitor. Cursor movement caused by SETFIELD or DEPRESS commands does not trigger CURSORMOVE updates in block mode (tn5250) sessions. Those commands do trigger CURSORMOVE updates in async mode (telnet, ssh) sessions. SAYSTRING = 12 (TE -> Monitor). The first argument is nonzero if any current speech should be flushed. The second argument is nonzero if this speech should be synchronous. That is followed by uint16 character codes to be spoken. Note that the language is specified by the monitor, not the TE. TODO The tn5250 ssl/tls key storage should use the same storage mechanism as the base ssh key storage. Copyright Copyright (C) 2019 by 510 Software Group <carl@five-ten-sg.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, please write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. Version @VERSION@ 2019-10-04 Carl Byington 510 Software Group deployment.connections 5 @PACKAGE@ @VERSION@ deployment.connections deployment file for @PACKAGE@ Description The deployment.connections sample file is below. If this file exists at the top level of the external storage (as returned by Environment.getExternalStorageDirectory().getAbsolutePath()), it is read, parsed, and optionally deleted. Comments start with # and extend to the end of the line. The deployment file is deleted unless it contains "delete_deployment=false" in the global options section. In that case, the file remains, and it is read and parsed every time the app is launched. Version @VERSION@