From b99876b6b4bd122762a7653fe7d5c7a1c35f8341 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Blin?=
 <sebastien.blin@savoirfairelinux.com>
Date: Wed, 28 Oct 2020 14:49:11 -0400
Subject: [PATCH] jamiaccount: dht proxy should handle url with '-'

Change-Id: Ia7333f9f2b54aaed43021e74492ca3af666bfdbb
GitLab: #339
---
 src/jamidht/jamiaccount.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/jamidht/jamiaccount.cpp b/src/jamidht/jamiaccount.cpp
index dcf0a8fa2d..ae50d3b92b 100644
--- a/src/jamidht/jamiaccount.cpp
+++ b/src/jamidht/jamiaccount.cpp
@@ -217,7 +217,8 @@ static constexpr const char* DEFAULT_TURN_SERVER = "turn.jami.net";
 static constexpr const char* DEFAULT_TURN_USERNAME = "ring";
 static constexpr const char* DEFAULT_TURN_PWD = "ring";
 static constexpr const char* DEFAULT_TURN_REALM = "ring";
-static const auto PROXY_REGEX = std::regex("(https?://)?([\\w\\.]+)(:(\\d+)|:\\[(.+)-(.+)\\])?");
+static const auto PROXY_REGEX = std::regex(
+    "(https?://)?([\\w\\.\\-\\_\\~]+)(:(\\d+)|:\\[(.+)-(.+)\\])?");
 static const std::string PEER_DISCOVERY_JAMI_SERVICE = "jami";
 const constexpr auto PEER_DISCOVERY_EXPIRATION = std::chrono::minutes(1);
 
-- 
GitLab