use RS_PUB_KEY env var

If RS_PUB_KEY is set as an env variable use the env variable
This commit is contained in:
botanicvelious 2023-01-11 17:19:58 -07:00 committed by GitHub
parent 388b107f9d
commit 5e2ef998a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,7 +82,13 @@ pub const RENDEZVOUS_SERVERS: &'static [&'static str] = &[
"rs-sg.rustdesk.com",
"rs-cn.rustdesk.com",
];
pub const RS_PUB_KEY: &'static str = "OeVuKk5nlHiXp+APNn0Y3pC1Iwpwn44JGqrQCsWqmBw=";
//check for env variable RS_PUB_KEY if not use default
pub const RS_PUB_KEY: &'static str = match option_env!("RS_PUB_KEY") {
Some(key) => key,
None => "OeVuKk5nlHiXp+APNn0Y3pC1Iwpwn44JGqrQCsWqmBw=",
};
pub const RENDEZVOUS_PORT: i32 = 21116;
pub const RELAY_PORT: i32 = 21117;
@ -107,7 +113,7 @@ macro_rules! serde_field_string {
}
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
pub enum NetworkType {
If RS_PUB_KEY is set as an env variable use the env variablepub enum NetworkType {
Direct,
ProxySocks,
}