Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
binary-person committed Sep 12, 2021
0 parents commit 22d7137
Show file tree
Hide file tree
Showing 34 changed files with 4,732 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parser": "babel-eslint",
"env": {
"commonjs": true,
"es2021": true,
"node": true,
"browser": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 12
},
"rules": {
"no-unused-vars": ["warn", { "args": "after-used", "argsIgnorePattern": "^_" }]
}
}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules/

# don't commit session data
sessions/*

# but commit the empty folders
!sessions/.gitkeep
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 120,
"trailingComma": "none",
"singleQuote": true,
"tabWidth": 4
}
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# rammerhead-proxy

> proxy based on testcafe-hammerhead
## Who is this package for

Package is for those who
- don't want to

## Features of proxy



## Effectiveness of proxy

This proxy supports proxying
- react

## Installing and running

Assuming you have node already installed, clone the repo, then run `npm install`.

After, configure your settings in [src/config.js](src/config.js) and [src/config2.js](src/config2.js).

Finally, there are two options in starting rammerhead:

- `node src/server.js`
- this starts the server as normal
- `node src/multi-server.js`
- this spawns N workers and load balances automatically among them, where N is the number of CPU threads in the system. configure number of workers settings in [src/multi-config.js](src/multi-config.js)
- try not to use this because race conditions occur when workers try to read and delete files from the session store at the same time. this can lead to unexpected behavior, like cookies randomly deciding to not work. Also, see [RammerheadSessionFilePersistentStore.js](src/RammerheadSessionFilePersistentStore.js) for a more in-depth description on the drawbacks of using this setup.

## Supporting me and contributing

Server infrastructure costs money, so I would appreciate it greatly if you become a Patreon member.
Loading

0 comments on commit 22d7137

Please sign in to comment.