How to connect to Internet via proxy server.
#1
I found most of plugins don't support proxy connection.
just like this : response = urllib2.urlopen(req)
but in my company it does't work by this way .
I suggest someone who want to develop plugins consider about this issue, read netwrok connection information from XBMC.

I'm not familiar with python, so I just make a work around .
#################################
user='username'
password='password'
proxyserver='IP_addr:port'

proxy='http://%s:%s@%s' %(user,password,proxyserver)
proxy_handler=urllib2.ProxyHandler({'http':proxy})

opener=urllib2.build_opener(proxy_handler,urllib2.HTTPHandler)

#mark this line
#response = urllib2.urlopen(req)
response = opener.open(req)
Reply
#2
Quote:I'm not familiar with python, so I just make a work around .
#################################
user='username'
password='password'
proxyserver='IP_addr:port'

proxy='http://%s:%s@%s' %(user,password,proxyserver)
proxy_handler=urllib2.ProxyHandler({'http':proxy})

opener=urllib2.build_opener(proxy_handler,urllib2.HTTPHandler)

#mark this line
#response = urllib2.urlopen(req)
response = opener.open(req)

How and where can I implement this work around
Reply

Logout Mark Read Team Forum Stats Members Help
How to connect to Internet via proxy server.0