hpts(http-proxy-to-socks) is a nodejs client to convert socks proxy into http proxy
Last updated 6 months ago by alexsorokoletov .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @alexsorokoletov/http-proxy-to-socks 
SYNC missed versions from official npm registry.



hpts(http-proxy-to-socks) is a nodejs tool to convert SOCKS proxy into http proxy.

Many clients support setting up http proxy to speed up network requests and for sometimes only SOCKS proxy is available to you. SOCKS proxy supports TCP so that it's possible to convert those requests from http proxy into SOCKS protocol. In this way, you can still keep the goodness provided by your SOCKS proxy(e.g. encryption).


npm install -g @alexsorokoletov/http-proxy-to-socks

Make sure your nodejs version is greater than 4.


hpts -s -p 8080 -s localhost|google.com|microsoft.com

This will start a process listening on 8080 as a http proxy. It will convert http requests into socks requests and send them to port 1080. Please make sure your socks service is available at the corresponding port.

Other options:


  -h, --help             output usage information
  -V, --version          output the version number
  -s, --socks [socks]    specify your socks proxy host, default:
  -p, --port [port]      specify the listening port of http proxy server, default: 8080
  -c, --config [config]  read configs from file in json format
  --skip [hostname1|hostname2] skip proxy for hostname1 and hostname2 and so on, default localhost|
  --level [level]        log level, vals: info, error

You can specify a json config file with -c:

  "socks": "",
  "port": 8080


Please add more tests for corresponding features when you send a PR:

npm run test



Current Tags

  • 1.2.6                                ...           latest (6 months ago)

7 Versions

  • 1.2.6                                ...           6 months ago
  • 1.2.5                                ...           6 months ago
  • 1.2.4                                ...           6 months ago
  • 1.2.3                                ...           6 months ago
  • 1.2.2                                ...           6 months ago
  • 1.2.1                                ...           6 months ago
  • 1.2.0                                ...           6 months ago
Maintainers (1)
Today 0
This Week 0
This Month 14
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (10)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |