2024-02-19 04:41:01 +00:00
# gnh1201/caterpillar
2024-08-20 05:50:06 +00:00
2024-08-20 10:38:47 +00:00
[![FOSSA Status ](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fgnh1201%2Fcaterpillar.svg?type=shield )](https://app.fossa.com/projects/git%2Bgithub.com%2Fgnh1201%2Fcaterpillar?ref=badge_shield)
2024-10-18 13:32:37 +00:00
[![DOI 10.5281/zenodo.13346533 ](https://zenodo.org/badge/DOI/10.5281/zenodo.13346533.svg )](https://doi.org/10.5281/zenodo.13346533)
2024-11-12 10:06:20 +00:00
[![ChatGPT available ](https://img.shields.io/badge/ChatGPT-74aa9c?logo=openai&logoColor=white )](#)
[![slideshare.net available ](https://img.shields.io/badge/SlideShare-black?logo=slideshare )](https://www.slideshare.net/slideshow/2024-caterpillar-project-in-2024-korea-oss-contest/273031732)
2024-08-20 05:50:06 +00:00
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-08-20 05:36:26 +00:00
![Cover image - Caterpillar on a tree looking at a rocket flying over the clouds ](assets/img/cover.png )
2024-02-19 05:16:42 +00:00
2024-08-20 11:11:10 +00:00
You can connect all physical and logical channels with communication capabilities to the web!
2024-08-20 11:11:55 +00:00
Imagine various means such as time machines, satellites, quantum technology, sound, light, the Philosopher's Stone, or Excalibur, just like in science fiction movies! Caterpillar Proxy supports the implementation of extensions for Connectors, Filters, and RPC methods to bring your imagination to life.
2024-08-20 10:45:04 +00:00
2024-06-20 08:48:26 +00:00
## Use cases
2024-10-19 07:15:53 +00:00
* [Build a network tunnel using Python and the LAMP(PHP) stack (qiita.com) ](https://qiita.com/gnh1201/items/40f9350ca6d308def6d4 )
* [K-Anonymity for Spam Filtering: Case with Mastodon, and Misskey (qiita.com) ](https://qiita.com/gnh1201/items/09f4081f84610db3a9d3 )
* [File Upload Vulnerability Attack Test (Caterpillar Proxy) (youtu.be) ](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-08-20 11:00:55 +00:00
* You < - > Proxy client (Python) < - > Parasitized proxy server (Optional, PHP/LAMP) < - > On the Web
2024-08-20 11:03:30 +00:00
* You < - > Proxy client (Python) < - > Connector extensions (Optional, Python) < - > On the Web
2022-10-05 17:19:11 +00:00
```
2024-08-20 05:36:26 +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-10-18 13:33:38 +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 (catswords-oss.rdbl.io) ](https://catswords-oss.rdbl.io/1155378128/5211324242 ).
2024-02-26 13:29:57 +00:00
2024-08-20 11:04:35 +00:00
### Connector extensions
2024-10-19 08:39:37 +00:00
This project supports the implementation of Connector extensions. The provided basic examples include implementations of web archives (caches) and serial communication as Connector extensions. Go to the [caterpillar-plugins repository (github.com) ](https://github.com/gnh1201/caterpillar-plugins )
2024-08-20 11:03:30 +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
2024-07-11 15:34:33 +00:00
SERVER_URL=localhost
SERVER_CONNECTION_TYPE=
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-07-11 15:34:33 +00:00
***Note***: If using Caterpillar Proxy (Python) alone, set `SERVER_URL=localhost` . Otherwise, use the endpoint URL of the Worker script (PHP or Java), e.g., `SERVER_URL=http://example.org` .
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-10-18 13:33:38 +00:00
* Fediverse (e.g., Mastodon): See the [Fediverse (catswords-oss.rdbl.io) ](https://catswords-oss.rdbl.io/1155378128/3821602484 ).
2024-10-18 13:32:37 +00:00
* Wayback (Private browsing with Google or Wayback cache): See the [Wayback (catswords-oss.rdbl.io) ](https://catswords-oss.rdbl.io/1155378128/6994492654 )
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
2024-07-19 02:43:00 +00:00
< a href = "https://github.com/gnh1201/caterpillar/graphs/contributors" >
< img src = "https://contrib.rocks/image?repo=gnh1201/caterpillar" alt = "Contributors" / >
< / a >
2024-07-12 02:23:42 +00:00
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-10-08 19:05:42 +00:00
- [GitHub Security Advisories ](https://github.com/gnh1201/caterpillar/security )
- abuse@catswords.net
- ActivityPub [@catswords_oss@catswords.social ](https://catswords.social/@catswords_oss )
- XMPP [catswords@conference.xmpp.catswords.net ](xmpp:catswords@conference.xmpp.catswords.net?join )
2024-11-13 07:06:33 +00:00
- [Join Catswords OSS on Microsoft Teams ](https://teams.live.com/l/community/FEACHncAhq8ldnojAI )
- [Join Catswords OSS #caterpillar on Discord ](https://discord.gg/9VVTHpfsVW )
2024-08-20 10:38:47 +00:00
## License
2024-08-20 10:45:04 +00:00
[![FOSSA Status ](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fgnh1201%2Fcaterpillar.svg?type=large )](https://app.fossa.com/projects/git%2Bgithub.com%2Fgnh1201%2Fcaterpillar?ref=badge_large)