8000 feat: Tether v1 — logged-in Chrome as HTTP proxy + WebDriver by adeelahmad · Pull Request #1 · adeelahmad/Tether · GitHub
[go: up one dir, main page]

Skip to content

feat: Tether v1 — logged-in Chrome as HTTP proxy + WebDriver - #1

Merged
adeelahmad merged 2 commits into
mainfrom
claude/tether-v1-cnb97e
Oct 11, 2026
Merged

adeelahmad merged 2 commits into
mainfrom
claude/tether-v1-cnb97e

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Before: an empty repository.

After: tether serve attaches to a real Chrome over CDP (or launches one with --launch) and exposes it as an HTTP/HTTPS forward proxy, a W3C WebDriver endpoint, and a small control API, all sharing one tab-session core. No extension.

How

  • internal/cdp: a thin CDP layer (go-rod's websocket client plus our own message types) with Browser/Tab interfaces, endpoint discovery (auto, port, ws://, DevToolsActivePort), and Launch.
  • internal/session: one session per tab. Requests resolve by X-Tether-Tab-ID, then the tether_tab cookie, then one tab per eTLD+1 (Public Suffix List). Includes idle reaping, explicit close, 410 tab_gone, and adopting existing tabs.
  • internal/core: Do handles requests. GET/HEAD navigate and return the rendered DOM, or raw bytes on request. Other methods run as a same-origin fetch() in the tab. Also has Eval via Runtime.evaluate, the Policy seam (--allow-domains), and header hygiene.
  • internal/proxy: HTTP plus CONNECT, with TLS interception by a local CA.
  • internal/webdriver: the common Selenium command set, documented in docs/WEBDRIVER.md.
  • Security: binds loopback by default and refuses a public bind unless --token or --insecure-allow-public is set. Supports bearer/basic auth, a loopback Host/Origin guard against DNS rebinding, and redacted logs.
  • internal/mcp and internal/remote are documented 501 stubs on the same core ("four faces on one core", see docs/ARCHITECTURE.md).
  • Sprint Zero: Makefile, golangci-lint v2, CI (lint → test + coverage, including a real headless Chrome → build matrix → govulncheck), CodeQL, Dependabot, GoReleaser (archives, checksums, multi-arch ghcr image, Homebrew cask), and community and legal docs.

Verified locally

  • Unit and integration tests pass with -race; coverage is 78% including the real-Chrome integration test.
  • golangci-lint reports 0 issues.
  • goreleaser check and a snapshot release both succeed.
  • I ran a real Selenium 4 script end to end against the WebDriver endpoint.
  • I ran the README quickstart commands verbatim against headless Chromium. github.com returned its sign-in page, as expected for a fresh profile. The logged-in flow is covered by a local login site in the integration test.

Notes

  • docs/demo.gif is rendered from real captured output. It is a stand-in for an asciinema recording.
  • The Homebrew tap needs a HOMEBREW_TAP_GITHUB_TOKEN secret and an adeelahmad/homebrew-tap repo. Without them the cask step is skipped.

🤖 Generated with Claude Code

https://claude.ai/code/session_01X9CEjRcHsJmgWdtz6ZTKsk


Generated by Claude Code

…point

Tether turns a real, already-logged-in Chrome into a network-accessible
browser over the Chrome DevTools Protocol. No extension, no cloud, one
static binary.

- Session core: one session per Chrome tab, resolved by X-Tether-Tab-ID
  header, then tether_tab cookie, then one default tab per registrable
  domain (Public Suffix List). Idle reaping, explicit close, 410 tab_gone
  for dead tabs, adoption of existing tabs.
- HTTP/HTTPS forward proxy: GET/HEAD navigate and return the rendered DOM
  (or raw bytes); other methods run as same-origin fetch() in the tab.
  HTTPS via a local CA. JavaScript evaluation via Runtime.evaluate.
- W3C WebDriver common command set on the same sessions.
- Security defaults: loopback bind, refuse public bind without a token,
  bearer/basic auth, loopback Host/Origin guard, domain allowlist policy
  seam, redacted logs.
- MCP and remote-UI faces stubbed on the shared core.
- Sprint Zero: Makefile, golangci-lint, CI, CodeQL, Dependabot,
  GoReleaser (archives, checksums, Docker, Homebrew), community docs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X9CEjRcHsJmgWdtz6ZTKsk
@adeelahmad adeelahmad self-assigned this Oct 10, 2026
@github-advanced-security
Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Comment thread internal/proxy/proxy.go Fixed
Comment thread internal/proxy/proxy.go Fixed
Comment thread internal/proxy/proxy.go Fixed
8000
Comment thread internal/proxy/proxy.go Fixed
Comment thread internal/server/server.go Fixed
Comment thread internal/session/session.go Fixed
Comment thread internal/session/session.go Fixed
Comment thread internal/webdriver/webdriver.go Fixed
Comment thread internal/webdriver/webdriver.go Fixed
Addresses CodeQL go/log-injection alerts: method, path, tab ID, domain,
session source and error text now pass through logx.Clean, and SafeURL
cleans its output.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X9CEjRcHsJmgWdtz6ZTKsk
@adeelahmad
adeelahmad marked this pull request as ready for review October 11, 2026 03:08
@adeelahmad
adeelahmad merged commit 9d5c350 into main Oct 11, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0