QuestionSolvedProxy Browser

Posts 1–10 of 10 · Page 1 of 1
Proxy Browser
ok, i have a program that i have made very recently that i need a teeny weeny bit of help with.
its a kind of proxy browser thingy.
i made my own browser, working controls and everything, tabbed browsing and alot more features.
but i would like to have the feature of proxy browsing!
so this is my code so far:
Code:
        'the url of the browser is set to "http://hidemyass.com" by default
        WebBrowser1.Document.GetElementById("hmaurl").SetAttribute("value", "http://www.google.com/")
        WebBrowser1.Document.GetElementById("advancedoptions").InvokeMember("click")
        WebBrowser1.Document.GetElementById("server").SetAttribute("value", "1")
        WebBrowser1.Document.GetElementById("ipidx").SetAttribute("value", "2")
        WebBrowser1.Document.GetElementById("hmabutton").InvokeMember("click")
ok, so for people trying to help out, what it does is firstly navigates to the proxy web page.
then it sets the proxy URL target to "http://www.google.com/".
it then clicks advanced options and sets the server value to 1 (Chicago).
after that it sets the IP value to 2 (74.63.112.139)
and finally it clicks the Hide my ass button which completes the page and loads the proxy web page.

my problem is that setting the ip isnt working, i can set the server to Chicago using the same method, but i can't set the IP to anything.
does anyone know whats happening?
Hidemyass is blocked here so I can't test it. Maybe @Jason can help !
ok, thank you for your help!
May I ask why you use hidemyass if you can just use a API to do proxy browsing?
Just a thought..
not a very secure way of using proxies..
see, if this is for a work/school network, the I.T guys are doing more than just looking for a url,
there also looking for the proxy sites,
seeing who goes on them over a month, then bans the lot.

using a socket connection is a lot better, becouse (from personal experience),
its a lot more anoying going through connection logs to find something like a proxy connection.....
and if there getting the header-client connections, this method will be picked up after a week...if that.

instead, make a module, and put this in it.
Code:
Imports System.Runtime.InteropServices
Module mdlproxy
    <Runtime.InteropServices.DllImport("wininet.dll", SetLastError:=True)> _
    Private Function InternetSetOption(ByVal hInternet As IntPtr, ByVal dwOption As Integer, ByVal lpBuffer As IntPtr, ByVal lpdwBufferLength As Integer) As Boolean
    End Function

    Public Structure Struct_INTERNET_PROXY_INFO
        Public dwAccessType As Integer
        Public proxy As IntPtr
        Public proxyBypass As IntPtr
    End Structure

    Public Sub refreshproxy(ByVal strProxy As String)
        Const INTERNET_OPTION_PROXY As Integer = 38
        Const INTERNET_OPEN_TYPE_PROXY As Integer = 3

        Dim struct_IPI As Struct_INTERNET_PROXY_INFO

        ' Filling in structure
        struct_IPI.dwAccessType = INTERNET_OPEN_TYPE_PROXY
        struct_IPI.proxy = Marshal.StringToHGlobalAnsi(strProxy)
        struct_IPI.proxyBypass = Marshal.StringToHGlobalAnsi("local")

        ' Allocating memory
        Dim intptrStruct As IntPtr = Marshal.AllocCoTaskMem(Marshal.SizeOf(struct_IPI))

        ' Converting structure to IntPtr
        Marshal.StructureToPtr(struct_IPI, intptrStruct, True)

        Dim iReturn As Boolean = InternetSetOption(IntPtr.Zero, INTERNET_OPTION_PROXY, intptrStruct, System.Runtime.InteropServices.Marshal.SizeOf(struct_IPI))
    End Sub
End Module
and when you want to use a proxy, use it like
Code:
refreshproxy("url:port")
hmmm, implemented, Thanks!
Alright. Marked Solved. :3
Posts 1–10 of 10 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

Talk with us