Created
          October 15, 2019 21:29 
        
      - 
      
 - 
        
Save gitawego/253f0ba67a0fb9ba14680d6055c13138 to your computer and use it in GitHub Desktop.  
    proxify alias behind enterprise
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| set -e | |
| PROXY_URL=myproxy.socgen.com | |
| PROXY_USERNAME=my_user_name | |
| function proxy_fnc(){ | |
| read -s -p "Enter Password: " PROXY_PASSWORD | |
| echo | |
| local prefix="$PROXY_USERNAME:$PROXY_PASSWORD" | |
| http_proxy="$prefix@$PROXY_URL" https_proxy="$prefix@$PROXY_URL" $@ | |
| } | |
| # alias proxify=proxy_fnc | |
| # example using alias: | |
| # proxify curl -k https://www.google.com | |
| # example: | |
| proxy_fnc env | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment