All Projects → crossbrowsertesting → Cbt Tunnel Nodejs

crossbrowsertesting / Cbt Tunnel Nodejs

Licence: mit
Node.js module for Local Connections to crossbrowsertesting.com

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Cbt Tunnel Nodejs

Selenium-Foundation
Selenium Foundation is an automation framework designed to extend and enhance the capabilities provided by Selenium (WebDriver).
Stars: ✭ 51 (+30.77%)
Mutual labels:  screenshot, selenium
Wdio Screenshot
A WebdriverIO plugin. Additional commands for taking screenshots with WebdriverIO.
Stars: ✭ 101 (+158.97%)
Mutual labels:  screenshot, selenium
Headless
Create a virtual X screen from Ruby, record videos and take screenshots.
Stars: ✭ 951 (+2338.46%)
Mutual labels:  screenshot, selenium
Singlefile
Web Extension for Firefox/Chrome/MS Edge and CLI tool to save a faithful copy of an entire web page in a single HTML file
Stars: ✭ 4,417 (+11225.64%)
Mutual labels:  screenshot, selenium
Svg Screenshot
リンクもまるごとキャプチャしてSVGで出力するChromeスクリーンショット拡張機能
Stars: ✭ 31 (-20.51%)
Mutual labels:  screenshot
Marionette client
Mozilla's Gecko Marionette client in golang
Stars: ✭ 21 (-46.15%)
Mutual labels:  selenium
Singlefilez
Web Extension for Firefox/Chrome/MS Edge and CLI tool to save a faithful copy of an entire web page in a self-extracting HTML/ZIP polyglot file
Stars: ✭ 882 (+2161.54%)
Mutual labels:  selenium
Crawl
selenium异步爬取网页图片
Stars: ✭ 13 (-66.67%)
Mutual labels:  selenium
Gowitness
🔍 gowitness - a golang, web screenshot utility using Chrome Headless
Stars: ✭ 996 (+2453.85%)
Mutual labels:  screenshot
Fileshare
Debian/Ubuntu applet for screenshots and images sharing using popular online services
Stars: ✭ 35 (-10.26%)
Mutual labels:  screenshot
Autocrawler
Google, Naver multiprocess image web crawler (Selenium)
Stars: ✭ 957 (+2353.85%)
Mutual labels:  selenium
Mac2imgur
⬆ A simple Mac app designed to make uploading images and screenshots to Imgur quick and effortless.
Stars: ✭ 914 (+2243.59%)
Mutual labels:  screenshot
Javaee7 Petclinic
Java EE 7 Petclinic
Stars: ✭ 31 (-20.51%)
Mutual labels:  selenium
Wdio Workshop
WebdriverIO Workshop
Stars: ✭ 20 (-48.72%)
Mutual labels:  selenium
Katalium
Stars: ✭ 36 (-7.69%)
Mutual labels:  selenium
Selenium Toys
Selenium Toys
Stars: ✭ 14 (-64.1%)
Mutual labels:  selenium
Botvid 19
Messenger Bot that scrapes for COVID-19 data and periodically updates subscribers via Facebook Messages. Created using Python/Flask, MYSQL, HTML, Heroku
Stars: ✭ 34 (-12.82%)
Mutual labels:  selenium
Appium Selenium Starter
Open source, complete and easy to use QA Automation platform
Stars: ✭ 30 (-23.08%)
Mutual labels:  selenium
Screeen
Observe user screen shot event in macOS.
Stars: ✭ 29 (-25.64%)
Mutual labels:  screenshot
Wd
Use WebDriver from the command line
Stars: ✭ 31 (-20.51%)
Mutual labels:  selenium

Local Connection with NodeJs

Creates a local connection (tunnel) to CrossBrowserTesting.com which allows you to test sites behind your firewall or to access web pages that are saved locally on your machine.

In just a few seconds, you can establish a connection which allows you to do live testing, screenshots, or run Selenium scripts against any of the internal sites you have access to.

This command line version uses WSS (secure websockets over https, port 443) to create the local connection. It can be scripted, so it is useful if you want to initiate a local connection programmatically before running automated javascript, screenshots, or selenium tests.

Install:
npm install -g cbt_tunnels
Scripted usage:
var cbt = require('cbt_tunnels');

There are three options provided for you to do this:

Internal websites:
This directs requests from CBT browsers to your computer to test sites behind your firewall
that would otherwise be inaccessible.

Basic usage: 
    Command line: 'cbt_tunnels --username USERNAME --authkey AUTHKEY'
    Scripted:   'cbt.start({"username":"USERNAME","authkey":"AUTHKEY"},function(err){ if(!err) do stuff })'
Local HTML Files:
This allows you to host static files on your computer that are not currently hosted on a server, 
as well as routing through your computer to access local or privileged sites.

Basic usage: 
    Command line: 'cbt_tunnels --username USERNAME --authkey AUTHKEY --dir PATHTODIRECTORY (optional: --port OPENPORT)'
    Scripted:   'cbt.start({"username":"USERNAME","authkey":"AUTHKEY","dir":"PATHTODIRECTORY", (optional: "port":"PORT") },function(err){ if(!err) do stuff })'
Proxy Server:
The tunnel still routes through your computer to download site data, but it further directs that 
connection through a proxy of your choosing. By default the CBT tunnel uses your local machine
to act as an HTTP proxy for web traffic from our remote browsers. Sometimes it is desirable
to use a remote proxy rather than your local machine. For example, if you wanted for it to
appear as though your traffic were coming from the United Kingdom, proxying through a server
there would allow for that.

Basic usage: 
    Command line: 'cbt_tunnels --username USERNAME --authkey AUTHKEY --proxyIp PROXYIP --proxyPort PROXYPORT'
    Scripted: 'cbt.start({"username":"USERNAME","authkey":"AUTHKEY","proxyIp":"PROXYIP","proxyPort":"PROXYPORT"},function(err){ if(!err) do stuff })'

Usage with basic authentication:
    Command line: 'cbt_tunnels --username USERNAME --authkey AUTHKEY --proxyIp PROXYIP --proxyPort PROXYPORT --proxyUser PROXYUSER --proxyPass PROXYPASS'
    Scripted: 'cbt.start({"username":"USERNAME","authkey":"AUTHKEY","proxyIp":"PROXYIP","proxyPort":"PROXYPORT","proxyUser:":"PROXYUSER","proxyPass":"PROXYPASS"},function(err){ if(!err) do stuff })'
PAC File:
In lieu of specifying a single proxy server, you may provide a proxy auto-config (PAC) file. 
Each request made through your local machine will follow the routing directives listed in 
the PAC. If the HTTP_PROXY or HTTPS_PROXY options listed below are employed, they will take
precedence in routing the connection from your local machine to CrossBrowserTesting. It does
not make sense to use the above Proxy Server option alongside the PAC file option, but in the 
case that you do, the Proxy Server option will take precedence. You may specify a path to a 
file or a URL.

Basic usage: 
    Command line: 'cbt_tunnels --username USERNAME --authkey AUTHKEY --pac URL/PATHTOFILE'
    Scripted: 'cbt.start({"username":"USERNAME","authkey":"AUTHKEY","pac":"URL/PATHTOFILE"},function(err){ if(!err) do stuff })'
Note:
All flags may also be set as environment variables beginning with CBT_TUNNELS.
e.g. Instead of typing --username, you may instead set the environment variable
CBT_TUNNELS_USERNAME to the desired username.
Further Options:
Tunnel name:
    There are some cases where multiple tunnels might be necessary, such as when working with multiple 
    development environments. In this case, we provide the option to name tunnels so that they may be 
    specifically selected for use in various tests: in the advanced settings in the UI, or by specifying
    the property "tunnel_name" in the JSON sent to the API.

    Command line: '--tunnelname TUNNELNAME'
    Scripted: 'cbt.start({"username":"USERNAME","authkey":"AUTHKEY","tunnelname":"TUNNELNAME"},function(err){ if(!err) do stuff })'

HTTP_PROXY:
    Some corporations use an HTTP proxy for all outbound web traffic. The CBT tunnel communicates via wss
    over port 443 to CrossBrowserTesting.com server to initiate a local connection. By default, it will
    try to connect directly to CrossBrowserTesting. If you have an HTTP proxy that it must route through, 
    use this option to do so. It works by temporarily setting the HTTP_PROXY environment variable, so may
    be redundant in cases wherein it is already set.

    Basic usage:
        Command line: '--httpProxy HTTPPROXY'
        Scripted: 'cbt.start({"username":"USERNAME","authkey":"AUTHKEY","httpProxy":"HTTPPROXY"},function(err){ if(!err) do stuff })'

    Usage with basic authentication:
        Command line: '--httpProxy PROXYUSER:[email protected]'
        Scripted: 'cbt.start({"username":"USERNAME","authkey":"AUTHKEY","httpProxy":"PROXYUSER:[email protected]"},function(err){ if(!err) do stuff })'

HTTPS_PROXY:
    Has the same functionality as HTTP_PROXY but sets the HTTPS_PROXY environment variable instead.

    Basic usage:
        Command line: '--httpsProxy HTTPSPROXY'
        Scripted: 'cbt.start({"username":"USERNAME","authkey":"AUTHKEY","httpsProxy":"HTTPSPROXY"},function(err){ if(!err) do stuff })'

    Usage with basic authentication:
        Command line: '--httpsProxy PROXYUSER:[email protected]'
        Scripted: 'cbt.start({"username":"USERNAME","authkey":"AUTHKEY","httpsProxy":"PROXYUSER:[email protected]"},function(err){ if(!err) do stuff })'

Bypass:
    Specify whether public-resolvable URLs should resolve direct (true behavior) or pass through
    the tunnel (default/false behavior).

    Basic Usage:
        Command line: '--bypass true' or '--bypass false'
        Scripted: 'cbt.start({"username":"USERNAME", "authkey":"AUTHKEY", "bypass": "false"}, function(err){if (!err) do stuff })'

Kill file:
    The kill file option allows you specify the name of a 'kill file' that if placed in the current 
    directory will cause the program to gracefully shutdown.

    Basic usage: 
        Command line: '--kill KILLFILENAME'
        Scripted: 'cbt.start({"username":"USERNAME","authkey":"AUTHKEY","kill":"KILLFILENAME"},function(err){ if(!err) do stuff })'

Ready file:
    When the tunnel is up-and-running, an empty file will be placed in the path specified by the user.

    Basic usage:
        Command line: '--ready READYFILENAME'
        Scripted: 'cbt.start({"username":"USERNAME","authkey":"AUTHKEY","ready":"READYFILENAME"},function(err){ if(!err) do stuff })'

Verbose mode:
    Specifying this flag enables verbose mode; you'll see most of the traffic handling.

    Basic usage:
        Command line: '--verbose'
        Scripted: 'cbt.start({"username":"USERNAME","authkey":"AUTHKEY","verbose":true},function(err){ if(!err) do stuff })'

Quiet mode:
    Specifying this flag disables most output.

    Basic usage:
        Command line: '--quiet'
        Scripted: 'cbt.start({"username":"USERNAME","authkey":"AUTHKEY","quiet":true},function(err){ if(!err) do stuff })'

Stop function:
    This function takes no parameters and kills the tunnel gracefully.

    Basic usage:
        Scripted: 'cbt.stop()'

Status function:
    This function takes no parameters and returns the status of the tunnel as a boolean
    (this is of limited use).

    Basic usage:
        Scripted: 'cbt.status()'

AcceptAllCerts:
   Set up the tunnel to work with sites with invalid (self-signed, expired) certificates.  
   Useful for testing sites that present with certificate errors in a browser.

    Basic usage:
        Command line: '--acceptAllCerts'
        Scripted: 'cbt.start({"username":"USERNAME","authkey":"AUTHKEY","acceptAllCerts":true},function(err){ if(!err) do stuff })'

RejectUnauthorized:
    Enable or disable SSL certificate checking in Node itself.  Useful if a self-signed certificate
    is in the chain (i.e., on a proxy), but only works in narrow cases.

    Basic usage:
        Command line: '--rejectUnauthorized false'
        Scripted: 'cbt.start({"username":"USERNAME","authkey":"AUTHKEY","rejectUnauthorized":"false"},function(err){ if(!err) do stuff })'
Building Binary From Source:
Binaries may be found at https://github.com/crossbrowsertesting/cbt-tunnel-nodejs/releases 
and are compiled using pkg. 

You may compile from source as follows:

Requirements:
node.js/npm
pkg

- npm install -g pkg
- git clone https://github.com/crossbrowsertesting/cbt-tunnel-nodejs.git
- navigate to cloned directory
- type 'pkg ./cmd_start.js --targets TARGETSTRING --output OUTPUTBINARYPATH'

(for target string information see: https://github.com/zeit/pkg)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].