mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
utils/Platform: Ignore virtualbox interface IP
Somewhat common on systems, so we'll just manually ignore it. Closes #928
This commit is contained in:
parent
ca34981aae
commit
226c81ce78
@ -54,6 +54,9 @@ std::string Utils::Platform::GetLocalAddress()
|
||||
for (auto address : validAddresses) {
|
||||
// Attribute a priority (0 is best) to the address to choose the best picks
|
||||
if (address.startsWith("192.168.1.") || address.startsWith("192.168.0.")) { // Prefer common consumer router network prefixes
|
||||
if (address.startsWith("192.168.56."))
|
||||
preferredAddresses.push_back(std::make_pair(address, 255)); // Ignore virtualbox default
|
||||
else
|
||||
preferredAddresses.push_back(std::make_pair(address, 0));
|
||||
} else if (address.startsWith("172.16.")) { // Slightly less common consumer router network prefixes
|
||||
preferredAddresses.push_back(std::make_pair(address, 1));
|
||||
|
Loading…
x
Reference in New Issue
Block a user