{"id":19053623,"url":"https://github.com/nating/proxy","last_synced_at":"2025-04-24T03:04:54.013Z","repository":{"id":47336458,"uuid":"81601391","full_name":"nating/proxy","owner":"nating","description":"📡 A Web Proxy written in Node.js. ↩️","archived":false,"fork":false,"pushed_at":"2021-09-02T17:07:51.000Z","size":39,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-24T03:04:47.157Z","etag":null,"topics":["http-proxy","https-proxy","nodejs"],"latest_commit_sha":null,"homepage":"","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/nating.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-10T19:53:49.000Z","updated_at":"2025-02-28T23:04:34.000Z","dependencies_parsed_at":"2022-07-20T21:02:17.439Z","dependency_job_id":null,"html_url":"https://github.com/nating/proxy","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/nating%2Fproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nating%2Fproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nating%2Fproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nating%2Fproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nating","download_url":"https://codeload.github.com/nating/proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250552072,"owners_count":21449164,"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":["http-proxy","https-proxy","nodejs"],"created_at":"2024-11-08T23:32:48.832Z","updated_at":"2025-04-24T03:04:53.994Z","avatar_url":"https://github.com/nating.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# proxy\nAn HTTP/HTTPS web proxy written in Node.js.\n\n## Overview\nWhen the proxy recieves an HTTP request, it creates a request of its own for the data and responds to the client's request with the response to its own request.\n\nOn a 'connect' event, the proxy opens sockets to message the client and server, and pipes all communication from one socket to the other.\n\nIf the domain of the URL in a request is in the blacklist (the blacklist can be found in the config file), the requested data is not delivered.\n\nWhen a HTTP response without the 'no-cache' cache-control header is delivered to the client from the proxy, it is also cached in the cache.json, so that it can be delivered straight from the cache if asked for again.\n\nThe cache.json is full of URL objects that have headers, status codes, and data. These attributes can be applied to a response to the client when a request is made for that URL.\n\nWhen the proxy is run, the managment console starts up. The management console prints information about requests made to the proxy and can be used to query information or change the proxy's configuration. Caching information is printed to the management console in yellow. Denied requests are printed to the management console in red.\n\n\n## Requirements\nThis web proxy needs Node to run:\n```\n$npm install node\n```\nor\n```\n$brew install node\n```\n\n## Usage\n\n### Running the Proxy\nTo run the proxy on the specified port and host ip from the config file:\n```\n$node proxy.js\n```\n\n### Management Console Commands\n\nTo list the avaialable commands:\n```\n\u003ehelp\n```\nTo list the contents of the blacklist:\n```\n\u003eblacklist\n```\nTo add domains to the blacklist:\n```\n\u003eblacklist \u003cdomain\u003e {\u003cdomain\u003e}\n```\nTo remove domains from the blacklist:\n```\n\u003eblacklistrm \u003cdomain\u003e {\u003cdomain\u003e}\n```\nTo clear the cache:\n```\n\u003eclearcache\n```\nTo print the current port, host ip, and blacklist of the proxy:\n```\n\u003estatus\n```\nTo change the port of the proxy:\n```\n\u003echangeport \u003cportnumber\u003e\n```\nTo change the host ip of the proxy:\n```\n\u003echangehost \u003chostip\u003e\n```\nTo terminate the proxy:\n```\n\u003equit\n```\n\nChanges can be made to the config.json file while the proxy is running, and it will automatically reconfigure. This is not recommended though, as making changes via the management console ensures that the config.json remains in valid JSON format.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnating%2Fproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnating%2Fproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnating%2Fproxy/lists"}