caterpillar/README.md

78 lines
3.1 KiB
Markdown
Raw Normal View History

2024-02-19 04:41:01 +00:00
# gnh1201/caterpillar
2024-06-20 08:21:34 +00:00
Caterpillar Proxy - The simple web debugging proxy (formerly, php-httpproxy)
2022-10-05 17:19:11 +00:00
2024-02-28 06:50:02 +00:00
![title image](assets/img/title.jfif)
2024-02-19 05:16:42 +00:00
2024-06-20 08:48:26 +00:00
## Use cases
* [Build a network tunnel using Python and the LAMP(PHP) stack.](https://qiita.com/gnh1201/items/40f9350ca6d308def6d4)
* [K-Anonymity for Spam Filtering: Case with Mastodon, and Misskey](https://qiita.com/gnh1201/items/09f4081f84610db3a9d3)
2024-06-28 05:27:27 +00:00
* [[YouTube Video] File Upload Vulnerability Attack Test (Caterpillar Proxy)](https://youtu.be/sPZOCgYtLRw)
2024-06-20 08:48:26 +00:00
2024-02-19 12:13:11 +00:00
## How it works
2024-02-19 07:30:43 +00:00
### Basic structure
2022-10-05 17:19:11 +00:00
```
2024-02-19 05:20:01 +00:00
You <-> Proxy client (Python) <-> Parasitized proxy server (Optional, PHP) <-> On the Web
2022-10-05 17:19:11 +00:00
```
2024-02-19 07:30:43 +00:00
For example, build a simple web debugging proxy on the shared servers.
2022-10-05 17:19:11 +00:00
2024-03-04 08:26:38 +00:00
### Stateful mode
2024-03-04 08:38:18 +00:00
This project supports two modes of connection. The default is stateless. You can use the stateful mode to avoid being constrained by transfer capacity limits. See the [Stateful mode (github.com/gnh1201/caterpillar wiki)](https://github.com/gnh1201/caterpillar/wiki/Stateful-mode).
2024-02-26 13:29:57 +00:00
2024-02-19 05:20:01 +00:00
## (Optional) Before to use
2024-02-28 08:00:25 +00:00
If you have a server that ***will be parasitized*** and you want to proxy it, you should upload the `index.php` file to a shared server. The index.php file is located in the `assets/php` directory within this repository.
2022-10-07 17:19:19 +00:00
2024-02-19 04:41:01 +00:00
## How to use
1. Write a file `.env`(Linux) or `settings.ini`(Windows). Like this:
2022-10-07 17:19:19 +00:00
```
[settings]
PORT=5555
2022-11-25 08:12:58 +00:00
SERVER_URL=http://example.org
2024-02-26 13:21:12 +00:00
SERVER_CONNECTION_TYPE=stateless
2022-11-25 08:12:58 +00:00
CA_KEY=ca.key
CA_CERT=ca.crt
CERT_KEY=cert.key
CERT_DIR=certs/
2022-11-25 12:58:03 +00:00
OPENSSL_BINPATH=openssl
2022-11-25 12:35:02 +00:00
CLIENT_ENCODING=utf-8
2024-07-09 07:31:41 +00:00
USE_EXTENSIONS=wayback.Wayback,bio.PyBio
2022-10-07 17:19:19 +00:00
```
2024-06-09 20:31:51 +00:00
- (Optional) Create a certificate for SSL decryption
2024-02-20 07:19:46 +00:00
2024-02-17 09:01:59 +00:00
```bash
2024-06-09 20:31:51 +00:00
chmod +x configure_certs.sh
./configure_certs.sh
2024-02-17 09:04:50 +00:00
sudo apt-get install -y ca-certificates
2024-02-19 04:49:51 +00:00
sudo cp ca.crt /usr/local/share/ca-certificates/caterpillar-ca.crt
2024-02-17 09:04:50 +00:00
sudo update-ca-certificates
2024-02-17 09:01:59 +00:00
```
2024-06-09 20:31:51 +00:00
2. Run `python3 server.py` and set HTTP(S) proxy in your web browser (e.g. Firefox, Chromium)
2022-10-07 17:19:19 +00:00
2024-06-09 20:32:58 +00:00
3. Test [100MB](http://speed.hetzner.de/100MB.bin)/[SSL](https://speed.hetzner.de/100MB.bin), [1GB](http://speed.hetzner.de/1GB.bin)/[SSL](https://speed.hetzner.de/1GB.bin), [10GB](http://speed.hetzner.de/10GB.bin)/[SSL](http://speed.hetzner.de/10GB.bin) download and check the speed.
2022-10-07 17:32:53 +00:00
2022-10-07 17:19:19 +00:00
3. Enjoy it
2022-10-08 15:51:58 +00:00
4. (Optional) With [Cloudflare](https://cloudflare.com), we can expect to accelerate the 4x speed and reduce the network stuck.
2022-10-08 15:48:25 +00:00
2024-03-13 08:14:37 +00:00
## Extensions
2024-06-21 03:43:19 +00:00
* [Web Console Available](https://pub-1a7a176eea68479cb5423e44273657ad.r2.dev/console.html)
2024-03-13 08:22:17 +00:00
* Fediverse (e.g., Mastodon): See the [Fediverse (github.com/gnh1201/caterpillar wiki)](https://github.com/gnh1201/caterpillar/wiki/Fediverse).
2024-03-13 08:21:40 +00:00
* Wayback (Private browsing with Google or Wayback cache): See the [Wayback (github.com/gnh1201/caterpillar wiki)](https://github.com/gnh1201/caterpillar/wiki/Wayback).
2022-10-05 17:21:12 +00:00
2024-02-26 13:38:53 +00:00
## Thanks to
2024-07-12 02:28:05 +00:00
* Pan Art by [@yeohangdang@i.peacht.art](#): [Image File](assets/img/logo.png)
2024-06-21 05:27:01 +00:00
* [GitHub Sponsors](https://github.com/sponsors/gnh1201)
2024-02-26 13:38:53 +00:00
2024-07-12 02:23:42 +00:00
## Contributors
![Contributors Images](https://contrib.rocks/image?repo=gnh1201/caterpillar)
2024-07-11 11:53:06 +00:00
## Our roadmap
2024-07-12 02:23:42 +00:00
![Roadmap image](assets/img/roadmap.png)
2024-07-11 11:53:06 +00:00
2024-02-29 18:10:30 +00:00
## Report abuse
2024-02-17 09:14:45 +00:00
* ActivityPub [@gnh1201@catswords.social](https://catswords.social/@gnh1201)
2022-11-25 14:05:24 +00:00
* abuse@catswords.net