Skip to content

Commit

Permalink
Merge pull request #7 from LambdaTest/feature/latestV3
Browse files Browse the repository at this point in the history
Feature/latest v3
  • Loading branch information
Kanhaiya Lal Singh authored Nov 3, 2020
2 parents 0e1eb46 + 1a13ca2 commit e1660e6
Show file tree
Hide file tree
Showing 9 changed files with 271 additions and 86 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ node_js:
- "8"
- "10"
- "12"
- "14"
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,13 @@ tunnelArguments = {
logFile: '/lambdatest/logs.txt'
};
```
- egressOnly: Uses proxy settings only for outbound requests.
- ingressOnly: Uses proxy settings only for inbound requests.
- dns: Comma separated list of dns servers
- sshConnType: Specify type of ssh connection (over_22, over_443, over_ws)
- mode: Specifies in which mode tunnel should run [ssh,ws]
- nows: Force tunnel to run in non websocket mode
- mitm: MITM mode, used for testing websites with private certificates

## Contribute

Expand Down
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ declare module "@lambdatest/node-tunnel" {
class Tunnel {
start(options: Partial<Options>, callback: (error?: Error) => void): void;
isRunning(): boolean;
stop(callback: () => void): void;
stop(callback: (error?: Error, status: boolean) => void): Promise<void>;
}
}

142 changes: 142 additions & 0 deletions lib/cfg/node-tunnel-config-v3-latest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
{
"binaryLinks": {
"mac": {
"v2": {
"32bit": {
"httpPath": "https://downloads.lambdatest.com/tunnel/mac/32bit/ltcomponent.zip",
"binaryName": "ltcomponent.zip",
"hash": "f802ce3166bb25c1a7508d530d514b19"
},
"64bit": {
"httpPath": "https://downloads.lambdatest.com/tunnel/mac/64bit/ltcomponent.zip",
"binaryName": "ltcomponent.zip",
"hash": "50508831995353deb4983d11ff4b0861"
}
},
"v3": {
"32bit": {
"httpPath": "https://downloads.lambdatest.com/tunnel/v3/mac/32bit/LT_Mac.zip",
"binaryName": "LT_Mac.zip",
"hash": "5fdb3e99e8c20fa9de64c73a3d68bac3"
},
"64bit": {
"httpPath": "https://downloads.lambdatest.com/tunnel/v3/mac/64bit/LT_Mac.zip",
"binaryName": "LT_Mac.zip",
"hash": "8bb2c01ca2eef94764523a7c40e72a39"
}
}
},
"win": {
"v2": {
"32bit": {
"httpPath": "https://downloads.lambdatest.com/tunnel/windows/32bit/ltcomponent.zip",
"binaryName": "ltcomponent.zip",
"hash": "a8eb108eb6fc60178ae28196242a17ff"
},
"64bit": {
"httpPath": "https://downloads.lambdatest.com/tunnel/windows/64bit/ltcomponent.zip",
"binaryName": "ltcomponent.zip",
"hash": "69f59ccd89aae6adeccf69a8a829bdea"
}
},
"v3": {
"32bit": {
"httpPath": "https://downloads.lambdatest.com/tunnel/v3/windows/32bit/LT_Windows.zip",
"binaryName": "LT_Windows.zip",
"hash": "251cedbb4aeaf4f65d0e772073327832"
},
"64bit": {
"httpPath": "https://downloads.lambdatest.com/tunnel/v3/windows/64bit/LT_Windows.zip",
"binaryName": "LT_Windows.zip",
"hash": "815260a1d983e79f2a35a732ab178c28"
}
}
},
"linux": {
"v2": {
"32bit": {
"httpPath": "https://downloads.lambdatest.com/tunnel/linux/32bit/ltcomponent.zip",
"binaryName": "ltcomponent.zip",
"hash": "f3eae3b5b32918e6ab53b694965fbdd2"
},
"64bit": {
"httpPath": "https://downloads.lambdatest.com/tunnel/linux/64bit/ltcomponent.zip",
"binaryName": "ltcomponent.zip",
"hash": "107d7d5020d181923fe2f207c2ec76cb"
}
},
"v3": {
"32bit": {
"httpPath": "https://downloads.lambdatest.com/tunnel/v3/linux/32bit/LT_Linux.zip",
"binaryName": "LT_Linux.zip",
"hash": "dfed824375d2e4326034ba8720fb88fd"
},
"64bit": {
"httpPath": "https://downloads.lambdatest.com/tunnel/v3/linux/64bit/LT_Linux.zip",
"binaryName": "LT_Linux.zip",
"hash": "7ce7a92c80e5968bbc81e610ad12ed04"
}
}
},
"freebsd": {
"v2": {
"32bit": {
"httpPath": "https://downloads.lambdatest.com/tunnel/freebsd/32bit/ltcomponent.zip",
"binaryName": "ltcomponent.zip",
"hash": "874da2557a6e7d4ee047830092b36f10"
},
"64bit": {
"httpPath": "https://downloads.lambdatest.com/tunnel/freebsd/64bit/ltcomponent.zip",
"binaryName": "ltcomponent.zip",
"hash": "cd6d2cdca428fa38c94922b9853afe06"
}
},
"v3": {
"32bit": {
"httpPath": "https://downloads.lambdatest.com/tunnel/v3/freebsd/32bit/LT_Freebsd.zip",
"binaryName": "LT_Freebsd.zip",
"hash": "03389252446fa9c10afd3784cc8c550e"
},
"64bit": {
"httpPath": "https://downloads.lambdatest.com/tunnel/v3/freebsd/64bit/LT_Freebsd.zip",
"binaryName": "LT_Freebsd.zip",
"hash": "36b42ef31100b8602596ad2eb8b9d0be"
}
}
}
},
"AuthUrl": "https://accounts.lambdatest.com/api/user/token/auth",
"logEnable": true,
"latest": "3.0.0",
"supportedVersions": [
"1.0.0",
"1.0.1",
"1.0.2",
"1.0.3",
"1.0.4",
"1.0.5",
"1.0.6",
"1.0.7",
"1.0.8",
"1.0.9",
"1.1.0",
"1.1.1",
"1.1.2",
"1.1.3",
"1.1.4",
"2.0.0",
"2.0.1",
"2.0.2",
"3.0.0-beta.1",
"3.0.0",
"3.0.1",
"3.0.2",
"3.0.3",
"3.0.4",
"3.0.5",
"3.0.6",
"3.0.7",
"3.0.8",
"3.0.9"
]
}
1 change: 0 additions & 1 deletion lib/conf/node-tunnel-config.json

This file was deleted.

7 changes: 2 additions & 5 deletions lib/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var httpTunnelConfigPath =
'https://s3.amazonaws.com/downloads.lambdatest.com/tunnel/node-tunnel-config.json',
var httpTunnelConfigPath = 'https://downloads.lambdatest.com/tunnel/node-tunnel-config-v3-latest.json',
httpTunnelLogUrl = 'https://oinwgsy681.execute-api.us-east-1.amazonaws.com/prod/addLog',
https = require('https'),
urlParse = require('url'),
Expand Down Expand Up @@ -82,9 +81,7 @@ function setupLogger_(options, jsonResponse) {
reqOptions.agent = new HttpsProxyAgent(proxyOpts);
}
var req = https.request(reqOptions, res => {
res.on('data', d => {
process.stdout.write(d);
});
res.on('data', _ => {});
});

req.on('error', _ => {});
Expand Down
Loading

0 comments on commit e1660e6

Please sign in to comment.