GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Commit 71ade2c3 authored by Kathleen Brade's avatar Kathleen Brade Committed by Georg Koppen

Bug 31488: Moat: support a comma-separated list of transports

Improve our ClientTransportPlugin config parser to recognize
"meek" and "meek_client" when they appear within a comma-separated
list of transports.
parent f69f0557
......@@ -642,14 +642,26 @@ function onOpenBridgeDBRequestPrompt()
let meekClientArgs;
reply.lineArray.forEach(aLine =>
{
// Parse each ClientTransportPlugin line and look for the meek or
// meek_lite transport. This code works a lot like the Tor daemon's
// parse_transport_line() function.
let tokens = aLine.split(' ');
if ((tokens.length > 2) &&
((tokens[0] == "meek") || (tokens[0] == "meek_lite")) &&
(tokens[1] == "exec"))
if ((tokens.length > 2) && (tokens[1] == "exec"))
{
meekTransport = tokens[0];
meekClientPath = tokens[2];
meekClientArgs = tokens.slice(3);
let transportArray = tokens[0].split(",").map(aStr => aStr.trim());
let transport = transportArray.find(
aTransport => (aTransport === "meek"));
if (!transport)
{
transport = transportArray.find(
aTransport => (aTransport === "meek_lite"));
}
if (transport)
{
meekTransport = transport;
meekClientPath = tokens[2];
meekClientArgs = tokens.slice(3);
}
}
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment