PLNK accepts connections

Next up exension time
This commit is contained in:
Alex
2022-09-13 00:57:48 -04:00
parent 455e87c168
commit 3878032d80
6 changed files with 68 additions and 8 deletions
+10 -1
View File
@@ -1,3 +1,4 @@
use md5;
use serde;
use worker::{kv::KvStore, *};
@@ -99,7 +100,15 @@ pub async fn main(req: Request, env: Env, _ctx: worker::Context) -> Result<Respo
user = user.replace("##CALL##", u);
user = user.replace("##EXT##", &info.ext);
user = user.replace("##PASSWD##", &info.passwd);
user = user.replace(
"##MD5_CRED##",
&format!(
"{:x}",
md5::compute(format!("{}:gonk:{}", u, &info.passwd))
),
);
// user = user.replace("##PASSWD##", &info.passwd);
conf = conf + &user;
}