How do I know what proxy server I'm using?
--
Music by Eric Matyas
https://www.soundimage.org
Track title: Unforgiving Himalayas Looping
--
Chapters
00:00 Question
00:32 Accepted answer (Score 232)
02:43 Answer 2 (Score 91)
03:21 Answer 3 (Score 75)
03:38 Answer 4 (Score 36)
04:43 Thank you
--
Full question
https://superuser.com/questions/346372/h...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#windows #windowsxp #networking #proxy
#avk47
ACCEPTED ANSWER
Score 234
The auto proxy detection system works by downloading a file called wpad.dat
from the host wpad
. First confirm this host exists from a command prompt:
ping wpad
If it doesn't exist, you may have to put the correct DNS suffix. In the same command prompt, type
ipconfig /all
You should see a Primary DNS Suffix
and a DNS Suffix Search List
Try appending each of these with a . to wpad
:
ping wpad.<primary dns suffix>
If any of these work, then in your browser enter http://wpad.<suffix>/wpad.dat
. This will download the proxy auto configuration file you can open in notepad.exe
Toward the bottom of this file, you should see a line saying
PROXY <host:port>;
It might be repeated if you have multiple proxies available. The host and port are what you need.
If this file doesn't exist, then either there is no proxy server, or the proxy server is being provided by dhcp (note that this would only work with IE, so if firefox can surf, this is not the method being used). If you don't have access to the dhcp server to see what it is sending, the easiest way would be to open a site in ie, then go to a command prompt. Type
netstat -ban
This will provide a list of connections made with the process id of each process. Go to Task Manager, and select View/Select Columns
and enable PID (Process Identifier). Look for the PID of iexplore.exe in the list returned by netstat -ban
This will reveal the proxy ip and port.
ANSWER 2
Score 80
Try the following command in cmd:
reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" | find /i "proxyserver"
Hope helps
ANSWER 3
Score 38
The following command also seems to work. As a bonus it avoids contacting lots of DNS servers that might or might not work, and it avoids querying the registry, so it functions even in fairly locked-down environments:
Windows Vista or later:
netsh winhttp show proxy
Windows XP or earlier:
netsh diag connect ieproxy
Some additional work is required to extract the proxy address from the output, so the registry approach is simpler if you know it's going to be available.
Update:
I've found that on windows 7 netsh sometimes returns different results depending on how I call it. If I run the above command manually in a prompt, I get 'Direct Access - No Proxy'. However, calling netsh
from SAS results in an actual proxy being listed!
ANSWER 4
Score 19
You can also get the automatic configuration file URL from the registry by running:
reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Wpad" /s | find /i "WpadDetectedURL"