Open TCP streams through proxy servers. Chaining supported.
It's recommended to ping proxies so it can connect to fastest one(s)
OpenProxyConnection(server$[, port%][, depth%]) Default port% is 80 and depth% is 1 depth% is the count of proxies in chain to use to reach the destination server
After successfull connection use Blitz's own TCP stream functions.
Example:
Include "multiprox.bb"
; Insert some proxies to system
AddProxy("69.88.144.162")
AddProxy("66.98.238.8", 3128)
AddProxy("65.83.25.189")
AddProxy("69.88.144.163")
; Ping proxies (first, parameter is for bandwidth testing, default is True, second is for sorting by ping (default True))
PingProxies(False, True)
; Open proxy connection
stream% = OpenProxyConnection("www.google.com", 80, 2)
WriteLine stream%, "GET / HTTP/1.1"
WriteLine stream%, "Host: www.google.com"
WriteLine stream%, "User-Agent: MultiProx"
WriteLine stream%, "Connection: Close"
WriteLine stream%, ""
Repeat
If ReadAvail(stream%) then Print ReadLine$(stream%)
Forever
WaitKey
Functions (multiprox.bb):
|