{"id":13826100,"url":"https://github.com/testingbot/testingbot-tunnel","last_synced_at":"2026-01-23T13:49:45.406Z","repository":{"id":2926589,"uuid":"3937627","full_name":"testingbot/Testingbot-Tunnel","owner":"testingbot","description":"TestingBot tunnel allows you to run tests against local or staging websites, from cloud-based browsers \u0026 devices on TestingBot.","archived":false,"fork":false,"pushed_at":"2025-01-03T19:17:13.000Z","size":3126,"stargazers_count":16,"open_issues_count":1,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-02T07:08:44.775Z","etag":null,"topics":["proxy","selenium","tunnel","vpn","webdriver"],"latest_commit_sha":null,"homepage":"https://testingbot.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/testingbot.png","metadata":{"files":{"readme":"README.markdown","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-04-05T08:18:44.000Z","updated_at":"2025-03-29T21:28:58.000Z","dependencies_parsed_at":"2024-04-24T07:45:07.746Z","dependency_job_id":"d6c8d5ad-c8e4-4c8a-af28-836a2f0e0ae3","html_url":"https://github.com/testingbot/Testingbot-Tunnel","commit_stats":null,"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testingbot%2FTestingbot-Tunnel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testingbot%2FTestingbot-Tunnel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testingbot%2FTestingbot-Tunnel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testingbot%2FTestingbot-Tunnel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/testingbot","download_url":"https://codeload.github.com/testingbot/Testingbot-Tunnel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247999860,"owners_count":21031046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["proxy","selenium","tunnel","vpn","webdriver"],"created_at":"2024-08-04T09:01:32.096Z","updated_at":"2026-01-23T13:49:45.392Z","avatar_url":"https://github.com/testingbot.png","language":"Java","funding_links":[],"categories":["\u003ca id=\"01e6651181d405ecdcd92a452989e7e0\"\u003e\u003c/a\u003e工具"],"sub_categories":["\u003ca id=\"9d6789f22a280f5bb6491d1353b02384\"\u003e\u003c/a\u003e隧道\u0026\u0026穿透"],"readme":"# TestingBot Tunnel\n\nThis is a Java-based application to test websites on your local computer or staging environment with the TestingBot.com browser cloud.\nA secure connection is established between your machine and the TestingBot.com cloud.\nYou can find more information on https://testingbot.com/support/tunnel\n\nAbout\n-------\n\nWhether you want to test on your local computer (localhost), on a staging server inside your LAN, or on a computer across VPN, TestingBot Tunnel makes all of this possible in a secure and reliable way.\n\nYou will no longer need to open up ports on your firewall or whitelist our IP range to run tests on your staging environment.\nBelow are some of the features of the TestingBot Tunnel:\n\n* Fast: at TestingBot's end of the tunnel we keep a cache of static content, to reduce traffic inside the tunnel.\n* Secure: based on an SSH Tunnel.\n* Robust: full HTTP(S) support, coded in Java\n* Easy to set up and use, supported on all operating systems.\n\nPrerequisites\n-------\n\nThis version of the tunnel requires Java 11 or higher.\n\n- If you need Java 8, you can use TestingBot Tunnel 4.0(https://github.com/testingbot/Testingbot-Tunnel/tree/TestingBotTunnel-4.0).\n- If you'd like to run on Java \u003c 8, please use [TestingBot Tunnel 1.21](https://github.com/testingbot/Testingbot-Tunnel/tree/TestingBotTunnel-1.21) (no longer maintained)\n\n**NOTE:** If you use the containerized tunnel, Java is not needed. See below under the *Docker*-header.\n\nInstall\n-------\n\nTo start the tunnel, enter the following command:\n    `java -jar testingbot-tunnel.jar key secret`\n\nYou can obtain a free key and secret from https://testingbot.com/members/user/edit\n\n**Hint:** Instead of passing the key and secret to the command, you can have them as environment variables `${TESTINGBOT_KEY}` and `${TESTINGBOT_SECRET}`.\n\nOptions\n-------\n\nThe tunnel comes with various options:\n\n|Command|Description|\n|---------|-------------|\n|-a,--auth \u003chost:port:user:passwd\u003e|Performs Basic Authentication for specific hosts.|\n|-b,--nobump|Do not perform SSL bumping.|\n|-d,--debug|Enables debug messages. Will output request/response headers.|\n|-dns,--dns|Use a custom DNS server. For example: 8.8.8.8|\n|--doctor|Perform sanity/health checks to detect possible misconfiguration or problems.|\n|--extra-headers \u003cJSON Map with Header Key and Value\u003e|Inject extra headers in the requests the tunnel makes.|\n|-f,--readyfile \u003cFILE\u003e|This file will be touched when the tunnel is ready for usage|\n|-F,--fast-fail-regexps \u003cOPTIONS\u003e|Specify domains you don't want to proxy, comma separated.|\n|-h,--help|Displays help text|\n|-i,--tunnel-identifier \u003cid\u003e|Add an identifier to this tunnel connection. In case of multiple tunnels, specify this identifier in your desired capabilities to use this specific tunnel.|\n|-j,--localproxy \u003cport\u003e|The port to launch the local proxy on (default 8087).|\n|-l,--logfile \u003cFILE\u003e|Write logging to a file.|\n|--metrics-port \u003cport\u003e|Use the specified port to access metrics. Default port 8003|\n|-P,--se-port \u003cPORT\u003e|The local port your Selenium test should connect to. Default port is 4445|\n|-p,--hubport \u003cHUBPORT\u003e|Use this if you want to connect to port 80 on our hub instead of the default port 4444|\n|--pac \u003carg\u003e|Proxy autoconfiguration. Should be a http(s) URL|\n|-q,--nocache|Bypass our Caching Proxy running on our tunnel VM.|\n|-s,--shared|Share this tunnel among team members.|\n|-v,--version|Displays the current version of the Tunnel|\n|-w,--web \u003cdirectory\u003e|Point to a directory for testing. Creates a local webserver.|\n|-x,--noproxy|Do not start a local proxy (requires user provided proxy server on port 8087)|\n|-Y,--proxy \u003cPROXYHOST:PROXYPORT\u003e|Specify an upstream proxy.|\n|-z,--proxy-userpwd \u003cuser:pwd\u003e|Username and password required to access the proxy configured with --proxy.|\n\n\nExample\n-------\nTo use the tunnel, simply start it:\n\n```\n$ java -jar testingbot-tunnel.jar \u003ckey\u003e \u003csecret\u003e\n```\n\nNow point your tests to use the tunnel's IP (localhost if the .jar is running on your local computer) and port 4445\n\n### Ruby\n\n```ruby\nrequire \"selenium-webdriver\"\n\noptions = Selenium::WebDriver::Chrome::Options.new\noptions.add_argument(\"--start-maximized\")\n\ncaps = Selenium::WebDriver::Remote::Capabilities.new(\n  browser_name: \"chrome\",\n  browser_version: \"latest\",\n  platform_name: \"WIN10\"\n)\n\nurlhub = \"http://key:secret@localhost:4445/wd/hub\"\nclient = Selenium::WebDriver::Remote::Http::Default.new\nclient.read_timeout = 120\n\ndriver = Selenium::WebDriver.for :remote,\n  url: urlhub,\n  capabilities: [caps, options],\n  http_client: client\n\ndriver.navigate.to \"http://staging.local\"\nputs driver.title\ndriver.quit\n```\n\n### Python\n\n```python\nfrom selenium import webdriver\nfrom selenium.webdriver.chrome.options import Options\n\noptions = Options()\noptions.browser_version = \"latest\"\noptions.platform_name = \"WIN10\"\n\ndriver = webdriver.Remote(\n    command_executor=\"http://key:secret@localhost:4445/wd/hub\",\n    options=options\n)\n\ndriver.get(\"http://staging.local\")\nprint(driver.title)\ndriver.quit()\n```\n\n### Java\n\n```java\nimport org.openqa.selenium.WebDriver;\nimport org.openqa.selenium.chrome.ChromeOptions;\nimport org.openqa.selenium.remote.RemoteWebDriver;\nimport java.net.URL;\n\npublic class TestingBotTest {\n    public static void main(String[] args) throws Exception {\n        ChromeOptions options = new ChromeOptions();\n        options.setPlatformName(\"WIN10\");\n        options.setBrowserVersion(\"latest\");\n\n        WebDriver driver = new RemoteWebDriver(\n            new URL(\"http://key:secret@localhost:4445/wd/hub\"),\n            options\n        );\n\n        driver.get(\"http://staging.local\");\n        System.out.println(driver.getTitle());\n        driver.quit();\n    }\n}\n```\n\n### JavaScript (Node.js)\n\n```javascript\nconst { Builder } = require('selenium-webdriver');\nconst chrome = require('selenium-webdriver/chrome');\n\n(async function example() {\n    const options = new chrome.Options();\n    options.setBrowserVersion('latest');\n    options.setPlatform('WIN10');\n\n    const driver = await new Builder()\n        .usingServer('http://key:secret@localhost:4445/wd/hub')\n        .forBrowser('chrome')\n        .setChromeOptions(options)\n        .build();\n\n    try {\n        await driver.get('http://staging.local');\n        console.log(await driver.getTitle());\n    } finally {\n        await driver.quit();\n    }\n})();\n```\n\n### C#\n\n```csharp\nusing OpenQA.Selenium;\nusing OpenQA.Selenium.Chrome;\nusing OpenQA.Selenium.Remote;\nusing System;\n\nclass TestingBotTest\n{\n    static void Main(string[] args)\n    {\n        var options = new ChromeOptions();\n        options.BrowserVersion = \"latest\";\n        options.PlatformName = \"WIN10\";\n\n        IWebDriver driver = new RemoteWebDriver(\n            new Uri(\"http://key:secret@localhost:4445/wd/hub\"),\n            options\n        );\n\n        driver.Navigate().GoToUrl(\"http://staging.local\");\n        Console.WriteLine(driver.Title);\n        driver.Quit();\n    }\n}\n```\n\nNode\n-------\nWe have created a NodeJS based launcher which you can use in your NodeJS tests and projects:\n[testingbot-tunnel-launcher](https://github.com/testingbot/testingbot-tunnel-launcher)\n\nMore documentation about this tunnel is available on https://testingbot.com/support/other/tunnel\n\nDocker\n------\nFor those who don't want to deal with Java, we also provide a containerized version of the tunnel.\n\nTo start the tunnel, run:\n```\n$ docker run -p 4445:4445 testingbot/tunnel:latest \u003ckey\u003e \u003csecret\u003e \u003coptions\u003e\n```\n\nAlternatively:\n```\n$ docker run -p 4445:4445 -e TESTINGBOT_KEY=\u003ckey\u003e -e TESTINGBOT_SECRET=\u003csecret\u003e testingbot/tunnel:latest \u003coptions\u003e\n```\n\nTo build the docker image, run:\n```\ndocker buildx build --platform linux/amd64,linux/arm64 \\\n  --no-cache \\\n  --push \\\n  -t testingbot/tunnel:4.1 \\\n  -t testingbot/tunnel:latest .\n```\n\nCompile from Source\n-------------------\n\nTo compile and test the Jar yourself you can use the following command:\n\n    mvn package\n\nCopyright\n---------\n\nCopyright (c) TestingBot.com\nSee the LICENSE for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestingbot%2Ftestingbot-tunnel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftestingbot%2Ftestingbot-tunnel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestingbot%2Ftestingbot-tunnel/lists"}