Home > OS >  How do you make powershell or CMD use proxy win10 please
How do you make powershell or CMD use proxy win10 please

Time:09-19

Recently, often need to use the command line to deal with things, making as if by walls again, result in can't use the script to initialize the project,

Computer use ss system agent, pac model and global model are tried and set http_proxy also use the command, or can't github.com

The browser can open,

Ask how to solve?

CodePudding user response:

It is best to use VPN connected directly

CodePudding user response:

Build script file

Setting-up a first set the IE agent. Bat script file and then add the following content (1.1.1.1:1111 change into your own agent and port number)

@ echo off
Echo began to set up the web site IE
Reg the add "HKCU \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings" REG_DWORD ProxyEnable/t/d/v 1/f
Reg the add "HKCU \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings" ProxyServer/d/v "1.1.1.1:1111/f
Echo proxy Settings complete press any button to turn off the
Pause> Nul

Then setting-up a cancel the IE agent. Bat script file and then add the following content

@ echo off
Echo began to clear the IE proxy Settings
Reg the add "HKCU \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings" REG_DWORD ProxyEnable/t/d/v/f
0Reg the add "HKCU \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings" ProxyServer/d/v/f
""Echo the IE agent clear finish press any button to turn off the
Pause> Nul

CodePudding user response:

To enter the first away win + r> Input "inetcpl. CPL" sure see connection - LAN Settings have to configure the proxy server
No configuration first https://jingyan.baidu.com/article/4dc408484a94c6c8d946f106.html

CodePudding user response:

Don't use ping test, use curl

CodePudding user response:

Ping to work in the network layer, is not a TCP or UDP protocol, so don't walk agent, direct access to the can.
Test can try the following command:
$client=new - object System.Net.WebClient
$client. DownloadFile (' https://www.google.com ', 'D:/index. HTML)
Cat D:/index. The HTML
If can normal display the web page source agent work normal, if a 500 error code is not normal.

CodePudding user response:

Proxifier PE
  • Related