40 lines
1.3 KiB
Markdown
40 lines
1.3 KiB
Markdown
# Worker proxy
|
|
Simple script to deploy an HTTP proxy on any of those meme-ass serverless servers.
|
|
|
|
## Install (for cloudflare workers)
|
|
```
|
|
node -v # should output v18.x or v20.x or some shit
|
|
sudo npm install -g wrangler
|
|
wrangler login # this will open some garbage in a browser tab. authenticate your ass
|
|
wrangler init worker-proxy
|
|
cd worker-proxy/src
|
|
rm index.js
|
|
wget https://git.lolcat.ca/lolcat/worker-proxy/raw/branch/master/src/index.js
|
|
```
|
|
|
|
## Configure
|
|
Edit line 10 of `index.js` with your favorite text editor. Change the password to something only you knows. A good way to make shit secure is by running the following garbage in a PHP shell:
|
|
|
|
```
|
|
php -a
|
|
php > echo bin2hex(random_bytes(21));
|
|
605ca86cd0e70b7cb96e2ccc5902e70639afe074aa
|
|
```
|
|
|
|
This way, only (You) can use your proxy.
|
|
|
|
## Run
|
|
```
|
|
wrangler dev # Runs proxy locally (useless, but lets you know shit werks)
|
|
wrangler publish # Use wrangler deploy if it complains like a little bitch
|
|
```
|
|
|
|
## Usage
|
|
When you run the command `wrangler publish`, Cloudfart should give you some URL. Go and visit it. The front page should read "Fuck off".
|
|
|
|
To proxy things, visit this endpoint:
|
|
|
|
/?p={Website}&k={YourKey}
|
|
|
|
This garbage should mirror all HTTP headers both ways, although cloudshit appends a bunch of useless headers to the response.
|