Skip to content

Instantly share code, notes, and snippets.

View hygorluz's full-sized avatar

Hygor Carvalho da Luz hygorluz

  • Georanker
  • Salvador
View GitHub Profile
Command:
- networksetup -getwebproxy <networkservice>
- networksetup -getftpproxy <networkservice>
- networksetup -getsecurewebproxy <networkservice>
- networksetup -getsocksfirewallproxy <networkservice>
Output Example:
Enabled: Yes or No
Server: SERVER_ADDRESS
Port: 123
Authenticated Proxy Enabled: 0 for false, 1 for true
$proxyOverride = Get-ItemProperty -path $regKey -name ProxyOverride
return $proxyOverride
Output:
ProxyOverride : <local>
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Interne
t Settings
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion
PSChildName : Internet Settings
PSDrive : HKCU
@hygorluz
hygorluz / win_set_proxy_server_powershell.ps1
Last active March 8, 2024 05:35
Set Windows Proxy Server via PowerShell
####
# SET-INTERNETPROXY
#
# DESCRIPTION
# This function will set the proxy server and (optional) Automatic configuration script.
#
# SYNTAX
# Set-InternetProxy [-Proxy] <string[]> [[-acs] <string[]>] [<CommonParameters>]
#
# EXAMPLES
@hygorluz
hygorluz / phantomjs_install_ubuntu.txt
Last active April 12, 2018 18:00
PhantomJs install on Ubuntu
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev -y
sudo apt-get install libfreetype6 libfreetype6-dev -y
sudo apt-get install libfontconfig1 libfontconfig1-dev -y
cd ~
export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/$PHANTOM_JS.tar.bz2
sudo tar xvjf $PHANTOM_JS.tar.bz2
sudo mv $PHANTOM_JS /usr/local/share
sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin