def get_proxy_bypass(network_service='Ethernet'):
 if (__grains__['os'] == 'Windows'):
  reg_val = __salt__['reg.read_value']('HKEY_CURRENT_USER', 'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet Settings', 'ProxyOverride')
  bypass_servers = reg_val['vdata'].replace('<local>', '').split(';')
  return bypass_servers
 out = __salt__['cmd.run']('networksetup -getproxybypassdomains {0}'.format(network_service))
 return out.split('\n')

def get_proxy_bypass ( network_service = 'Ethernet' ) : if ( __grains__ [ 'os' ] == 'Windows' ) : reg_val = __salt__ [ 'reg.read_value' ] ( 'HKEY_CURRENT_USER' , 'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet Settings' , 'ProxyOverride' ) bypass_servers = reg_val [ 'vdata' ] . replace ( '<local>' , '' ) . split ( ';' ) return bypass_servers out = __salt__ [ 'cmd.run' ] ( 'networksetup -getproxybypassdomains {0}' . format ( network_service ) ) return out . split ( '\n' )
returns the current domains that can bypass the proxy network_service the network service to get the bypass domains from .