Skip to content

Latest commit

 

History

History

README.md

Proxy

Description

This directory contains a modular proxy and monitoring tool for different types of CPUs, the state of which are collected and forwarded by the code in the socket directory in the root of the project.

The proxy listens for UDP packets containing CPU state, translates them to JSON, and broadcasts them to connected WebSocket clients. The proxy server includes a lightweight web server for serving dashboards and client pages, allowing real-time visualization and interaction via modern browsers.

Multiple proxy modules can run in parallel, each on its own port, and all share a single web server for static content.

Supported CPUs and Port Numbers

Currently, the proxy includes modules for the following CPUs. The default UDP and WebSocket port number for each module are as indicated:

  • PDP-11/83, running at port 4000
  • AMD64, running at port 4001
  • NetBSD on VAX, running at port 4002

The built-in webserver runs at port 4080.

Build Instructions

Prerequisites

  • C++20 compiler (e.g., g++, clang++) with support for std::jthread
  • asio development headers (sudo apt-get install libasio-dev on Ubuntu)
  • zlib development headers (sudo apt-get install zlib1g-dev on Ubuntu)
  • pthreads (usually included by default)

Build Steps

make

This will build the udproxy executable.

Running

  1. Start the proxy:

    ./udproxy
  2. Open your browser and navigate to:

    http://localhost:4080/
    

    You'll see the dashboard and links to available proxy modules.

Directory Structure

The following takes the proxy/ project directory as its root.

  • main.cpp — Application entry point
  • proxybase.hpp/cpp — Abstract base class for proxies
  • pdproxy.hpp/cpp — PDP-11 proxy implementation
  • amd64proxy.hpp/cpp — AMD64 proxy implementation
  • webserver.hpp/cpp — Lightweight HTTP server
  • wwwroot/ — Static web content (dashboard, client pages)
  • A number of other header files provide supporting functions

Credits

  • The PDP-11 virtual panel that is displayed in the browser, is based on the Javascript PDP 11/70 Emulator written by Paul Nankervis.
  • WebSocket support and HTTP serving are implemented through Crow.