Skip to content

Commit 10d4d6b

Browse files
removed duplicated flags passing bug
1 parent 40b5575 commit 10d4d6b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/main/java/com/lambdatest/tunnel/Tunnel.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*/
2727
public class Tunnel {
2828

29-
private static final List<String> IGNORE_KEYS = Arrays.asList("user", "key", "infoAPIPort", "binarypath", "load-balanced", "mitm");
29+
private static final List<String> IGNORE_KEYS = Arrays.asList("user", "key", "infoAPIPort", "binarypath", "load-balanced", "mitm", "pacfile", "mTLSHosts", "clientKey", "clientCert", "allowHosts", "verbose");
3030

3131
private boolean tunnelFlag = false;
3232

@@ -87,6 +87,7 @@ public Tunnel() throws TunnelException {
8787
parameters.put("clientKey","--clientKey");
8888
parameters.put("clientCert","--clientCert");
8989
parameters.put("allowHosts","--allowHosts");
90+
parameters.put("verbose","--verbose");
9091
}
9192

9293
/**
@@ -244,22 +245,31 @@ public String passParametersToTunnel(Map<String, String> options) {
244245

245246
if(options.get("pacfile") != "" && options.get("pacfile") !=null ) {
246247
command += " --pacfile ";
248+
command += options.get("pacfile");
247249
}
248250

249251
if(options.get("mTLSHosts") != "" && options.get("mTLSHosts") !=null ) {
250252
command += " --mTLSHosts ";
253+
command += options.get("mTLSHosts");
251254
}
252255

253256
if(options.get("clientKey") != "" && options.get("clientKey") !=null ) {
254257
command += " --clientKey ";
258+
command += options.get("clientKey");
255259
}
256260

257261
if(options.get("clientCert") != "" && options.get("clientCert") !=null ) {
258262
command += " --clientCert ";
263+
command += options.get("clientCert");
259264
}
260265

261266
if(options.get("allowHosts") != "" && options.get("allowHosts") !=null ) {
262267
command += " --allowHosts ";
268+
command += options.get("allowHosts");
269+
}
270+
271+
if(options.get("verbose") != "" && options.get("verbose") !=null ) {
272+
command += " --verbose ";
263273
}
264274

265275
if(t1.port!=null) {

0 commit comments

Comments
 (0)