https://github.com/zbo14/bouncer
😎 Dynamically block hostnames with HTTP and SOCKS proxies
https://github.com/zbo14/bouncer
docker docker-compose haproxy http http-proxy sequelize socks-proxy socks5 sqlite3
Last synced: about 1 year ago
JSON representation
😎 Dynamically block hostnames with HTTP and SOCKS proxies
- Host: GitHub
- URL: https://github.com/zbo14/bouncer
- Owner: zbo14
- License: isc
- Created: 2021-07-14T19:41:11.000Z (over 4 years ago)
- Default Branch: develop
- Last Pushed: 2021-07-15T19:11:59.000Z (over 4 years ago)
- Last Synced: 2025-01-31T14:29:05.518Z (about 1 year ago)
- Topics: docker, docker-compose, haproxy, http, http-proxy, sequelize, socks-proxy, socks5, sqlite3
- Language: JavaScript
- Homepage:
- Size: 36.1 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bouncer
A proxy suite that dynamically blocks hostnames you specify!
Simplicity and ease-of-use were primary design goals for this project. If you're looking for a privacy-focused web proxy with more functionality, something like [privoxy](https://www.privoxy.org/) might be a better choice.
## Features
**Dynamic and database-driven:**
View and edit blocked hostnames on-the-fly, without a service restart.
**Pattern matching:**
Block custom wildcard domains (e.g. `*.foo.com`, `bar-*.baz.com`).
**Supports HTTP and SOCKS5:**
Run HTTP and SOCKS5 proxies that use the same list of blocked hostnames.
This is useful since (1) some clients or devices only support HTTP, and (2) the SOCKS5 proxy allows us to block traffic that isn't handled by HTTP proxies (e.g. TLS connections in desktop applications).
## Prerequisites
* [Node 14.x](https://nodejs.org/dist/latest-v14.x/)
* [Docker](https://docs.docker.com/get-docker/)
* [Compose](https://docs.docker.com/compose/install/)
## Install
Clone the repo, `cd` into it, and `npm i -g`.
## Usage
### Proxy
#### Build Docker image
`npm run build`
#### Start
`npm start`
This starts an HAProxy gateway that load-balances connections and requests across SOCKS5 and HTTP proxies, respectively.
The gateway listens on port 8088 for HTTP requests and port 9059 for SOCSK5 connections.
#### Stop
`npm stop`
This stops and removes the Docker containers running the gateway and proxies.
### CLI
```
Usage: bouncer [options] [command]
Options:
-V, --version output the version number
-h, --help display help for command
Commands:
allow
block
view
help [command] display help for command
```
#### Block hostname
`bouncer block `
Block a hostname or a file containing 1 hostname per line.
#### Allow hostname
`bouncer allow `
#### View blocked hostnames
`bouncer view`