check if current environment is related with proxy.
fix typos in variable names.
find the way to substitute variable recursively so the value instead of the variable name is checked.
add here-document consisting in the main logic.
quote here-document delimiter to redirect its contents literally without any interpretation by the current shell.