Skip to content

Instantly share code, notes, and snippets.

@saihtaM
saihtaM / hdhomerun-socat.service
Last active July 2, 2024 14:51
HDHomeRun (legacy) streaming over VPN/VLANs using socat for port forwarding.
# This helps clients communicate with HDHR works across all VLANs and more, run this on a server with access to the clients prefix (because we need to see the broadcast).
[Unit]
Description=HDHomeRun socat port forwarding service
After=network.target
[Service]
ExecStartPre=/bin/sleep 5
ExecStart=/bin/bash -c '/usr/bin/socat udp4-recvfrom:65001,broadcast,fork udp4-sendto:HDHOMERUN-IP-HERE:65001 & /usr/bin/socat tcp4-listen:65001,reuseaddr,fork tcp4:HDHOMERUN-IP-HERE:65001'
Restart=always
RestartSec=3