introduction-to-bash-scripting icon indicating copy to clipboard operation
introduction-to-bash-scripting copied to clipboard

Feature: Proxy automation script!

Open akshaykhoje opened this issue 2 years ago • 1 comments

Yes, my shell script is an automation script for system-wide proxy setup on linux installed machines.

I have been wandering why we at our college are not able to access the internet from within the terminal when behind a proxy server. Henceforth we had to switch between personal wifi and the college proxy every now and then.

I'd like this issue be solved by writing a few simple command from the terminal to toggle the proxy on and off.

The current way of tackling this problem is to manually comment out all the config files for whom one sets the proxy. I would like this to be automated with as minimum efforts as possible.

I HAVE THE SOLUTION DONE MYSELF! A month ago I wrote this shell script which does the above job by just a couple commands. To turn the proxy on enter the commands: myproxy on source /etc/profile.d/proxy.sh

To turn off: myproxy off source /etc/profile.d/unset_proxy.sh

You can check the script here

PLEASE ASSIGN ME THIS FEATURE! I SUPPOSE THIS WILL ADD VALUE TO THE BOOK AND MIGHT SERVE A REAL LIFE PURPOSE FOR LEARNERS!

THANK YOU😇

akshaykhoje avatar Oct 01 '22 15:10 akshaykhoje

Hi there, sounds good! Feel free to submit a PR!

bobbyiliev avatar Oct 01 '22 17:10 bobbyiliev