Files
Z User 42557d4384 feat(cli): reset-config subcommand for SSH rescue
Adds a new '3m-ui reset-config' CLI subcommand that lets operators undo
panel configuration changes via SSH when the web UI is unreachable
(e.g. panel bound to 127.0.0.1, wrong port, broken SSL config).
USAGE
3m-ui reset-config [--panel] [--access] [--public] [--all] [--yes]
SCOPE FLAGS (default: --panel if none given)
--panel    Clear server.listen (= ':<port>') + disable SSL/ACME
→ panel boots plain HTTP on next restart. Port preserved.
--access   Clear listener.public_host / access_sni / access_alpn
→ nodes fall back to their bind address.
--public   Clear server.public_url
→ subscription links fall back to request host.
--all      Apply all three scopes above.
--yes / -y Skip interactive y/N confirmation (for rescue scripts).
AFTER RESET
sudo systemctl restart 3m-ui
Open http://<server-ip>:<port>  (HTTP, not HTTPS)
Re-apply settings from the web UI.
SAFETY
- Never deletes users, listeners, traffic records, or credentials.
- Preserves server.port (so SSH rescue doesn't require re-reading YAML).
- SSL disabled by flipping Enabled flag only — Domain / cert paths kept
so operator can re-enable from UI after fixing underlying issue.
- Interactive y/N prompt by default; --yes for scripted rescue.
FILES ADDED
backend/cmd/server/reset_config.go      (~210 LOC)
backend/cmd/server/reset_config_test.go (~110 LOC, 5 tests)
FILES MODIFIED
backend/cmd/server/main.go             (wire reset-config subcommand)
backend/internal/config/config.go      (+ClearListenInFile +ClearPublicURLInFile helpers)
Tests: 23/23 backend packages PASS.
feat(cli): reset-config subcommand for SSH rescue
Adds a new '3m-ui reset-config' CLI subcommand that lets operators undo
panel configuration changes via SSH when the web UI is unreachable
(e.g. panel bound to 127.0.0.1, wrong port, broken SSL config).
USAGE
3m-ui reset-config [--panel] [--access] [--public] [--all] [--yes]
SCOPE FLAGS (default: --panel if none given)
--panel    Clear server.listen (= ':<port>') + disable SSL/ACME
→ panel boots plain HTTP on next restart. Port preserved.
--access   Clear listener.public_host / access_sni / access_alpn
→ nodes fall back to their bind address.
--public   Clear server.public_url
→ subscription links fall back to request host.
--all      Apply all three scopes above.
--yes / -y Skip interactive y/N confirmation (for rescue scripts).
AFTER RESET
sudo systemctl restart 3m-ui
Open http://<server-ip>:<port>  (HTTP, not HTTPS)
Re-apply settings from the web UI.
SAFETY
- Never deletes users, listeners, traffic records, or credentials.
- Preserves server.port (so SSH rescue doesn't require re-reading YAML).
- SSL disabled by flipping Enabled flag only — Domain / cert paths kept
so operator can re-enable from UI after fixing underlying issue.
- Interactive y/N prompt by default; --yes for scripted rescue.
FILES ADDED
backend/cmd/server/reset_config.go      (~210 LOC)
backend/cmd/server/reset_config_test.go (~110 LOC, 5 tests)
FILES MODIFIED
backend/cmd/server/main.go             (wire reset-config subcommand)
backend/internal/config/config.go      (+ClearListenInFile +ClearPublicURLInFile helpers)
Tests: 23/23 backend packages PASS.
feat(cli): reset-config subcommand for SSH rescue
Adds a new '3m-ui reset-config' CLI subcommand that lets operators undo
panel configuration changes via SSH when the web UI is unreachable
(e.g. panel bound to 127.0.0.1, wrong port, broken SSL config).
USAGE
3m-ui reset-config [--panel] [--access] [--public] [--all] [--yes]
SCOPE FLAGS (default: --panel if none given)
--panel    Clear server.listen (= ':<port>') + disable SSL/ACME
→ panel boots plain HTTP on next restart. Port preserved.
--access   Clear listener.public_host / access_sni / access_alpn
→ nodes fall back to their bind address.
--public   Clear server.public_url
→ subscription links fall back to request host.
--all      Apply all three scopes above.
--yes / -y Skip interactive y/N confirmation (for rescue scripts).
AFTER RESET
sudo systemctl restart 3m-ui
Open http://<server-ip>:<port>  (HTTP, not HTTPS)
Re-apply settings from the web UI.
SAFETY
- Never deletes users, listeners, traffic records, or credentials.
- Preserves server.port (so SSH rescue doesn't require re-reading YAML).
- SSL disabled by flipping Enabled flag only — Domain / cert paths kept
so operator can re-enable from UI after fixing underlying issue.
- Interactive y/N prompt by default; --yes for scripted rescue.
FILES ADDED
backend/cmd/server/reset_config.go      (~210 LOC)
backend/cmd/server/reset_config_test.go (~110 LOC, 5 tests)
FILES MODIFIED
backend/cmd/server/main.go             (wire reset-config subcommand)
backend/internal/config/config.go      (+ClearListenInFile +ClearPublicURLInFile helpers)
Tests: 23/23 backend packages PASS.
feat(cli): reset-config subcommand for SSH rescue
Adds a new '3m-ui reset-config' CLI subcommand that lets operators undo
panel configuration changes via SSH when the web UI is unreachable
(e.g. panel bound to 127.0.0.1, wrong port, broken SSL config).
USAGE
3m-ui reset-config [--panel] [--access] [--public] [--all] [--yes]
SCOPE FLAGS (default: --panel if none given)
--panel    Clear server.listen (= ':<port>') + disable SSL/ACME
→ panel boots plain HTTP on next restart. Port preserved.
--access   Clear listener.public_host / access_sni / access_alpn
→ nodes fall back to their bind address.
--public   Clear server.public_url
→ subscription links fall back to request host.
--all      Apply all three scopes above.
--yes / -y Skip interactive y/N confirmation (for rescue scripts).
AFTER RESET
sudo systemctl restart 3m-ui
Open http://<server-ip>:<port>  (HTTP, not HTTPS)
Re-apply settings from the web UI.
SAFETY
- Never deletes users, listeners, traffic records, or credentials.
- Preserves server.port (so SSH rescue doesn't require re-reading YAML).
- SSL disabled by flipping Enabled flag only — Domain / cert paths kept
so operator can re-enable from UI after fixing underlying issue.
- Interactive y/N prompt by default; --yes for scripted rescue.
FILES ADDED
backend/cmd/server/reset_config.go      (~210 LOC)
backend/cmd/server/reset_config_test.go (~110 LOC, 5 tests)
FILES MODIFIED
backend/cmd/server/main.go             (wire reset-config subcommand)
backend/internal/config/config.go      (+ClearListenInFile +ClearPublicURLInFile helpers)
Tests: 23/23 backend packages PASS.
feat(cli): reset-config subcommand for SSH rescue
Adds a new '3m-ui reset-config' CLI subcommand that lets operators undo
panel configuration changes via SSH when the web UI is unreachable
(e.g. panel bound to 127.0.0.1, wrong port, broken SSL config).
USAGE
3m-ui reset-config [--panel] [--access] [--public] [--all] [--yes]
SCOPE FLAGS (default: --panel if none given)
--panel    Clear server.listen (= ':<port>') + disable SSL/ACME
→ panel boots plain HTTP on next restart. Port preserved.
--access   Clear listener.public_host / access_sni / access_alpn
→ nodes fall back to their bind address.
--public   Clear server.public_url
→ subscription links fall back to request host.
--all      Apply all three scopes above.
--yes / -y Skip interactive y/N confirmation (for rescue scripts).
AFTER RESET
sudo systemctl restart 3m-ui
Open http://<server-ip>:<port>  (HTTP, not HTTPS)
Re-apply settings from the web UI.
SAFETY
- Never deletes users, listeners, traffic records, or credentials.
- Preserves server.port (so SSH rescue doesn't require re-reading YAML).
- SSL disabled by flipping Enabled flag only — Domain / cert paths kept
so operator can re-enable from UI after fixing underlying issue.
- Interactive y/N prompt by default; --yes for scripted rescue.
FILES ADDED
backend/cmd/server/reset_config.go      (~210 LOC)
backend/cmd/server/reset_config_test.go (~110 LOC, 5 tests)
FILES MODIFIED
backend/cmd/server/main.go             (wire reset-config subcommand)
backend/internal/config/config.go      (+ClearListenInFile +ClearPublicURLInFile helpers)
Tests: 23/23 backend packages PASS.
feat(cli): reset-config subcommand for SSH rescue
Adds a new '3m-ui reset-config' CLI subcommand that lets operators undo
panel configuration changes via SSH when the web UI is unreachable
(e.g. panel bound to 127.0.0.1, wrong port, broken SSL config).
USAGE
3m-ui reset-config [--panel] [--access] [--public] [--all] [--yes]
SCOPE FLAGS (default: --panel if none given)
--panel    Clear server.listen (= ':<port>') + disable SSL/ACME
→ panel boots plain HTTP on next restart. Port preserved.
--access   Clear listener.public_host / access_sni / access_alpn
→ nodes fall back to their bind address.
--public   Clear server.public_url
→ subscription links fall back to request host.
--all      Apply all three scopes above.
--yes / -y Skip interactive y/N confirmation (for rescue scripts).
AFTER RESET
sudo systemctl restart 3m-ui
Open http://<server-ip>:<port>  (HTTP, not HTTPS)
Re-apply settings from the web UI.
SAFETY
- Never deletes users, listeners, traffic records, or credentials.
- Preserves server.port (so SSH rescue doesn't require re-reading YAML).
- SSL disabled by flipping Enabled flag only — Domain / cert paths kept
so operator can re-enable from UI after fixing underlying issue.
- Interactive y/N prompt by default; --yes for scripted rescue.
FILES ADDED
backend/cmd/server/reset_config.go      (~210 LOC)
backend/cmd/server/reset_config_test.go (~110 LOC, 5 tests)
FILES MODIFIED
backend/cmd/server/main.go             (wire reset-config subcommand)
backend/internal/config/config.go      (+ClearListenInFile +ClearPublicURLInFile helpers)
Tests: 23/23 backend packages PASS.
feat(cli): reset-config subcommand for SSH rescue
Adds a new '3m-ui reset-config' CLI subcommand that lets operators undo
panel configuration changes via SSH when the web UI is unreachable
(e.g. panel bound to 127.0.0.1, wrong port, broken SSL config).
USAGE
3m-ui reset-config [--panel] [--access] [--public] [--all] [--yes]
SCOPE FLAGS (default: --panel if none given)
--panel    Clear server.listen (= ':<port>') + disable SSL/ACME
→ panel boots plain HTTP on next restart. Port preserved.
--access   Clear listener.public_host / access_sni / access_alpn
→ nodes fall back to their bind address.
--public   Clear server.public_url
→ subscription links fall back to request host.
--all      Apply all three scopes above.
--yes / -y Skip interactive y/N confirmation (for rescue scripts).
AFTER RESET
sudo systemctl restart 3m-ui
Open http://<server-ip>:<port>  (HTTP, not HTTPS)
Re-apply settings from the web UI.
SAFETY
- Never deletes users, listeners, traffic records, or credentials.
- Preserves server.port (so SSH rescue doesn't require re-reading YAML).
- SSL disabled by flipping Enabled flag only — Domain / cert paths kept
so operator can re-enable from UI after fixing underlying issue.
- Interactive y/N prompt by default; --yes for scripted rescue.
FILES ADDED
backend/cmd/server/reset_config.go      (~210 LOC)
backend/cmd/server/reset_config_test.go (~110 LOC, 5 tests)
FILES MODIFIED
backend/cmd/server/main.go             (wire reset-config subcommand)
backend/internal/config/config.go      (+ClearListenInFile +ClearPublicURLInFile helpers)
Tests: 23/23 backend packages PASS.
feat(cli): reset-config subcommand for SSH rescue
Adds a new '3m-ui reset-config' CLI subcommand that lets operators undo
panel configuration changes via SSH when the web UI is unreachable
(e.g. panel bound to 127.0.0.1, wrong port, broken SSL config).
USAGE
3m-ui reset-config [--panel] [--access] [--public] [--all] [--yes]
SCOPE FLAGS (default: --panel if none given)
--panel    Clear server.listen (= ':<port>') + disable SSL/ACME
→ panel boots plain HTTP on next restart. Port preserved.
--access   Clear listener.public_host / access_sni / access_alpn
→ nodes fall back to their bind address.
--public   Clear server.public_url
→ subscription links fall back to request host.
--all      Apply all three scopes above.
--yes / -y Skip interactive y/N confirmation (for rescue scripts).
AFTER RESET
sudo systemctl restart 3m-ui
Open http://<server-ip>:<port>  (HTTP, not HTTPS)
Re-apply settings from the web UI.
SAFETY
- Never deletes users, listeners, traffic records, or credentials.
- Preserves server.port (so SSH rescue doesn't require re-reading YAML).
- SSL disabled by flipping Enabled flag only — Domain / cert paths kept
so operator can re-enable from UI after fixing underlying issue.
- Interactive y/N prompt by default; --yes for scripted rescue.
FILES ADDED
backend/cmd/server/reset_config.go      (~210 LOC)
backend/cmd/server/reset_config_test.go (~110 LOC, 5 tests)
FILES MODIFIED
backend/cmd/server/main.go             (wire reset-config subcommand)
backend/internal/config/config.go      (+ClearListenInFile +ClearPublicURLInFile helpers)
Tests: 23/23 backend packages PASS.
feat(cli): reset-config subcommand for SSH rescue
Adds a new '3m-ui reset-config' CLI subcommand that lets operators undo
panel configuration changes via SSH when the web UI is unreachable
(e.g. panel bound to 127.0.0.1, wrong port, broken SSL config).
USAGE
3m-ui reset-config [--panel] [--access] [--public] [--all] [--yes]
SCOPE FLAGS (default: --panel if none given)
--panel    Clear server.listen (= ':<port>') + disable SSL/ACME
→ panel boots plain HTTP on next restart. Port preserved.
--access   Clear listener.public_host / access_sni / access_alpn
→ nodes fall back to their bind address.
--public   Clear server.public_url
→ subscription links fall back to request host.
--all      Apply all three scopes above.
--yes / -y Skip interactive y/N confirmation (for rescue scripts).
AFTER RESET
sudo systemctl restart 3m-ui
Open http://<server-ip>:<port>  (HTTP, not HTTPS)
Re-apply settings from the web UI.
SAFETY
- Never deletes users, listeners, traffic records, or credentials.
- Preserves server.port (so SSH rescue doesn't require re-reading YAML).
- SSL disabled by flipping Enabled flag only — Domain / cert paths kept
so operator can re-enable from UI after fixing underlying issue.
- Interactive y/N prompt by default; --yes for scripted rescue.
FILES ADDED
backend/cmd/server/reset_config.go      (~210 LOC)
backend/cmd/server/reset_config_test.go (~110 LOC, 5 tests)
FILES MODIFIED
backend/cmd/server/main.go             (wire reset-config subcommand)
backend/internal/config/config.go      (+ClearListenInFile +ClearPublicURLInFile helpers)
Tests: 23/23 backend packages PASS.
feat(cli): reset-config subcommand for SSH rescue
Adds a new '3m-ui reset-config' CLI subcommand that lets operators undo
panel configuration changes via SSH when the web UI is unreachable
(e.g. panel bound to 127.0.0.1, wrong port, broken SSL config).
USAGE
3m-ui reset-config [--panel] [--access] [--public] [--all] [--yes]
SCOPE FLAGS (default: --panel if none given)
--panel    Clear server.listen (= ':<port>') + disable SSL/ACME
→ panel boots plain HTTP on next restart. Port preserved.
--access   Clear listener.public_host / access_sni / access_alpn
→ nodes fall back to their bind address.
--public   Clear server.public_url
→ subscription links fall back to request host.
--all      Apply all three scopes above.
--yes / -y Skip interactive y/N confirmation (for rescue scripts).
AFTER RESET
sudo systemctl restart 3m-ui
Open http://<server-ip>:<port>  (HTTP, not HTTPS)
Re-apply settings from the web UI.
SAFETY
- Never deletes users, listeners, traffic records, or credentials.
- Preserves server.port (so SSH rescue doesn't require re-reading YAML).
- SSL disabled by flipping Enabled flag only — Domain / cert paths kept
so operator can re-enable from UI after fixing underlying issue.
- Interactive y/N prompt by default; --yes for scripted rescue.
FILES ADDED
backend/cmd/server/reset_config.go      (~210 LOC)
backend/cmd/server/reset_config_test.go (~110 LOC, 5 tests)
FILES MODIFIED
backend/cmd/server/main.go             (wire reset-config subcommand)
backend/internal/config/config.go      (+ClearListenInFile +ClearPublicURLInFile helpers)
Tests: 23/23 backend packages PASS.
feat(cli): reset-config subcommand for SSH rescue
Adds a new '3m-ui reset-config' CLI subcommand that lets operators undo
panel configuration changes via SSH when the web UI is unreachable
(e.g. panel bound to 127.0.0.1, wrong port, broken SSL config).
USAGE
3m-ui reset-config [--panel] [--access] [--public] [--all] [--yes]
SCOPE FLAGS (default: --panel if none given)
--panel    Clear server.listen (= ':<port>') + disable SSL/ACME
→ panel boots plain HTTP on next restart. Port preserved.
--access   Clear listener.public_host / access_sni / access_alpn
→ nodes fall back to their bind address.
--public   Clear server.public_url
→ subscription links fall back to request host.
--all      Apply all three scopes above.
--yes / -y Skip interactive y/N confirmation (for rescue scripts).
AFTER RESET
sudo systemctl restart 3m-ui
Open http://<server-ip>:<port>  (HTTP, not HTTPS)
Re-apply settings from the web UI.
SAFETY
- Never deletes users, listeners, traffic records, or credentials.
- Preserves server.port (so SSH rescue doesn't require re-reading YAML).
- SSL disabled by flipping Enabled flag only — Domain / cert paths kept
so operator can re-enable from UI after fixing underlying issue.
- Interactive y/N prompt by default; --yes for scripted rescue.
FILES ADDED
backend/cmd/server/reset_config.go      (~210 LOC)
backend/cmd/server/reset_config_test.go (~110 LOC, 5 tests)
FILES MODIFIED
backend/cmd/server/main.go             (wire reset-config subcommand)
backend/internal/config/config.go      (+ClearListenInFile +ClearPublicURLInFile helpers)
Tests: 23/23 backend packages PASS.
feat(cli): reset-config subcommand for SSH rescue
Adds a new '3m-ui reset-config' CLI subcommand that lets operators undo
panel configuration changes via SSH when the web UI is unreachable
(e.g. panel bound to 127.0.0.1, wrong port, broken SSL config).
USAGE
3m-ui reset-config [--panel] [--access] [--public] [--all] [--yes]
SCOPE FLAGS (default: --panel if none given)
--panel    Clear server.listen (= ':<port>') + disable SSL/ACME
→ panel boots plain HTTP on next restart. Port preserved.
--access   Clear listener.public_host / access_sni / access_alpn
→ nodes fall back to their bind address.
--public   Clear server.public_url
→ subscription links fall back to request host.
--all      Apply all three scopes above.
--yes / -y Skip interactive y/N confirmation (for rescue scripts).
AFTER RESET
sudo systemctl restart 3m-ui
Open http://<server-ip>:<port>  (HTTP, not HTTPS)
Re-apply settings from the web UI.
SAFETY
- Never deletes users, listeners, traffic records, or credentials.
- Preserves server.port (so SSH rescue doesn't require re-reading YAML).
- SSL disabled by flipping Enabled flag only — Domain / cert paths kept
so operator can re-enable from UI after fixing underlying issue.
- Interactive y/N prompt by default; --yes for scripted rescue.
FILES ADDED
backend/cmd/server/reset_config.go      (~210 LOC)
backend/cmd/server/reset_config_test.go (~110 LOC, 5 tests)
FILES MODIFIED
backend/cmd/server/main.go             (wire reset-config subcommand)
backend/internal/config/config.go      (+ClearListenInFile +ClearPublicURLInFile helpers)
Tests: 23/23 backend packages PASS.
2026-09-25 06:10:45 +00:00
..