Using an HTTP proxy server to stream IPTV sources












0















I don't know if this is the right place to ask this question but I'm hoping to find directions here.



I have a smart tv and I like to watch tv from my country with the SSIPTV app. I found an android app that streams local channels, so I checked the requests with android studio to find the streaming links. Some of them are free, but some others are served through cloudfront. The problem is that I can't add a header needed for cloudfront to authorize the request.



For example: when I try to make a request without the "User-Agent" header, the response is this:



Status Code: 403 Forbidden
Connection: keep-alive
Content-Length: 560
Content-Type: text/html
Date: Tue, 01 Jan 2019 20:57:50 GMT
Server: CloudFront
Via: 1.1 f7e7b00c5c66a4e43041ba24c378d07a.cloudfront.net (CloudFront)
X-Amz-Cf-Id: uZQAVTrQzHsQe2vGyHxY1OYfjHCL-Nz7gCTG-koHcgr1A5HG7fGGOg==
X-Cache: Error from cloudfront


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD>
<BODY>
<H1>403 ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
Request blocked.


<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront)
Request ID: TZztsUjltHpEhx54wplzupvLmZwjCRPtAvTcbdJ8DL16b1k9-_XwZw==
</PRE>
<ADDRESS></ADDRESS>
</BODY>
</HTML>


But if I set the "User-Agent" header with the value "iPhone" this is the response:enter code here



Status Code: 200 OK
Accept-Ranges: bytes
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Content-Type, User-Agent, If-Modified-Since, Cache-Control, Range
Access-Control-Allow-Methods: OPTIONS, GET, POST, HEAD
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: Date, Server, Content-Type, Content-Length
Cache-Control: max-age=1
Connection: keep-alive
Content-Length: 366
Content-Type: application/vnd.apple.mpegurl
Date: Tue, 01 Jan 2019 20:51:32 GMT
Server: WowzaStreamingEngine/4.7.6
Via: 1.1 880eb84cefca849ee159a7c4d89c31ea.cloudfront.net (CloudFront)
X-Amz-Cf-Id: pogc8_OBsN2-QeGj_1q8K_vyxrQH-G8a2JmWqSkVt9x57NlbKfDSdQ==
X-Cache: Hit from cloudfront


So, is there a way I could set up a proxy to add the request and then get the content served in my tv app?










share|improve this question



























    0















    I don't know if this is the right place to ask this question but I'm hoping to find directions here.



    I have a smart tv and I like to watch tv from my country with the SSIPTV app. I found an android app that streams local channels, so I checked the requests with android studio to find the streaming links. Some of them are free, but some others are served through cloudfront. The problem is that I can't add a header needed for cloudfront to authorize the request.



    For example: when I try to make a request without the "User-Agent" header, the response is this:



    Status Code: 403 Forbidden
    Connection: keep-alive
    Content-Length: 560
    Content-Type: text/html
    Date: Tue, 01 Jan 2019 20:57:50 GMT
    Server: CloudFront
    Via: 1.1 f7e7b00c5c66a4e43041ba24c378d07a.cloudfront.net (CloudFront)
    X-Amz-Cf-Id: uZQAVTrQzHsQe2vGyHxY1OYfjHCL-Nz7gCTG-koHcgr1A5HG7fGGOg==
    X-Cache: Error from cloudfront


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
    <TITLE>ERROR: The request could not be satisfied</TITLE>
    </HEAD>
    <BODY>
    <H1>403 ERROR</H1>
    <H2>The request could not be satisfied.</H2>
    <HR noshade size="1px">
    Request blocked.


    <BR clear="all">
    <HR noshade size="1px">
    <PRE>
    Generated by cloudfront (CloudFront)
    Request ID: TZztsUjltHpEhx54wplzupvLmZwjCRPtAvTcbdJ8DL16b1k9-_XwZw==
    </PRE>
    <ADDRESS></ADDRESS>
    </BODY>
    </HTML>


    But if I set the "User-Agent" header with the value "iPhone" this is the response:enter code here



    Status Code: 200 OK
    Accept-Ranges: bytes
    Access-Control-Allow-Credentials: true
    Access-Control-Allow-Headers: Content-Type, User-Agent, If-Modified-Since, Cache-Control, Range
    Access-Control-Allow-Methods: OPTIONS, GET, POST, HEAD
    Access-Control-Allow-Origin: *
    Access-Control-Expose-Headers: Date, Server, Content-Type, Content-Length
    Cache-Control: max-age=1
    Connection: keep-alive
    Content-Length: 366
    Content-Type: application/vnd.apple.mpegurl
    Date: Tue, 01 Jan 2019 20:51:32 GMT
    Server: WowzaStreamingEngine/4.7.6
    Via: 1.1 880eb84cefca849ee159a7c4d89c31ea.cloudfront.net (CloudFront)
    X-Amz-Cf-Id: pogc8_OBsN2-QeGj_1q8K_vyxrQH-G8a2JmWqSkVt9x57NlbKfDSdQ==
    X-Cache: Hit from cloudfront


    So, is there a way I could set up a proxy to add the request and then get the content served in my tv app?










    share|improve this question

























      0












      0








      0








      I don't know if this is the right place to ask this question but I'm hoping to find directions here.



      I have a smart tv and I like to watch tv from my country with the SSIPTV app. I found an android app that streams local channels, so I checked the requests with android studio to find the streaming links. Some of them are free, but some others are served through cloudfront. The problem is that I can't add a header needed for cloudfront to authorize the request.



      For example: when I try to make a request without the "User-Agent" header, the response is this:



      Status Code: 403 Forbidden
      Connection: keep-alive
      Content-Length: 560
      Content-Type: text/html
      Date: Tue, 01 Jan 2019 20:57:50 GMT
      Server: CloudFront
      Via: 1.1 f7e7b00c5c66a4e43041ba24c378d07a.cloudfront.net (CloudFront)
      X-Amz-Cf-Id: uZQAVTrQzHsQe2vGyHxY1OYfjHCL-Nz7gCTG-koHcgr1A5HG7fGGOg==
      X-Cache: Error from cloudfront


      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
      <HTML>
      <HEAD>
      <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
      <TITLE>ERROR: The request could not be satisfied</TITLE>
      </HEAD>
      <BODY>
      <H1>403 ERROR</H1>
      <H2>The request could not be satisfied.</H2>
      <HR noshade size="1px">
      Request blocked.


      <BR clear="all">
      <HR noshade size="1px">
      <PRE>
      Generated by cloudfront (CloudFront)
      Request ID: TZztsUjltHpEhx54wplzupvLmZwjCRPtAvTcbdJ8DL16b1k9-_XwZw==
      </PRE>
      <ADDRESS></ADDRESS>
      </BODY>
      </HTML>


      But if I set the "User-Agent" header with the value "iPhone" this is the response:enter code here



      Status Code: 200 OK
      Accept-Ranges: bytes
      Access-Control-Allow-Credentials: true
      Access-Control-Allow-Headers: Content-Type, User-Agent, If-Modified-Since, Cache-Control, Range
      Access-Control-Allow-Methods: OPTIONS, GET, POST, HEAD
      Access-Control-Allow-Origin: *
      Access-Control-Expose-Headers: Date, Server, Content-Type, Content-Length
      Cache-Control: max-age=1
      Connection: keep-alive
      Content-Length: 366
      Content-Type: application/vnd.apple.mpegurl
      Date: Tue, 01 Jan 2019 20:51:32 GMT
      Server: WowzaStreamingEngine/4.7.6
      Via: 1.1 880eb84cefca849ee159a7c4d89c31ea.cloudfront.net (CloudFront)
      X-Amz-Cf-Id: pogc8_OBsN2-QeGj_1q8K_vyxrQH-G8a2JmWqSkVt9x57NlbKfDSdQ==
      X-Cache: Hit from cloudfront


      So, is there a way I could set up a proxy to add the request and then get the content served in my tv app?










      share|improve this question














      I don't know if this is the right place to ask this question but I'm hoping to find directions here.



      I have a smart tv and I like to watch tv from my country with the SSIPTV app. I found an android app that streams local channels, so I checked the requests with android studio to find the streaming links. Some of them are free, but some others are served through cloudfront. The problem is that I can't add a header needed for cloudfront to authorize the request.



      For example: when I try to make a request without the "User-Agent" header, the response is this:



      Status Code: 403 Forbidden
      Connection: keep-alive
      Content-Length: 560
      Content-Type: text/html
      Date: Tue, 01 Jan 2019 20:57:50 GMT
      Server: CloudFront
      Via: 1.1 f7e7b00c5c66a4e43041ba24c378d07a.cloudfront.net (CloudFront)
      X-Amz-Cf-Id: uZQAVTrQzHsQe2vGyHxY1OYfjHCL-Nz7gCTG-koHcgr1A5HG7fGGOg==
      X-Cache: Error from cloudfront


      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
      <HTML>
      <HEAD>
      <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
      <TITLE>ERROR: The request could not be satisfied</TITLE>
      </HEAD>
      <BODY>
      <H1>403 ERROR</H1>
      <H2>The request could not be satisfied.</H2>
      <HR noshade size="1px">
      Request blocked.


      <BR clear="all">
      <HR noshade size="1px">
      <PRE>
      Generated by cloudfront (CloudFront)
      Request ID: TZztsUjltHpEhx54wplzupvLmZwjCRPtAvTcbdJ8DL16b1k9-_XwZw==
      </PRE>
      <ADDRESS></ADDRESS>
      </BODY>
      </HTML>


      But if I set the "User-Agent" header with the value "iPhone" this is the response:enter code here



      Status Code: 200 OK
      Accept-Ranges: bytes
      Access-Control-Allow-Credentials: true
      Access-Control-Allow-Headers: Content-Type, User-Agent, If-Modified-Since, Cache-Control, Range
      Access-Control-Allow-Methods: OPTIONS, GET, POST, HEAD
      Access-Control-Allow-Origin: *
      Access-Control-Expose-Headers: Date, Server, Content-Type, Content-Length
      Cache-Control: max-age=1
      Connection: keep-alive
      Content-Length: 366
      Content-Type: application/vnd.apple.mpegurl
      Date: Tue, 01 Jan 2019 20:51:32 GMT
      Server: WowzaStreamingEngine/4.7.6
      Via: 1.1 880eb84cefca849ee159a7c4d89c31ea.cloudfront.net (CloudFront)
      X-Amz-Cf-Id: pogc8_OBsN2-QeGj_1q8K_vyxrQH-G8a2JmWqSkVt9x57NlbKfDSdQ==
      X-Cache: Hit from cloudfront


      So, is there a way I could set up a proxy to add the request and then get the content served in my tv app?







      rest proxy video-streaming iptv






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 1 at 21:50









      Carlos AndresCarlos Andres

      3419




      3419
























          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53999220%2fusing-an-http-proxy-server-to-stream-iptv-sources%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53999220%2fusing-an-http-proxy-server-to-stream-iptv-sources%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          MongoDB - Not Authorized To Execute Command

          Npm cannot find a required file even through it is in the searched directory

          in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith