mirror of
https://github.com/dkmstr/openuds.git
synced 2025-03-12 04:58:34 +03:00
* Updated nxtuntransport to work with new java 1.7 upgrade 21
* Removed render extension, so nx works fine with ubuntu 12.10
This commit is contained in:
parent
a90e7c0ae4
commit
804669824f
Binary file not shown.
@ -111,7 +111,7 @@ public class NxFile {
|
|||||||
" <option key=\"Session\" value=\"unix\" />\n" +
|
" <option key=\"Session\" value=\"unix\" />\n" +
|
||||||
" <option key=\"Desktop\" value=\"{DESKTOP}\" />\n" +
|
" <option key=\"Desktop\" value=\"{DESKTOP}\" />\n" +
|
||||||
" <option key=\"Use default image encoding\" value=\"1\" />\n" +
|
" <option key=\"Use default image encoding\" value=\"1\" />\n" +
|
||||||
" <option key=\"Use render\" value=\"true\" />\n" +
|
" <option key=\"Use render\" value=\"false\" />\n" +
|
||||||
" <option key=\"Use taint\" value=\"true\" />\n" +
|
" <option key=\"Use taint\" value=\"true\" />\n" +
|
||||||
" <option key=\"Virtual desktop\" value=\"false\" />\n" +
|
" <option key=\"Virtual desktop\" value=\"false\" />\n" +
|
||||||
" <option key=\"XAgent encoding\" value=\"true\" />\n" +
|
" <option key=\"XAgent encoding\" value=\"true\" />\n" +
|
||||||
|
@ -100,7 +100,7 @@ public class WindowsApplet implements OsApplet {
|
|||||||
{
|
{
|
||||||
String java = System.getProperty("java.home") + File.separator + "bin" + File.separator + "java.exe";
|
String java = System.getProperty("java.home") + File.separator + "bin" + File.separator + "java.exe";
|
||||||
String cmd = "\"" + java + "\" -jar " + jarFileName + " " + tunPort + " " + nxCmd;
|
String cmd = "\"" + java + "\" -jar " + jarFileName + " " + tunPort + " " + nxCmd;
|
||||||
ProcessBuilder pb = new ProcessBuilder( cmd );
|
ProcessBuilder pb = new ProcessBuilder( util.splitCommandLine(cmd ));
|
||||||
Map<String,String> env = pb.environment();
|
Map<String,String> env = pb.environment();
|
||||||
env.put("TPARAMS", params.get("tun"));
|
env.put("TPARAMS", params.get("tun"));
|
||||||
System.out.println("TPARAMS: " + params.get("tun"));
|
System.out.println("TPARAMS: " + params.get("tun"));
|
||||||
|
@ -6,6 +6,7 @@ import java.io.IOException;
|
|||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class util {
|
public class util {
|
||||||
|
|
||||||
@ -95,4 +96,35 @@ public class util {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static ArrayList<String> splitCommandLine(String cmd) {
|
||||||
|
boolean inQuotes = false;
|
||||||
|
ArrayList<String> res = new ArrayList<String>();
|
||||||
|
String tmp = "";
|
||||||
|
for( char c : cmd.toCharArray() ) {
|
||||||
|
if( c == '"' ) {
|
||||||
|
if( inQuotes ) {
|
||||||
|
res.add(tmp);
|
||||||
|
tmp = "";
|
||||||
|
inQuotes = false;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
inQuotes = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if( c == ' ' && inQuotes == false) {
|
||||||
|
if( tmp.length() > 0 ) {
|
||||||
|
res.add(tmp);
|
||||||
|
tmp = "";
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
tmp += c;
|
||||||
|
}
|
||||||
|
if( tmp.length() > 0 )
|
||||||
|
res.add(tmp);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user