#!/bin/bash | |
set -euo pipefail | |
openssl req -new -text -passout pass:abcd -subj /CN=localhost -out server.req -keyout privkey.pem | |
openssl rsa -in privkey.pem -passin pass:abcd -out server.key | |
openssl req -x509 -in server.req -text -key server.key -out server.crt | |
chmod 600 server.key | |
test $(uname -s) = Linux && chown 70 server.key | |
docker run -d --name postgres -e POSTGRES_HOST_AUTH_METHOD=trust -v "$(pwd)/server.crt:/var/lib/postgresql/server.crt:ro" -v "$(pwd)/server.key:/var/lib/postgresql/server.key:ro" postgres:12-alpine -c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key |
#!/bin/bash | |
# Convenient when you're using lots of in-browser terminals. | |
set -eu | |
MAXLEN=74994 | |
TARGET=$1 | |
if [ -f $TARGET ]; then |
const path = require('path') | |
const fs = require('fs') | |
const { execSync } = require('child_process') | |
let file = path.join(process.cwd(), 'core.wxvpkg') | |
if (fs.existsSync(file)) { | |
execSync(`rmtrash ${file}`) | |
} | |
let fd = fs.openSync(file, 'w') |
ipvtap is similar to macvtap, but works over wifi too, since it uses the same mac address as the wifi interface.
libvirt doesn't support ipvtap, so we have to configure everything manually. Important data we need before we start:
- the name of the wifi interface,
wlan0
in my case (it's already connected - use NM or networkd+iwd). - the mac address of the wifi interface (it must be the same in the guest too)
On the host:
All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker
. This will install the whole docker suite, left only Tini to be compiled manually.
This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.
Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.