GNU General Public License v3.0

项目介绍

alsmith/multicast-relay 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 GNU General Public License v3.0 许可证,目前获得 363 个 Star、56 次 Fork。

仓库全名
alsmith/multicast-relay
开源许可证
GNU General Public License v3.0
Star 数
363
Fork 数
56
未关闭 Issue
23

README 摘要

Relay broadcast and multicast packets between interfaces Useful, for example, if you have Sonos speakers on one interface, or VLAN, and you want to be able to control them from devices on a different interface/VLAN. Similar for Chromecast devices. By default, SSDP multicast packets received on 239.255.255.250:1900 are relayed to the other interfaces listed, as well as multicast DNS packets received on…

完整内容见 GitHub 原始 README 或本页 。

常见问题

multicast-relay 用什么语言开发?

主要使用 Python 编写,采用 GNU General Public License v3.0 许可证,目前有 363 个 Star。

multicast-relay 可以免费商用吗?

仓库标注的许可证为 GNU General Public License v3.0,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 multicast-relay 的源码?

可以直接克隆仓库:git clone https://github.com/alsmith/multicast-relay.git,默认分支为 master;安装与运行步骤见仓库 README。

multicast-relay 最近还在维护吗?

仓库最近一次更新为 2023年11月5日,当前有 23 个未关闭 Issue;Star 数为 363,可作为社区活跃度的参考。

关于

Relay multicast and broadcast packets between interfaces.

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
498
价值分
235
活跃状态
活跃

语言占比

Dockerfile
Python

Release

README

Relay broadcast and multicast packets between interfaces

Useful, for example, if you have Sonos speakers on one interface, or VLAN, and you want to be able to control them from devices on a different interface/VLAN. Similar for Chromecast devices.

By default, SSDP multicast packets received on 239.255.255.250:1900 are relayed to the other interfaces listed, as well as multicast DNS packets received on 224.0.0.251:5353.

Broadcast UDP packets received on port 6969 are also relayed by default: this is used by Sonos during the initial device-discovery phase, initiated by pressing either the infinity button or the play+volume up buttons, depending on your Sonos speaker.

Please note that even when your devices have discovered one another, at least in the Sonos case, a unicast connection will be established from the speakers back to the controlling-telephone. You will need to make sure that IP forwarding is enabled (echo 1 > /proc/sys/net/ipv4/ip_forward) and that no firewalling is in place that would prevent connections being established.

usage: multicast-relay.py [-h] --interfaces INTERFACE INTERFACE [INTERFACE ...] [--noTransmitInterfaces INTERFACE ...] [-ifFilter IFFILTER] [--relay BROADCAST_OR_MULTICAST:PORT [BROADCAST_OR_MULTICAST:PORT ...]] [--noMDNS] [--noSSDP] [--noSonosDiscovery] [--oneInterface] [--homebrewNetifaces] [--wait] [--listen REMOTE_ADDRESS [REMOTE_ADDRESS ...]] [--remote REMOTE_ADDRESS] [--remotePort PORT] [--remoteRetry SECS] [--foreground] [--logfile FILE] [--verbose]

--interfaces specifies the >= 2 interfaces that you desire to listen to and relay between. You can specify an interface by name, by IP address, or by network/netmask combination (e.g. 10.0.0.0/24 in the last case). With certain flags below, the minimum number of interfaces drops to >= 1.

--noTransmitInterfaces specifies interface(s) that are listen-only.

--ifFilter specifies a JSON file where one can state that a source address A.B.C.D/M is only to be relayed to specific interfaces. This can be useful in applications such as a hotel where relaying for one guest room may only discover device(s) that are in the same guest room. See example file ifFilter.json.

--relay specifies additional broadcast or multicast addresses to relay.

--noMDNS disables mDNS relaying.

--noSSDP disables SSDP relaying.

--noSonosDiscovery disables broadcast udp/6969 relaying.

--oneInterface support for one interface connected to two networks. Use with caution - watch out for packet storms (although the IP checksum list ought to still prevent such a thing from happening).

--homebrewNetifaces attempt to use our own netifaces implementation, probably doesn’t work on any other system than Linux but maybe useful for OpenWRT where it’s rather tricky to compile up netifaces.

--allowNonEther supports non-ethernet interfaces to be relayed [experimental].

--wait indicates that the relay should wait for an IPv4 address to be assigned to each interface rather than bailing immediately if an interface is yet to be assigned an address.

--listen for connections from the specified remote host(s) or network(s), for example --listen 10.0.0.1 192.168.0.0/16.

--remote connect to the specified remote host. If either --listen or --remote are specified, then one can also specify just one local interface with --interfaces.

--remotePort use the specified port for remote communications (default: 1900).

--remoteRetry if the remote connection fails, wait at least this number of seconds before retrying (default: 5).

--aes use the specified string to encrypt/decrypt data packets.

--foreground stops the process forking itself off into the background. This flag also encourages logging to stdout as well as to the syslog.

--logfile saves log data to the specified file.

--verbose steps up the logging.

multicast-relay.py requires the python ‘netifaces’ package. Install via ‘easy_install netifaces’ or ‘pip install netifaces’. For ZeroShell users, please review README-ZeroShell for further instructions.

Al Smith [email protected]

评论

暂无评论