{"id":19490604,"url":"https://github.com/sanjaysunil/ip-assignment","last_synced_at":"2026-05-13T08:31:18.718Z","repository":{"id":58207649,"uuid":"529240438","full_name":"SanjaySunil/ip-assignment","owner":"SanjaySunil","description":"Cross-platform dependency-free IP assignment npm module.","archived":false,"fork":false,"pushed_at":"2022-08-30T12:02:18.000Z","size":33,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T21:47:50.438Z","etag":null,"topics":["dhcp","interface","ip","ip-assign","ip-assignment","network","static"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/ip-assignment","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/SanjaySunil.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":"2022-08-26T12:01:28.000Z","updated_at":"2024-03-22T08:12:30.000Z","dependencies_parsed_at":"2022-08-30T23:31:28.172Z","dependency_job_id":null,"html_url":"https://github.com/SanjaySunil/ip-assignment","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SanjaySunil%2Fip-assignment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SanjaySunil%2Fip-assignment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SanjaySunil%2Fip-assignment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SanjaySunil%2Fip-assignment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SanjaySunil","download_url":"https://codeload.github.com/SanjaySunil/ip-assignment/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240738066,"owners_count":19849545,"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":["dhcp","interface","ip","ip-assign","ip-assignment","network","static"],"created_at":"2024-11-10T21:13:41.883Z","updated_at":"2026-05-13T08:31:18.686Z","avatar_url":"https://github.com/SanjaySunil.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- Header --\u003e\n\u003cbr/\u003e\u003cbr/\u003e\n\u003ch1 align=\"center\"\u003eip-assignment\u003c/h1\u003e\n  \u003cp align=\"center\"\u003e\n    Cross-platform dependency-free IP assignment module\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/SanjaySunil/ip-assignment/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/SanjaySunil/ip-assignment/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/h1\u003e\n\u003cbr/\u003e\u003cbr/\u003e\n\n\u003c!-- Description --\u003e\n## What's ip-assignment?\n\n[ip-assignment]() is a cross-platform dependency free ip-assignment module. With ip-assignment, you can easily configure network interfaces in your own projects.\n\n\u003c!-- Install --\u003e\n## Install\n```sh\n$ npm install ip-assignment\n```\n\n## Usage\n\n### [`examples/linux.js`](./examples/linux.js)\n\n```js\nconst interfaces = require(\"ip-assignment\");\n\n// This interface has a static IP\nconst eth0 = {\n  name: \"eth0\",\n  ip_address: \"192.168.1.98\",\n  subnet_mask: \"24\",\n  gateway: \"192.168.1.1\",\n  dns_server: \"8.8.8.8\",\n  alternate_dns_server: \"8.8.4.4\",\n};\n\n// This interface has a DHCP IP\nconst wlan0 = {\n  name: \"wlan0\",\n};\n\ninterfaces.set([eth0, wlan0]);\n```\n\n### [`examples/windows.js`](./examples/windows.js)\n\n```js\nconst interfaces = require(\"ip-assignment\");\n\n// This interface has a static IP\nconst Ethernet = {\n  name: \"Ethernet\",\n  ip_address: \"192.168.1.99\",\n  subnet_mask: \"255.255.255.0\",\n  gateway: \"192.168.1.1\",\n  dns_server: \"8.8.8.8\",\n  alternate_dns_server: \"8.8.4.4\",\n};\n\ninterfaces.set([Ethernet]);\n```\n\n\u003c!-- License --\u003e\n## License\n\nCopyright © 2022 Sanjay Sunil (sanjaysunil@protonmail.com)\n\nDistributed under the MIT License. See `LICENSE` for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanjaysunil%2Fip-assignment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanjaysunil%2Fip-assignment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanjaysunil%2Fip-assignment/lists"}