Total Pageviews

Wednesday 27 June 2018

基于nodejs的反向代理和正向代理程序-gate

Javascript based reverse & forward proxy with high performance & capability.

Website: www.gatejs.org

GateJS is a javascript based reverse & forward proxy with high performance & capability.
For more informations about gatejs & configuration please visit the wiki at https://github.com/binarysec/gate/wiki
note: gatejs team is looking for someone to maintain debian packages, contact us at info [at] binarysec [dot] com
Learn more about gatejs contribution @ https://github.com/binarysec/gate/wiki/Contribution

Installation

TLDR

You need to install before NodeJS >4.x.x. Once nodejs is installed you can run:
$ sudo npm install -g gatejs

Installation from git

To install this project from git, you will have to run the following command :
$ git clone https://github.com/binarysec/gate.git gate
$ cd gate
$ npm install
If you downloaded the zip from github, you will have to fetch the submodules yourself.

Running gatejs

You can use the forever process manager to run and control gatejs.
mkdir /var/log/gatejs
forever -a -o /var/log/gatejs/forever.log -e /var/log/gatejs/forever-error.log start --uid gatejs --max_old_space_size=150 /usr/bin/gatejs --config=/etc/gatejs/config.js
You can also run the command at the reboot time using cron!
Add the following lines when editing crontab (crontab -e):
@reboot forever -a -o /var/log/gatejs/forever.log -e /var/log/gatejs/forever-error.log start --uid gatejs --max_old_space_size=150 /usr/bin/gatejs --config=/etc/gatejs/config.js
--max_old_space_size=150 allows to control the V8 garbage collector which is set to 150MB.

Debian packages

apt-get install gcc make g++ python

from https://github.com/binarysec/gate

No comments:

Post a Comment