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
@@ -140,6 +140,11 @@ void NetworkSettingsPage::saveToConfig(const QString& configPath) const {
|
||||
config_update_option(configPath, SECTION, "transport",
|
||||
m_protoCombo->currentText().toLower(),
|
||||
CONFIG_UPDATE_REPLACE);
|
||||
|
||||
// IPv6 dual-stack: always add [server:lan6] with same port
|
||||
config_update_option(configPath, "server:lan6", "addr",
|
||||
QString("[::]:%1").arg(m_portSpin->value()),
|
||||
CONFIG_UPDATE_REPLACE);
|
||||
}
|
||||
|
||||
void NetworkSettingsPage::onInterfaceChanged(int index) {
|
||||
|
||||
Reference in new issue
Block a user