2012-07-01 3 views
0

프록시를 사용하여 netit 탐색기에서 인터넷 서핑을 숨기고 싶습니다! 이 내 코드입니다 :Autoit 프록시 IE 개체

#NoTrayIcon 
#include <GUIConstants.au3> 
#Include <IE.au3> 
#include <GUIConstantsEx.au3> 
GUICreate("Web Browser By EMP£!!",800,600) 
GUISetBkColor(0x808080) 
GUISetState(@SW_SHOW) 
$Edit=GUICtrlCreateInput("http://www.whatismyip.com/",20,20,500,20) 
$Vai=GUICtrlCreateButton("SURF!!!",600,10,150,50) 
$oIE = ObjCreate("Shell.Explorer.2") 
GUICtrlCreateObj($oIE, 10, 90,780, 500) 
$ret = HttpSetProxy(2,"61.163.78.51:3128") 
If $ret == 0 Then 
    MsgBox(0, "Proxy", "Proxy Error") 
    Exit 
EndIf 
While 1 
$msg=GUIGetMsg() 
    Switch $msg 
    Case $Vai 
$Link=GUICtrlRead($Edit) 
_IENavigate($oIE,($Link)) 
    GUICtrlSetData($Edit,$Link) 
    Case $GUI_EVENT_CLOSE 
    Exit 
     EndSwitch 
WEnd 

내가 http://www.whatismyip.com/에 탐색하고 난 내 실제 IP 주소를 볼 수 있습니다! 프록시를 숨기고 싶습니다.

답변

1

HttpSetProxy 기능은 InetGet과 함께 사용하기 때문에 Internet Explorer 설정에 아무런 차이가 없습니다. 인터넷 익스플로러 윈도우를위한 프록시를 만들기 위해서는 인터넷 익스플로러 설정을 변경해야합니다.

#include <GUIConstants.au3> 
#include <IE.au3> 
#include <GUIConstantsEx.au3> 

Global Const $sInetSettingsKey = "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" 

GUICreate("Web Browser By EMP£!!", 800, 600) 
GUISetBkColor(0x808080) 
GUISetState(@SW_SHOW) 
$Edit = GUICtrlCreateInput("http://www.whatismyip.com/", 20, 20, 500, 20) 
$Vai = GUICtrlCreateButton("SURF!!!", 600, 10, 150, 50) 
$oIE = ObjCreate("Shell.Explorer.2") 
GUICtrlCreateObj($oIE, 10, 90, 780, 500) 

MySetProxy("61.163.78.51:3128") 

While 1 
    $msg = GUIGetMsg() 
    Switch $msg 
     Case $Vai 
      $Link = GUICtrlRead($Edit) 
      _IENavigate($oIE, ($Link)) 
      GUICtrlSetData($Edit, $Link) 
     Case $GUI_EVENT_CLOSE 
      ExitLoop 
    EndSwitch 
WEnd 

MySetProxy() 

Func MySetProxy($sProxy = "", $fEnable = True) 
    Local Static $sPrev = "" 
    Local Static $fWasEnabled = False 

    If $sProxy = "" Then 
     If $sPrev <> "" Then __setProxyInfo($fWasEnabled, $sPrev) 
    Else 
     If $sPrev = "" Then 
      $sPrev = RegRead($sInetSettingsKey, "ProxyServer") 
      $fWasEnabled = RegRead($sInetSettingsKey, "ProxyEnable") 
     EndIf 

     __setProxyInfo($fEnable, $sProxy) 
    EndIf 
EndFunc 

Func __setProxyInfo($fEnabled, $sProxy) 
    RegWrite($sInetSettingsKey, "ProxyEnable", "REG_DWORD", 1) 
    RegWrite($sInetSettingsKey, "ProxyServer", "REG_SZ", $sProxy) 
EndFunc 

whatismyip.com 그래도 훨씬 좋아하지 않았어요 : 나는 그것을 할 것

방법은 무엇인가 같다. 그러나 IP 주소가 확실히 바뀌 었습니다.