From d72ae99bfcdea021c70b42ebf95ec8fde4157992 Mon Sep 17 00:00:00 2001 From: mawalu Date: Mon, 17 Jul 2023 22:31:04 +0200 Subject: [PATCH] Bind globally --- src/main.rs | 2 +- src/smtp.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 1792e4b..19e7f08 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,7 +16,7 @@ fn main() { let http_state = Arc::clone(&state); let http_thread = thread::spawn(move || { - rouille::start_server("127.0.0.1:8005", move |request| { + rouille::start_server("0.0.0.0:8005", move |request| { http::http_handler(request, &http_state) }) }); diff --git a/src/smtp.rs b/src/smtp.rs index c59b0cc..465c7dd 100644 --- a/src/smtp.rs +++ b/src/smtp.rs @@ -5,7 +5,7 @@ use mailparse::{parse_mail, MailHeaderMap, ParsedMail}; use std::net::{TcpListener, TcpStream}; pub fn start_server(state: State) { - let listener = TcpListener::bind("127.0.0.1:25").unwrap(); + let listener = TcpListener::bind("0.0.0.0:25").unwrap(); for stream in listener.incoming() { match stream {