Sign in to follow this  
Followers 0
miketh2005

HttpSetProxy? WTH?

13 posts in this topic

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?

Share this post


Link to post
Share on other sites

Yes you are. HttpSetProxy only changes the proxy AutoIt uses for InetGet.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Hi. Thanks for the replies. Yes, I want the bot to connect to the internet and be like an internet browser, THROUGH a proxy. Anyway to do that? Thanks.

Edited by miketh2005

Share this post


Link to post
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.

Share this post


Link to post
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:

Share this post


Link to post
Share on other sites

No, you would set ProxyEnable to 0.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Did you read the post right before yours, Medic873?

No, you would set ProxyEnable to 0.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

Now it all makes since thank you so much

Share this post


Link to post
Share on other sites

You bet. Good luck.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  
Followers 0