Что нового

Использование прокси

DanSaratov

Новичок
Сообщения
112
Репутация
1
Как использовать прокси во встроенном в окно элементе IE?
 

zert88

Новичок
Сообщения
14
Репутация
0
madmasles сказал(а):
Не работает, что не так?
Код:
#include <NetSession-0.9d.au3>

; Let's include IE.au3 just for this example assuming you're making an embedded browser.
#include <IE.au3>

; In this example you would create your embedded IE object and use as follows.

;_SetProxy('108.247.158.12:8080')

; Now your proxy is set. This would be an HTTP proxy. For SOCKS you would use:

_SetProxy('SOCKS=127.0.0.1:2049')

; Or if you have TOR running and would like to use it as your proxy simply use:

;_UseTOR()

; But if your TOR isn't running on default port 9150 (Like if you changed it to 9292) you must specify your TOR port:

;UseTOR(9292)

; The following is an example of setting your user agent:
;#include <IE.au3>

Local $ie = _IECreate("http://www.2ip.ru")

;_SetUserAgent('Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36')

; At this point any browsing you perform will use the previously set proxy and user agent. Such as:

;_IENavigate($ie,"http://www.ipchicken.com")

; If your proxy or SOCKS requires authentication you would add the proxy auth to the URL like this:

;_IENavigate($ie,"http://ProxyUser:[email protected]")

; Let's clear all browser & Flash cookies

_ClearCookies()
 
Верх