srt_proxy_pass

The `srt_proxy_pass` directive specifies the destination for outgoing SRT communications within an NGINX stream block.

Syntaxsrt_proxy_pass srt://address:port;
Defaultnone
Contextstream server
Arguments1

Description

The srt_proxy_pass directive is used within the stream server block of the NGINX SRT module to define the SRT destination to which the server should forward incoming SRT connections. This directive is particularly useful in scenarios where NGINX is configured as a gateway between SRT stream clients and another SRT endpoint or TCP service. By utilizing this directive, NGINX will handle the incoming SRT traffic and proxy it seamlessly to the specified destination, thereby enabling bidirectional SRT communication.

This directive takes a single mandatory argument: the SRT URI, which follows the standard format srt://ip_address:port. The specified address must be reachable from the NGINX server to successfully proxy the SRT traffic. When implementing srt_proxy_pass, it's essential to ensure that both the incoming and outgoing configurations match in terms of protocol and security, as SRT provides settings aimed at optimizing streaming performance across the internet. The directive is especially effective when used in conjunction with detailed stream server configurations, such as setting appropriate buffers and connection options.

A common use case is to set up NGINX to listen for incoming SRT connections on a specified port and then proxy these connections to another SRT stream, facilitating an environment for scalable and reliable media transport. This is done using the directive in conjunction with other configuration options to customize buffer sizes, timeouts, and error handling as needed.

Config Example

stream {
    server {
        listen 5432;
        srt_proxy_pass srt://127.0.0.1:4321;
    }
}

The address specified in the URI must be accessible from the NGINX server.

Ensure SRT is configured and running on the destination IP and port before using this directive.

Network firewalls should allow SRT traffic between NGINX and the destination endpoint.

← Back to all directives