https://github.com/hxfdarling/bifrost-proxy
为Nodejs 提供代理服务,并支持动态分配Server监听端口
https://github.com/hxfdarling/bifrost-proxy
bifrost proxy
Last synced: about 2 months ago
JSON representation
为Nodejs 提供代理服务,并支持动态分配Server监听端口
- Host: GitHub
- URL: https://github.com/hxfdarling/bifrost-proxy
- Owner: hxfdarling
- Created: 2019-07-15T16:54:40.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-01-31T02:50:11.000Z (over 1 year ago)
- Last Synced: 2025-04-24T06:52:00.172Z (about 2 months ago)
- Topics: bifrost, proxy
- Language: JavaScript
- Homepage:
- Size: 340 KB
- Stars: 4
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# bifrost-proxy
为 Nodejs 提供全局代理服务,可以拦截所有从 Nodejs 发出的请求,并配置自定义代理服务器
**用法:**
在项目中安装 `npm i bifrost-proxy`
修改启动代码
```js
// 设置代理地址和端口
process.env.BIFROST_HOST = '127.0.0.1';
process.env.BIFROST_PORT = '8899';
process.env.BIFROST = 'true'; // 启动代理// 允许自定义证书
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';require('bifrost-proxy'); // 必须要在业务代码前面
// you code...
const Koa = require('koa');
// you code...
```