{"id":22962460,"url":"https://github.com/suign/netget","last_synced_at":"2025-04-02T03:28:09.436Z","repository":{"id":44006857,"uuid":"225311413","full_name":"suiGn/netget","owner":"suiGn","description":"netGet - The Right Adepto.","archived":false,"fork":false,"pushed_at":"2024-05-14T14:38:24.000Z","size":6263,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-14T16:08:47.692Z","etag":null,"topics":["gateways","networking","utils"],"latest_commit_sha":null,"homepage":"http://netget.me","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/suiGn.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-02T07:25:29.000Z","updated_at":"2024-05-27T20:52:25.889Z","dependencies_parsed_at":"2024-02-26T16:30:50.340Z","dependency_job_id":"c5fa4aa6-3896-4ac5-8584-30dc989e6ca0","html_url":"https://github.com/suiGn/netget","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suiGn%2Fnetget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suiGn%2Fnetget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suiGn%2Fnetget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suiGn%2Fnetget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suiGn","download_url":"https://codeload.github.com/suiGn/netget/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246749188,"owners_count":20827463,"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":["gateways","networking","utils"],"created_at":"2024-12-14T19:16:53.381Z","updated_at":"2025-04-02T03:28:09.210Z","avatar_url":"https://github.com/suiGn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://suign.github.io/assets/imgs/netget.png\" alt=\"netget\" width=\"420\" align=\"right\"\u003e\n\n# NetGet\n\u003e [netget.me](https://netget.me)\n\n\n## Install:\nInstall **NetGet** globally using npm:\n\n```bash\nnpm install -g netget\n```\n\n## Start:\nOnce installed, start the **NetGet** by simply running the following command in the terminal:\n\n```bash\nnetget\n```\n\n---------------\n# Modules:\n\n## **NetGetX**\nServes as a **front face to the public.** Provides an efficient, centralized solution for managing and directing public traffic to the correct internal services.\nIs particularly useful in environments where multiple services or applications must be accessible through a single entry point. \n\u003cimg src=\"https://suign.github.io/assets/imgs/netgetX.png\" alt=\"netgetX\" width=\"377\"\u003e\n- **Public Interface**: Serves as the front face to the public by acting as a reverse proxy that redirects all traffic to a specific port.\n- **Optimal NGINX Configuration**: Ensures that NGINX is set up as a robust and efficient channel, directing incoming traffic to the appropriate internal endpoints automatically.\n- **Reverse Proxy Setup**: Ideal for environments where multiple services or applications need to be accessible through a single entry point. This setup simplifies traffic management by centralizing the routing process.\n\n  **For example:** Rather than having different domain names, server names, and configurations for each website or application, you **set up NetGetX on a specific domain**. Once configured, you **point all your other domains to this NetGetX domain.** This approach eliminates the need to maintain multiple **DNS records**, as they all redirect to the same place. **NetGetX** handles the traffic and routes it to the appropriate internal services based on your configurations.  \nIn summary, **NetGetX** provides an efficient, centralized solution for managing and directing public traffic to the correct internal services, **simplifying domain and server management.**\n\n---\n\n## GateWays:\nA **Gateway** in NetGet is a key component that manages incoming traffic in a more granular level.\nHere are the key points about its functionality:\n\n\u003cimg src=\"https://suign.github.io/assets/imgs/netgetGateways.png\" alt=\"netgetX\" width=\"377\"\u003e\n- **Traffic Reception**: Gateways receive traffic through an input port. Typically plugged in after a **NetGetX** to handle all public requests.\n- **Request Management**: The gateway identifies the requester, domain, subdomain, or path of the incoming request.\n- **Route Handling**: Based on predefined routes, the gateway determines how to handle each request.\n- **Redirection**: The gateway can redirect requests to another port where a different server is active.\n- **Request Handling**: Alternatively, it can process the request directly using specified handlers.\nIn essence, a **Gateway** acts as a **traffic manager**, directing and processing incoming requests **based on defined rules and routes.**\n\n----\n\n## **Port Management**:\n\"I traced the *cord back to the wall*, *no wonder* it was ever plugged in at all ... ♪ ♪ ♪\n\u003cimg src=\"https://suign.github.io/assets/imgs/port_management.png\" alt=\"netgetX\" width=\"377\"\u003e\n- **Check Port Activity**: Users can check what processes are running on a specific port.\n- **Kill Processes**: Facilitates the termination of processes running on a selected port by converting port numbers to PIDs.\n**In summary**, the **Port Management** menu offers comprehensive control over port configurations and process management, streamlining the process of monitoring and managing network traffic and making the right connections easy.\n\n------\n\n**Local NetGet Setup:** On your local machine, **NetGet** operates within your Node.js environment, managing local traffic and processing requests according to your configured rules. The GateWays doesn't directly face the internet and instead communicates with an external **NetGetX** instance that does or any other service.\n\n\n\n# Install as a Node Module Dependency.\n\n```bash\nnpm install netget\n```\n\n### GateWay SetUp\n\n```js\n// NETGET\nimport NetGet from 'netget';\nimport { routes } from './GET/routes.js';\nlet netget = new NetGet();\nnetget.Gateway({ routes: routes }).listen();\n```\n\nIf no port specified the Gateway listens at http://localhost:3432/\n\nThis will set up a gateway that will listen to all traffic in a specific port, detect the domain, host, subdomain and act accordingly.\n\n### Constructor:\n\n* Initializes a new instance of the Gateway class.\n\n```js\nclass Gateway {\n  constructor({   \n   host = process.env.HOST || 'localhost', \n   port = process.env.NETGET_PORT || 3432, \n   routes = {},\n   domainsConfigPath = process.env.DOMAINS_CONFIG_PATH || '~/.get/domains.json' \n  } = {}) {\n   this.host = host;\n   this.port = port;\n   this.routes = routes;\n   this.domainsConfigPath = domainsConfigPath;\n   this.app = express();\n   this.initialize().catch(err =\u003e console.error('Initialization error:', err));\n  }\n```\n\n\n\nIt **detects the host making the request**, the domain and the subdomain. Acting accordingly through the routes given and its handlers.\n\n\n### Scalable Web Services\nIn a microservices architecture, **NetGet can route requests to different services** within your infrastructure, making it an ideal solution for developers looking to scale their applications horizontally. Each service can have its own domain, and **NetGet** will ensure that requests are forwarded to the correct service.\n\n### Personal Hosting Solutions\nFor personal web hosting, **NetGet** provides an **easy-to-set-up gateway** for routing traffic to various self-hosted applications. \n\n### Secure Access Control\nCombined with authentication layers, NetGet can control access to various parts of a web infrastructure, ensuring that only authorized users can access specific services.\n\n# \n\n\n\n## By Neurons.me \n\n#### **License \u0026 Policies**\n\n- **License**: MIT License (see LICENSE for details).\n\n- **Privacy Policy**: Respects user privacy; no collection/storage of personal data.\n\n- **Terms of Usage**: Use responsibly. No guarantees/warranties provided. [Terms](https://www.neurons.me/terms-of-use) | [Privacy](https://www.neurons.me/privacy-policy)\n\n  \u003cimg src=\"https://suign.github.io/neurons.me/neurons_logo.png\" alt=\"neurons.me logo\" width=\"123\" height=\"123\" style=\"width123px; height:123px;\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuign%2Fnetget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuign%2Fnetget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuign%2Fnetget/lists"}