1udpxy(1)                       udpxy manual page                      udpxy(1)
2
3
4

NAME

6       udpxy - a UDP-to-HTTP multicast traffic relay daemon.
7
8

SYNOPSIS

10       udpxy [-vTS] [-a <listenaddr>] [-m <mcast_ifc_addr>] [-c <clients>] [-l
11       <logfile>] [-B <sizeK>] [-R <msgs>] [-H  <sec>]  [-n  <nice_incr>]  [-M
12       <sec>] -p <port>
13
14

DESCRIPTION

16       udpxy  is a UDP-to-HTTP multicast traffic relay daemon: it forwards UDP
17       traffic from a given multicast or source-specific  multicast  subscrip‐
18       tion to the requesting HTTP client.
19
20       udpxy listens (on a dedicated address/port) for HTTP requests issued by
21       clients.  A client request should be structured as:
22
23       http://{address}:{port}/{cmd}/[src_address@]{mgroup_ad‐
24       dress}{sep}{mgroup_port}
25
26       {sep}   :|%|~|+|-|^
27
28       {cmd}   udp|rtp
29
30
31       where  address and port match the listening address/port combination of
32       udpxy,   and   mgroup_address:mgroup_port   identify   the    multicast
33       group/channel to subscribe to.
34
35
36       udp     udp  command  will  have udpxy probe for known types of payload
37               (such as MPEG-TS and RTP over MPEG-TS);
38
39       rtp     rtp command makes udpxy assume RTP over MPEG-TS  payload,  thus
40               skipping the probes.
41
42
43       udpxy  will  start a separate client process for each new relay request
44       (within the specified limit on active  clients).   The  client  process
45       will relay/forward all network traffic received (via a UDP socket) from
46       the specified multicast group to the requesting HTTP connection.
47
48
49       udpxy also supports a few administrative requests:
50
51
52       status  http://address:port/status/ to send back an HTML page with dae‐
53               mon status and client statistics.
54
55       restart http://address:port/restart/  to  close  all active connections
56               and restart.
57
58
59

EXAMPLES

61       http://192.168.0.12:5056/udp/10.170.185.82@232.22.137.57:5057
62
63       http://192.168.0.12:5056/udp/224.0.2.26:24012
64
65       http://192.168.0.12:5056/rtp/224.0.2.26:24012
66
67       http://192.168.0.15:5056/rtp/224.0.2.26^24055
68
69       http://192.168.0.15:5056/status/
70
71

OPTIONS

73       udpxy accepts the following options:
74
75       -v      Enable verbose output [default = disabled].
76
77       -S      Enable client statistics [default = disabled].
78
79       -T      Do NOT run as a daemon [default = daemon if root].
80
81       -a <listenaddr>
82               IPv4 address/interface to listen on [default = 0.0.0.0].
83
84       -m <mcast_ifc_addr>
85               IPv4  address/interface  of  (multicast)  source   [default   =
86               0.0.0.0].
87
88       -c <clients>
89               Maximum number of clients to accept [default = 3, max = 5000].
90
91       -l <logfile>
92               Log output to file [default = stderr].
93
94       -B <sizeK>
95               Buffer  size  (65536,  32Kb,  1Mb) for inbound (multicast) data
96               [default = 2048 bytes].
97
98       -R <msgs>
99               Maximum number of messages to buffer (-1 = all) [default = 1].
100
101       -H <sec>
102               Maximum time (in seconds) to hold data in a buffer (-1 = unlim‐
103               ited) [default = 1].
104
105       -n <nice_incr>
106               Nice value increment [default = 0].
107
108       -M <sec>
109               Renew  multicast  subscription every M seconds (skip if 0) [de‐
110               fault = 0].
111
112       -p <port>
113               Port to listen on.
114
115

PAYLOAD TYPES AND HANDLING

117       udpxy recognizes MPEG-TS and RTP over MPEG-TS payloads  within  relayed
118       packets;  if udpxy encounters RTP payload it automatically 'translates'
119       it to MPEG-TS (by stripping RTP headers) so that media players not rec‐
120       ognizing RTP could still play back the stream.
121
122       So far, no translation is performed for other payload types.
123
124

RECORDING MPEG TRAFFIC

126       udpxy  includes functionality to record captured traffic as raw MPEG-TS
127       stream into a file. This functionality is enabled  through  udpxrec:  a
128       bundled-in  application that is linked together with udpxy (as one exe‐
129       cutable).
130
131       udpxrec is invoked via a symbolic link (named udpxrec) to the udpxy ex‐
132       ecutable (i.e. do not rename udpxy executable).
133
134       udpxrec  creates MPEG files encapsulating MPEG-TS segments; certain me‐
135       dia players will NOT play such files; in order to  make  them  playable
136       the  stream  must  be transcoded to MPEG-PS; vlc 'knows' how to do such
137       transcoding, here is a command-line example:
138
139       vlc input-ts.mpg --sout="#std{access=file,mux=ps,dst=out-ps.mpg}"
140
141       The resulting MPEG-PS file can be played back by most media players.
142
143
144

ENVIRONMENT

146       udpxy utilizes the following environment variables  to  compliment  its
147       command-line options; the variables are considered for the options that
148       most people would not need to change too often (or simply  inconvenient
149       to use from the command line).
150
151       NB: If there is a command-line switch that would intersect in function‐
152       ality with an environment variable, the switch always has higher prior‐
153       ity.
154
155       UDPXY_RCV_TMOUT
156               timeout  (sec)  on  the  inbound  data  stream (multicast), de‐
157               fault=5;
158
159       UDPXY_DHOLD_TMOUT
160               timeout (sec) to hold buffered data before sending/flushing  to
161               client(s), default=1;
162
163       UDPXY_SREAD_TMOUT
164               timeout  (sec) to read from the listening socked (handling HTTP
165               requests), default=1;
166
167       UDPXY_SWRITE_TMOUT
168               timeout (sec) to write to the listening socked  (handling  HTTP
169               requests), default=1;
170
171       UDPXY_SSEL_TMOUT
172               timeout (sec) to select(2) in server loop (unused if pselect(2)
173               is employed), default=30;
174
175       UDPXY_LQ_BACKLOG
176               size of the listener socket's backlog, default=16;
177
178       UDPXY_SRV_RLWMARK
179               low watermaek on the receiving (m-cast) socket, default=0  (not
180               set);
181
182       UDPXY_SSOCKBUF_NOSYNC
183               do  not sync inbound (UDP) socket's buffer size (with the value
184               set by -B), default=1 (sync);
185
186       UDPXY_DSOCKBUF_NOSYNC
187               do not sync outbound (TCP) socket's buffer size (with the value
188               set by -B), default=1 (sync);
189
190       UDPXY_TCP_NODELAY
191               disable  Nagle  algorithm  on the newly accepted socket (faster
192               channel switching), default=1;
193
194       UDPXY_HTTP200_FTR_FILE
195               append contents of the given text file  to  the  HTTP  200  re‐
196               sponse, default=none;
197
198       UDPXY_HTTP200_FTR_LN
199               append the text (line) to the HTTP 200 response, default=none;
200
201       UDPXY_ALLOW_PAUSES
202               if  blocked  on  a write(2), keep reading data until the buffer
203               (-B <sizeK>) is full, default=disabled;
204
205       UDPXY_PAUSE_MSEC
206               allow only N milliseconds of reading data  when  blocked  on  a
207               write(2).
208
209       UDPXY_CONTENT_TYPE
210               specify custom Content-Type in HTTP responses.
211
212

AUTHORS

214       Pavel  V.  Cherenkov  and  all the good people who submitted patches or
215       otherwise contributed to the project.
216
217

SEE ALSO

219       udpxrec(1)
220
221
222
223
224
225Version 1.0                    November 17, 2012                      udpxy(1)
Impressum