Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/amanoteam/kad
- Owner: AmanoTeam
- License: lgpl-3.0
- Created: 2023-09-24T23:03:15.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-11-01T04:04:14.000Z (about 1 year ago)
- Last Synced: 2024-05-21T05:24:58.634Z (8 months ago)
- Topics: c, cpp, curl, curl-impersonate, http-proxy
- Language: C
- Homepage:
- Size: 73.2 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 requestsproxies = {
"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