Skip to content

feat: coder connect integration #482

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 14 commits into from
Prev Previous commit
Next Next commit
fixup
  • Loading branch information
ethanndickson committed Apr 17, 2025
commit 9252fff15c48b36ec24846b16956564f0d2cf5ea
2 changes: 2 additions & 0 deletions src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,8 @@ async function maybeCoderConnectAddr(
const coderConnectHostname = `${agent}.${workspace}.${owner}.${hostnameSuffix}`
try {
const res = await promisify(lookup)(coderConnectHostname)
// Captive DNS portals may return an unrelated address, so we check it's
// within the Coder Service Prefix.
return res.family === 6 && ipRangeCheck(res.address, "fd60:627a:a42b::/48") ? coderConnectHostname : undefined
} catch {
return undefined
Expand Down