Register local ip address handler for raw udp

This commit is contained in:
Marvin W 2021-11-09 22:06:50 +01:00 committed by fiaxh
parent c9194973de
commit 0fe24c4339
1 changed files with 6 additions and 1 deletions

View File

@ -15,7 +15,12 @@ public class Dino.Plugins.Ice.Plugin : RootInterface, Object {
list.add(new Module());
});
app.stream_interactor.stream_attached_modules.connect((account, stream) => {
stream.get_module(Socks5Bytestreams.Module.IDENTITY).set_local_ip_address_handler(get_local_ip_addresses);
if (stream.get_module(Socks5Bytestreams.Module.IDENTITY) != null) {
stream.get_module(Socks5Bytestreams.Module.IDENTITY).set_local_ip_address_handler(get_local_ip_addresses);
}
if (stream.get_module(JingleRawUdp.Module.IDENTITY) != null) {
stream.get_module(JingleRawUdp.Module.IDENTITY).set_local_ip_address_handler(get_local_ip_addresses);
}
});
app.stream_interactor.stream_negotiated.connect(on_stream_negotiated);
}