Jump to content

Proxy configuration _WinHttp


Go to solution Solved by trancexx,

Recommended Posts

Posted

I'm trying to set a proxy in _WinHttp

Here's my code

$hOpen = _WinHttpOpen($userAgent)
   $hConnect = _WinHttpConnect($hOpen, $host, $SSL)


   _WinHttpSetDefaultProxyConfiguration(1, "84.40.120.192:8080")


   $hLoginResult = _WinHttpSimpleFormFill($hConnect, $referer, $actionUrl, _
           $formID, _
           "name:" & $inputUser, $user, _
           "name:" & $inputPass, $pass)

   ConsoleWrite($hLoginResult & @CRLF)

   _WinHttpCloseHandle($hConnect)
   _WinHttpCloseHandle($hOpen)

But it's just using my regular IP. I'm not too familiar with using proxies inside _WinHttp so any help is appreciated.

  • Solution
Posted (edited)

;...
$hOpen = _WinHttpOpen($userAgent, $WINHTTP_ACCESS_TYPE_NAMED_PROXY, "84.40.120.192:8080")
;...
 

 

$hOpen = _WinHttpOpen($userAgent, $WINHTTP_ACCESS_TYPE_NAMED_PROXY, "84.40.120.192:8080")
$hConnect = _WinHttpConnect($hOpen, $host, $SSL)
$hLoginResult = _WinHttpSimpleFormFill($hConnect, $referer, $actionUrl, _
        $formID, _
        "name:" & $inputUser, $user, _
        "name:" & $inputPass, $pass)
ConsoleWrite($hLoginResult & @CRLF)
_WinHttpCloseHandle($hConnect)
_WinHttpCloseHandle($hOpen)
Edited by trancexx

♡♡♡

.

eMyvnE

Posted (edited)

;...
$hOpen = _WinHttpOpen($userAgent, $WINHTTP_ACCESS_TYPE_NAMED_PROXY, "84.40.120.192:8080")
;...
 

 

$hOpen = _WinHttpOpen($userAgent, $WINHTTP_ACCESS_TYPE_NAMED_PROXY, "84.40.120.192:8080")
$hConnect = _WinHttpConnect($hOpen, $host, $SSL)
$hLoginResult = _WinHttpSimpleFormFill($hConnect, $referer, $actionUrl, _
        $formID, _
        "name:" & $inputUser, $user, _
        "name:" & $inputPass, $pass)
ConsoleWrite($hLoginResult & @CRLF)
_WinHttpCloseHandle($hConnect)
_WinHttpCloseHandle($hOpen)

Thanks that works perfectly :)

Edited by Cherokee

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...