filename.sh contains the definition of
unload_proxy, then you need to use
source ./filename.sh or the shortcut
Sourcing the file causes it to evaluate within the current shell's environment, thereby letting it define new functions.
in your example, you're running the file directly* (ie without sourcing), and the sequence of events is as follows:
a new bash shell is created, with a new environment that is, for the purposes of this explanation, more or less a copy of the current shell's (dependent on certain options and ways of defining things).
the script is run inside this new shell, and defines the functions within its environment.
the script ends, and the new shell with the functions defined in it ends as well.
control is returned to your original shell, where no functions have been defined.
When run as
source ./filename.sh, no new shell is launched, so only step number 2 happens, and it happens in your current shell.
* assuming the file has a proper shebang, such as