Reverse proxy vs redirect
Reverse proxy mode gives tuliprox full control over:
- user and provider connection limits
- custom fallback responses for failure cases
- HLS and catchup session handling
- live stream sharing across users
- priority-based preemption
force_redirect: true in the target options.
Stream configuration
Thereverse_proxy.stream block controls the runtime behaviour of proxied streams:
retry
When true, tuliprox automatically reconnects to the provider if the upstream disconnects unexpectedly. This keeps clients playing through transient provider blips without any action on the client side.
Buffer
The buffer holds a rolling window of stream data in memory:
When
share_live_streams is enabled, each shared channel keeps at least shared_burst_buffer_mb of data in memory so that new viewers can join mid-stream without missing content.
Throttle
Limit the bandwidth tuliprox uses per stream. Supported units:Rate limiting
Per-IP rate limiting is available underreverse_proxy.rate_limit:
Grace period (VLC seeks)
VLC and some other players produce rapid reconnects during seeks. If the previous upstream connection has not fully closed yet, the provider may still count it against its max-connections limit, causing a false “connections exhausted” error. The grace period gives stale connections time to disappear before tuliprox re-evaluates the limit:HLS and catchup session reservation
HLS and catchup clients repeatedly connect, fetch a playlist or segment, disconnect, and reconnect. Holding a real provider slot open the entire time wastes provider connections. tuliprox instead keeps a short-lived account reservation between requests:- the real provider slot is held only during the active request
- between requests, tuliprox keeps only an account reservation for the session TTL
- the same client/session reuses the same provider account on reconnect
- a channel switch from the same client can take over the reservation immediately
Normal TS streaming does not use the reservation model. Only HLS and catchup use session TTLs.
Shared live streams
Whenshare_live_streams is enabled on a target, multiple users watching the same channel share a single upstream provider connection instead of each opening their own:
- the first viewer starts the shared stream immediately
- additional viewers on the same channel join the existing shared stream
- the effective priority of the shared stream equals the highest priority of its active viewers
- when a viewer leaves, priority is recalculated
- if a higher-priority user requests a new stream and provider capacity is full, a lower-priority shared stream can be preempted
- equal priority never preempts a running stream
Priority and preemption
tuliprox uses a nice-style priority scale across users and internal tasks:- lower number = higher priority
- negative values are allowed
- equal priority does not preempt a running stream
metadata_update.probe.user_priority (default 127, the lowest end of the scale). This ensures user playback always wins over background metadata work:
Custom fallback videos
When tuliprox cannot serve the real stream, it can return a pre-recorded fallback transport stream instead of an error. This makes failure modes visible and friendly for downstream clients. Place.ts files in the directory configured by custom_stream_response_path. tuliprox discovers them by filename:
custom_stream_response_timeout_secs to cap playback of fallback content so clients retry after a fixed delay.
Other reverse proxy settings
Cache
Cache
tuliprox maintains an LRU cache for proxied resources such as channel logos. If
resource_rewrite_disabled is true, the cache is effectively disabled because tuliprox can no longer track rewritten resource URLs.Header stripping
Header stripping
Use
disabled_header to strip request headers before forwarding to providers:Resource retries
Resource retries
Control retries for proxied upstream resources such as logos and EPG images:
GeoIP
GeoIP
Optional country lookup from a CSV IP-range file. When configured, tuliprox can expose country information for connected clients.
Rewrite secret
Rewrite secret
Set an explicit secret for generating and validating rewritten resource URLs. Without this, a server restart regenerates the secret and invalidates any previously rewritten URLs stored in client caches.