How to connect to Internet via proxy server. - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: How to connect to Internet via proxy server. (/showthread.php?tid=135678) |
How to connect to Internet via proxy server. - ldy2534 - 2012-07-09 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) RE: How to connect to Internet via proxy server. - onochiecy - 2012-09-11 Quote:I'm not familiar with python, so I just make a work around . How and where can I implement this work around |