Skip to content

Add automatic sslip HTTPS access mode - #6

Draft
Mammad3861 wants to merge 1 commit into
mainfrom
feat/sslip-access-mode
Draft

Mammad3861 wants to merge 1 commit into
mainfrom
feat/sslip-access-mode

Conversation

@Mammad3861

Copy link
Copy Markdown
Owner

Summary

Adds an explicit three-mode HTTPS access workflow:

  • IP: preserves the existing Selkies self-signed HTTPS and public browser port mappings without Caddy.
  • sslip.io: generates a browser-specific hostname from the server's public IPv4 and uses the existing managed Caddy path for trusted HTTPS.
  • Custom domain: preserves the existing Caddy-backed trusted HTTPS behavior.

Configuration

Adds:

ILB_ACCESS_MODE=ip|sslip|domain

Backward-compatible behavior is preserved:

  • No mode and no domain defaults to IP mode.
  • Explicit ILB_DOMAIN= selects IP mode.
  • A legacy non-empty ILB_DOMAIN selects custom-domain mode.
  • Unknown modes and conflicting values fail before Docker or configuration changes.

Interactive installs show the three HTTPS choices and default to IP mode.

sslip.io mode

  • Detects the public IPv4 with a single operation bounded to five seconds.
  • Rejects malformed and non-public IPv4 ranges.
  • Generates separate hostnames for Chromium and Firefox.
  • Binds browser ports to loopback.
  • Publishes ports 80 and 443 only through the existing project-managed Caddy container.
  • Reuses the existing Caddy validation, rollback, permissions, persistence, ownership, startup, and cleanup protections.
  • Does not add wildcard TLS, on-demand TLS, or an automatic DNS-provider fallback.

Security and compatibility

  • Access-mode, domain, IPv4, and ACME email validation occurs before Docker readiness checks or mutations.
  • Test Docker logs redact password values.
  • Chromium flags, images, authentication, profiles, ports, restart policies, container names, and IP-mode Docker arguments remain unchanged.
  • IP mode remains Caddy-free.

Documentation

Documents all three HTTPS modes, including the sslip.io third-party dependency, IP exposure, public port requirements, possible certificate rate limits, and the recommendation to use a custom domain for stable deployments.

Verification

  • git diff --check: passed
  • bash -n browser.sh tests/browser_test.sh: passed
  • bash tests/browser_test.sh: passed
  • Local output:
    • SKIP: streamed TTY tests require the util-linux script command
    • PASS: browser.sh checks

All Docker, curl, public-IP, and network operations were mocked during local tests.

Remaining runtime validation

Before merging, validate on a real VPS:

  • Public IPv4 detection
  • sslip.io DNS resolution
  • Public certificate issuance
  • Chromium and Firefox coexistence
  • Ports 80/443 and loopback browser bindings
  • sslip route and managed-resource cleanup

Linux CI should exercise the util-linux pseudo-terminal tests.

@Mammad3861
Mammad3861 marked this pull request as ready for review September 12, 2026 17:25
@Mammad3861
Mammad3861 marked this pull request as draft September 12, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant