mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-01-10 08:18:04 +08:00
43a0a4f8e0
* add http(s) proxy
* Add front-end translation
* fix ui description
* For linux platform, add rustls support
* fix: Fix the proxy address test function.
* add: Added default prompts for agency agreement and some multi-language translations
* add: Http proxy request client
* fix: add async http proxy func and format the code
* add: Preliminary support for flutter front-end calling rust back-end http request
* Optimize HTTP calls
* Optimize HTTP calls
* fix: Optimize HTTP requests, refine translations, and fix dependencies
* fix: Win and macOS compilation errors
* fix: web platforms
* fix: Optimize import
* fix: Fix web platform issues
* fix: Fix web platform issues
* fix: update ci
* fix: test ci
* test: test CI
* Revert "fix: update ci"
This reverts commit 2e5f247b2e
.
* test: test CI
* test: test CI
* fix: fix lock file
* fix: Optimize imports
29 lines
897 B
Rust
29 lines
897 B
Rust
mod custom_server;
|
|
use hbb_common::{ResultType, base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine as _}};
|
|
use custom_server::*;
|
|
|
|
fn gen_name(lic: &CustomServer) -> ResultType<String> {
|
|
let tmp = URL_SAFE_NO_PAD.encode(&serde_json::to_vec(lic)?);
|
|
Ok(tmp.chars().rev().collect())
|
|
}
|
|
|
|
fn main() {
|
|
let args: Vec<_> = std::env::args().skip(1).collect();
|
|
let api = args.get(2).cloned().unwrap_or_default();
|
|
let relay = args.get(3).cloned().unwrap_or_default();
|
|
if args.len() >= 2 {
|
|
match gen_name(&CustomServer {
|
|
key: args[0].clone(),
|
|
host: args[1].clone(),
|
|
api,
|
|
relay,
|
|
}) {
|
|
Ok(name) => println!("rustdesk-custom_serverd-{}.exe", name),
|
|
Err(e) => println!("{:?}", e),
|
|
}
|
|
}
|
|
if args.len() == 1 {
|
|
println!("{:?}", get_custom_server_from_string(&args[0]));
|
|
}
|
|
}
|