Bind globally

This commit is contained in:
Martin 2023-07-17 22:31:04 +02:00
parent 63aea46079
commit d72ae99bfc
Signed by: mawalu
GPG Key ID: BF556F989760A7C8
2 changed files with 2 additions and 2 deletions

View File

@ -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)
})
});

View File

@ -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 {