mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-06-21 16:41:01 +00:00
Initial support digest auth scheme
This commit is contained in:
parent
6767076a6b
commit
86429ee8eb
6 changed files with 321 additions and 67 deletions
|
@ -110,15 +110,15 @@ impl Options {
|
|||
|
||||
#[derive(Default, Clone, Debug)]
|
||||
pub struct Credentials {
|
||||
pub(crate) username: Vec<u8>,
|
||||
pub(crate) password: Vec<u8>,
|
||||
pub(crate) username: String,
|
||||
pub(crate) password: String,
|
||||
}
|
||||
|
||||
impl Credentials {
|
||||
pub fn new(username: &str, password: &str) -> Self {
|
||||
Self {
|
||||
username: username.as_bytes().to_vec(),
|
||||
password: password.as_bytes().to_vec(),
|
||||
username: String::from(username),
|
||||
password: String::from(password),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue