mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-11-13 15:27:21 +00:00
[client/idd] network: allow unencrypted 1-RTT payloads
Expose the insecure MsQuic draft API and add an opt-in setting on both peers. Query the negotiated state after connection establishment so one-sided opt-in remains encrypted and is logged accurately.
This commit is contained in:
@@ -246,6 +246,13 @@ static void networkSetup(void)
|
||||
.sensitive = true,
|
||||
.value.x_string = NULL,
|
||||
},
|
||||
{
|
||||
.module = "network",
|
||||
.name = "allowUnencrypted",
|
||||
.description = "Allow unencrypted 1-RTT network payloads",
|
||||
.type = OPTION_TYPE_BOOL,
|
||||
.value.x_bool = false,
|
||||
},
|
||||
{
|
||||
.module = "network",
|
||||
.name = "forgetCertificate",
|
||||
@@ -555,20 +562,21 @@ static bool networkCreate(LG_Transport ** result)
|
||||
|
||||
const NetworkConnectionParams params =
|
||||
{
|
||||
.address = address,
|
||||
.port = port,
|
||||
.password = option_get_string("network", "password"),
|
||||
.knownHosts = &this->knownHosts,
|
||||
.trustPrompt = networkTrustPrompt,
|
||||
.trustCancel = networkCancelTrustPrompt,
|
||||
.packet = networkPacket,
|
||||
.state = networkConnectionState,
|
||||
.sendReady = networkSendReady,
|
||||
.datagramLost = networkDatagramLost,
|
||||
.capabilities = NETWORK_CAPABILITIES,
|
||||
.capabilityCount = sizeof(NETWORK_CAPABILITIES) /
|
||||
.address = address,
|
||||
.port = port,
|
||||
.password = option_get_string("network", "password"),
|
||||
.allowUnencrypted = option_get_bool("network", "allowUnencrypted"),
|
||||
.knownHosts = &this->knownHosts,
|
||||
.trustPrompt = networkTrustPrompt,
|
||||
.trustCancel = networkCancelTrustPrompt,
|
||||
.packet = networkPacket,
|
||||
.state = networkConnectionState,
|
||||
.sendReady = networkSendReady,
|
||||
.datagramLost = networkDatagramLost,
|
||||
.capabilities = NETWORK_CAPABILITIES,
|
||||
.capabilityCount = sizeof(NETWORK_CAPABILITIES) /
|
||||
sizeof(NETWORK_CAPABILITIES[0]),
|
||||
.opaque = this,
|
||||
.opaque = this,
|
||||
};
|
||||
if (!networkConnectionCreate(&this->connection, ¶ms))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user