Allow hostnames in LDN direct connect

This commit is contained in:
Benjamin
2022-09-27 00:07:05 +02:00
parent 465c46387d
commit 89f81ab46e
2 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -63,7 +63,7 @@
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;IPv4 address of the host&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="maxLength">
<number>16</number>
<number>253</number>
</property>
</widget>
</item>
+2 -4
View File
@@ -36,11 +36,9 @@ private:
QRegExp nickname_regex = QRegExp(QStringLiteral("^[a-zA-Z0-9._- ]{4,20}$"));
QRegExpValidator nickname;
/// ipv4 address only
// TODO remove this when we support hostnames in direct connect
/// ipv4 address and hostname
QRegExp ip_regex = QRegExp(QStringLiteral(
"(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|"
"2[0-4][0-9]|25[0-5])"));
"[a-zA-Z0-9.-]{2,253}$"));
QRegExpValidator ip;
/// port must be between 0 and 65535