@openmeet/snowglobe 0.0.0-stage → 0.3.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +28 -0
- package/LICENSE +21 -0
- package/README.md +148 -2
- package/bin/snowglobe.mjs +71 -0
- package/lib/apps.mjs +97 -0
- package/lib/args.mjs +29 -0
- package/lib/certs.mjs +211 -0
- package/lib/commands/account.mjs +85 -0
- package/lib/commands/app.mjs +86 -0
- package/lib/commands/certs.mjs +36 -0
- package/lib/commands/check.mjs +37 -0
- package/lib/commands/down.mjs +40 -0
- package/lib/commands/env.mjs +146 -0
- package/lib/commands/invite.mjs +48 -0
- package/lib/commands/lexicons.mjs +94 -0
- package/lib/commands/ls.mjs +72 -0
- package/lib/commands/render.mjs +63 -0
- package/lib/commands/run.mjs +109 -0
- package/lib/commands/trust.mjs +45 -0
- package/lib/commands/up.mjs +301 -0
- package/lib/config.mjs +514 -0
- package/lib/env.mjs +526 -0
- package/lib/hosts.mjs +36 -0
- package/lib/prebuilt.mjs +56 -0
- package/lib/render.mjs +601 -0
- package/lib/settings.mjs +156 -0
- package/lib/state.mjs +109 -0
- package/lib/trust.mjs +288 -0
- package/lib/up.mjs +54 -0
- package/lib/xrpc.mjs +49 -0
- package/package.json +55 -4
- package/snowglobe.default.yml +54 -0
- package/stack/docker-compose.relay.yml +105 -0
- package/stack/docker-compose.test.yml +41 -0
- package/stack/docker-compose.yml +179 -0
- package/stack/https/app-names.cjs +31 -0
- package/stack/https/dns/Dockerfile +10 -0
- package/stack/https/dns/dns.sh +40 -0
- package/stack/https/nginx.conf.template +104 -0
- package/stack/https/proxy/Dockerfile +8 -0
- package/stack/https/proxy/server.mjs +213 -0
- package/stack/init/init.sh +118 -0
- package/stack/page/fonts/OFL-jetbrains-mono.txt +93 -0
- package/stack/page/fonts/OFL-schibsted-grotesk.txt +93 -0
- package/stack/page/fonts/jetbrains-mono-latin.woff2 +0 -0
- package/stack/page/fonts/schibsted-grotesk-latin.woff2 +0 -0
- package/stack/page/index.html +409 -0
- package/stack/page/snowglobe.conf +59 -0
- package/stack/pdsls/Dockerfile +27 -0
- package/stack/pdsls/network.patch +294 -0
- package/stack/pdsls/server.mjs +192 -0
- package/stack/relay/Dockerfile +30 -0
- package/stack/relay/allow-private-hosts.patch +55 -0
- package/stack/slingshot/Dockerfile +36 -0
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
// A way into the https snowglobe for a browser on another computer, with no launch flags and no
|
|
2
|
+
// hosts file: a proxy and the PAC file that points a browser at it, on one port. The browser asks the
|
|
3
|
+
// PAC which names go through the proxy; for those it hands the proxy the name itself, and the proxy
|
|
4
|
+
// connects every one of them to nginx. So every handle works the moment its account exists, and
|
|
5
|
+
// nothing the browser looks up anywhere else changes.
|
|
6
|
+
//
|
|
7
|
+
// The PAC names an HTTP proxy (CONNECT), the kind every PAC reader understands, Windows' own
|
|
8
|
+
// included. SOCKS5 is answered on the same port too, for a client set to it directly.
|
|
9
|
+
//
|
|
10
|
+
// The proxy reaches nginx and nothing else: a name outside the snowglobe, an IP address, a port other
|
|
11
|
+
// than 443, or anything but a CONNECT is refused. On the one port:
|
|
12
|
+
//
|
|
13
|
+
// GET /proxy.pac the snowglobe's names: <domain>, *.<domain>
|
|
14
|
+
// GET /proxy-with-plc.pac the same plus plc.directory, for a browser used only for the snowglobe:
|
|
15
|
+
// plc.directory then means this snowglobe's PLC for every page in it
|
|
16
|
+
// GET /_health 200, for the container's healthcheck (not logged)
|
|
17
|
+
// CONNECT <name>:443 an HTTP proxy tunnel
|
|
18
|
+
// anything starting 0x05 SOCKS5
|
|
19
|
+
//
|
|
20
|
+
// The PAC names the proxy by the Host its request came in on, so it is right whatever port the
|
|
21
|
+
// browser's machine forwards. Settings:
|
|
22
|
+
//
|
|
23
|
+
// PROXY_DOMAIN the snowglobe's domain (SG_DOMAIN)
|
|
24
|
+
// PROXY_UPSTREAM host:port every allowed name goes to (default nginx:443)
|
|
25
|
+
// PROXY_BIND host:port to listen on (default 0.0.0.0:1080)
|
|
26
|
+
import http from 'node:http'
|
|
27
|
+
import net from 'node:net'
|
|
28
|
+
|
|
29
|
+
const DOMAIN = (process.env.PROXY_DOMAIN ?? '').toLowerCase()
|
|
30
|
+
const [UP_HOST, UP_PORT] = (process.env.PROXY_UPSTREAM ?? 'nginx:443').split(':')
|
|
31
|
+
const [BIND_HOST, BIND_PORT] = (process.env.PROXY_BIND ?? '0.0.0.0:1080').split(':')
|
|
32
|
+
const HANDSHAKE_MS = 10_000
|
|
33
|
+
|
|
34
|
+
/** Whether a CONNECT to `name`:`port` goes to nginx. */
|
|
35
|
+
export function allowed(name, port, domain = DOMAIN) {
|
|
36
|
+
const n = String(name).toLowerCase().replace(/\.$/, '')
|
|
37
|
+
if (port !== 443 || !domain) return false
|
|
38
|
+
return n === domain || n.endsWith(`.${domain}`) || n === 'plc.directory'
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** The PAC file: the snowglobe's names go to the proxy at `proxy` (host:port), the rest direct. */
|
|
42
|
+
export function pac(proxy, domain = DOMAIN, withPlc = false) {
|
|
43
|
+
const names = [`host == ${JSON.stringify(domain)}`, `dnsDomainIs(host, ${JSON.stringify(`.${domain}`)})`]
|
|
44
|
+
if (withPlc) names.push('host == "plc.directory"')
|
|
45
|
+
return `// The https snowglobe at ${domain}: its names through its proxy, which resolves them; the rest direct.
|
|
46
|
+
function FindProxyForURL(url, host) {
|
|
47
|
+
host = host.toLowerCase();
|
|
48
|
+
if (${names.join(' ||\n ')}) {
|
|
49
|
+
return "PROXY ${proxy}";
|
|
50
|
+
}
|
|
51
|
+
return "DIRECT";
|
|
52
|
+
}
|
|
53
|
+
`
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** The Host a PAC request came in on, when it is a plain host:port; else null. */
|
|
57
|
+
export function proxyAddress(hostHeader) {
|
|
58
|
+
const h = String(hostHeader ?? '')
|
|
59
|
+
return /^[A-Za-z0-9.-]+:[0-9]{1,5}$/.test(h) || /^\[[0-9a-fA-F:]+\]:[0-9]{1,5}$/.test(h) ? h : null
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// SOCKS5 replies (RFC 1928): succeeded, general failure, not allowed, host unreachable, refused,
|
|
63
|
+
// command not supported, address type not supported.
|
|
64
|
+
const REP = { ok: 0, fail: 1, notAllowed: 2, unreachable: 4, refused: 5, badCommand: 7, badAddress: 8 }
|
|
65
|
+
const reply = (sock, rep) => sock.write(Buffer.from([5, rep, 0, 1, 0, 0, 0, 0, 0, 0]))
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Read a SOCKS5 greeting and CONNECT from `sock`, whose first bytes are `first`. Resolves to
|
|
69
|
+
* { name, port } with the socket ready for the reply, or null once it has refused and closed it.
|
|
70
|
+
*/
|
|
71
|
+
export function readConnect(sock, first) {
|
|
72
|
+
return new Promise((resolve) => {
|
|
73
|
+
let buf = first
|
|
74
|
+
let stage = 'greeting'
|
|
75
|
+
const done = (v) => {
|
|
76
|
+
// Paused, so nothing the browser sends before the reply is dropped; pipe() resumes it.
|
|
77
|
+
sock.pause()
|
|
78
|
+
sock.off('data', onData)
|
|
79
|
+
clearTimeout(timer)
|
|
80
|
+
resolve(v)
|
|
81
|
+
}
|
|
82
|
+
const refuse = (rep) => {
|
|
83
|
+
if (rep !== undefined) reply(sock, rep)
|
|
84
|
+
sock.end()
|
|
85
|
+
done(null)
|
|
86
|
+
}
|
|
87
|
+
const timer = setTimeout(() => refuse(), HANDSHAKE_MS)
|
|
88
|
+
const step = () => {
|
|
89
|
+
if (stage === 'greeting') {
|
|
90
|
+
if (buf.length < 2) return
|
|
91
|
+
const n = buf[1]
|
|
92
|
+
if (buf.length < 2 + n) return
|
|
93
|
+
const methods = buf.subarray(2, 2 + n)
|
|
94
|
+
buf = buf.subarray(2 + n)
|
|
95
|
+
if (!methods.includes(0)) {
|
|
96
|
+
sock.write(Buffer.from([5, 0xff]))
|
|
97
|
+
return refuse()
|
|
98
|
+
}
|
|
99
|
+
sock.write(Buffer.from([5, 0]))
|
|
100
|
+
stage = 'request'
|
|
101
|
+
}
|
|
102
|
+
if (buf.length < 4) return
|
|
103
|
+
const [ver, cmd, , atyp] = buf
|
|
104
|
+
if (ver !== 5) return refuse(REP.fail)
|
|
105
|
+
if (cmd !== 1) return refuse(REP.badCommand)
|
|
106
|
+
// Only a name: an address would skip the check on what the browser meant to reach.
|
|
107
|
+
if (atyp !== 3) return refuse(atyp === 1 || atyp === 4 ? REP.notAllowed : REP.badAddress)
|
|
108
|
+
if (buf.length < 5) return
|
|
109
|
+
const len = buf[4]
|
|
110
|
+
if (buf.length < 5 + len + 2) return
|
|
111
|
+
const name = buf.subarray(5, 5 + len).toString('latin1')
|
|
112
|
+
const port = buf.readUInt16BE(5 + len)
|
|
113
|
+
const rest = buf.subarray(5 + len + 2)
|
|
114
|
+
if (rest.length) sock.unshift(rest)
|
|
115
|
+
done({ name, port })
|
|
116
|
+
}
|
|
117
|
+
const onData = (chunk) => {
|
|
118
|
+
buf = Buffer.concat([buf, chunk])
|
|
119
|
+
step()
|
|
120
|
+
}
|
|
121
|
+
sock.on('data', onData)
|
|
122
|
+
step()
|
|
123
|
+
})
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Splice `sock` to nginx for `name`:`port`, or refuse it. `answer` writes the protocol's reply:
|
|
128
|
+
* answer('ok'), answer('notAllowed'), answer('refused') or answer('unreachable'). `head` is anything
|
|
129
|
+
* the client sent after its request.
|
|
130
|
+
*/
|
|
131
|
+
function tunnel(how, sock, name, port, answer, head) {
|
|
132
|
+
if (!allowed(name, port)) {
|
|
133
|
+
console.log(`proxy: ${how} refused ${name}:${port}`)
|
|
134
|
+
answer('notAllowed')
|
|
135
|
+
return sock.end()
|
|
136
|
+
}
|
|
137
|
+
console.log(`proxy: ${how} ${name}:${port}`)
|
|
138
|
+
const up = net.connect(Number(UP_PORT), UP_HOST)
|
|
139
|
+
up.once('connect', () => {
|
|
140
|
+
answer('ok')
|
|
141
|
+
if (head?.length) up.write(head)
|
|
142
|
+
sock.pipe(up).pipe(sock)
|
|
143
|
+
})
|
|
144
|
+
up.on('error', (err) => {
|
|
145
|
+
console.error(`proxy: ${name}: ${err.message}`)
|
|
146
|
+
if (!sock.destroyed) {
|
|
147
|
+
answer(err.code === 'ECONNREFUSED' ? 'refused' : 'unreachable')
|
|
148
|
+
sock.end()
|
|
149
|
+
}
|
|
150
|
+
})
|
|
151
|
+
sock.on('error', () => up.destroy())
|
|
152
|
+
sock.once('close', () => up.destroy())
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
async function socks(sock, first) {
|
|
156
|
+
const req = await readConnect(sock, first)
|
|
157
|
+
if (!req) return
|
|
158
|
+
tunnel('socks', sock, req.name, req.port, (r) => reply(sock, REP[r]))
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/** The name and port a CONNECT names (`name:port`), or null for an address or anything else. */
|
|
162
|
+
export function connectTarget(target) {
|
|
163
|
+
const m = /^([A-Za-z0-9.-]+):([0-9]{1,5})$/.exec(String(target))
|
|
164
|
+
if (!m || /^[0-9.]+$/.test(m[1])) return null
|
|
165
|
+
return { name: m[1], port: Number(m[2]) }
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const STATUS = { ok: '200 Connection Established', notAllowed: '403 Forbidden', refused: '502 Bad Gateway', unreachable: '504 Gateway Timeout' }
|
|
169
|
+
|
|
170
|
+
const pacServer = http.createServer((req, res) => {
|
|
171
|
+
// Node passes on a target URL can't parse (`GET //[`); thrown here, it would end the proxy.
|
|
172
|
+
let path
|
|
173
|
+
try {
|
|
174
|
+
path = new URL(req.url ?? '/', 'http://x').pathname
|
|
175
|
+
} catch {
|
|
176
|
+
return res.writeHead(400).end()
|
|
177
|
+
}
|
|
178
|
+
if (path === '/_health') return res.writeHead(200).end('ok\n')
|
|
179
|
+
const proxy = proxyAddress(req.headers.host)
|
|
180
|
+
// Who fetched the PAC is the first thing to know when a browser seems to ignore it.
|
|
181
|
+
console.log(`pac: ${req.method} ${path} host=${req.headers.host ?? '-'} agent=${req.headers['user-agent'] ?? '-'}`)
|
|
182
|
+
if (req.method !== 'GET' && req.method !== 'HEAD') return res.writeHead(405).end()
|
|
183
|
+
if ((path !== '/proxy.pac' && path !== '/proxy-with-plc.pac') || !proxy) return res.writeHead(404).end('not here\n')
|
|
184
|
+
const body = pac(proxy, DOMAIN, path === '/proxy-with-plc.pac')
|
|
185
|
+
res.writeHead(200, { 'content-type': 'application/x-ns-proxy-autoconfig', 'cache-control': 'no-cache' })
|
|
186
|
+
res.end(req.method === 'HEAD' ? undefined : body)
|
|
187
|
+
})
|
|
188
|
+
|
|
189
|
+
pacServer.on('connect', (req, sock, head) => {
|
|
190
|
+
sock.on('error', () => {})
|
|
191
|
+
const t = connectTarget(req.url)
|
|
192
|
+
const answer = (r) => sock.write(`HTTP/1.1 ${STATUS[r]}\r\n\r\n`)
|
|
193
|
+
if (!t) {
|
|
194
|
+
console.log(`proxy: http refused ${req.url}`)
|
|
195
|
+
answer('notAllowed')
|
|
196
|
+
return sock.end()
|
|
197
|
+
}
|
|
198
|
+
tunnel('http', sock, t.name, t.port, answer, head)
|
|
199
|
+
})
|
|
200
|
+
|
|
201
|
+
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
202
|
+
if (!DOMAIN) throw new Error('set PROXY_DOMAIN')
|
|
203
|
+
net
|
|
204
|
+
.createServer((sock) => {
|
|
205
|
+
sock.on('error', () => {})
|
|
206
|
+
sock.once('data', (first) => {
|
|
207
|
+
if (first[0] === 5) return void socks(sock, first)
|
|
208
|
+
sock.unshift(first)
|
|
209
|
+
pacServer.emit('connection', sock)
|
|
210
|
+
})
|
|
211
|
+
})
|
|
212
|
+
.listen(Number(BIND_PORT), BIND_HOST, () => console.log(`proxy: listening on ${BIND_HOST}:${BIND_PORT} for ${DOMAIN}, to ${UP_HOST}:${UP_PORT}`))
|
|
213
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
set -eu
|
|
3
|
+
|
|
4
|
+
# atproto-devnet init: create invite code, seed accounts, write credentials
|
|
5
|
+
# Runs as a one-shot container after PDS + PLC are healthy.
|
|
6
|
+
|
|
7
|
+
PDS_URL="http://pds:3000"
|
|
8
|
+
DATA_DIR="/devnet-data"
|
|
9
|
+
|
|
10
|
+
log() { echo "[init] $*"; }
|
|
11
|
+
|
|
12
|
+
# Install curl + jq (alpine base image)
|
|
13
|
+
apk add --no-cache curl jq >/dev/null 2>&1
|
|
14
|
+
|
|
15
|
+
# Wait for PDS to be truly ready (healthcheck may pass before XRPC is ready)
|
|
16
|
+
log "Waiting for PDS XRPC..."
|
|
17
|
+
for i in $(seq 1 30); do
|
|
18
|
+
if curl -sf "${PDS_URL}/xrpc/_health" >/dev/null 2>&1; then
|
|
19
|
+
break
|
|
20
|
+
fi
|
|
21
|
+
sleep 1
|
|
22
|
+
done
|
|
23
|
+
|
|
24
|
+
# ── Create invite code ────────────────────────────────────────────
|
|
25
|
+
log "Creating invite code..."
|
|
26
|
+
INVITE_RESPONSE=$(curl -sf -X POST "${PDS_URL}/xrpc/com.atproto.server.createInviteCode" \
|
|
27
|
+
-H "Content-Type: application/json" \
|
|
28
|
+
-H "Authorization: Basic $(echo -n "admin:${PDS_ADMIN_PASSWORD}" | base64)" \
|
|
29
|
+
-d '{"useCount": 100}')
|
|
30
|
+
|
|
31
|
+
INVITE_CODE=$(echo "$INVITE_RESPONSE" | jq -r '.code')
|
|
32
|
+
log "Invite code: ${INVITE_CODE}"
|
|
33
|
+
|
|
34
|
+
# ── Seed accounts ─────────────────────────────────────────────────
|
|
35
|
+
if [ "${SEED_ACCOUNTS}" = "true" ]; then
|
|
36
|
+
# Skip if accounts were already seeded on THIS PDS (idempotent re-runs). data/ is a
|
|
37
|
+
# host directory that outlives `down -v`, so after a fresh volume (or a different
|
|
38
|
+
# PDS image) accounts.json can name accounts the running PDS has never seen.
|
|
39
|
+
SEEDED_DID=$(jq -r '[.. | objects | select(has("did")) | .did][0] // empty' "${DATA_DIR}/accounts.json" 2>/dev/null || true)
|
|
40
|
+
# getRepoStatus answers from the PDS's own store, with no DID resolution.
|
|
41
|
+
if [ -n "${SEEDED_DID}" ] && curl -sf "${PDS_URL}/xrpc/com.atproto.sync.getRepoStatus?did=${SEEDED_DID}" >/dev/null 2>&1; then
|
|
42
|
+
log "Accounts already seeded, skipping."
|
|
43
|
+
else
|
|
44
|
+
log "Seeding accounts..."
|
|
45
|
+
|
|
46
|
+
# Initialize output files
|
|
47
|
+
echo "{}" > "${DATA_DIR}/accounts.json"
|
|
48
|
+
: > "${DATA_DIR}/accounts.env"
|
|
49
|
+
echo "SG_INVITE_CODE=${INVITE_CODE}" >> "${DATA_DIR}/accounts.env"
|
|
50
|
+
|
|
51
|
+
create_account() {
|
|
52
|
+
local handle="$1"
|
|
53
|
+
local email="$2"
|
|
54
|
+
local password="$3"
|
|
55
|
+
local var_prefix="$4"
|
|
56
|
+
|
|
57
|
+
log "Creating account: ${handle}"
|
|
58
|
+
RESULT=$(curl -sf -X POST "${PDS_URL}/xrpc/com.atproto.server.createAccount" \
|
|
59
|
+
-H "Content-Type: application/json" \
|
|
60
|
+
-d "{
|
|
61
|
+
\"handle\": \"${handle}\",
|
|
62
|
+
\"email\": \"${email}\",
|
|
63
|
+
\"password\": \"${password}\",
|
|
64
|
+
\"inviteCode\": \"${INVITE_CODE}\"
|
|
65
|
+
}")
|
|
66
|
+
|
|
67
|
+
DID=$(echo "$RESULT" | jq -r '.did')
|
|
68
|
+
ACCESS_JWT=$(echo "$RESULT" | jq -r '.accessJwt')
|
|
69
|
+
|
|
70
|
+
if [ "$DID" = "null" ] || [ -z "$DID" ]; then
|
|
71
|
+
log "WARNING: Failed to create ${handle}: $(echo "$RESULT" | jq -r '.message // "unknown error"')"
|
|
72
|
+
return 1
|
|
73
|
+
fi
|
|
74
|
+
|
|
75
|
+
log "Created ${handle} → ${DID}"
|
|
76
|
+
|
|
77
|
+
# Append to accounts.env
|
|
78
|
+
echo "${var_prefix}_HANDLE=${handle}" >> "${DATA_DIR}/accounts.env"
|
|
79
|
+
echo "${var_prefix}_DID=${DID}" >> "${DATA_DIR}/accounts.env"
|
|
80
|
+
echo "${var_prefix}_PASSWORD=${password}" >> "${DATA_DIR}/accounts.env"
|
|
81
|
+
echo "${var_prefix}_EMAIL=${email}" >> "${DATA_DIR}/accounts.env"
|
|
82
|
+
|
|
83
|
+
# Append to accounts.json
|
|
84
|
+
ACCOUNTS=$(cat "${DATA_DIR}/accounts.json")
|
|
85
|
+
echo "$ACCOUNTS" | jq \
|
|
86
|
+
--arg handle "$handle" \
|
|
87
|
+
--arg did "$DID" \
|
|
88
|
+
--arg password "$password" \
|
|
89
|
+
--arg email "$email" \
|
|
90
|
+
". + {\"${var_prefix}\": {\"handle\": \$handle, \"did\": \$did, \"password\": \$password, \"email\": \$email}}" \
|
|
91
|
+
> "${DATA_DIR}/accounts.json"
|
|
92
|
+
|
|
93
|
+
return 0
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
create_account \
|
|
97
|
+
"alice${HANDLE_DOMAIN}" \
|
|
98
|
+
"alice@${SG_DOMAIN:-${DEVNET_DOMAIN:-devnet.test}}" \
|
|
99
|
+
"alice-devnet-pass" \
|
|
100
|
+
"ALICE"
|
|
101
|
+
|
|
102
|
+
create_account \
|
|
103
|
+
"bob${HANDLE_DOMAIN}" \
|
|
104
|
+
"bob@${SG_DOMAIN:-${DEVNET_DOMAIN:-devnet.test}}" \
|
|
105
|
+
"bob-devnet-pass" \
|
|
106
|
+
"BOB"
|
|
107
|
+
|
|
108
|
+
log "Accounts seeded. Credentials in ${DATA_DIR}/accounts.env"
|
|
109
|
+
fi
|
|
110
|
+
else
|
|
111
|
+
log "Skipping account seeding (SEED_ACCOUNTS=${SEED_ACCOUNTS})"
|
|
112
|
+
echo "SG_INVITE_CODE=${INVITE_CODE}" > "${DATA_DIR}/accounts.env"
|
|
113
|
+
fi
|
|
114
|
+
|
|
115
|
+
# Make output files world-readable/writable so host user can read them
|
|
116
|
+
chmod 666 "${DATA_DIR}/accounts.env" "${DATA_DIR}/accounts.json" 2>/dev/null || true
|
|
117
|
+
|
|
118
|
+
log "Init complete."
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
|
|
5
|
+
This license is copied below, and is also available with a FAQ at: https://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2023 The Schibsted-Grotesk Project Authors (https://github.com/schibsted/schibsted-grotesk)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
|
Binary file
|