implement tapserver BBA on all platforms

This expands the tapserver BBA interface to be available on all platforms. tapserver itself is still macOS-only, but newserv (the PSO server) is not, and it can directly accept local and remote tapserver connections as well. This makes the tapserver interface potentially useful on all platforms.
This commit is contained in:
Martin Michelsen
2023-02-12 17:58:17 -08:00
parent 85dee300b5
commit 0c364cbb4c
14 changed files with 134 additions and 44 deletions

View File

@ -48,6 +48,17 @@ void BroadbandAdapterSettingsDialog::InitControls()
window_title = tr("Broadband Adapter MAC Address");
break;
case Type::TapServer:
address_label = new QLabel(tr("UNIX socket path or netloc (address:port):"));
address_placeholder = QStringLiteral("/tmp/dolphin-tap");
current_address = QString::fromStdString(Config::Get(Config::MAIN_BBA_TAPSERVER_DESTINATION));
description =
new QLabel(tr("On macOS and Linux, the default value \"/tmp/dolphin-tap\" will work with "
"tapserver and newserv. On Windows, you must enter an IP address and port."));
window_title = tr("BBA destination address");
break;
case Type::BuiltIn:
address_label = new QLabel(tr("Enter the DNS server to use:"));
address_placeholder = QStringLiteral("8.8.8.8");
@ -114,6 +125,9 @@ void BroadbandAdapterSettingsDialog::SaveAddress()
Config::SetBaseOrCurrent(Config::MAIN_BBA_MAC, bba_new_address);
break;
}
case Type::TapServer:
Config::SetBaseOrCurrent(Config::MAIN_BBA_TAPSERVER_DESTINATION, bba_new_address);
break;
case Type::BuiltIn:
Config::SetBaseOrCurrent(Config::MAIN_BBA_BUILTIN_DNS, bba_new_address);
break;