{"id":13775826,"url":"https://github.com/mattcg/socks5-http-client","last_synced_at":"2025-04-04T09:09:35.797Z","repository":{"id":7240260,"uuid":"8550041","full_name":"mattcg/socks5-http-client","owner":"mattcg","description":"SOCKS v5 HTTP client implementation in JavaScript for Node.js.","archived":false,"fork":false,"pushed_at":"2019-09-19T07:21:15.000Z","size":28,"stargazers_count":256,"open_issues_count":10,"forks_count":27,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-28T08:09:03.125Z","etag":null,"topics":["proxy-client","socks","tor"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/mattcg.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":"2013-03-04T07:00:57.000Z","updated_at":"2025-02-23T04:16:56.000Z","dependencies_parsed_at":"2022-09-04T22:51:59.640Z","dependency_job_id":null,"html_url":"https://github.com/mattcg/socks5-http-client","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattcg%2Fsocks5-http-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattcg%2Fsocks5-http-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattcg%2Fsocks5-http-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattcg%2Fsocks5-http-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattcg","download_url":"https://codeload.github.com/mattcg/socks5-http-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247149502,"owners_count":20891954,"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":["proxy-client","socks","tor"],"created_at":"2024-08-03T17:01:51.726Z","updated_at":"2025-04-04T09:09:35.781Z","avatar_url":"https://github.com/mattcg.png","language":"JavaScript","funding_links":[],"categories":["\u003ca id=\"d03d494700077f6a65092985c06bf8e8\"\u003e\u003c/a\u003e工具"],"sub_categories":["\u003ca id=\"57b8e953d394bbed52df2a6976d98dfa\"\u003e\u003c/a\u003eSocks"],"readme":"# SOCKS5 HTTP Client #\n\n[![Build Status](https://travis-ci.org/mattcg/socks5-http-client.png?branch=master)](https://travis-ci.org/mattcg/socks5-http-client)\n\nSOCKS v5 HTTP client implementation in JavaScript for Node.js.\n\n```js\nvar shttp = require('socks5-http-client');\n\nshttp.get('http://www.google.com/', function(res) {\n\tres.setEncoding('utf8');\n\tres.on('readable', function() {\n\t\tconsole.log(res.read()); // Log response to console.\n\t});\n});\n```\n\nURLs are parsed using `url.parse`. You may also pass an options hash as the first argument to `get` or `request`.\n\n## Options ##\n\nSpecify the `socksHost` and `socksPort` options if your SOCKS server isn't running on `localhost:1080`. Tor runs its SOCKS server on port `9050` by default, for example.\n\nSpecify a username and password using `socksUsername` and `socksPassword`.\n\n## Using with Tor ##\n\nWorks great for making HTTP requests through [Tor](https://www.torproject.org/).\n\nMake sure a Tor server is running locally and run `node example/tor http://en.wikipedia.org/wiki/SOCKS` to test.\n\n## Using with Request ##\n\nTo use with [Request](https://github.com/mikeal/request), just pass a reference to the `Agent` constructor.\n\n```js\nvar Agent = require('socks5-http-client/lib/Agent');\n\nrequest({\n\turl: 'http://en.wikipedia.org/wiki/SOCKS',\n\tagentClass: Agent,\n\tagentOptions: {\n\t\tsocksHost: 'my-tor-proxy-host', // Defaults to 'localhost'.\n\t\tsocksPort: 9050 // Defaults to 1080.\n\t}\n}, function(err, res) {\n\tconsole.log(err || res.body);\n});\n```\n\n## HTTPS ##\n\nThis client only provides support for making HTTP requests. See [socks5-https-client](https://github.com/mattcg/socks5-https-client) for an HTTPS implementation.\n\n## License ##\n\nCopyright © 2013 [Matthew Caruana Galizia](http://twitter.com/mcaruanagalizia), licensed under an [MIT license](http://mattcg.mit-license.org/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattcg%2Fsocks5-http-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattcg%2Fsocks5-http-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattcg%2Fsocks5-http-client/lists"}