diff --git a/pom.xml b/pom.xml index 51e94f7..3b0138c 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.github.lambdatest lambdatest-tunnel-binary jar - 1.0.11 + 1.0.12 lambdatest-maven-tunnel LambdaTest tunnel binary in Java https://www.lambdatest.com diff --git a/src/main/java/com/lambdatest/tunnel/Tunnel.java b/src/main/java/com/lambdatest/tunnel/Tunnel.java index b5e5d17..8cefb42 100644 --- a/src/main/java/com/lambdatest/tunnel/Tunnel.java +++ b/src/main/java/com/lambdatest/tunnel/Tunnel.java @@ -26,7 +26,7 @@ */ public class Tunnel { - private static final List IGNORE_KEYS = Arrays.asList("user", "key", "infoAPIPort", "binarypath", "load-balanced", "mitm"); + private static final List IGNORE_KEYS = Arrays.asList("user", "key", "infoAPIPort", "binarypath", "load-balanced", "mitm", "pacfile", "mTLSHosts", "clientKey", "clientCert", "allowHosts", "verbose"); private boolean tunnelFlag = false; @@ -82,6 +82,12 @@ public Tunnel() throws TunnelException { parameters.put("basicAuth", "--basic-auth"); parameters.put("mitm", "--mitm"); parameters.put("skip-upgrade", "--skip-upgrade"); + parameters.put("pacfile","--pacfile"); + parameters.put("mTLSHosts","--mTLSHosts"); + parameters.put("clientKey","--clientKey"); + parameters.put("clientCert","--clientCert"); + parameters.put("allowHosts","--allowHosts"); + parameters.put("verbose","--verbose"); } /** @@ -237,6 +243,35 @@ public String passParametersToTunnel(Map options) { command += " --mitm "; } + if(options.get("pacfile") != "" && options.get("pacfile") !=null ) { + command += " --pacfile "; + command += options.get("pacfile"); + } + + if(options.get("mTLSHosts") != "" && options.get("mTLSHosts") !=null ) { + command += " --mTLSHosts "; + command += options.get("mTLSHosts"); + } + + if(options.get("clientKey") != "" && options.get("clientKey") !=null ) { + command += " --clientKey "; + command += options.get("clientKey"); + } + + if(options.get("clientCert") != "" && options.get("clientCert") !=null ) { + command += " --clientCert "; + command += options.get("clientCert"); + } + + if(options.get("allowHosts") != "" && options.get("allowHosts") !=null ) { + command += " --allowHosts "; + command += options.get("allowHosts"); + } + + if(options.get("verbose") != "" && options.get("verbose") !=null ) { + command += " --verbose "; + } + if(t1.port!=null) { command += " --callbackURL http://127.0.0.1:" + String.valueOf(t1.port); }