This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Project Description
# MDNS Repeater

Services that broadcast themselves via MDNS are only available for DNS-SD on
the networks they are directly connected to. However, some network topologies
allow devices on different subnets to route to each other and you may want
services to be discoverable across certain network boundaries.

This is a work in progress and there may be some ping-pong between
bidirectionally mirrored networks. It also only supports service records right
now and that probably won't change unless there is some reason to support other
record types.


## Motivation

There are existing projects that enable this sort of functionality, namely
Avahi in the open source world with its 'reflector' option. The main issue I
had with setting reflector=on was that Avahi would reflect every network
interface's services on every other network interface, which was a bit too
broad for my network. (My MacBook would switch WiFi networks and Avahi would
advertize a stale service from my MacBook from another subnet and everything
would catch fire.) The main motivation here was to provide similar
functionality as reflector=on in a loosly scriptable fashion.


## Examples

###Scenario 1

You have a DMZ network and an internal network and you want services on the DMZ
to be available to devices on the internal network. In this scenario, assume
you have a device with network interfaces `enDMZ` at `192.168.2.100` and
`enInternal` at `192.168.1.100`.

```python
import functools
import signal
import sys
import time

from mdns_repeater import Repeater


enInternal = Repeater('192.168.1.100')
enDMZ = Repeater('192.168.2.100')

enDMZ.repeat_to(enInternal)


if __name__ == '__main__' and not sys.flags.interactive:
@functools.partial(signal.signal, signal.SIGINT)
def boop(signum, stuff):
print('Exiting...')
sys.exit(0)
while True:
time.sleep(1.0)
```

###Scenario 2

You have two separate WiFi networks set up with different access permissions
but you still want services to advertize across both (think AppleTV or
Chromecast). In this scenario, assume you have a device with network interfaces
`brWifiA` at `192.168.1.1` and `brWifiB` at `192.168.2.1`.

```python
import functools
import signal
import sys
import time

from mdns_repeater import Repeater


wifiA = Repeater('192.168.1.1')
wifiB = Repeater('192.168.2.1')

wifiA.repeat_to(wifiB)
wifiB.repeat_to(wifiA)


if __name__ == '__main__' and not sys.flags.interactive:
@functools.partial(signal.signal, signal.SIGINT)
def boop(signum, stuff):
print('Exiting...')
sys.exit(0)
while True:
time.sleep(1.0)
```
Release History

Release History

0.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting