{"id":17399228,"url":"https://github.com/feross/chrome-dns","last_synced_at":"2025-09-13T01:32:17.967Z","repository":{"id":57198411,"uuid":"201558513","full_name":"feross/chrome-dns","owner":"feross","description":"Use the Node `dns` API in Chrome Apps","archived":false,"fork":false,"pushed_at":"2019-08-10T00:48:14.000Z","size":10,"stargazers_count":33,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-03T02:53:02.882Z","etag":null,"topics":["chrome-apps","chrome-dns","chrome-extension","dns","javascript","nodejs"],"latest_commit_sha":null,"homepage":"https://webtorrent.io","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/feross.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-10T00:33:16.000Z","updated_at":"2023-07-23T20:10:05.000Z","dependencies_parsed_at":"2022-09-16T13:10:43.619Z","dependency_job_id":null,"html_url":"https://github.com/feross/chrome-dns","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fchrome-dns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fchrome-dns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fchrome-dns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fchrome-dns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feross","download_url":"https://codeload.github.com/feross/chrome-dns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232806955,"owners_count":18579340,"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":["chrome-apps","chrome-dns","chrome-extension","dns","javascript","nodejs"],"created_at":"2024-10-16T15:13:34.894Z","updated_at":"2025-01-07T01:13:14.585Z","avatar_url":"https://github.com/feross.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chrome-dns [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]\n\n[travis-image]: https://img.shields.io/travis/feross/chrome-dns/master.svg\n[travis-url]: https://travis-ci.org/feross/chrome-dns\n[npm-image]: https://img.shields.io/npm/v/chrome-dns.svg\n[npm-url]: https://npmjs.org/package/chrome-dns\n[downloads-image]: https://img.shields.io/npm/dm/chrome-dns.svg\n[downloads-url]: https://npmjs.org/package/chrome-dns\n[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg\n[standard-url]: https://standardjs.com\n\n### Use the Node `dns` API in Chrome Apps\n\nThis module lets you use the Node.js [dns](https://nodejs.org/api/dns.html) API in [Chrome Packaged Apps](https://developer.chrome.com/apps/about_apps.html).\n\nThe chrome.dns API for Chrome Apps is not documented, but it still available. You need the \"dns\" permission in your manifest. As of August 2019, it appears that the API is only available if you use Chrome Dev channel or Canary channel.\n\nInstead of learning the quirks of Chrome's `chrome.dns` API for networking in Chrome Apps just **use the higher-level node API you're familiar with**. Then, compile your code with [browserify](https://github.com/substack/node-browserify) and you're all set!\n\nThis module is used by the Chrome App build of [webtorrent](https://github.com/feross/webtorrent), which is used in [Brave Browser](https://brave.com).\n\n## install\n\n```\nnpm install chrome-dns\n```\n\n## methods\n\nUse node's `dns` API. Example:\n\n```js\nvar dns = require('chrome-dns')\n\ndns.lookup('feross.org', (err, address, family) =\u003e {\n  if (err) {\n    console.error(err)\n    return\n  }\n\n  console.org(`feross.org has the IPv${family} address of ${address}`)\n})\n```\n\nSee nodejs.org for full API documentation: [dns](https://nodejs.org/api/dns.html)\n\n## contribute\n\nTo run tests, use `npm test \u0026\u0026 npm run test-browser`. The tests will run TCP and\nUDP servers and launch a few different Chrome Packaged Apps with browserified\nclient code. The tests currently require Chrome Canary.\n\n## license\n\nMIT. Copyright (c) [Feross Aboukhadijeh](https://feross.org)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeross%2Fchrome-dns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeross%2Fchrome-dns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeross%2Fchrome-dns/lists"}