#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2011
    Posts
    6
    Rep Power
    0

    Arrow Proxy authentification


    Hi,

    I have created web browser that surf to the internet through proxy and now I need to create a browser that surf to internet via proxy authentication server (server required enter username and password) and I dont know how which component has ability to describe proxy username and password... :/

    Maybe something has know ?
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,444
    Rep Power
    4539
    What does your question have to do with visual basic?
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2011
    Posts
    6
    Rep Power
    0
    It has connect to proxy server that require authentication, I think it should be something like:
    Code:
       
    Inet.UserName = "YourUsername"     
    Inet.Password = "YourPassword"     
    Inet.Proxy = YourProxyIP
    that?
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2011
    Posts
    6
    Rep Power
    0
    Finally I got something, what is wrong ?
    Code:
    Private Sub Command6_Click()
    Dim header As String
    Inet1.UserName = username
    Inet1.Password = password
    Inet1.Proxy = "192.168.120.120:17890"
    Inet1.AccessType = icNamedProxy
    
    header = "Proxy-Authorization: Basic " & Inet1.UserName & ":" & Inet1.Password
    
    Inet1.Execute , "GET", , header, Combo1
    Inet1.Execute "192.168.120.120:17890", "GET", header
    Text1.Text = Inet1.OpenURL("http://www.google.com")
    WebBrowser1.Navigate Inet1.OpenURL("http://www.microsoft.com")
    
    End Sub
  8. #5
  9. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,444
    Rep Power
    4539
    What version of VB? What doesn't work? What errors might you be getting? How are you testing your code?
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  10. #6
  11. Type Cast Exception
    Devshed Supreme Being (6500+ posts)

    Join Date
    Apr 2004
    Location
    OAKLAND CA | Adam's Point (Fairyland)
    Posts
    14,954
    Rep Power
    8617
    I see you got your example here did you try doing anything to adapt this generic code to your own need, such as prompt for the actual username/password and change 192.168.120.120:17890 to your own proxy server? You will of course have to do this ...

    Oh maybe those are also posts of yours ... anyway you don't have any user name or password in the code above they will be blank and if you use option explicit (which you should for debugging) will throw an error as undeclared.
    Last edited by medialint; October 10th, 2011 at 05:01 PM.
    medialint.com

    “Today you are You, that is truer than true. There is no one alive who is Youer than You.” - Dr. Seuss
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2011
    Posts
    6
    Rep Power
    0
    Code:
    Inet1.UserName = username
    Inet1.Password = password
    Is it not a username and password?
  14. #8
  15. Type Cast Exception
    Devshed Supreme Being (6500+ posts)

    Join Date
    Apr 2004
    Location
    OAKLAND CA | Adam's Point (Fairyland)
    Posts
    14,954
    Rep Power
    8617
    No those are empty variables, which will return null. Or nothing. Unless you have them declared elsewhere globally, which isn't advisable.

    You'll need to input the actual password and user into the variables first.

    Even if you literally wanted to enter the words "username" for username and "password" for password you'd need to quote your literals.

    From just this code above you're passing a blank username and password.
    Last edited by medialint; October 11th, 2011 at 11:13 AM.
    medialint.com

    “Today you are You, that is truer than true. There is no one alive who is Youer than You.” - Dr. Seuss
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2011
    Posts
    6
    Rep Power
    0
    Dear medialint,

    Pls tell me how to declare this variables in global ? just all i need

IMN logo majestic logo threadwatch logo seochat tools logo