{"id":26859690,"url":"https://github.com/lvmalware/cf-proxy","last_synced_at":"2025-05-06T15:28:34.124Z","repository":{"id":216476650,"uuid":"741432510","full_name":"LvMalware/cf-proxy","owner":"LvMalware","description":"Proxy requests through Cloudflare workers","archived":false,"fork":false,"pushed_at":"2025-01-02T21:51:38.000Z","size":35,"stargazers_count":36,"open_issues_count":0,"forks_count":11,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-31T01:29:40.706Z","etag":null,"topics":["cloudflare","ip-rotation","javascript","proxy","workers"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LvMalware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-10T11:39:38.000Z","updated_at":"2025-02-26T18:38:13.000Z","dependencies_parsed_at":"2024-12-05T13:28:08.868Z","dependency_job_id":"724015c2-07d5-4450-a08b-8ade03c00ec9","html_url":"https://github.com/LvMalware/cf-proxy","commit_stats":null,"previous_names":["lvmalware/cf-proxy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LvMalware%2Fcf-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LvMalware%2Fcf-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LvMalware%2Fcf-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LvMalware%2Fcf-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LvMalware","download_url":"https://codeload.github.com/LvMalware/cf-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252712577,"owners_count":21792339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudflare","ip-rotation","javascript","proxy","workers"],"created_at":"2025-03-31T01:29:38.945Z","updated_at":"2025-05-06T15:28:34.095Z","avatar_url":"https://github.com/LvMalware.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cf-proxy\n\n\u003e Proxy requests through Cloudflare (CF) workers\n\nA simple worker that acts as proxy to tunnel requests over the internet, forwarding them through Cloudflare's global \nnetwork of servers. This way, we can archieve automatic IP address rotation, all coming from a trusted ASN \n(as CF is used by a huge number of websites, their ASNs are usually whitelisted \non firewalls :stuck_out_tongue_winking_eye:).\n\n## Usage\n\nYou will need [bun](https://bun.sh/) to run the client script `proxy.js`. You can install it by running:\n\n```bash\ncurl -fsSL https://bun.sh/install | bash\n. ~/.bashrc\n```\n\nYou also need a Cloudflare account to deploy the worker. A free account is fine, but you might experience some issues \nwith page loading with slow website connections as the workers have a limitation of 10ms CPU time per request on the \nfree tier, but as long as you don't try to download any big files this should be enough to navigate the internet.\n\nOnce you have bun installed, go ahead and install `wrangler` using:\n\n```bash\nbun i -g wrangler\n```\n\nLogin to CF with `wrangler`:\n\n```bash\nwrangler login\n```\n\nThen, `cd` into `worker/` directory and install dependences with:\n\n```bash\ncd worker/\nbun i\n```\n\nNow, edit the file at `src/index.js` to include an authorization token (necessary to avoid other people from using it). \nJust change the TOKEN constant value:\n\n```javascript\n5   const TOKEN = '\u003cYOUR-AUTH-TOKEN\u003e'\n```\n\n\nNow, you can deploy the worker with (on `worker/`)\n```bash\nwrangler deploy\n```\n\nYou can run `bun proxy.js` (with no arguments) to see options:\n\n```\nproxy.js - Proxy requests through CloudFlare workers\nUsage: bun proxy.js [options] \u003csocks|http\u003e \u003cworker\u003e\n\nOptions:\n\n-h, --help         Show this help message and exit\n-p, --port         Port to listen on\n-a, --auth         Authorization header\n-v, --verbose      Enable verbose mode (default: false)\n\nExample: bun proxy.js -v -a auth-secret socks my-instance.workers.dev\n\nBy Lucas V. Araujo \u003croot@lva.sh\u003e\nMore at https://github.com/lvmalware\n\n```\n\nThe general usage options are `-a` (to provide the authorization token), followed by the type of proxy and the \nworker's address.\n\nFor example, lets suppose your worker instance has the address `myinstance.workers.dev`, with the auth token of \n`secret` (your CF token) and you want to run a SOCKS5 proxy server on port `1080` (default for SOCKS). \nThis could be done with the following command:\n\n\u003e Make sure that you are in the root project directory.\n\n```bash\ncd ..\nbun proxy.js -a secret -p 1080 socks myinstance.workers.dev\n```\n\nThen configure your browser to use `127.0.0.1:1080` as a SOCKS5 proxy and enjoy the automatic ip address \nrotation :wink:.\n\nFor a http proxy, just change the type from `socks` to `http`, for example:\n\n```bash\nbun proxy.js -a secret -p 8080 http myinstance.workers.dev\n```\n\n\u003e In order to confirm that your IP has changed. \n\u003e You can easily see your request information on the CLI with:\n\n```bash\ncurl -x localhost:8080 https://myip.wtf/json\n```\n\n\u003e Or simply go to the address below on the URL bar. Remember to configure the proxy on the browser, \n\u003e I suggest this extension [Foxy proxy standard](https://addons.mozilla.org/pt-BR/firefox/addon/foxyproxy-standard/) for easily switching between proxy configurations.\n\n```\nhttps://myip.wtf/json\n```\n\n## Limitations\n\nBy default, Cloudflare doesn't allow connections to port 25 of any target. Also, connecting to Cloudflare \naddress space from within a worker is not supported, so you might have problems accessing sites that are \nbehind CF (there are some ways around it, but I will leave that as an exercise to the reader :smiley:).\n\n## Notes\n\nYour IP address will rotate at _each_ request, since the worker runs on the so-called serverless architecture, \nspawned in a distributed global network of servers owned by cloudflare. Each time you invoke a worker, a different \nserver might be provisioned depending on the current availability. These servers might be located on your region \n(which is usually the case) or even in another country.\n\nThis project is just an example to showcase an application that I developed while learning javascript and \n[Workers](https://workers.cloudflare.com/). I'm not related to the company, nor I endorse or otherwise discourage \nthe usage their services. And finally, this project is intended only for educational purposes and I won't be \nresponsible for any bad actions or abuse of this service. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flvmalware%2Fcf-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flvmalware%2Fcf-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flvmalware%2Fcf-proxy/lists"}