pub fn load_from_file<P: AsRef<Path> + ?Sized>(filename: &P) -> io::Result<Self> {
        let filename = filename.as_ref();

        trace!(
            "loading socks5 authentication configuration from {}",
            filename.display()
        );

        let mut reader = OpenOptions::new().read(true).open(filename)?;
        let mut content = String::new();
        reader.read_to_string(&mut content)?;

        let jconf: SSSocks5AuthConfig = match json5::from_str(&content) {
            Ok(c) => c,
            Err(err) => return Err(io::Error::other(err)),
        };

        let mut passwd = Socks5AuthPasswdConfig::new();
        if let Some(p) = jconf.password {
            for user in p.users {
                passwd.add_user(user.user_name, user.password);
            }
        }

        Ok(Self { passwd })
    }
Load from configuration file

```json
{
"password": {
"users": [
{
"user_name": "USER_NAME",
"password": "PASSWORD"
}
]
}
}
crates/shadowsocks-service/src/local/socks/config.rs