Commit 61d5e19a authored by Roman Haefeli's avatar Roman Haefeli
Browse files

rename tpf-switchboard to switchboard (hyphen is illegal in python module names)

parent 449ec21c
......@@ -28,7 +28,7 @@ valid_types = ['mirror', 'one2oneBi', 'one2manyMo', 'one2manyBi', 'many2manyBi']
listen_port = 3591
listen_address = '0.0.0.0'
api = Flask(__name__)
app = Flask(__name__)
class r(Response):
default_mimetype = 'application/json'
......@@ -48,7 +48,7 @@ def get_proxies_of_room(room):
proxies_in_room[myproxies[key]['port']] = proxy
return proxies_in_room
@api.route(baseroute, methods=['POST'])
@app.route(baseroute, methods=['POST'])
def start_proxy():
proxydef = request.get_json()
# Do some input sanitizing
......@@ -126,7 +126,7 @@ def start_proxy():
response = {'status': 'Error', 'msg': 'Proxy already running on port %s' % proxydef['port']}
return r(json.dumps(response), 422)
@api.route(baseroute + '<int:port>', methods=['DELETE'])
@app.route(baseroute + '<int:port>', methods=['DELETE'])
def stop_proxy(port):
try:
myproxies[port]['obj'].stop()
......@@ -137,14 +137,14 @@ def stop_proxy(port):
response = {'status': 'OK', 'msg': 'Proxy is not running'}
return r(json.dumps(response))
@api.route(baseroute, methods=['GET'])
@app.route(baseroute, methods=['GET'])
def list_proxies():
proxies = {}
for key in myproxies.keys():
proxies[key] = representation_format(myproxies[key])
return r(json.dumps(proxies))
@api.route(baseroute + '<int:port>', methods=['GET'])
@app.route(baseroute + '<int:port>', methods=['GET'])
def get_proxy(port):
try:
proxy = representation_format(myproxies[port])
......@@ -152,7 +152,7 @@ def get_proxy(port):
except KeyError:
return r(json.dumps({'status': 'Error', 'msg': 'No proxy running on this port'}), 404)
@api.route('/rooms/', methods=['GET'])
@app.route('/rooms/', methods=['GET'])
def get_proxies_grouped_by_room():
rooms = {myproxies[key]['room'] for key in myproxies.keys()}
all_rooms = {}
......@@ -161,7 +161,7 @@ def get_proxies_grouped_by_room():
all_rooms[room] = proxies_of_room
return r(json.dumps(all_rooms))
@api.route('/rooms/' + '<string:room>', methods=['GET'])
@app.route('/rooms/' + '<string:room>', methods=['GET'])
def get_proxies_of_room_http(room):
try:
assert room in {myproxies[key]['room'] for key in myproxies.keys()}
......@@ -172,4 +172,4 @@ def get_proxies_of_room_http(room):
return r(json.dumps(proxies_of_room))
if __name__ == '__main__':
api.run(host=listen_address, port=listen_port)
app.run(host=listen_address, port=listen_port)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta charset="UTF-8">
<title>telematic.zhdk.ch - List of IA.[space] UDP ports</title>
</head>
<body>
<style>
td.container > div{
height:100%;
}
td.container {
height: 20px;
width: 800px;
}
object{
width:800px;
}
</style>
<h1>telematic.zhdk.ch - List of IA.[space] UDP ports</h1>
<table border="1" cellpadding="5">
<tr align="left">
<th>Port-No.:</th>
<th>Typ:</th>
<th>Reserviert für:</th>
<th>Connections:</th>
</tr>
<!-- range 14400 - 14441 -->
<tr style="background-color:#FFDDFF">
<td>1x001</td>
<td>dynamic UDP proxy</td>
<td>tpf server</td>
<td></td>
</tr>
<tr style="background-color:#DDDDFF">
<td>1x011</td>
<td>UDP mirror</td>
<td>mirrors UDP stream</td>
<td></td>
</tr>
<tr>
<td>1x100...1x119</td>
<td>UDP proxy</td>
<td>for audio</td>
<td></td>
</tr>
<tr>
<td>1x200...1x219</td>
<td>UDP proxy</td>
<td>for OSC</td>
<td></td>
</tr>
<td>1x250...1x259</td>
<td>UDP proxy</td>
<td>for moCap</td>
<td></td>
</tr>
<!-- range 15000 - 15018 -->
<tr>
<td>1x300</td>
<td>UDP proxy</td>
<td>UltraGrid 1 to 1</td>
<td class="container"><div><object data="ports/11300.txt"></object></div></td>
</tr>
<tr>
<td>1x310</td>
<td>UDP proxy</td>
<td>UltraGrid 1 to 1</td>
<td class="container"><div><object data="ports/11310.txt"></object></div></td>
</tr>
<tr>
<td>1x320</td>
<td>UDP proxy</td>
<td>UltraGrid 1 to 1</td>
<td class="container"><div><object data="ports/11320.txt"></object></div></td>
<tr>
</tr>
<td>1x330</td>
<td>UDP proxy</td>
<td>UltraGrid 1 to 1</td>
<td class="container"><div><object data="ports/11330.txt"></object></div></td>
<tr>
</tr>
<td>1x340</td>
<td>UDP proxy</td>
<td>UltraGrid 1 to 1</td>
<td class="container"><div><object data="ports/11340.txt"></object></div></td>
</tr>
<tr>
<td>1x350</td>
<td>UDP proxy</td>
<td>UltraGrid 1 to 1</td>
<td class="container"><div><object data="ports/11350.txt"></object></div></td>
</tr>
<tr>
<td>1x360</td>
<td>UDP proxy</td>
<td>UltraGrid 1 to 1</td>
<td class="container"><div><object data="ports/11360.txt"></object></div></td>
</tr>
<tr>
<td>1x370</td>
<td>UDP proxy</td>
<td>UltraGrid 1 to 1</td>
<td class="container"><div><object data="ports/11370.txt"></object></div></td>
</tr>
<tr>
<td>1x380</td>
<td>UDP proxy</td>
<td>UltraGrid 1 to 1</td>
<td class="container"><div><object data="ports/11380.txt"></object></div></td>
<tr>
</tr>
<td>1x390</td>
<td>UDP proxy</td>
<td>UltraGrid 1 to 1</td>
<td class="container"><div><object data="ports/11390.txt"></object></div></td>
</tr>
<tr style="background-color:#FFDDDD">
<td>1x500</td>
<td>UDP multi proxy</td>
<td>UltraGrid 1 to many</td>
<td class="container"><div><object data="ports/11500.txt"></object></div></td>
</tr>
<tr style="background-color:#FFDDDD">
<td>1x510</td>
<td>UDP multi proxy</td>
<td>UltraGrid 1 to many</td>
<td class="container"><div><object data="ports/11510.txt"></object></div></td>
</tr>
<tr style="background-color:#FFDDDD">
<td>1x520</td>
<td>UDP multi proxy</td>
<td>UltraGrid 1 to many</td>
<td class="container"><div><object data="ports/11520.txt"></object></div></td>
</tr>
<tr style="background-color:#FFDDDD">
<td>1x530</td>
<td>UDP multi proxy</td>
<td>UltraGrid 1 to many</td>
<td class="container"><div><object data="ports/11530.txt"></object></div></td>
</tr>
<tr style="background-color:#FFDDDD">
<td>1x540</td>
<td>UDP multi proxy</td>
<td>UltraGrid 1 to many</td>
<td class="container"><div><object data="ports/11540.txt"></object></div></td>
</tr>
<tr style="background-color:#FFDDDD">
<td>1x550</td>
<td>UDP multi proxy</td>
<td>UltraGrid 1 to many</td>
<td class="container"><div><object data="ports/11550.txt"></object></div></td>
</tr>
<tr style="background-color:#FFDDDD">
<td>1x560</td>
<td>UDP multi proxy</td>
<td>UltraGrid 1 to many</td>
<td class="container"><div><object data="ports/11560.txt"></object></div></td>
</tr>
<tr style="background-color:#FFDDDD">
<td>1x570</td>
<td>UDP multi proxy</td>
<td>UltraGrid 1 to many</td>
<td class="container"><div><object data="ports/11570.txt"></object></div></td>
</tr>
<tr style="background-color:#FFDDDD">
<td>1x580</td>
<td>UDP multi proxy</td>
<td>UltraGrid 1 to many</td>
<td class="container"><div><object data="ports/11580.txt"></object></div></td>
</tr>
<tr style="background-color:#FFDDDD">
<td>1x590</td>
<td>UDP multi proxy</td>
<td>UltraGrid 1 to many</td>
<td class="container"><div><object data="ports/11590.txt"></object></div></td>
</tr>
</table>
<dl>
<dt><b>UDP proxy</b></dt>
<dd>connects two endpoints and relays datagrams between them</dd>
<div style="background-color:#DDDDFF">
<dt><b>UDP mirror</b></dt>
<dd>sends incoming datagram back to source IP:port</dd>
</div>
<div style="background-color:#FFDDFF">
<dt><b>dynamic UDP proxy</b><dt>
<dd>manages multiple pairs of endpoints and relays datagrams between two linked endpoints (please refer to: <a href="https://gitlab.zhdk.ch/TPF/tpf-server">tpf-server</a>)</dd>
</ div>
<div style="background-color:#FFDDDD">
<dt><b>UDP multi proxy</b><dt>
<dd>allows 1-to-N connections, where the sender connects to the given port and all receivers connect to given Port + 5. There is also ports available at +1 and +2(i.e. 11500 links to 11505 | 11501 links to 11506 | 11502 links to 11507)</dd>
</ div>
</dl>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta charset="UTF-8">
<title>telematic.zhdk.ch - List of UDP ports</title>
</head>
<body>
<h1>telematic server ports: <a href="telematic.php">overview</a>)</h1>
<h1>IA.[space] server ports: <a href="iaspace1.php">overview</a>)</h1>
<h1>telematic.zhdk.ch - List of Example UDP ports</h1>
<table border="1" cellpadding = "5">
<tr align="left">
<th>ports</th>
<th>service</th>
<th>use</th>
<th>connection</th>
</tr>
<tr style="background-color:#AADDDD">
<td>10100</td>
<td>UDP proxy</td>
<td>for Audio</td>
<td></td>
</tr>
<tr style="background-color:#AADDDD">
<td>10101</td>
<td>UDP proxy</td>
<td>for Audio</td>
<td></td>
</tr>
<tr style="background-color:#BBDDDD">
<td>10200</td>
<td>UDP multi proxy</td>
<td>for OSC</td>
<td></td>
</tr>
<tr style="background-color:#BBDDDD">
<td>10201</td>
<td>UDP multi proxy</td>
<td>for OSC</td>
<td></td>
</tr>
<tr style="background-color:#CCDDDD">
<td>10250</td>
<td>UDP multi proxy</td>
<td>for MoCap</td>
<td></td>
</tr>
<tr style="background-color:#CCDDDD">
<td>10251</td>
<td>UDP multi proxy</td>
<td>for MoCap</td>
<td></td>
</tr>
<tr style="background-color:#FFDDDD">
<td>10300</td>
<td>UDP proxy</td>
<td>for UltraGrid</td>
<td></td>
</tr>
<tr style="background-color:#FFDDDD">
<td>10500</td>
<td>UDP multi proxy</td>
<td>for UltraGrid</td>
<td></td>
</tr>
<tr style="background-color:#FFDDDD">
<td>10501</td>
<td>UDP multi proxy</td>
<td>for UltraGrid</td>
<td></td>
</tr>
<tr style="background-color:#FFDDDD">
<td>10502</td>
<td>UDP multi proxy</td>
<td>for UltraGrid</td>
<td></td>
</tr>
</table>
<dl>
<dt><b>UDP proxy</b></dt>
<dd>connects two endpoints and relays datagrams between them</dd>
<div style="background-color:#DDDDFF">
<dt><b>UDP mirror</b></dt>
<dd>sends incoming datagram back to source IP:port</dd>
</div>
<div style="background-color:#FFDDFF">
<dt><b>dynamic UDP proxy</b><dt>
<dd>manages multiple pairs of endpoints and relays datagrams between two linked endpoints (please refer to: <a href="https://gitlab.zhdk.ch/TPF/tpf-server">tpf-server</a>)</dd>
</ div>
<div style="background-color:#FFDDDD">
<dt><b>UDP multi proxy</b><dt>
<dd>allows 1-to-N connections, where the sender connects to the given port and all receivers connect to given Port + 5.</dd>
</ div>
</dl>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta charset="UTF-8">
<title>telematic.zhdk.ch - List of UDP ports</title>
</head>
<body>
<h1>telematic.zhdk.ch - List of UDP ports</h1>
<table border="1" cellpadding="5">
<tr align="left">
<th>Port-No.:</th>
<th>Typ:</th>
<th>Reserviert für:</th>
<th>Connections:</th>
</tr>
<tr style="background-color:#FFDDFF">
<td>4460</td>
<td>dynmic UDP proxy</td>
<td>tpf-server</td>
<td></td>
</tr>
<tr>
<td>4464 - 4483</td>
<td>UDP proxy</td>
<td></td>
<td></td>
</tr>
<tr style="background-color:#DDDDFF">
<td>4484</td>
<td>UDP mirror</td>
<td></td>
<td></td>
</tr>
<!-- range 5000 - 5020 -->
<tr>
<td>5000</td>
<td>UDP proxy</td>
<td></td>
<td></td>
</tr>
<tr>
<td>5002</td>
<td>UDP proxy</td>
<td></td>
<td></td>
</tr>
<tr>
<td>5004</td>
<td>UDP proxy</td>
<td></td>
<td></td>
</tr>
<tr>
<td>5006</td>
<td>UDP proxy</td>
<td></td>
<td></td>
</tr>
<tr>
<td>5008</td>
<td>UDP proxy</td>
<td></td>
<td></td>
</tr>
<tr>
<td>5010</td>
<td>UDP proxy</td>
<td>UltraGrid</td>
<td></td>
</tr>
<tr>
<td>5012</td>
<td>UDP proxy</td>
<td>UltraGrid</td>
<td></td>
</tr>
<tr>
<td>5014</td>
<td>UDP proxy</td>
<td>UltraGrid</td>
<td></td>
</tr>
<tr>
<td>5016</td>
<td>UDP proxy</td>
<td>UltraGrid</td>
<td></td>
</tr>
<tr>
<td>5018</td>
<td>UDP proxy</td>
<td>UltraGrid</td>
<td></td>
</tr>
<tr>
<td>5020</td>
<td>UDP proxy</td>
<td>UltraGrid</td>
<td></td>
</tr>
</table>
<dl>
<dt><b>UDP proxy</b></dt>
<dd>connects two endpoints and relays datagrams between them</dd>
<div style="background-color:#DDDDFF">
<dt><b>UDP mirror</b></dt>
<dd>sends incoming datagram back to source IP:port</dd>
</div>
<div style="background-color:#FFDDFF">
<dt><b>dynamic UDP proxy</b><dt>
<dd>manages multiple pairs of endpoints and relays datagrams between two linked endpoints (please refer to: <a href="https://gitlab.zhdk.ch/TPF/tpf-server">tpf-server</a>)</dd>
</ div>
<div style="background-color:#FFDDDD">
<dt><b>UDP multi proxy</b><dt>
<dd>allows 1-to-N connections, where the sender connects to the given port and all receivers connect to given Port + 2.</dd>
</ div>
</dl>
</body>
</html>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment