mumble-voip / mumble

Mumble is an open-source, low-latency, high quality voice chat software.
https://www.mumble.info
Other
6.26k stars 1.11k forks source link

Allow specification of separate hosts for UDP and TCP #5685

Open jboverfelt opened 2 years ago

jboverfelt commented 2 years ago

Context

Running a server on a Platform-as-a-Service host like fly.io

Description

Hello and thanks for making this awesome voice chat program! Currently, mumble server allows you to specify a default interface to listen on in the mumble.ini file using the key "host". However, I'm running my mumble server on fly.io and their handling of UDP requires binding to a separate interface from TCP. I don't know if other Platform as a Service providers do the same. TCP connections must listen on 0.0.0.0, while UDP connections must listen on "fly-global-services"

https://fly.io/docs/app-guides/udp-and-tcp/

Mumble server seems to use the same interface for both TCP and UDP from the host key, meaning I have to use tcp-only on my fly.io instance.

My mumble server still works fine in TCP only mode, so this is not a blocker by any means. I understand support of strange configurations like this may not be high on the priority list!

Mumble component

Server

OS-specific?

No

Additional information

No response

davidebeatrici commented 2 years ago

Related: #5555

Sorseg commented 2 months ago

As a workaround for fly.io I was able to LD_PRELOAD a library that rewrites the host for udp socket. Source code is here

I have this in my Dockerfile to make it work ```dockerfile # Build the interceptor lib FROM docker.io/rust:1.75.0 as builder WORKDIR /usr/src RUN git clone https://gitlab.com/samoylovfp/7d2d-ded WORKDIR /usr/src/7d2d-ded/interceptor RUN cargo build --release FROM mumblevoip/mumble-server:v1.5.634-0 # Copy the built lib COPY --from=builder /usr/src/7d2d-ded/interceptor/target/release/libinterceptor.so / # Make all apps started after this use the lib ENV LD_PRELOAD=/libinterceptor.so ```