Files
euzuandGitHub e8a7f2629e Ship log records to an external syslog collector over UDP (#951)
* Ship log records to an external syslog collector over UDP

Add opt-in log.syslog (off by default): RFC 5424, RFC 3164 or NDJSON
datagrams, optional remote log level independent of stdout and the
Web-UI, bounded queue with drop counters, dedicated worker thread, live
reload without restart.

* fix filter parse long filter chains without a stack limit error

pest 2.9.4 probes the native stack before parsing and reports only the
mapped stack region on static musl (~128 KiB), so a filter chain of a few
dozen terms failed with "stack limit reached" and restarted the container.
pest 2.9.5 limits the probe to targets whose stack bounds it can determine.

The expr rule now reads a chain as a flat operand list and folds it from the
right, so a long AND/OR chain no longer nests the parser stack while
grouping, NOT binding and results stay identical to the previous grammar.
2026-10-30 06:57:14 +01:00

195 lines
6.3 KiB
YAML

# TULIPROX_HOME should point to /app for docker
process_parallel: true
api:
host: 0.0.0.0
port: 8901
web_root: ${env:TULIPROX_HOME}/web
working_dir: ${env:TULIPROX_HOME}/data
backup_dir: ${env:TULIPROX_HOME}/backup
custom_stream_response_path: ${env:TULIPROX_HOME}/resources
connect_timeout_secs: 10
interner_gc_interval_secs: 180
interner_gc_min_pool_size: 100
# Used when no `User-Agent` is provided by the client request and none is set in input headers.
# If omitted, the built-in default is used.
default_user_agent: "VLC/3.0.16 LibVLC/3.0.16"
user_access_control: false
schedules:
- schedule: 0 0 4/23 * * *
targets: []
messaging:
notify_on: []
log:
sanitize_sensitive_info: false
log_active_user: true
log_level: debug
# syslog:
# enabled: false # default: false; enable here or in the Web-UI (Config -> Log)
# host: "192.168.1.50" # destination hostname or IP literal (no brackets for IPv6)
# port: 514 # destination UDP port (1..=65535, default: 514)
# format: rfc5424 # wire format: rfc5424 | rfc3164 | json (default: rfc5424)
# facility: local0 # all 24 RFC 5424 facilities are accepted, but only local0..local7 make
# # sense here (default: local0). A facility is a routing key: cron/authpriv
# # move the records out of the general log. Route on app_name instead.
# app_name: "tuliprox" # application identifier (1..=48 ASCII characters without spaces, default: tuliprox)
# hostname: "node1" # optional hostname override; default: system hostname, else "-"
# log_level: debug # optional filter: debug|info|warn|error (omit = follow root; trace is not allowed)
# queue_capacity: 4096 # in-memory datagram queue capacity (1..=65536, drop-on-full, default: 4096)
# max_message_len: 1024 # datagram size limit in bytes (480..=65507, json min: 1024; default: 1024)
update_on_boot: false # best not to hammer upstream during testing
web_ui:
enabled: true
user_ui_enabled: true
content_security_policy:
enabled: true
custom-attributes:
- "default-src 'self'"
- "script-src 'self' 'wasm-unsafe-eval' 'nonce-{nonce_b64}'"
- "frame-ancestors 'none'"
- "style-src 'self' 'nonce-{nonce_b64}'"
- "style-src-attr 'unsafe-inline'"
- "img-src 'self' data:"
- "font-src 'self' data:"
- "connect-src 'self' wss:"
- "object-src 'none'"
- "base-uri 'self'"
- "form-action 'self'"
path:
auth:
enabled: true
issuer: tuliprox
secret: ef9ab256a8c0abe5de92c2e05ca92baa810472ab702ff1674e9248308ceeec92
userfile: user.txt
video:
web_search: "https://www.imdb.com/search/title/?title={}"
extensions:
- mkv
- avi
- mp4
- mpeg
- divx
- mov
recording:
headers:
Accept: video/*
User-Agent: |
Mozilla/5.0 (AppleTV; U; CPU OS 14_2 like Mac OS X; en-us) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.1 Safari/605.1.15
directory: ${env:TULIPROX_HOME}/recordings
organize_into_directories: false
episode_pattern: .*(?P<episode>[Ss]\d{1,2}(.*?)[Ee]\d{1,2}).*
priority: 1
reserve_slots_for_users: 1
max_background_per_provider: 1
retry_backoff_initial_secs: 3
retry_backoff_multiplier: 3.0
retry_backoff_max_secs: 30
retry_backoff_jitter_percent: 20
retry_max_attempts: 5
enabled: true
container_format: mpegts
timezone: UTC
filename_template: "{channel}_{program_title}_{start_time}"
default_pre_roll_secs: 0
max_pre_roll_secs: 900
default_post_roll_secs: 0
max_post_roll_secs: 1800
fallback_bytes_per_minute: 8388608
retention:
keep_last_per_channel: 10
delete_after_days: 30
sweep_interval_secs: 3600
disk:
high_water_percent: 85
low_water_percent: 70
cleanup_interval_secs: 3600
safety_bytes: 1073741824
quota:
default_private_bytes: 53687091200
shared_bytes: 536870912000
per_user_bytes:
"web:alice": 107374182400
notifications:
outbox_buffer: 1024
max_attempts: 6
backoff_initial_secs: 5
backoff_max_secs: 900
reverse_proxy:
resource_retry:
max_attempts: 3
backoff_millis: 250
backoff_multiplier: 1.0
# geoip:
# enabled: true
# # unavailable_policy: deny # default. If GeoIP is disabled, missing, or not loaded,
# # country-based network_access rules deny non-CIDR-matching requests.
# # allow: explicit risk acceptance. Country-based network_access rules
# # allow when GeoIP is unavailable; CIDR-only misses still deny.
# unavailable_policy: deny
stream:
shared_burst_buffer_mb: 12 # default 12 MB
# stream_history:
# stream_history_enabled: true
# stream_history_batch_size: 128
# stream_history_retention_days: 30
# stream_history_directory: ${env:TULIPROX_HOME}/stream_history
# qos_aggregation:
# enabled: true
# interval_secs: 300
# compaction_interval_secs: 86400
rewrite_secret: ${env:TULIPROX_PROXY_REWRITE_SECRET} # use openssl rand -hex 16
library:
enabled: true
scan_directories:
- path: "/media/movies"
enabled: true
- path: "/media/tvshows"
enabled: true
# You can add more directories as needed
# - path: "/mnt/videos"
# enabled: false
supported_extensions:
- "mp4"
- "mkv"
- "avi"
- "mov"
- "ts"
- "m4v"
- "webm"
# Metadata configuration
metadata:
# Location to store metadata cache (JSON files)
path: "${env:TULIPROX_HOME}/library_metadata"
# TMDB (The Movie Database) API integration
tmdb:
enabled: true
# api_key: "" # Get your API key from https://www.themoviedb.org/settings/api
rate_limit_ms: 250 # Milliseconds between API calls (default: 250ms)
# Fallback to filename parsing if no metadata found
fallback_to_filename: true
# Metadata output formats
formats:
# - "nfo" # Optionally write Kodi-compatible NFO files
# Playlist integration
playlist:
# Group name for movies in M3U/Xtream playlist
movie_category: "Local Movies"
# Group name for series in M3U/Xtream playlist
series_category: "Local Series"