diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2020-05-13 10:25:55 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2020-05-13 12:25:16 +0200 |
| commit | 1e3812d75aae2c884e3cfd0deec7cc253b849b6a (patch) | |
| tree | 1b0f18e05a59db8d5d1c9d46401ffea9890dc120 | |
| parent | 494acbc5ff03533a2f4c55ce1401d83c0e42e465 (diff) | |
| download | mullvadvpn-1e3812d75aae2c884e3cfd0deec7cc253b849b6a.tar.xz mullvadvpn-1e3812d75aae2c884e3cfd0deec7cc253b849b6a.zip | |
Update Shadowsocks port parsing regex
Newer Shadowsocks updated the format they print
the bound port to stdout. So we had to update the
regex looking for it to find the port
| -rw-r--r-- | talpid-core/src/proxy/shadowsocks.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/talpid-core/src/proxy/shadowsocks.rs b/talpid-core/src/proxy/shadowsocks.rs index 6a1fab1414..cd5d1295b3 100644 --- a/talpid-core/src/proxy/shadowsocks.rs +++ b/talpid-core/src/proxy/shadowsocks.rs @@ -204,7 +204,7 @@ impl ShadowsocksProxyMonitor { fn parse_port(logline: &str) -> Result<u16> { // TODO: Compile once and reuse. - let re = Regex::new(r"(?:TCP Listening on \d+\.\d+\.\d+\.\d+:)(\d+$)").unwrap(); + let re = Regex::new(r"(?:TCP listening on \d+\.\d+\.\d+\.\d+:)(\d+$)").unwrap(); if let Some(captures) = re.captures(logline) { return Ok(captures[1].parse().map_err(|_| { |
