{"id":32122196,"url":"https://github.com/rmw-deno-lib/upnp","last_synced_at":"2026-02-21T03:02:00.900Z","repository":{"id":62422100,"uuid":"364865813","full_name":"rmw-deno-lib/upnp","owner":"rmw-deno-lib","description":"upnp port mapping for deno","archived":false,"fork":false,"pushed_at":"2021-05-08T03:09:06.000Z","size":65,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-27T21:37:06.820Z","etag":null,"topics":["deno","upnp"],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rmw-deno-lib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-06T10:05:25.000Z","updated_at":"2021-05-08T03:09:08.000Z","dependencies_parsed_at":"2022-11-01T17:45:46.313Z","dependency_job_id":null,"html_url":"https://github.com/rmw-deno-lib/upnp","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/rmw-deno-lib/upnp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmw-deno-lib%2Fupnp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmw-deno-lib%2Fupnp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmw-deno-lib%2Fupnp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmw-deno-lib%2Fupnp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rmw-deno-lib","download_url":"https://codeload.github.com/rmw-deno-lib/upnp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmw-deno-lib%2Fupnp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29672256,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T00:11:43.526Z","status":"online","status_checked_at":"2026-02-21T02:00:07.432Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["deno","upnp"],"created_at":"2025-10-20T20:29:26.856Z","updated_at":"2026-02-21T03:02:00.895Z","avatar_url":"https://github.com/rmw-deno-lib.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- 本文件由 ./readme.make.md 自动生成，请不要直接修改此文件 --\u003e\n\n# upnp\n\nupnp port mapping for deno\n\n## import or export\n\n```\nimport Upnp from 'https://deno.land/x/rmw_upnp@0.0.12/lib/index.js'\n```\n\nor export in your `deps.js`\n\n```\nexport {default as Upnp} from 'https://deno.land/x/rmw_upnp@0.0.12/lib/index.js'\n```\n\n## use\n\nsee [src/index_test.coffee](./src/index_test.coffee) or [lib/index_test.js](./lib/index_test.js)  for example\n\ncoffeescript version\n\n```coffee\nimport Upnp from './index.js'\n\ndo =\u003e\n  upnp = await Upnp()\n  if not upnp\n    console.log \"UPNP not available\"\n    return\n\n  # mapPort(protocol,internal,external,duration=0,description=\"\") -\u003e local ip\n  console.log await upnp.mapPort(\n    \"UDP\",8080,8080,0,\"upnp test\"\n  )\n  for await i from upnp.map()\n    console.log i\n\n```\n\n\njavascript version\n\n```javascript\n// Generated by CoffeeScript 2.5.1\nimport Upnp from './index.js';\n\n(async() =\u003e {\n  var i, ref, results, upnp;\n  upnp = (await Upnp());\n  if (!upnp) {\n    console.log(\"UPNP not available\");\n    return;\n  }\n  // mapPort(protocol,internal,external,duration=0,description=\"\") -\u003e local ip\n  console.log((await upnp.mapPort(\"UDP\", 8080, 8080, 0, \"upnp test\")));\n  ref = upnp.map();\n  results = [];\n  for await (i of ref) {\n    results.push(console.log(i));\n  }\n  return results;\n})();\n\n//# sourceMappingURL=index_test.js.map\n\n```\n\noutput like below\n\n```javascript\n[\n  {\n    NewPortMappingDescription: \"upnp test\",\n    NewProtocol: \"UDP\",\n    NewInternalClient: \"172.16.0.15\",\n    NewRemoteHost: \"\",\n    NewInternalPort: 8080,\n    NewExternalPort: 8080,\n    NewEnabled: 1,\n    NewLeaseDuration: 0\n  }\n]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmw-deno-lib%2Fupnp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frmw-deno-lib%2Fupnp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmw-deno-lib%2Fupnp/lists"}