Giter Site home page Giter Site logo

mrudelle / gate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gatejs/core

0.0 2.0 0.0 2.26 MB

Javascript based reverse & forward proxy with high performance & capability

License: GNU General Public License v3.0

Makefile 0.04% JavaScript 78.23% Shell 1.94% Python 0.16% C++ 16.61% Smarty 1.12% CSS 1.33% HTML 0.58%

gate's Introduction

gate

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

Forward proxy configuration example

var serverConfig = function(bs) { return({
    serverProcess: 4,
    hostname: "testServer0",
    runDir: "/var/run/gatejs",
    dataDir: "/home/gatejs-data",
    logDir: "/var/log/gatejs",
    confDir: '/etc/gatejs',

    http: {
        forwardInterface: {
            type: 'forward',
            port: 80,
            pipeline: 'pipetest'
        }
    },

    pipeline: {
        pipetest: [
            ['cache', { }],
            ['proxyPass', { mode: 'host', timeout: 10 }]
        ],
    }

})};

module.exports = serverConfig;

gate's People

Contributors

dagrut avatar julienmru avatar lazarus974 avatar mykiimike avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.