chatgui: IPv4+IPv6 dual-stack listen by default
- Default config creates [server:lan] (0.0.0.0) + [server:lan6] ([::]) - Network settings save also writes [server:lan6] section - Sets IPV6_V6ONLY=1 on IPv6 sockets to avoid conflict with IPv4 - interface_addr for [::] bind prefers permanent IPv6 over temporary
This commit is contained in:
1 parent
7799d54c0c
commit
af3e2ee869
3 files changed
+37
-10
No files matched your search
@@ -177,8 +177,10 @@ bool NodeConfig::create(const QString& nodeName, quint16 listenPort) {
|
||||
m_controlAddr = "127.0.0.1:9999";
|
||||
m_servers.clear();
|
||||
m_clients.clear();
|
||||
if (listenPort > 0)
|
||||
if (listenPort > 0) {
|
||||
m_servers.append({"lan", QString("0.0.0.0:%1").arg(listenPort)});
|
||||
m_servers.append({"lan6", QString("[::]:%1").arg(listenPort)});
|
||||
}
|
||||
if (m_dbPath.isEmpty())
|
||||
m_dbPath = "chat_data";
|
||||
return save();
|
||||
|
||||
Reference in new issue
Block a user