https://github.com/3rd/devproxy
https://github.com/3rd/devproxy
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/3rd/devproxy
- Owner: 3rd
- Created: 2024-01-08T21:35:39.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-02-14T21:05:42.000Z (about 1 year ago)
- Last Synced: 2025-02-14T22:19:39.327Z (about 1 year ago)
- Language: TypeScript
- Size: 31.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# devproxy
> WIP
## Usage
```
Usage: devproxy [options]
Options:
-c, --config config file (default: "config.js")
-p, --port custom proxy port
--chromium-binary specify chromium binary
-o, --open open url
-h, --help display help for command
```
## Configuration
```js
module.exports = {
open: "about:blank",
chromiumBinary: "google-chrome-beta",
rules: [
{
match: ({ url, method, hostname, path }) => {
return false;
},
beforeRequest: ({ id, url, method, hostname, path }) => ({}),
beforeResponse: (request, response) => {
// const { id, url, method, hostname, path} = request;
// const { id, statusCode, headers, body } = response;
return { statusCode: 200, body: "test" };
},
},
],
};
```