Giter Club home page Giter Club logo

udpxy's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

udpxy's Issues

Android 4.4 - setsockopt SO_REUSEPORT: Protocol not available

It running find on Android 6 but I got this error when running on Android 4.4

# udpxy -vT -a wlan0 -m eth0 -p 8888
Added client: pid=[17586], maddr=[239.1.1.15], mport=[8064], saddr=[192.168.100.2], sport=[26015]
setup_mcast_listener: setsockopt SO_REUSEPORT: Protocol not available

udpxy with igmpproxy

Hello and thanks for your work.

I have a problem with udpxy running on my OpenWrt router :
I have a multicast stream provided by my ISP : I get this stream on my LAN with IGMPproxy on my router (i have IGMPsnooping enabled on my entire lan).

But I would like to add udpxy to convert multicast to unicast when I need (through my home VPN per exemple).

So udpxy is configured with sources as my LAN router IP but I have a problem :
If the multicast stream is active on the lan (on another machine for exemple), udpxy works and I can get the unicast stream of this multicast from udpxy.
But if this multicast stream is not active, udpxy can't access this stream.
Also if I stop the multicast stream in all my machines on my LAN, the unicast stream from udpxy stops after about 10 seconds.

It looks as if udpxy can't make the subscription to multicast.

Do you know why it doesn't work the way I want ?

Thanks

IGMP V3 SSM support

Hello,
This is rather feature request than a bug.
Multiple providers deliver their multicast as IGMP v3 SSM (source specific multicast) for example:
rtp://[email protected]:10000
and that can't be relayed by udpxy at all.
Those SSM multicasts are causing "issues" as many of the software just don't support those at all, tvheadend for example, but support http streams without issue.
There are workarounds by using ffmpeg to translate ssm multicast to fifio pipe but those are CPU intensive.
Having udpxy be able to convert ssm to http stream would be quite nice.

Even buffered data is not continuous with a weak Internet connection

I'm not sure this problem is related to udpxy, but it could be.

On a weak internet connection, I set a 30 second buffered time in the vlc (the stream is provided by udpxy, of course) and I find that once the buffer is loaded and the vlc starts playing, the 30 second buffered video is also interrupted.

I would expect playback to be smooth for at least the first 30 seconds.

I tried configuring udpxy parameterization as well as linux sysctl values but it didn't help.

udpxy -B 4K -H 30 -R -1
net.core.wmem_max = 1677721600
net.core.rmem_max = 1677721600
net.core.wmem_default = 167772160
net.core.rmem_default = 167772160

stuttering/lags

hi, not sure if this is a problem with udpxy or something else, but thought i'll report it here.
my ISP provides an iptv stream and when i use udpxy, i have each minute or 2 some lag for 1-2 seconds.
is there some way to configure udpxy that it buffers more? i use kodi with iptvsimple.

in the kodi.log i have some of those:
2023-04-08 21:39:05.325 T:8953 warning : OutputPicture - timeout waiting for buffer
2023-04-08 21:41:04.008 T:8951 info : CAEStreamParser::TrySyncAC3 - AC3 stream detected (2 channels, 48000Hz)
2023-04-08 21:42:04.894 T:8953 warning : OutputPicture - timeout waiting for buffer
2023-04-08 21:48:03.380 T:8951 info : CAEStreamParser::TrySyncAC3 - AC3 stream detected (2 channels, 48000Hz)
2023-04-08 21:49:03.583 T:8951 info : CAEStreamParser::TrySyncAC3 - AC3 stream detected (2 channels, 48000Hz)
2023-04-08 21:49:05.214 T:8953 warning : OutputPicture - timeout waiting for buffer
2023-04-08 21:51:04.880 T:8953 warning : OutputPicture - timeout waiting for buffer
2023-04-08 21:54:03.246 T:8951 info : CAEStreamParser::TrySyncAC3 - AC3 stream detected (2 channels, 48000Hz)
2023-04-08 21:54:04.808 T:8953 warning : OutputPicture - timeout waiting for buffer

on my router the log looks like:
2023-04-08 22:36:25.070137 CEST S(24170) Received TSTAT={ sender=[15445], bytes=[1316000.000000], seconds=[1.000000] }
2023-04-08 22:36:25.070193 CEST S(24170) Updated context for pid=[15445]; [1285.2] Kb/sec
2023-04-08 22:36:25.070245 CEST S(24170) Waiting for input from [2] fd's, NO timeout
2023-04-08 22:36:25.750613 CEST S(24170) No children exited since last check
2023-04-08 22:36:25.750729 CEST S(24170) Got 1 requests
2023-04-08 22:36:25.750787 CEST S(24170) Received TSTAT={ sender=[15445], bytes=[1316000.000000], seconds=[0.000000] }
2023-04-08 22:36:25.750854 CEST S(24170) Updated context for pid=[15445]; [inf] Kb/sec
2023-04-08 22:36:25.750911 CEST S(24170) Waiting for input from [2] fd's, NO timeout

not sure if that inf kb/sec is correct

uninitialized source address for source specific multicast

There is an issue with source specific multicast (SSM) support, that source address is uninitialized if SSM unspecified.
Which may cause mcast listen with wrong parameter since set_multicast() rely on following condition (netop.c, line 158):

if (s_in_addr->s_addr != 0)

It will result in socket timeout if source address is unspecified and uninitialized.

udpxy and ssm

Hello!
I wonder, will be ssm/imr supported in udpxy someday? Last time i saw this was asked, it was 2012, maybe something changed in roadmap.

Duplicate SO_REUSEPORT setsockopt error

Hi,

Using a Debian 7 x64 machine (yes, quite old but working) I detected that the double call to the setsockopt SO_REUSEPORT fails:

#ifdef SO_REUSEPORT

So, I suggest to improve the code or include a configurable alternive, like with Environment variables.
I compiled it disabling this and then it works in this server.

I hope this helps to improve this tool.
Regards.

status page

Hello,
please, is there a way to block status html page?

Thank You

clang compilation: pointer-bool-conversion warning

I want to update FreeBSD net/udpxy port to the latest version.
Under FreeBSD 12.1 with clang 8 from base system I get this:

cc -W -Wall -Werror --pedantic -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing   -DUDPXREC_MOD -DNDEBUG -DTRACE_MODULE -c mkpg.c -o mkpg.o

mkpg.c:93:29: error: address of array 'client->tail' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                    client->tail ? client->tail : "",
                    ~~~~~~~~^~~~ ~
mkpg.c:100:25: error: address of array 'client->tail' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
            if (client->tail && (ssize_t)strlen(client->tail) > max_cli_tail)
                ~~~~~~~~^~~~ ~~
2 errors generated.

The same error with clang 9.

OpenBSD 6.8 compile problem (use gmake)

udpxy-1.0-25.0 has error when compile on OpenBSD 6.8 uses gmake.

gmake[1]: Entering directory '/home/builder/udpxy-1.0-25.0/chipmunk'
cc -W -Wall -Werror --pedantic   -DUDPXREC_MOD -DNDEBUG -DTRACE_MODULE -c util.c -o util.o
util.c:857:16: error: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to
      9223372036854775808 [-Werror,-Wimplicit-int-float-conversion]
    if( dval > LONG_MAX || dval < LONG_MIN )
             ~ ^~~~~~~~
/usr/include/sys/limits.h:63:19: note: expanded from macro 'LONG_MAX'
# define LONG_MAX       0x7fffffffffffffffL
                        ^~~~~~~~~~~~~~~~~~~
1 error generated.
gmake[1]: *** [Makefile:106: util.o] Error 1
gmake[1]: Leaving directory '/home/builder/udpxy-1.0-25.0/chipmunk'
gmake: *** [Makefile:110: release] Error 2
obsd68$

Version 1.0.24.1 compile successfully.

Packet loss when using multicast renew feature

I am using udpxy on mt7621 router with multicast renew enabled. My iptv provider requires the client send multicast report packet periodicity.
After enabling the feature, packet loss causes VLC video lag periodicity.
Attached logs from VLC:

main debug: resampling stopped (drift: 485 us)
main debug: picture might be displayed late (missing 4 ms)
ts warning: discontinuity received 0x7 instead of 0x0 (pid=4113)
ts warning: discontinuity received 0x4 instead of 0xe (pid=4113)
main debug: picture might be displayed late (missing 1 ms)
main debug: auto hiding mouse cursor
main warning: picture is too late to be displayed (missing 25 ms)
main warning: picture is too late to be displayed (missing 49 ms)
main debug: picture might be displayed late (missing 9 ms)
main debug: auto hiding mouse cursor
ts warning: discontinuity received 0xc instead of 0x0 (pid=4113)
ts warning: discontinuity received 0x1 instead of 0xf (pid=4352)
main debug: picture might be displayed late (missing 9 ms)
main debug: picture might be displayed late (missing 17 ms)
main debug: auto hiding mouse cursor
main debug: auto hiding mouse cursor

gcc9 warns about s_sysinfo size

This problem appears again:

util.c: In function 'get_sysinfo':
util.c:1082:61: error: ' ' directive output may be truncated writing 1 byte into a region of size between 0 and 255 [-Werror=format-truncation=]
 1082 |         (void) snprintf (s_sysinfo, sizeof(s_sysinfo)-1, "%s %s %s",
      |                                                             ^
util.c:1082:16: note: 'snprintf' output between 3 and 768 bytes into a destination of size 255
 1082 |         (void) snprintf (s_sysinfo, sizeof(s_sysinfo)-1, "%s %s %s",
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1083 |             uts.sysname, uts.release, uts.machine);
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

s_sysinfo was extended to 256 before in 2cdb00f, but this is not enough for gcc9.

I suppose this should be reworked somehow.

Also seems like snprintf() always null terminates the buffer. Is such code really needed?
https://github.com/pcherenkov/udpxy/blob/master/chipmunk/util.c#L1081

setup_mcast_listener: bind: Address already in use

Now, there is 1.0-24.1 on my router, Dozens of channels can be switched freely and played perfectly, only one channel cannot be played, there will be such an error message in the background

However, the igmp address of this channel is playable, such as rtp: //239.3.1.209: 8052

rtp: //239.3.1.209: 8052 can play

http://192.168.123.1:2333/rtp/239.3.1.209:8052 cannot be played

All other channels are normal, but this one is problematic. The error is:

Mar 10 14:39:31 udpxy[10557]: setup_mcast_listener: bind: Address already in use
Mar 10 14:39:31 udpxy[10558]: setup_mcast_listener: bind: Address already in use

update

I found that there are other programs occupying 8052 port
I want to know from udpxy's perspective, is there any way to solve this problem?

IPv6 Support?

Hi! Appreciate for your great work.
I would like to know if there is a way to make udpxy listen both on ipv4&&ipv6 request?

Security: limit TTL=1

It will be nice to see that udpxy set by default TTL for multicast and unicast sockets to 1, to not allow use it outside LAN.
And nice to see option to able to increase it.

For unicast sockets:

int ttl = 1;		     /*	max = 255 */
setsockopt(s, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl));

This for multicast:

u_char ttl = 1;     /*	range: 0 to 255, default = 1 */
setsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl));

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.