Skip to content

How to create an universal RTSP/RTMP ondemand proxy? #3012

Answered by aler9
rafox2005 asked this question in Questions
Discussion options

You must be logged in to vote

Hello, the setup you are describing, which is the ability to use the server as a proxy to any URL, is seldom used since it has an intrinsic security flaw, that is the possibility for an attacker to use the server to send requests to arbitrary services or websites.

Anyway this can be accomplished if the protocol (RTSP) is fixed:

paths:
  "~^proxy_rtsp/(.+)/(.+)/(.+)/(.+)/(.+)$":
    source: rtsp://$G1:$G2@$G3:$G4/$G5
    sourceOnDemand: yes

Requests addressed to

rtsp://localhost:8554/proxy_rtsp/myuser/mypass/myhost/554/mypath

will be proxied to

rtsp://myuser:mypass@myhost:554/mypath

You can create configurations for different protocols:

paths:
  "~^proxy_rtsp/(.+)/(.+)/(.+)/(.+)/(.+)$":
…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@SMSmith
Comment options

Answer selected by rafox2005
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants