;读取文本,设置变量,我就不写了,下面的就是开启和关闭代理了
$DLIP="http=192.168.0.1:8080";这个就是代理的变量了,你去读取文本内容
$DL=MsgBox(4,"","是否开启代理")
If $DL=6 Then
RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", "REG_DWORD", 1 );开启代理
RegWrite ( "HKEY_USERS\S-1-5-21-839522115-1801674531-682003330-500\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer", "REG_SZ", $DLIP)
DllCall("wininet.dll", "uint", "InternetSetOption", "ptr", 0, "dword", 37, "ptr", 0, "dword", 0)
MsgBox(0,"开启","代理已经开启")
Else
RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", "REG_DWORD", 0);关闭代理
DllCall("wininet.dll", "uint", "InternetSetOption", "ptr", 0, "dword", 37, "ptr", 0, "dword", 0)
MsgBox(0,"关闭","代理已经关闭")
EndIf |