From 12af9e636963d1adfcc33f23f42cc9d560c43f9a Mon Sep 17 00:00:00 2001 From: botanicvelious Date: Tue, 17 Jan 2023 06:56:09 -0700 Subject: [PATCH] update RENDEZVOUS_SERVER env check --- libs/hbb_common/src/config.rs | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/libs/hbb_common/src/config.rs b/libs/hbb_common/src/config.rs index e53bda578..213da08f1 100644 --- a/libs/hbb_common/src/config.rs +++ b/libs/hbb_common/src/config.rs @@ -77,21 +77,13 @@ const CHARS: &'static [char] = &[ 'm', 'n', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', ]; -//check for env variable RENDEZVOUS_SERVER1-3 if not use the default -pub const RENDEZVOUS_SERVERS: &'static [&'static str] = &[ - match option_env!("RENDEZVOUS_SERVER1") { - Some(key) => key, - None => "rs-ny.rustdesk.com", - }, - match option_env!("RENDEZVOUS_SERVER2") { - Some(key) => key, - None => "rs-sg.rustdesk.com", - }, - match option_env!("RENDEZVOUS_SERVER3") { - Some(key) => key, - None => "rs-cn.rustdesk.com", - }, -]; +//check for env variable RENDEZVOUS_SERVER if not use the default +pub const RENDEZVOUS_SERVERS: [&'static str;3] = + match option_env!("RENDEZVOUS_SERVER") { + Some(key) => [key,key,key], + None => ["rs-ny.rustdesk.com","rs-sg.rustdesk.com","rs-cn.rustdesk.com"], + }; + //check for env variable RS_PUB_KEY if not use default pub const RS_PUB_KEY: &'static str = match option_env!("RS_PUB_KEY_VAL") {