Skip to content

Enable runtime-configurable HTTPS for smartdns-ui and remove compile-time TLS gating#464

Open
PikuZheng wants to merge 4 commits intomasterfrom
codex/add-https-support-to-http_server.rs
Open

Enable runtime-configurable HTTPS for smartdns-ui and remove compile-time TLS gating#464
PikuZheng wants to merge 4 commits intomasterfrom
codex/add-https-support-to-http_server.rs

Conversation

@PikuZheng
Copy link
Copy Markdown
Owner

Motivation

  • Make HTTPS support configurable at runtime via an https_port setting instead of being controlled by a compile feature and URL scheme.

Description

  • Add https_port to HttpServerConfig, load it from server config and command-line (--https-port), and expose it in settings_map.
  • Replace compile-time feature gating for TLS with runtime logic that creates a rustls TlsAcceptor and a separate HTTPS TcpListener when https_port > 0, accepting TLS connections concurrently with HTTP.
  • Remove cfg_if usage and make tokio-rustls/rustls-pemfile available unconditionally by changing Cargo.toml so TLS dependencies are no longer optional and the https feature no longer maps to them.
  • Update argument parsing in plugin.rs to accept --https-port and minor whitespace/format cleanup.

Testing

  • Built the smartdns-ui crate with cargo build -p smartdns-ui and the build completed successfully.
  • Ran the crate test suite with cargo test -p smartdns-ui and all tests passed.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant