First MeshCentral with working UDP routing.
Ylian Saint-Hilaire committed
May 7, 2019 at 12:39 UTC
825bff5bc01f39d9b84b169cd24b304b0b3f1365
3 files changed
+3
-6
agents/MeshCentralRouter.exe
Binary files a/agents/MeshCentralRouter.exe and b/agents/MeshCentralRouter.exe differ
agents/meshcore.js
+2
-5
@@ -418,7 +418,7 @@ function createMeshCore(agent) {
418
var woptions = http.parseUri(xurl);
419
woptions.rejectUnauthorized = 0;
420
//sendConsoleText(JSON.stringify(woptions));
421
- sendConsoleText('TUNNEL: ' + JSON.stringify(data));
421
+ //sendConsoleText('TUNNEL: ' + JSON.stringify(data));
422
var tunnel = http.request(woptions);
423
tunnel.upgrade = onTunnelUpgrade;
424
tunnel.on('error', function (e) { sendConsoleText('ERROR: ' + JSON.stringify(e)); });
@@ -621,7 +621,6 @@ function createMeshCore(agent) {
621
s.tcprelay.peerindex = this.index;
622
} if (this.udpport != null) {
623
// This is a UDP relay connection, get the UDP socket setup. // TODO: ***************
624
- sendConsoleText('UDP relay connection');
624
s.data = onUdpRelayServerTunnelData;
625
s.udprelay = require('dgram').createSocket({ type: 'udp4' });
626
s.udprelay.bind({ port: 0 });
@@ -638,10 +637,8 @@ function createMeshCore(agent) {
637
638
// Called when UDP relay data is received // TODO****
639
function onUdpRelayTargetTunnelConnect(data) {
641
- // TODO!!!
642
- sendConsoleText('onUdpRelayTargetTunnelConnect: ' + data);
640
var peerTunnel = tunnels[this.peerindex];
644
- peerTunnel.send(data);
641
+ peerTunnel.s.write(data);
642
}
643
644
// Called when we get data from the server for a TCP relay (We have to skip the first received 'c' and pipe the rest)
package.json
+1
-1
@@ -1,6 +1,6 @@
1
{
2
"name": "meshcentral",
3
- "version": "0.3.3-t",
3
+ "version": "0.3.3-u",
4
"keywords": [
5
"Remote Management",
6
"Intel AMT",