mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
use more accurate regex for {domain}:{port}
This commit is contained in:
@@ -7,10 +7,10 @@ use cpal::{
|
||||
use magnum_opus::{Channels::*, Decoder as AudioDecoder};
|
||||
use sha2::{Digest, Sha256};
|
||||
use std::{
|
||||
str::FromStr,
|
||||
collections::HashMap,
|
||||
net::SocketAddr,
|
||||
ops::{Deref, Not},
|
||||
str::FromStr,
|
||||
sync::{atomic::AtomicBool, mpsc, Arc, Mutex, RwLock},
|
||||
};
|
||||
use uuid::Uuid;
|
||||
@@ -181,14 +181,10 @@ impl Client {
|
||||
true,
|
||||
));
|
||||
}
|
||||
// Allow connect to {hostname}:{port}
|
||||
if hbb_common::is_hostname_port_str(peer) {
|
||||
// Allow connect to {domain}:{port}
|
||||
if hbb_common::is_domain_port_str(peer) {
|
||||
return Ok((
|
||||
socket_client::connect_tcp(
|
||||
peer,
|
||||
RENDEZVOUS_TIMEOUT,
|
||||
)
|
||||
.await?,
|
||||
socket_client::connect_tcp(peer, RENDEZVOUS_TIMEOUT).await?,
|
||||
true,
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user