"AGP" <si**********@softhome.netschrieb im Newsbeitrag
news:Ie******************@newssvr21.news.prodigy.n et...
I dont belive it has to do anything with the regsitry. all you are doing
is
passing the info to the browser but I just cant seem to make it work. also
its not a commerical application, its for my personal work process.
Something like this
http://support.microsoft.com/kb/q172998/
Although that doesnt handle a proxy address and port.
The Link basically shows, what is needed.
If you have a ProxyIP, a ProxyPort and a Proxy-Usr+Pass
then the socket-connect of the request has to be made
on the ProxyIP and ProxyPort.
Additionally your http-Header has to be enhanced by
the following.
At the very first line of the http-Header:
(not sure, if you can manage/manipulate that inside the
navigate-method of the IE-Control)
Instead of the normal first line wich would be e.g.:
"Get /" & WebUrl & " HTTP/1.1"
you will have to send to the proxy the fully qualified Url
(including the domainname/IP of the "real WebHost"):
"Get http://" & DomainOrIP & "/" & WebUrl & " HTTP/1.1"
so that the proxy gets a chance, to parse the real target-
IP out, to wich to connect to (indirectly).
Additionally your http-header has to be enhanced by
this line:
"Authorization: Basic " & _
Base64Enc(ProxyUsr & ":" & ProxyPasswd)
Now your connect should go through.
At least this works for us, if we use the socketapi
directly.
Olaf
P.S. Here's some code for Base64Encoding:
Public Function Base64Enc(s$) As String
Static Enc() As Byte, Done as Boolean
Dim b() As Byte, Out() As Byte, i&, j&, L&
Const E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstu vwxyz0123456789+/"
If Not Done Then Done = True: Enc = StrConv(E, vbFromUnicode)
L = Len(s): b = StrConv(s, vbFromUnicode)
ReDim Preserve b(0 To (UBound(b) \ 3) * 3 + 2)
ReDim Preserve Out(0 To (UBound(b) \ 3) * 4 + 3)
For i = 0 To UBound(b) - 1 Step 3
Out(j) = Enc(b(i) \ 4): j = j + 1
Out(j) = Enc((b(i + 1) \ 16) Or (b(i) And 3) * 16): j = j + 1
Out(j) = Enc((b(i + 2) \ 64) Or (b(i + 1) And 15) * 4): j = j + 1
Out(j) = Enc(b(i + 2) And 63): j = j + 1
Next i
For i = 1 To i - L: Out(UBound(Out) - i + 1) = 61: Next i
Base64Enc = StrConv(Out, vbUnicode)
End Function