{"id":13437986,"url":"https://github.com/codewar65/VTX_ClientServer","last_synced_at":"2025-03-19T18:31:26.384Z","repository":{"id":217393541,"uuid":"97280298","full_name":"codewar65/VTX_ClientServer","owner":"codewar65","description":"VTX Client / Server package.","archived":false,"fork":false,"pushed_at":"2019-08-30T17:02:22.000Z","size":13309,"stargazers_count":78,"open_issues_count":8,"forks_count":13,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-10-27T23:24:10.007Z","etag":null,"topics":["ansi-codes","freepascal","http-server","javascript-client","pascal","telnet-client","vtx","websocket-server"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codewar65.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-07-14T23:44:15.000Z","updated_at":"2024-08-03T06:21:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"75bd7dd1-ede8-46a6-991c-b5533926f647","html_url":"https://github.com/codewar65/VTX_ClientServer","commit_stats":null,"previous_names":["codewar65/vtx_clientserver"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewar65%2FVTX_ClientServer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewar65%2FVTX_ClientServer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewar65%2FVTX_ClientServer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewar65%2FVTX_ClientServer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codewar65","download_url":"https://codeload.github.com/codewar65/VTX_ClientServer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244483287,"owners_count":20460085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansi-codes","freepascal","http-server","javascript-client","pascal","telnet-client","vtx","websocket-server"],"created_at":"2024-07-31T03:01:01.961Z","updated_at":"2025-03-19T18:31:25.586Z","avatar_url":"https://github.com/codewar65.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# VTX_ClientServer\n\nupdated: 23-JUL-2019\n\n\n![VTX Client Screenshot](https://raw.githubusercontent.com/codewar65/VTX_ClientServer/master/work/vtx_screen1.png \"Logo Title Text 1\")\n\n## Intro\n\nVTX consists of a web / websocket server written in FreePascal, and a browser \nbased javascript client.  The client can be run as a stand alone item if the\noperator has their own webserver and access to a websocket proxy.\n\nThe server software listens to two separate ports while running. A port for \nHTTP, and a separate port for Web Sockets.\n\nA 'user' connects to the web server via HTTP. The web server delivers a client \npayload (html, css, javascript client, web font) to the 'user's web browser.\n\nThe client software then connects to the server via a web socket connection. \nUpon a 'user' connection to the web socket server, the server will wither spawn \na 'sysop' defined application ('node' software) or connect to a telnet server. \nThe 'node' software pipes raw binary text to / from the server via StdIn / \nStdOut. The server then relays this stream to the 'user' through the web socket \nconnection. Alternately, VTX server can be configured to connect to a remote \ntelnet server (bbs or other service).\n\nThe server console is written in Free Pascal.\n\nThe client is written in javascript. The client can be run independant of the \nserver if you have your own web and websocket proxy. (See Client Only Setup \nbelow.)\n\nThe sample 'node' is written in Free Pascal.\n\nLazarus project files are included.\n\nThe www directory contains files sent via HTTP.\n\nThe node directory contains files needed for the 'node' applications.\n\nThe work directory is various unneeded stuff I use for web graphics and testing.\n\n\n## Client Features\n\nAny column width display by any length page. Using webfont specified in html/css \ntemplate file (in the www path).\n\nANSI: 256 colors (base 8 + high intensity + 6x6x6 color cube + grays) - see \nhttps://en.wikipedia.org/wiki/ANSI_escape_code PETSCII: Commodore color palettes.\n\nANSI: 24-bit color support. (see vtx.txt)\n\nTransparent black in VTX mode.\n\nVariable row sizing, row background effects, and marquee text rows in VTX ANSI \nmode.\n\nSupport up to 64 SVG sprites from 64 SVG sprite definitions. \n\nSee https://github.com/codewar65/VTX_ClientServer/blob/master/vtx.txt for ANSI \ncode sequences supported.\n\nY-Modem 1K upload and download. \n\nBuild in audio player for streaming audio with ANSI sequences to set source, \nvolume, play, stop.\n\n\n## PETSCII Mode\n\nVIC 20, Commodore 64 or 128 font support. All PETSCII controls are emulated. \nColor palette depends on CodePage.\n\nKeys mapped to:\n* Backspace   = BACK/DEL\n* Del         = BACK/DEL\n* ESC         = RUN/STOP\n* END         = Text Mode\n* Shift END   = Graphics Mode\n* HOME        = HOME\n* Shift HOME  = CLR\n* Arrows      = Arrows\n* Ctrl 1      = Black\n* Ctrl 2      = White\n* Ctrl 3      = Red\n* Ctrl 4      = Cyan\n* Ctrl 5      = Purple\n* Ctrl 6      = Green\n* Ctrl 7      = Blue\n* Ctrl 8      = Yellow\n* Ctrl 9      = Reverse Off\n* Ctrl 0      = Reverse On\n* Alt 1       = Orange\n* Alt 2       = Brown\n* Alt 3       = Lt Red\n* Alt 4       = Dk Gray\n* Alt 5       = Gray\n* Alt 6       = Lt Green\n* Alt 7       = Lt Blue\n* Alt 8       = Lt Gray\n* F1-F8       = F1-F8\n* Tab         = Toggle Text / Graphics\n\n\n## ATASCII Mode\n\nATARI 8bit font support. All ATASCII controls are emulated. Only two color support (0/1).\n\nKeys mapped to:\n* ESC         = Escape\n* Arrows      = Cursor move\n* Shift HOME  = Clear Screen \n* Backspace   = Backspace\n* Tab         = Tab\n* SHIFT Tab   = Set Tabstop\n* CTRL Tab    = Clear Tabstop\n* Return      = End Line\n* SHIFT DEL   = Delete row\n* SHIFT INS   = Insert Row\n* CTRL 2      = Bell\n* DEL         = Delete\n* INS         = Insert\n\n\n## Compiling\n\nThere is no make procedure at this time. It currently only builds on Windows. \nBasically, snag a copy of the latest Lazarus / Free Pascal, open the project \nfile and build.\n\nI have ported the current project to console more so it will be easier to port \nto other platforms.\n\nLarazus : http://www.lazarus-ide.org/\n\nFree Pascal : https://www.freepascal.org/\n\nYou will need the Synapse package (synapse40) to compile at this time until I \nget around to replacing them with my own routines.\n\n\n## Setup\n\nThe vtxserv.ini file contains settings for configuring the server.\n\nSystemName : the name of the server / node processes. Typically the name of of a \nbulletin board system. The name here is embedded into the HTML sent to the \nclient from the VTX web server.\n\nSystemIP : The IP address that the server needs to bind to. If you are behind a \nfirewall / router, this would be your internal LAN IP.\n\nInternetIP : The address that 'user's out in internet land will need to visit to \nhit your system (via port forwarding, etc.)\n\nHTTPPort : The port number the web server will be listening to HTTP requests on.\n\nWSPort : The websocket port number.\n\nWSSecure : 0 = use ws, 1 = use wss\n\nNodeType : 'ExtProc' or 'Telnet'\n\nTerminal : Terminal type. PETSCII, ATASCII or other..\n\nCodePage: The codepage that is running on the node process telnet service. \nCurrently supported Code Pages:\nARMSCII_8, ATARI, C128, C64, CP437, CP667, CP668, CP737, CP770, CP771, CP772, \nCP773, CP774, CP775, CP790, CP808, CP813, CP819, CP850, CP851, CP852, CP853, \nCP855, CP857, CP858, CP859, CP860, CP861, CP862, CP863, CP864, CP865, CP866, \nCP867, CP869, CP872, CP878, CP895, CP900, CP912, CP915, CP916, CP920, CP991, \nCP1117, CP1118, CP1119, CP1131, CP28593, CP65001, CPMIK, HAIK8, ISO8859_1, \nISO8859_2, ISO8859_3, ISO8859_4, ISO8859_5, ISO8859_6, ISO8859_7, ISO8859_8, \nISO8859_9, ISO8859_10, ISO8859_13, ISO8859_14, ISO8859_15, ISO8859_16, KOI8_R, \nKOI8_U, TELETEXT, UTF8, UTF16, VIC20, WIN1250, WIN1251, WIN1253, WIN1254, \nWIN1255, WIN1256, WIN1257\n\nExtProcess : the name of the node process that is launched for a 'user' \nconnection. This will be the main process that the 'user' interacts with. The \nprogram needs to communicate with the server via StdIn / StdOut UTF-8 IO pipe \nstreams. These streams need to be character based and not line based to function \nproperly.\n\nTelnetIP : IP address that the server needs to connect to the telnet server.\n\nTelnetPort : The port number the telnet server is running on.\n\nMaxConnections : maximum number of websocket connections allowed to operate at\nthe same time.\n\nAutoConnect : 0 = don't autoconnect on lauch, 1 = connect on launch.\n\n\n## Running VTXServ\n\nType vtxserv from the command line. Once the server is running you can enter\ncommands like:\n\nSTART ALL : start up the web server, websocket server, and the bridge process.\n\nSTOP ALL : stop all processes.\n\nQUIT : close all 'nodes', connections, servers, and exit the program.\n\nLIST : list connections.\n\nKICK n : will hang up on a connection\n\nHELP : displays help with other commands.\n\nCLS : clear the console window.\n\nSTATUS : show server status.\n\nLOADCFG : stop listeners, reload INI settings, and restart.\n\n\n## Node Software\n\nSample node software is in the node directory. Actual BBS software is not in the\nscope of this project, but feel free to tinker, or retrofit existing packages\nto work with VTX.\n\n\n## Client Only Setup.\n\nTo run the client without using the VTX server software, all you need is a web page and access to a websocket proxy server.\n\n### Files Needed:\n\n*   vtxdata.js          (see below for customizing)\n*   vtxclient.js        (or vtxclient.min.js)\n*   *.woff              (terminal fonts needed for the client. include ALL of these or the client will not boot.)\n*   *.png               (24x24px images for the UI. customize if you want to replace these.)\n*   bell.mp3            (bing! the bell sound. customize if you want to replace this.)\n\n### HTML additions.\n\nIn the HTML that will contain the client, in the \u003cHEAD\u003e, include:\n\n```html\n    \u003cscript type='text/javascript' src='https://cdn.jsdelivr.net/pako/1.0.3/pako.min.js'\u003e\u003c/script\u003e\n    \u003cscript type='text/javascript' src='vtxdata.js'\u003e\u003c/script\u003e\n    \u003cscript type='text/javascript' src='vtxclient.min.js'\u003e\u003c/script\u003e\n```\n\nIn the \u003cBODY\u003e of your page, place something like (the outer 2 divs are the border area and one to center the terminal on the page. you can tinker with these to suit your website):\n\n```html\n        \u003c!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- --\u003e\n        \u003c!-- center term on page --\u003e\n        \u003cdiv style='text-align:center'\u003e \n            \u003cdiv id='vtxclient' style='text-align:center;margin:0 auto;display:inline-block;padding:34px;'\u003e\n                \u003c!-- VTX client will appears in here --\u003e\n            \u003c/div\u003e\n        \u003c/div\u003e\n        \u003c!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- --\u003e\n```\n\nThe vtxpage div element will house the client once the vtxclient.js has booted up.\n\nPlace the two javascript files on your webserver so the HTML can get at them.\n\n### vtxdata.js\n\nThe contents of the vtxdata is information the client needs to connect to your system.    \n\n**sysName** will be place in the \u003cTITLE\u003e of the page if it is missing or blank.\n\n**wsConnect** is the [ws/wss]://url:port to the websocket service that will direct you to your system.\n\n**wsProtocol** is the protocol specified when the websocket connection is made. Normally this is either telnet or plain.\n\n**wsDataType** either 'string' or 'arraybuffer'. if not specified, string is used. 'blob' is as of now, unsupported.\n\n**term** is the terminal type that gets reported to the telnet server. Use PETSCII if you\nare connecting to a Commodore style board.\n\n**codePage** is the default codepage of the system.\n\n**crtCols**, **crtRows** are the dimensions of the a normal terminal screen. Rows may grow as upto **crtHistory**.\nLines of data beyond **crtHistory** get appended to the bottom, and rows from the top of the terminal\nget truncated.\n\n**xScale** is a scaling factor for displaying the terminal. A value of 1 is no scaling, values larger than 1 would double the size of the terminal horizontally.\n\n**initStr** contains optional ANSI codes that can be sent to the term prior to connection\nto set it into whatever modes the system operator desires.\n\n**defPageBorder** is the border color of the terminal (the parent container outside of the main vtxpage div). 0-255.\n\n**defPageBG** is the page color of the terminal. 0-255.\n\n**defCrsrFG** is the color of the cursor. (0-255).\n\n**defCrsrAttr** is a list of attributes for the cursor. Values are 'none', 'thin', 'thick', or 'full' for the size, along with either 'horizontal' or 'vertical' for cursor orientation.\n\n**defCellFG** is the default character foreground color. Values are 0-255 for indexed color or '#RRGGBB' for 24 bit color.\n\n**defCellBG** is the default character background color. Values are 0-255 for indexed color or '#RRGGBB' for 24 bit color.\n\n**defCellAttr** is a list of character attributes for the default character state (i.e. after a reset). Values include: 'bold', 'italics', 'underline', 'reverse', 'shadow', 'doublestrike', 'strikethrough', 'faint', 'blinkslow', or 'blinkfast'\n\n**telnet** lets the client know if the server is connecting to a telnet service if set to 1. If the value\nis set to 0, no telnet handshaking negotiations will take place once a connection is made.\n\n**autoConnect** 0 = don't autoconnect on launch, 1 = autoconnect.\n\n**fontName** is the default font to use. UVGA16 should be specified in most cases. \n\n**fontSize** the default font size to use. 16px unscaled default size. Larger sizes will increase the required size of the client.\n\n```javascript\nvar vtxdata = {\n  sysName:        \"Goblin Studio BBS\",\n  wsConnect:      \"wss://goblin.strangled.net:8811\",\n  term:           \"ansi-bbs\",\n  codePage:       \"CP437\",\n  autoConnect:    0,\n  telnet:         1,\n  wsProtocol:     'telnet',\n  wsDataType:     'arraybuffer',\n  fontSize:       '24px',\n  fontName:       'UVGA16',\n  crtCols:        80,\n  crtRows:        25,\n  crtHistory:     500,\n  xScale:         1,\n  //initStr:     \"\\x1B[?50h\\x1B[0;10m\\x1B[255l\\x1B[?25h\\x1B[?31h\\x1B[?32l\\x1B[?33l\\x1B[?34l\\x1B[?35l\",\n  initStr:        \"\",\n  defPageBorder:  232,\n  defPageBG:      0x10,\n  defCrsrFG:      0x07,\n  defCrsrAttr:    [ 'thick', 'horizontal' ],\n  defCellFG:      0x07,\n  defCellBG:      0x00,\n  defCellAttr:    []\n};\n```\n\n## To Do($) / To Fix(!) / Investigate(?)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewar65%2FVTX_ClientServer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodewar65%2FVTX_ClientServer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewar65%2FVTX_ClientServer/lists"}