mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-02-20 09:26:37 +00:00
Add api for starting msp tunnel end points
This commit is contained in:
parent
5f9ffefcfc
commit
bcc4d8ce60
@ -21,6 +21,7 @@
|
||||
package org.servalproject.servaldna;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
@ -640,4 +641,16 @@ public class ServalDCommand
|
||||
sender.toHex(), recipient.toHex(),
|
||||
"" + offset);
|
||||
}
|
||||
|
||||
public static Process mspTunnnelCreate(String exec, int ip_port, int msp_port) throws IOException {
|
||||
return new ProcessBuilder(exec, "msp", "connect", "--forward="+ip_port, Integer.toString(msp_port)).start();
|
||||
}
|
||||
|
||||
public static Process mspTunnnelCreate(String exec, int ip_port, String serviceName, int msp_port) throws IOException {
|
||||
return new ProcessBuilder(exec, "msp", "connect", "--forward="+ip_port, "--service="+serviceName, Integer.toString(msp_port)).start();
|
||||
}
|
||||
|
||||
public static Process mspTunnelConnect(String exec, int ip_port, SubscriberId msp_sid, int msp_port) throws IOException {
|
||||
return new ProcessBuilder(exec, "msp", "connect", "--forward="+ip_port, msp_sid.toHex(), Integer.toString(msp_port)).start();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user