Proxy use?

Posts 1–4 of 4 · Page 1 of 1
Proxy use?
so im totaly bumed right now lmfaao cuss I tried and i failed hard to get proxys to work with my latest apps! could someone point me in the right direction or show me an example code for vb .net and poxys? pretty much i want to view webpages behind a proxy or send emails behind a proxy who ever could help me with this sure would be the cats pajamas lmfao

this is the email code i use
[php]myEmailAddress = TextBox6.Text
myPassword = TextBox5.Text
z.Port = Label6.Text
z.UseDefaultCredentials = False
z.Credentials = New System.Net.NetworkCredential(myEmailAddress, myPassword)
z.Host = Label5.Text[/php]
couldnt i edit the network credentials some how to use a proxy? im a newb i guess please help!
Quote Originally Posted by Qizzle15401 View Post
so im totaly bumed right now lmfaao cuss I tried and i failed hard to get proxys to work with my latest apps! could someone point me in the right direction or show me an example code for vb .net and poxys? pretty much i want to view webpages behind a proxy or send emails behind a proxy who ever could help me with this sure would be the cats pajamas lmfao

this is the email code i use
[php]myEmailAddress = TextBox6.Text
myPassword = TextBox5.Text
z.Port = Label6.Text
z.UseDefaultCredentials = False
z.Credentials = New System.Net.NetworkCredential(myEmailAddress, myPassword)
z.Host = Label5.Text[/php]
couldnt i edit the network credentials some how to use a proxy? im a newb i guess please help!
i did not read ur post to well but if its for a vb wb try this, it should work if im not mistaken.
Code:
Public Structure Struct_INTERNET_PROXY_INFO
        Public dwAccessType As Integer
        Public proxy As IntPtr
        Public proxyBypass As IntPtr
    End Structure
#Region "Proxy"

    ' The Windows API function that allows us to manipulate
    ' IE settings programmatically.
    Private Declare Auto Function InternetSetOption Lib "wininet.dll" _
    (ByVal hInternet As IntPtr, ByVal dwOption As Integer, ByVal lpBuffer As IntPtr, _
     ByVal lpdwBufferLength As Integer) As Boolean

    ' The function we will be using to set the proxy settings.
    Private Sub RefreshIESettings(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 = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(strProxy)
        struct_IPI.proxyBypass = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi("local")

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

        ' Converting structure to IntPtr
        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

#End Region


RefreshIESettings(Proxy Here)
that worked amazingly would you know how to use proxys when sending a email using smtp mail?
/Closed

Won't support email bombing or potentially harmful material, Sorry
Posts 1–4 of 4 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us