mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2025-07-01 23:46:59 +00:00
Only listen on localhost ipv4 (#134)
This avoids the firewall popup on windows.
This commit is contained in:
commit
423519f31e
@ -306,7 +306,7 @@ void CoreMain() {
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
hints.ai_protocol = IPPROTO_TCP;
|
||||
hints.ai_flags = AI_PASSIVE;
|
||||
iRes = getaddrinfo(nullptr, std::to_string(options.port).c_str(), &hints, &res);
|
||||
iRes = getaddrinfo("127.0.0.1", std::to_string(options.port).c_str(), &hints, &res);
|
||||
if (iRes) {
|
||||
debug("(Core) addr info failed with error: " + std::to_string(iRes));
|
||||
WSACleanup();
|
||||
|
@ -261,7 +261,7 @@ void HTTP::StartProxy() {
|
||||
handle_request(req, res);
|
||||
});
|
||||
|
||||
ProxyPort = HTTPProxy.bind_to_any_port("0.0.0.0");
|
||||
ProxyPort = HTTPProxy.bind_to_any_port("127.0.0.1");
|
||||
debug("HTTP Proxy listening on port " + std::to_string(ProxyPort));
|
||||
HTTPProxy.listen_after_bind();
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user