Jump to content

HttpSetProxy? WTH?


Recommended Posts

I'm using something like this:

_IEErrorHandlerRegister()
$oIE = _IECreateEmbedded()
HttpSetProxy(2, "75.73.29.14:25697")
_IENavigate($oIE, "http://www.showmyip.com")

ofc, thats not the full code.

When the GUI opens, it still shows my IP, not the IP of the proxy, though...

What's going on? Am I using the function wrong?

Link to comment
Share on other sites

Hi,

so you need to use the internet through a proxy and you want Autoit to send all http data via proxy?

What about changing the settings in your IE?

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

You'll have to change your global proxy settings. I'm looking around right now for a way to do this in code that doesn't just involve automating the Internet Options dialog.

Ok I found two registry entries you can try changing.

RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", "REG_DWORD", 1)
RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer", "REG_SZ", "75.73.29.14:25697")

Just save the original values somewhere so you can set it back.

Link to comment
Share on other sites

Ohhh. Thanks. So can I use this code now, and when the bot exits, just put

RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyDisable", "REG_DWORD", 1)

? Thanks alot, your a life-saver :P I was going to have to automate the Internet Options dialog, like you said :mellow:

Link to comment
Share on other sites

  • 2 months later...

Hey I just found this and was going through the same thing as the creator of this topic... And though I might bring it back to life.....

I obviously have a few questions

I can get this half to work

RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", "REG_DWORD", 1)
RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer", "REG_SZ", "75.73.29.14:25697")

So it will set a proxy for me but the more important half in my book shutting off the proxy will not work

RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyDisable", "REG_DWORD", 1)

this dosnt work for me what could I do to make it work thank you

Link to comment
Share on other sites

It still looks like it isnt taking the proxy off.....

Try adding this after your RegWrite commands to force it to refresh the proxy details:

DllCall('WININET.DLL', 'long', 'InternetSetOption', 'int', 0, 'long', 39, 'str', 0, 'long', 0)

NiVZ

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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