Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/erguotou520/simple-web-proxy
基于Nodejs的简单http_proxy,给ss(r)的socks服务做代理比较有用
https://github.com/erguotou520/simple-web-proxy
node nodejs proxy proxy-server shadowsocks shadowsocksr socks5
Last synced: 3 months ago
JSON representation
基于Nodejs的简单http_proxy,给ss(r)的socks服务做代理比较有用
- Host: GitHub
- URL: https://github.com/erguotou520/simple-web-proxy
- Owner: erguotou520
- Created: 2018-01-24T08:07:31.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-28T03:49:39.000Z (almost 6 years ago)
- Last Synced: 2024-09-26T21:23:28.139Z (4 months ago)
- Topics: node, nodejs, proxy, proxy-server, shadowsocks, shadowsocksr, socks5
- Language: JavaScript
- Size: 4.88 KB
- Stars: 10
- Watchers: 1
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 一个简单的http_proxy服务器
基于Nodejs的简单http_proxy,给`ss(r)`的`socks`服务做代理比较有用。
## 安装
```bash
yarn add simple-web-proxy
```## 开发
```js
const proxyServer = require('simple-web-proxy')
// 开启
const server = proxyServer({
listenHost: 'localhost',
listenPort: 12333,
socksHost: 'localhost',
socksPort: 1080,
socksUsername,
socksPassword
})
// 关闭
server.close()
// 事件监听
server.on('request:error', console.log)
server.on('request:success', console.log)
server.on('connect:error', console.log)
server.on('connect:success', console.log)
```## 使用
```bash
export http_proxy="http://127.0.0.1:12333"
export https_proxy="http://127.0.0.1:12333"
curl https://twitter.com
```