Command line (or other way) to change proxy config in easy way
No need to create a script:


Create a proxyless network environment: in the Network pane of System Preferences, click on the “Profile” drop down and select “Manage Profiles…”. Duplicate your standard settings (by clicking on the cog wheel button at the bottom of the list). Give the duplicated profile a unique name (“Proxyless”, say). Disable all proxies in the settings for that profile.
Assign a keyboard shortcut to your new profile: in the Keyboard pane of System Preferences, create a new Application shortcut for “All Applications”. Name it like your profile (i.e. “Proxyless”), add the shortcut.


The shortcut will be activated once your switch applications at least once (it won’t be active while you are still in System Preferences).