Skip to content

Commit af9e2cb

Browse files
added missing flags
1 parent 9399aa3 commit af9e2cb

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<groupId>com.github.lambdatest</groupId>
66
<artifactId>lambdatest-tunnel-binary</artifactId>
77
<packaging>jar</packaging>
8-
<version>1.0.11</version>
8+
<version>1.0.12</version>
99
<name>lambdatest-maven-tunnel</name>
1010
<description>LambdaTest tunnel binary in Java</description>
1111
<url>https://www.lambdatest.com</url>

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

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ public Tunnel() throws TunnelException {
8282
parameters.put("basicAuth", "--basic-auth");
8383
parameters.put("mitm", "--mitm");
8484
parameters.put("skip-upgrade", "--skip-upgrade");
85+
parameters.put("pacfile","--pacfile");
86+
parameters.put("mTLSHosts","--mTLSHosts");
87+
parameters.put("clientKey","--clientKey");
88+
parameters.put("clientCert","--clientCert");
89+
parameters.put("allowHosts","--allowHosts");
8590
}
8691

8792
/**
@@ -236,6 +241,31 @@ public String passParametersToTunnel(Map<String, String> options) {
236241
if(options.get("mitm") != "" && options.get("mitm") !=null ) {
237242
command += " --mitm ";
238243
}
244+
parameters.put("pacfile","--pacfile");
245+
parameters.put("mTLSHosts","--mTLSHosts");
246+
parameters.put("clientKey","--clientKey");
247+
parameters.put("clientCert","--clientCert");
248+
parameters.put("allowHosts","--allowHosts");
249+
250+
if(options.get("pacfile") != "" && options.get("pacfile") !=null ) {
251+
command += " --pacfile ";
252+
}
253+
254+
if(options.get("mTLSHosts") != "" && options.get("mTLSHosts") !=null ) {
255+
command += " --mTLSHosts ";
256+
}
257+
258+
if(options.get("clientKey") != "" && options.get("clientKey") !=null ) {
259+
command += " --clientKey ";
260+
}
261+
262+
if(options.get("clientCert") != "" && options.get("clientCert") !=null ) {
263+
command += " --clientCert ";
264+
}
265+
266+
if(options.get("allowHosts") != "" && options.get("allowHosts") !=null ) {
267+
command += " --allowHosts ";
268+
}
239269

240270
if(t1.port!=null) {
241271
command += " --callbackURL http://127.0.0.1:" + String.valueOf(t1.port);

0 commit comments

Comments
 (0)