Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/amanoteam/kad

A simple HTTP proxy server that forwards all requests through curl-impersonate
https://github.com/amanoteam/kad

c cpp curl curl-impersonate http-proxy

Last synced: 2 months ago
JSON representation

A simple HTTP proxy server that forwards all requests through curl-impersonate

Awesome Lists containing this project

README

        

# Kad

Kad is a simple HTTP proxy server that forwards all requests through curl-impersonate.

## Installation

You can obtain precompiled binaries from the [releases](https://github.com/AmanoTeam/Kad/releases) page.

## Building

Clone this repository and fetch all submodules

```bash
git clone --depth='1' 'https://github.com/AmanoTeam/Kad.git'
cd Kad
git submodule update --init --depth='1'
```

Configure, build and install:

```bash
cmake -B build -DCMAKE_BUILD_TYPE=MinSizeRel
cmake --build ./build
cmake --install ./build
```

## Usage

Available options:

```
$ kad --help
usage: kad [-h] [-v] [--host HOST] [--port PORT] [--target TARGET]

A simple HTTP proxy server that forwards all requests through curl-impersonate.

options:
-h, --help Show this help message and exit.
-v, --version Display the Kad version and exit.
--host HOST Bind socket to this host. [default: 127.0.0.1]
--port PORT Bind socket to this port. [default: 4000]
--target TARGET Impersonate this target. [default: chrome116]

Note, options that take an argument require a equal sign. E.g. --host=HOST
```

You can start a server with all default options by simply running `kad`:

```
$ kad
Starting server at http://127.0.0.1:4000 (pid = 478)

```

## Examples

Kad is just a proxy server; you need an HTTP client to start using it.

With curl:

```bash
$ curl --proxy 'http://127.0.0.1:4000' --url 'http://example.com'
```

With Python + Requests:

```python
import requests

proxies = {
"http": "http://127.0.0.1:4000",
"https": "http://127.0.0.1:4000"
}

response = requests.get(url = "http://example.com", proxies = proxies)
```

With PHP + curl:

```php