mirror of
https://github.com/gnh1201/caterpillar.git
synced 2024-11-26 23:41:44 +00:00
1.7 KiB
1.7 KiB
php-httpproxy
HTTP(S) proxy implementation with PHP (PHP is no required) socket
How to works
You <-----> HTTP(S) proxy (Python) <-----> Web hosting (PHP) <-----> On the Web
HTTP(S) proxy over the web hosting!
How to use
- Write a file with filename like
.env
(Linux) orsettings.ini
(Windows). Like this:
[settings]
PORT=5555
SERVER_URL=http://example.org
CA_KEY=ca.key
CA_CERT=ca.crt
CERT_KEY=cert.key
CERT_DIR=certs/
OPENSSL_BINPATH=openssl
CLIENT_ENCODING=utf-8
1.1. (Optional) Install ca.cert
sudo apt-get install -y ca-certificates
sudo cp ca.crt /usr/local/share/ca-certificates/php-httpproxy-ca.crt
sudo update-ca-certificates
-
Run
python3 server.py
and set HTTP(S) proxy in your web browser (e.g. Firefox) -
Test 100MB/SSL, 1GB/SSL, 10GB/SSL download and check the speed (e.g. https://speed.hetzner.de/1GB.bin)
-
Enjoy it
-
(Optional) With Cloudflare, we can expect to accelerate the 4x speed and reduce the network stuck.
(Optional) For Mastodon users
- In
[php-httpproxy installed directory]/settings.ini
or.env
, setSERVER_URL
variable tolocalhost
in.env
(e.g.SERVER_URL=localhost
) - In
[mastodon installed directory]/env.production
, sethttp_proxy
variable tohttp://localhost:5555
(e.g.http_proxy=http://localhost:5555
)
References
Contact
- ActivityPub @gnh1201@catswords.social
- abuse@catswords.net