Windows 10 cmd set proxy

I want to set a proxy throught the command line, first thing I found out is that you have to run command line with administrator rights — then the basic proxy set would be:

netsh winhttp set proxy SERVER:PORT

This works nice, but I also want to add a login. As you can see I’ve tried using netsh->winhttp, however manual does not say anything about the login part so I just tried:

netsh winhttp set proxy user:password@SERVER:PORT

This unfortunately does not work. Is it even possible to achieve something like this in netsh->winhttp?

If so, how? If not => what windows commands should I follow?

̶O̶r̶ ̶i̶s̶ ̶t̶h̶i̶s̶ ̶m̶o̶r̶e̶ ̶e̶a̶s̶i̶l̶y̶ ̶a̶c̶h̶i̶e̶v̶e̶a̶b̶l̶e̶ ̶t̶h̶r̶o̶u̶g̶h̶ ̶s̶o̶m̶e̶ ̶W̶i̶n̶d̶o̶w̶s̶A̶P̶I̶ ̶(̶e̶.̶g̶.̶ ̶u̶s̶i̶n̶g̶ ̶C̶/̶C̶+̶+̶)̶?̶

Thanks for help, please feel free to ask any questions if something is unclear.

USING: Windows 7, cmd.exe, netsh->winhttp

EDIT: This looks like the C++ way: http://msdn.microsoft.com/en-us/library/windows/desktop/aa383144(v=vs.85).aspx , but a better way for C++ might be to go this way: http://msdn.microsoft.com/en-us/library/windows/desktop/aa385384(v=vs.85).aspx#general_option, — so the remaining question is how to achieve this in command line generally (or even better command-line->netsh->winhttp)?

asked Nov 18, 2014 at 11:11

jave.web's user avatar

jave.webjave.web

14k12 gold badges92 silver badges125 bronze badges

5

If you are using Microsoft windows environment then you can set a variable named HTTP_PROXY, FTP_PROXY, or HTTPS_PROXY depending on the requirement.

I have used following settings for allowing my commands at windows command prompt to use the browser proxy to access internet.

set HTTP_PROXY=http://proxy_userid:proxy_password@proxy_ip:proxy_port

The parameters on right must be replaced with actual values.

Once the variable HTTP_PROXY is set, all our subsequent commands executed at windows command prompt will be able to access internet through the proxy along with the authentication provided.

Additionally if you want to use ftp and https as well to use the same proxy then you may like to the following environment variables as well.

set FTP_PROXY=%HTTP_PROXY%

set HTTPS_PROXY=%HTTP_PROXY%

Michael Lihs's user avatar

Michael Lihs

7,50017 gold badges52 silver badges85 bronze badges

answered Jan 10, 2017 at 13:29

Chinmay's user avatar

ChinmayChinmay

8606 silver badges9 bronze badges

7

cmd

Tunnel all your internet traffic through a socks proxy:

netsh winhttp set proxy proxy-server="socks=localhost:9090" bypass-list="localhost"

View the current proxy settings:

netsh winhttp show proxy

Clear all proxy settings:

netsh winhttp reset proxy

ejderuby's user avatar

ejderuby

7105 silver badges21 bronze badges

answered Aug 22, 2019 at 16:28

Adasiek's user avatar

AdasiekAdasiek

2693 silver badges2 bronze badges

IE can set username and password proxies, so maybe setting it there and import does work

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /t REG_SZ /d name:port
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyUser /t REG_SZ /d username
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyPass /t REG_SZ /d password
netsh winhttp import proxy source=ie

answered Nov 26, 2014 at 23:44

overflowed's user avatar

overflowedoverflowed

1,77310 silver badges13 bronze badges

4

The best way around this is (and many other situations) in my experience, is to use cntlm which is a local no-authentication proxy which points to a remote authentication proxy. You can then just set WinHTTP to point to your local CNTLM (usually localhost:3128), and you can set CNTLM itself to point to the remote authentication proxy. CNTLM has a «magic NTLM dialect detection» option which generates password hashes to be put into the CNTLM configuration files.

answered Apr 28, 2015 at 17:09

Adam Burley's user avatar

Adam BurleyAdam Burley

5,5954 gold badges51 silver badges73 bronze badges

2

Я хочу установить прокси-сервер через командную строку, первое, что я выяснил, это то, что вы должны выполнить командную строку с правами администратора. Тогда базовым набором прокси будет:

netsh winhttp set proxy SERVER:PORT

Это работает хорошо, но я также хочу добавить логин. Как вы можете видеть, я попытался использовать netsh- > winhttp, однако руководство ничего не говорит о части входа, поэтому я просто попробовал:

netsh winhttp set proxy user:[email protected]:PORT

Это, к сожалению, не работает. Возможно ли достичь чего-то подобного в netsh- > winhttp?

Если да, то как? Если нет = > какие команды окон следует выполнять?

Или это легче ̶a̶c̶h̶i̶e̶v̶e̶a̶b̶l̶e̶ через некоторые ̶W̶i̶n̶d̶o̶w̶s̶A̶P̶I̶ ̶ (например, с помощью C/C + + ̶ ̶) ̶? ̶

Спасибо за помощь, пожалуйста, не стесняйтесь задавать любые вопросы, если что-то неясно.

ИСПОЛЬЗОВАНИЕ: Windows 7, cmd.exe, netsh- > winhttp

EDIT: Это похоже на способ С++: http://msdn.microsoft.com/en-us/library/windows/desktop/aa383144(v=vs.85).aspx, но лучший способ для С++ — это пойти следующим образом: http://msdn.microsoft.com/en-us/library/windows/desktop/aa385384(v=vs.85).aspx#general_option, поэтому оставшийся вопрос заключается в том, как добиться этого в командной строке в целом (или даже лучше командной строки- > netsh- > winhttp)?

4b9b3361

Ответ 1

Если вы используете среду Microsoft Windows, вы можете установить переменную с именем HTTP_PROXY, FTP_PROXY или HTTPS_PROXY в зависимости от требования.

Я использовал следующие настройки, позволяющие моим командам в командной строке Windows использовать прокси-сервер браузера для доступа в Интернет.

set HTTP_PROXY=http://proxy_userid:[email protected]_ip:proxy_port

Параметры справа должны быть заменены фактическими значениями.

Как только переменная HTTP_PROXY установлена, все наши последующие команды, выполняемые в командной строке Windows, смогут получить доступ к интернету через прокси вместе с предоставленной аутентификацией.

Кроме того, если вы хотите использовать ftp и https для использования того же прокси-сервера, вам также могут понравиться следующие переменные среды.

set FTP_PROXY=%HTTP_PROXY%

set HTTPS_PROXY=%HTTP_PROXY%

Ответ 2

IE может устанавливать прокси-серверы для имени пользователя и пароля, поэтому, возможно, его установить, а импорт работает

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /t REG_SZ /d name:port
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyUser /t REG_SZ /d username
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyPass /t REG_SZ /d password
netsh winhttp import proxy source=ie

Ответ 3

На мой взгляд, лучший способ обойти это (и многие другие ситуации) — использовать cntlm, который является локальным прокси-сервером без аутентификации, который указывает на удаленный прокси-сервер аутентификации. Затем вы можете просто установить WinHTTP, чтобы он указывал на локальный CNTLM (обычно localhost: 3128), и вы можете настроить сам CNTLM, чтобы он указывал на удаленный прокси-сервер аутентификации. У CNTLM есть опция «обнаружения волшебного NTLM-диалекта», которая генерирует хэши паролей, которые нужно поместить в файлы конфигурации CNTLM.

Ответ 4

CMD

Туннелируйте весь свой интернет-трафик через прокси socks:

netsh winhttp set proxy proxy-server="socks=localhost:9090" bypass-list="localhost"

Просмотр текущих настроек прокси:

netsh winhttp show proxy

Очистить все настройки прокси-сервера:

netsh winhttp reset proxy

Using advanced VPN helps you set up proxy settings instantly

by Elena Constantinescu

Elena started writing professionally in 2010 and hasn’t stopped exploring the tech world since. With a firm grasp of software reviewing and content editing, she is always trying… read more


Updated on

  • Windows 10 has native support for proxy settings, allowing you to set up a proxy server for all your applications.
  • You can easily configure proxy settings on Windows 10 in automatic or manual mode.
  • However, if you prefer a safer long-term solution, consider investing in a premium VPN service. 
  • Check out our intuitive step-by-step guide below to set up a proxy on Windows 10 in manual and automatic mode.

how to configure global proxy settings on Windows 10

A proxy server diverts your network data to another computer before it reaches its intended destination.

It has multiple benefits, from changing your IP address and geo-location to accessing restricted content.

If you’re looking for a simple way to set global proxy options on your Windows 10 desktop, laptop, or tablet, we’re here to help.

Does Windows have a built-in proxy?

Yes, you have a Windows 10 proxy server integrated and you can set up a proxy using the Network and Internet menu.

This connection can increase your digital security when browsing risky websites and grant you access to region-blocked content.

How we test, review and rate?

We have worked for the past 6 months on building a new review system on how we produce content. Using it, we have subsequently redone most of our articles to provide actual hands-on expertise on the guides we made.

For more details you can read how we test, review, and rate at WindowsReport.

How do I find my global proxy settings?

You can discover the proxy settings in a few steps by using only the Windows 10 settings panel. However, it’s not possible to use global proxy settings for all applications.

It’s possible to access Proxy Settings on your Windows and use the automatic proxy or set up a manual proxy with a different proxy IP address.

How do I set a global proxy in Windows?

1. Automatic proxy setup

If you have discussed with your ISP or system administrator about using proxy settings or a proxy setup on your Windows 10 PC, here’s what you have to do:

  1. Click the Start button, type proxy, and select Proxy settings.access Windows 10 proxy settings from the Start menu
  2. Turn on Automatically detect settings.autodetect proxy settings on Windows 10
  3. Or, if you have received a proxy URL, then enable Script Address, paste the URL, and click Save.add a proxy script address on Windows 10

In some cases, Windows fails to autodetect proxy settings. But you can easily fix issues by using our troubleshooting guide.

2. Manual proxy setup

If you’re looking for a proxy server that will help you access blocked websites and unblock streaming content, you can look up free proxy server lists on Google.

Here’s how to set it up on your Windows 10 computer:

manually set up proxy settings on Windows 10

1. Go to proxy settings.
2. Turn on Use a proxy server.
3. Specify the Address and Port of the proxy server.
4. If you want to exclude certain websites from the proxy, write them down in the box below.
5. To exclude LAN addresses from the proxy, check the Don’t use the proxy server for local (intranet) addresses option.
6. Click Save.

2.2 Set proxy in windows cmd

  1. Open the Command Prompt by typing cmd in the Start.
    CMD run as administrator
  2. Select the Run as Administrator option.
  3. Type the following command netsh winhttp show proxy
  4. Search the Internet Option and go to the Connections tab.
    Internet options
  5. Find the LAN settings and copy the proxy address.
  6. Import the address in the Command prompt.

If Windows 10 fails in its attempts to connect to the proxy, get started by checking your Internet settings. But there are also other simple solutions you can try.

Read more about this topic

  • Is Windows 11 Faster Than Windows 10?
  • How to Change the Icon Size on Windows 10
  • Are Windows 11 Product Keys Backward Compatible?
  • Microsoft Store Apps vs Desktop Apps: Which Ones to Use?

3. Use a VPN service

A proxy server has low security and barely works as an Internet circumvention tool. It’s slow, and crowded because it’s used by thousands of other users like yourself, and won’t protect your online privacy.

If you’re a privacy-concerned individual, consider investing in a premium VPN service. Compared to a proxy server, a VPN has superior security and geo-blocking features.

Here are the exact steps for your Windows 10 laptop or desktop:

  1. Sign up for a VPN subscription plan (we recommend ExpressVPN)
  2. Follow the download instructions and install the software on Windows 10.
  3. Launch the VPN client.
  4. Press the big power button to connect.

We suggest using ExpressVPN because it’s the best in the business. It encrypts all data traffic flowing in and out of your PC.

That’s because the desktop client covers all Internet-enabled applications: web browsers, email clients, torrenting clients, Steam games, and everything else.

Plus, if you want to redirect your VPN traffic through a secondary location, you can configure a SOCKS5 proxy without having to resort to a separate software application.

These are two aspects that make Express stand out because Windows 10 doesn’t natively support SOCKS5.

ExpressVPN

Use this reliable VPN instead of a proxy server to encrypt all your data and make yourself anonymous.

How do I set up a proxy script in Windows 10?

In order to set up a script address for proxy on Windows 10, you should access the proxy settings. As discussed below, you can do this task from your settings.

It’s possible to simply type Proxy settings on the Start menu and select the Change proxy settings option that would appear in the results.

To recap, you can easily configure proxy settings on your Windows 10 computer in automatic or manual mode, without having to install any additional software.

However, unless you received explicit instructions from your ISP or system admin, you need to get old proxy connection details from somewhere else.

Instead, we suggest opting for a premium VPN like ExpressVPN. It’s built to protect your online privacy, defend your router from hackers, unblock streaming media that’s not available in your country, and more.

So without a doubt, it is the best VPN for Windows 10.

newsletter icon

Have you installed windows 10 on your computer but wondering how to set a proxy server? Worry not! In this article we’ve prepared three step-by-step guidelines on how to set a proxy in windows 10.

Typically, using a proxy is fundamental in accessing geo-blocked sites or censored programs. What proxy does is configuring your IP address to appear like its own IP.  For that reason, you can browse the internet anonymously without the Internet Service Provider (ISP), knowing it’s you.

Proxies have been a household name for most IT experts who want to browse anonymously. You, too, have the capability of configuring the proxy in your windows 10 PC. Windows 10 is compatible with most proxy settings; therefore, follow any of the methods below and you’ll be proud of yourself.


1. Configuring a Proxy Through the Network Settings

With the network settings, you need to turn the WIFI on for the system to identify the network close to you.

First: Locate the Proxy Server Settings on the PC

Step 1. On your computer keypad, press the windows icon plus letter (I) or (O) simultaneously to access the settings Icons.

Or else, find the setting menu by clicking the windows icon on the taskbar on your screen.

Windows settings option

Step 2. Click the setting menu and identify the network and setting tab among the other fourteen icons

network and setting menu

Step 3: Open the Network and Internet Panel and choose the Proxy icon you see below

network and setting proxy menu


Second: Set Up A Proxy

In this case, you can set the proxy server automatically or manually. After you access the proxy icon, you will find both the automatic option and manual option.

Setting the Proxy Server Automatically

Step 1: Identify the proxy tab where the automatic detect setting should be on. Your system will automatically connect to an available network when the automatic detect location is on.

proxy tab on windows

Step 2. Turn on the ‘use setup script’ tab, where you will find the script address dialog box. You should do that if your system is not connecting to any WIFI network automatically.

use setup script on proxy tab

Step 3: Paste or type the URL to access via script address dialog box

script address dialog box

Step 4: Click on the save tab.

Save script address

Step 5: go to your browsers like internet explorer or edge.

Open edge

Step 6: Access your URL by clicking it on the internet explorer site to connect to the proxy you have just made.

Setting the Proxy Server Automatically


Setting the Proxy Server Manually

Step 1: On the same proxy tab, scroll your computer downwards to manual proxy setup

manual proxy tab

Step 2: Turn on the ‘use of a proxy server’ icon. That will activate the address and port icon.

use of a proxy server icon

Step 3: Enter the proxy server IP address and its port digits.

manual proxy server tab with IP address

Step 4 : (This is not compulsory). Below the address and port tab, there is a dialog box with the computer’s set instruction. In this box, you type the address that the system should not read.

dialog box with the computer's set instruction

Step 5: Depending on the network available, tick or not tick the option ‘do not use the proxy server for local addresses.

proxy server for local addresses

Step 6: Click the save icon.

Save manual proxy


2.Configuring Proxies Through Command Prompt

Typically, most IT gurus recommend the use of the Netsh.exe tool to facilitate this action. The following is a chronological guide on how to set up the proxy using the command prompt.

Step 1: First, press the windows pad and R pad on your keyboard simultaneously. That will bring you a run tab.

Or else, type the word Run on your search box and click it.

run program window

Step 2:  type and click ok the ‘cmd ‘word on your computer. If your computer brings you a cmd story automatically, type it ok.

run cmd

Step 3: (not compulsory) you could also make the run program as an administrator to get proficient results. On your search box, type and click Run. Then select the command prompt you see below and right-click ‘run as the administrator’ option.

command prompt run as administrator

Step 4: On the command prompt, input the following commands ‘netsh winhttp set proxy proxy_server_ip:proxy_port’ or ‘netsh winhttp set proxy <proxy> :< port>’.

netsh winhttp command

Step 5: Tap the enter button to run either of the commands. If you find a text showing      WinHTTP requires you to set IP and port, then you are on the right track.

Step 6: Input the respective proxy IP server and its port and browse your internet peacefully.

respective proxy IP server


3. Configuring Proxies with a Control Panel

Step 1: Type the word control panel on your search box in the home tab.

Or else, you can go to the setting menu and type to search the word control panel.

control panel from setting menu

Step 2: Identify and click the Network and Internet icons found in the control panel

Network and Internet icons on control panel

Step 3: Scroll your cursor to the internet Options icon found where you will find three selections.

internet Options icon

Step 4: Among the four choices, tap the ‘manage browser add-ons’ selection.

manage browser add-ons

Step 5: In the ‘manage browser add-ons,’ click the connections property you see above.

connections property

Step 6: Go to LAN settings below and tap it.

LAN settings on internet option

Step 7:  Type to enter the address and port boxes you see in the LAN settings

address and port on LAN settings

Step 8: Tick the box ‘bypass proxy server for local addresses’ and tap ok

bypass proxy server for local addresses

Step 9: Click the advanced icon when you want to access the HTTP, FTP, Socks, or other particular websites.

advanced icon on lan

Step 10: Fill the HTTP, FTP, or Socks with their respective proxy address and port number.

proxy address on advanced icon

Step 11: If you’re using similar Socks’, HTTP’s or FTP’s addresses, tick the ‘use the same proxy server for all protocols’

same proxy server for all protocols option

Step 12: Click ok, if you are satisfied with your settings.

Final proxy setup on advanced icon

1. How should I use and access Free proxies?

Typically, you can use free proxies to browse anonymously, just like premium proxies do. You can also use them for web surfing and access encrypted data.

You can access these proxies as an extension to browsers or access them from their sites. You can also route to access them using windows, android, Linux, IOS, Mac, or other OS. Such free proxies include Hide.me, Proxysite, and countless others.

2. Which Are The Details Required For Me To Set A Free Proxy?

Remember that there are two types of proxies, which are the premium and the free proxy. For the free proxy, you need an IP of the proxy server and the port number.

With the premium proxy, there is the username, Port number, IP, or Username. The username and password come into play because you are paying for the server’s service.

3. Why does proxy matter?

A proxy is important for you to access those sites you love like YouTube or Facebook, that are restricted by your government, workplace, or school. It works by masking your IP and tricking the ISP to think that the proxy server is the one accessing their websites while it is you.

The same way you set a proxy in windows 10, it is relatively similar to all other windows versions. You can also route your proxy with different operating systems like Linux, Mac, IOS, or Android with this knowledge. In other cases, always use a proxy that is fast and has optimum bandwidth.

Для просмотра текущего состояния прокси воспользуемся командой netsh winhttp show proxy.ttfpxskjsk7

Здесь мы видим, что система настроена на прямой доступ, без использования прокси. Для установки прокси служит команда netsh winhttp set proxy.

zg8nbtrj4f4

Следует заметить, что интерпретатор командной строки в этом случае нужно запускать от имени администратора, иначе получим ошибку.

Для сброса настроек служит команда netsh winhttp reset proxy.

y43gzgavvcr

Отсюда — savvateev.org

Запись опубликована в рубрике IT с метками proxy, windows. Добавьте в закладки постоянную ссылку.

  • Windows 10 cmd for windows update
  • Windows 10 consumer и business в чем отличия
  • Windows 10 clear update cache
  • Windows 10 consumer editions version 2004
  • Windows 10 consumer edition скачать торрент