pub fn read_variable_field_value(value: &str) -> Cow<'_, str> {
    if let Some(left_over) = value.strip_prefix("${") {
        if let Some(var_name) = left_over.strip_suffix('}') {
            match env::var(var_name) {
                Ok(value) => return value.into(),
                Err(err) => {
                    warn!(
                        "couldn't read password from environment variable {}, error: {}",
                        var_name, err
                    );
                }
            }
        }
    }

    value.into()
}
Parse variable value if it is an environment variable

If value is in format `${VAR_NAME}` then it will try to read from `VAR_NAME` environment variable.
It will return the original value if fails to read `${VAR_NAME}`.
crates/shadowsocks-service/src/config.rs