This guide explains how to set up a development environment for Open OSCAR Server and build/run the application. It assumes that you have little to no experience with golang.
Before you can run Open OSCAR Server, set up the following software dependencies.
Since Open OSCAR Server is written in go, install the latest version of golang.
If you're new to go, try Visual Studio Code with the go plugin as your first IDE.
Mockery is used to generate test mocks. Install this dependency and regenerate the mocks if you change any interfaces.
go install github.com/vektra/mockery/v3@latestRun the following command in a terminal from the root of the repository in order to regenerate test mocks,
mockeryTo build the server binary:
go build -o open_oscar_server ./cmd/serverTo run the binary with the settings file:
./open_oscar_server -config config/settings.envThis project provides configuration for running with plain sockets and SSL sockets. Choose the mode that best suits your needs.
To run AIM v1.0-v6.1, you can use the plain socket config (located in config/settings.env) with no additional
dependencies.
make runTo run AIM v6.2-v7.0, you must run the server with SSL enabled. This project provides tooling for generating a self-signed certificate and fronting the server with the SSL proxy stunnel.
- Git
- Docker Desktop
- Unix-like terminal with Make installed (use WSL2 for Windows)
git clone https://github.com/mk6i/open-oscar-server.git
cd open-oscar-serverThis builds Docker images for:
- Certificate generation
- SSL termination
- The Open OSCAR Server runtime
make docker-imagesThe following creates a self-signed certificate under certs/server.pem.
make docker-cert OSCAR_HOST=ras.devReplace ras.dev with the hostname clients will use to connect.
This creates the NSS certificate database in
certs/nss/, which must be installed on each AIM 6.2+ client.
make docker-nssStart the server in a terminal.
make run-sslIn a separate terminal, start stunnel.
make run-stunnelFollow the AIM 6.x client setup instructions to install the certs/nss/ database on
each client.
If OSCAR_HOST (e.g., ras.dev) is not a real domain with DNS configured, you'll need to add it to each client's hosts
file so clients can resolve it.
- Linux/macOS:
/etc/hosts - Windows:
C:\Windows\System32\drivers\etc\hosts
Add a line like this, replacing the IP with your server's IP address:
127.0.0.1 ras.dev
Open OSCAR Server includes a test suite that must pass before merging new code. To run the unit tests, run the following command from the root of the repository in a terminal:
go test -race ./...Before opening a PR, run the same lint checks used by CI:
make lintInstall golangci-lint locally if the command is not already available on your PATH.
The config file config/settings.env is generated programmatically from the Config struct using
go generate. If you want to add or remove application configuration options, first edit the Config struct and then
generate the configuration files by running make config from the project root. Do not edit the config files by hand.
Windows XP is the most convenient OS for running Windows OSCAR clients, which were released across the 1990s, 2000s, and 2010s. An ISO of the most recent version is available on archive.org.
To run Windows XP on your modern machine, install a hypervisor:
- UTM (macOS)
- QEMU w/ KVM (Linux)
- VirtualBox (Windows)