Alot of people were requesting the proxy class for a webbrowser in vb.net, so here it is:
And this is how you use it:
Activate it before you run you're webbrowser, so like this:
Feedback appreciated!
This is not made by me! I'm just sharing it with you guys 🤝
PHP Code
<?php
Public Structure Struct_INTERNET_PROXY_INFO
Public dwAccessType As Integer
Public proxy As IntPtr
Public proxyBypass As IntPtr
End Structure
<Runtime.InteropServices.DllImport("wininet.dll", SetLastError:=True)> _
Private Shared Function InternetSetOption(ByVal hInternet As IntPtr, ByVal dwOption As Integer, ByVal lpBuffer As IntPtr, ByVal lpdwBufferLength As Integer) As Boolean
End Function
Private Sub PROXYSET(ByVal strProxy As String)
WebBrowser1.ScriptErrorsSuppressed = True
Const INTERNET_OPTION_PROXY As Integer = 38
Const INTERNET_OPEN_TYPE_PROXY As Integer = 3
Dim struct_IPI As Struct_INTERNET_PROXY_INFO
struct_IPI.dwAccessType = INTERNET_OPEN_TYPE_PROXY
struct_IPI.proxy = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(strProxy)
struct_IPI.proxyBypass = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi("local")
Dim intptrStruct As IntPtr = System.Runtime.InteropServices.Marshal.AllocCoTaskMem(System.Runtime.InteropServices.Marshal.SizeOf(struct_IPI))
System.Runtime.InteropServices.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
And this is how you use it:
PHP Code
<?php
Dim proxy as string = "Insert you're proxy here"
PROXYSET(proxy)
Activate it before you run you're webbrowser, so like this:
PHP Code
<?php
Dim proxy as string = "123.123.123.123:80"
PROXYSET(proxy)
Webbrowser1.navigate("https://hackforums.net")
Feedback appreciated!
This is not made by me! I'm just sharing it with you guys 🤝


