Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
Dh-_c@s•ddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZd„Ze
j
e
j
eƒdd„Zidd„Zidd6ed	6ad
e	jfd„ƒYZedkr‘eejƒd
kr0eddejƒejdƒnyeejdƒZejdZejdZejdZejd
Z ej!j"deƒddl#m$Z$e$ƒZ%ej&e%ƒZ'ej(e'ƒtj)ied6ed6ƒe*ej+_,ej+defeƒZ-e-j.dZedee j/dddƒfdejƒe-j0ƒWn9e1k
r€eƒe-j2ƒe-j3j4ƒe-j5ƒnXejdƒndS(iÿÿÿÿ(tprint_functionNcCstjtjƒtjƒdS(N(tostkilltgetpidtsignaltSIGTERM(tsigtframe((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/scripts/keepalive_proxy.pytsignal_handlerstcCsdtjƒ}t|ƒdS(NsEXCEPTION: 
%s(t	tracebackt
format_exctprint(tmsg((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/scripts/keepalive_proxy.pytprintExcscCsÿt}d}|jdtƒ}y¼tj|||ƒ}d|krY|jd|dƒnd|kr||jd|dƒnd|krŸ|jd|dƒntj|ƒ}|rÍ|jƒ}|j	ƒn|}t}Wnt
k
rôtƒnX||fS(Ntreturn_datatReferers
User-Agentt
Connection(tFalsetNonetgettTrueturllib2tRequestt
add_headerturlopentreadtcloset	ExceptionR(turltparamst	post_datatststdataRtreqtresp((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/scripts/keepalive_proxy.pytgetPages(


s
keep-aliveRRtProxycBs)eZd„Zddd„Zd„ZRS(cCsÐy¬|j}|jdƒr,d|d}n |jdƒrLd|d}nt|tƒ\}}|r”|jdƒ|jƒ|j||jƒn|jdƒ|jƒWntk
rËt	|j
_nXdS(	Ns/https/shttps://is/http/shttp://iiÈi“(tpatht
startswithR$tHTTP_HEADERt
send_responsetend_headerstcopyfiletwfiletKeyboardInterruptRtservert_BaseServer__shutdown_request(tselfRR R#((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/scripts/keepalive_proxy.pytdo_GET0s	



t-cCsdS(N((R0tcodetsize((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/scripts/keepalive_proxy.pytlog_requestCscGsdS(N((R0tformattargs((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/scripts/keepalive_proxy.pyt	log_errorFs(t__name__t
__module__R1R5R8(((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/scripts/keepalive_proxy.pyR%/s	t__main__is6libsPath, userAgent, refererUrl and m3u8Url are neededtfileiiii(tHTTPHandlers
User-AgentRs	127.0.0.1s
http://127.0.0.1:%s/%s
s://t/i(6t
__future__RturllibRtsysttimeR
turlparsetSocketServertSimpleHTTPServerRRRtSIGINTRRR$RR(tSimpleHTTPRequestHandlerR%R9tlentargvRtstderrtexittinttporttlibsPatht	userAgentt
refererUrltm3u8UrlR&tinsertt	keepaliveR=tkeepalive_handlertbuild_openertopenertinstall_openertupdateRt	TCPServertallow_reuse_addressthttpdtserver_addresstreplacet
serve_foreverR-tshutdowntsocketRtserver_close(((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/scripts/keepalive_proxy.pyt<module>sV	



	

,