Implement dual host configuration: bind_host and hostname

- Replace 'host' config with separate 'bind_host' and 'hostname'
- bind_host: IP/interface for server binding (default 0.0.0.0)
- hostname: Domain for URI validation (required)
- Update all parsing and validation code
- Create dist/ directory with systemd service, config, and install guide
- Add comprehensive INSTALL.md with setup instructions
This commit is contained in:
Jeena 2026-01-16 12:46:27 +00:00
parent 1665df65da
commit ea8083fe1f
7 changed files with 333 additions and 13 deletions

View file

@ -40,7 +40,7 @@ pub async fn serve_file(
pub async fn handle_connection(
mut stream: TlsStream<TcpStream>,
dir: &str,
expected_host: &str,
hostname: &str,
expected_port: u16,
max_concurrent_requests: usize,
_test_processing_delay: u64,
@ -97,7 +97,7 @@ pub async fn handle_connection(
}
// Parse Gemini URL
let path = match parse_gemini_url(&request, expected_host, expected_port) {
let path = match parse_gemini_url(&request, hostname, expected_port) {
Ok(p) => p,
Err(_) => {
logger.log_error(59, "Invalid URL format");