Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for curl proxy #44

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,30 @@ fi

home=$HOME

echo "Enter proxy info for curl? (y/n)"
echo
read answer
echo
if [ "$answer" == "y" ]; then
echo "Enter proxy info <proxyhost>:<proxyport>:"
echo
read proxyinfo
echo
echo "proxy = $proxyinfo" >> $HOME/.curlrc

if [ $? == 0 ]; then
echo "$HOME/.curlrc appended successfully."
echo
else
echo "writing ${HOME}/.curlrc failed"
fi

elif [ "$answer" == "n" ]; then
:
else
echo "unrecognized input, skipping..."
fi

if [ ! $(pwd | sed 's/\/.*\/.*\///') = '.proxyhelper' ]
then
echo Exiting. This script should be run from "~/.proxyhelper" directory
Expand All @@ -25,23 +49,23 @@ chmod +x $home/.proxyhelper/uninstall.sh
# Needs for people with earlier version of PH
# Which might clash
if [ -x "$(command -v /usr/bin/phelp)" ]
then
then
sudo rm /usr/bin/phelp
fi
if [ -x "$(command -v /usr/bin/zetproxy)" ]
then
sudo rm /usr/bin/zetproxy
fi
if [ -x "$(command -v /usr/bin/torpinger)" ]
then
then
sudo rm /usr/bin/torpinger
fi
if [ -x "$(command -v /etc/network/if-up.d/zetproxy)" ]
then
sudo rm /etc/network/if-up.d/zetproxy
fi
if [ -x "$(command -v /etc/network/if-up.d/torpinger)" ]
then
then
sudo rm /etc/network/if-up.d/torpinger
fi
# symlinks fail if the path is not absolute
Expand Down