title: How to hide the RTMP stream url from client?
body: <p>I have a custom RTMP server powered by nginx-rtmp.</p>
  
  <p>This is my configuration:</p>
  
  <pre><code>server {
      listen 1935;
      chunk_size 4000;
      ping 10s;
      ping_timeout 5s;
  
      application live {
          live on;
          wait_key on;
          play_restart on;
      }
  }
  </code></pre>
  
  <p>When a broadcaster wants to start a live stream, s/he will publish the content to <code>rtmp://myserver.com/live/someUserDefinedStreamName</code>.</p>
  
  <p>When a viewer wants to watch a live stream, s/he will get the stream url from an API endpoint, and this is the problem.</p>
  
  <p>The <code>someUserDefinedStreamName</code> is literally "public", which means everyone can publish content to this url to pretend as the broadcaster.</p>
  
  <p>Any suggestion on this problem to prevent the viewers from knowing the original stream url?</p>
  
  <p>For example, broadcaster publishes content to <code>rtmp://myserver.com/live/someUserDefinedStreamName</code> while viewers can watch the stream with <code>rtmp://myserver.com/live?someHashString</code>, but how?</p>