A python module to make using tunnels easy.
Note: this is pre-release software. If you encounter any problems, please reach out to CrossBrowserTesting
pip install sbsecuretunnel
from sbsecuretunnel.sb_securetunnel import SBTunnel
tunnel = SBTunnel(username="you@email.com", authkey="yourauthkey")
tunnel.start_tunnel()
...
tunnel.kill_tunnel()
- Automatically gets the correct tunnel for your platform
- Handles cleanly starting and stopping the tunnel connection
- Handles all features of the tunnel
The tunnel object is created with the following options:
username
("") - CBT usernameauthkey
("") - CBT authkeydelete_after
(False) - delete the tunnel binary after kill (note: on Windows, make sure backslashes are escaped\\
)tunnel_location
(".") - location to download tunnel binary toready_file
("ready.check") - ready file for tunnel clientkill_file
("kill.check") - kill file for tunnel client
These are all methods available on the tunnel object
bypass(bool)
- enable or disable bypassset_https_proxy(string)
- string should be the HTTPS proxyset_http_proxy(string)
- same as above for HTTPset_tunnel_name(string)
- set the name of the named tunnelset_pac_file(string)
- set the client to use the PAC file at path stringset_html_path(string)
- set the path to use for local HTML files to be servedset_proxy(host="string", port="string", username="string"/None, password="string/None)
- set proxy settingsset_accept_all_certs(bool)
- set whether to accept all certs in the tunnel client