Pooq Proxy

This is my current setup for watching Pooq in Australia for anyone interested. With local proxy, below 4k streaming (UHD) seems alright with NBN via AussieBB. TPG might have better throughput as they have PPC-1 submarine cable.

Architecture Diagram

Prerequisite

  1. Nginx installed host in Korea – AWS LightSail costs USD 3.5/month~
  2. DNS dmasquerading – this can be any dns server running from your router or NAS
  3. Pooq subscription – Can be paid via Korean credit card or Apple store credit

Dnsmasq Config

address=/live-su.cdn.pooq.co.kr/vod-su.cdn.pooq.co.kr/_put current IP address of the host here to exclude them from the below_
address=/.cdn.pooq.co.kr/_your Nginx host IP here_

Nginx Config

server {
    server_name apis.pooq.co.kr ;
    listen 80;
 
    location / {
      proxy_set_header Host $host;
      proxy_pass http://apis.pooq.co.kr;
    }
  }
 
 server {
    server_name ~^(.*)\.cdn\.wavve\.com$ ;
    listen 80;
 
    location / {
      proxy_set_header Host $host;
      proxy_pass http://vod-m02.cdn.wavve.com;
    }
  }
 
 server {
    server_name ~^(.*)\.cdn\.pooq\.co\.kr$ ;
    listen 80;
 
    location / {
      proxy_set_header Host $host;
      proxy_pass http://vod-m02.cdn.pooq.co.kr;
    }
  }
 
  server {
    server_name ~^api\.tving\.com$ ;
    listen 80;
 
    location / {
      proxy_set_header Host $host;
      proxy_pass http://api.tving.com;
    }
  }
 
  server {
    server_name pip-vod-xcdn.tving.com ;
    listen 80;
 
    location / {
      proxy_set_header Host $host;
      proxy_pass http://pip-vod-xcdn.tving.com;
    }
  }
 
}
 
stream {
  map $ssl_preread_server_name $selected_upstream {
    api.tving.com tving_api;
    apis.pooq.co.kr pooq_api;
     ~^(.*)\.cdn\.pooq\.co\.kr$ pooq_cdn;
    ~^(.*)\.cdn\.wavve\.com$ wavve_cdn;
  }
  upstream tving_api { server api.tving.com:443; }
  upstream pooq_api { server apis.pooq.co.kr:443; }
  upstream pooq_cdn { server vod-m02.cdn.pooq.co.kr:443; }
  upstream wavve_cdn { server vod-m02.cdn.wavve.com:443; }
 
  server {
    listen 443;
    proxy_pass $selected_upstream;
    ssl_preread on;
  }
}

Note: need libnginx-mod-stream package installed

(Optional) Pooq Local Proxy https://github.com/logan-han/pooq-proxy Need to reroute *.cdn.pooq.co.kr traffic to the proxy using DNS server. Don’t forget to set config.js file to point the nginx host.