Commit Graph
11 Commits
Author SHA1 Message Date
Classic298 f44200d581 refac: extend egress rules to IPv6 (#209)
The egress rules now also cover IPv6 traffic.
2026-11-07 11:12:46 +09:00
Timothy Jaeryang Baek 54491de05c refac 2026-10-24 04:00:02 +09:00
Timothy Jaeryang BaekandDenny Pradipta 48d0ab4fe6 enh: OPEN_TERMINAL_NPM_PACKAGES
Co-Authored-By: Denny Pradipta <dennypradiptaprojects@gmail.com>
2026-03-30 19:56:58 -05:00
Timothy Jaeryang Baek 7738e7032a fix: enforce env/_FILE mutual exclusivity for empty values
The _FILE mutual-exclusivity guard silently passed when the plain env
var was set to an empty string, because empty strings are falsy.

Python: changed `if value and file_path` to
`if value is not None and file_path is not None`, and the fallback
return from `value or default` to
`value if value is not None else default`.

entrypoint.sh: changed ${!var:-} to ${!var+set} to test whether the
variable is defined at all, not just non-empty.

entrypoint-slim.sh: changed -n tests to ${var+set} via eval, matching
the bash entrypoint semantics.
2026-03-19 17:53:56 -05:00
Timothy Jaeryang Baek 39ff40ccb8 fix: install pip packages globally in multi-user mode
When OPEN_TERMINAL_MULTI_USER=true, OPEN_TERMINAL_PIP_PACKAGES now uses
sudo pip install to install to the system-wide site-packages directory
instead of /home/user/.local/. This ensures all provisioned users share
the same packages without needing to reinstall individually.

Closes #68
2026-03-14 19:18:01 -05:00
Timothy Jaeryang Baek 9398d3028f feat: network egress filtering via dnsmasq + ipset + iptables + capsh (Docker only)
Add OPEN_TERMINAL_ALLOWED_DOMAINS env var for domain-level network
restriction. Uses dnsmasq as a local DNS resolver (NXDOMAIN for
non-whitelisted domains), ipset for dynamic IP tracking (dnsmasq
auto-populates resolved IPs), iptables to block external DNS and
non-whitelisted IPs, and capsh to permanently drop CAP_NET_ADMIN.

Supports wildcards (*.github.com), live DNS, fails closed.
Set to empty string to block all; omit for full access.
Gracefully skips on bare metal if iptables is unavailable.

Bump version 0.11.11 → 0.11.12
2026-03-12 16:17:34 -05:00
Timothy Jaeryang Baek 553db84542 feat: bundle Docker CLI, Compose, and Buildx in container image
Install Docker CLI, Compose, and Buildx via get.docker.com so agents can
build images and run containers when the host Docker socket is mounted.
The entrypoint automatically fixes socket group permissions.

Closes #19
2026-03-06 22:01:14 -06:00
Timothy Jaeryang Baek 725b86beca fix: ensure ~/.local/bin is in PATH for bind-mounted home dirs
When /home/user is bind-mounted (instead of using a Docker volume),
Docker does not seed it with the image's original contents, so shell
dotfiles are missing and ~/.local/bin never appears in PATH.

- Add ENV PATH in Dockerfile so the server and all subprocesses
  always include ~/.local/bin
- Seed .bashrc and .profile from /etc/skel in entrypoint.sh when
  they are missing
- Create ~/.local/bin directory if it doesn't exist

Fixes #24
2026-03-06 15:50:59 -06:00
Timothy Jaeryang Baek fb2870fab1 feat: startup package installation via env vars (0.9.1) 2026-03-05 15:08:37 -06:00
Timothy Jaeryang Baek 26090678d4 feat: add Docker secrets support for OPEN_TERMINAL_API_KEY_FILE
Allow loading the API key from a file via OPEN_TERMINAL_API_KEY_FILE,
following the convention used by the official PostgreSQL Docker image.

- Add _resolve_file_env() helper in env.py
- Add file_env shell function in entrypoint.sh
- Add _FILE fallback in cli.py run command
- Update README with Docker Compose example
- Bump version to 0.4.3

Closes #14
2026-03-02 12:17:54 -06:00
Timothy Jaeryang Baek 6797a5e86e fix: handle permission errors gracefully, add entrypoint for volume ownership 2026-02-23 18:24:34 -06:00