{"id":13610351,"url":"https://github.com/leproxy/leproxy","last_synced_at":"2026-01-11T13:45:51.219Z","repository":{"id":20986791,"uuid":"66137915","full_name":"leproxy/leproxy","owner":"leproxy","description":"LeProxy is the HTTP/SOCKS proxy server for everybody!","archived":false,"fork":false,"pushed_at":"2023-07-13T20:29:31.000Z","size":230,"stargazers_count":201,"open_issues_count":17,"forks_count":39,"subscribers_count":19,"default_branch":"main","last_synced_at":"2024-03-14T17:14:06.000Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leproxy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2016-08-20T09:00:07.000Z","updated_at":"2024-03-14T17:14:06.001Z","dependencies_parsed_at":"2024-01-14T06:56:24.157Z","dependency_job_id":null,"html_url":"https://github.com/leproxy/leproxy","commit_stats":{"total_commits":123,"total_committers":4,"mean_commits":30.75,"dds":0.08130081300813008,"last_synced_commit":"4dc4144f15ecf93ab4bc87a72214eefd09a85ad1"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leproxy%2Fleproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leproxy%2Fleproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leproxy%2Fleproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leproxy%2Fleproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leproxy","download_url":"https://codeload.github.com/leproxy/leproxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223549200,"owners_count":17163612,"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":[],"created_at":"2024-08-01T19:01:43.898Z","updated_at":"2026-01-11T13:45:51.212Z","avatar_url":"https://github.com/leproxy.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"# LeProxy\n\n[![CI status](https://github.com/leproxy/leproxy/actions/workflows/ci.yml/badge.svg)](https://github.com/leproxy/leproxy/actions)\n[![downloads on GitHub](https://img.shields.io/github/downloads/leproxy/leproxy/total?color=blue\u0026label=downloads%20on%20GitHub)](https://github.com/leproxy/leproxy/releases)\n[![installs on Packagist](https://img.shields.io/packagist/dt/leproxy/leproxy?color=blue\u0026label=installs%20on%20Packagist)](https://packagist.org/packages/leproxy/leproxy)  \n\nLeProxy is the HTTP/SOCKS proxy server for everybody!\n\nLeProxy is designed for anonymous surfing, improved security and privacy plus\ncircumventing geoblocking.\nIt allows you to enjoy the web like it's meant to work and access your favorite\nonline video platform without annoying country blocks while traveling.\n\nLeProxy is a powerful, lightweight, fast and simple to use proxy server that you\ncan host on your own server or PC at home and then access from anywhere.\nIt supports optional authentication so you can share a server instance with your\nfamily and friends without having to worry about third parties.\nIt provides compatibility with a large number of clients and services by\naccepting both common HTTP and SOCKS proxy protocols on a single listening port.\n\n**Table of contents**\n\n* [Install](#install)\n* [Usage](#usage)\n* [Clients](#clients)\n* [Development](#development)\n* [License](#license)\n\n\u003e Note that this is an early beta version and that\n  LeProxy is under active development.\n  Many new features are going to be added in the future!\n\n## Install\n\nLeProxy requires only PHP.\n*PHP 7+ is highly recommended*, but it runs on any system that uses PHP 5.4+ or\nHHVM.\nIf you have not installed PHP already, on a recent Ubuntu/Debian system, simply run:\n\n```bash\n$ sudo apt-get install php7.0-cli\n```\n\nYou can simply download the latest `leproxy-{version}.php` file from our\n[releases page](https://github.com/leproxy/leproxy/releases).\nThe [latest release](https://github.com/leproxy/leproxy/releases/latest) can\nalways be downloaded like this:\n\n```bash\n$ curl -OL https://leproxy.org/leproxy-latest.php\n```\n\nDownloaded the `leproxy-{version}.php` file?\nYou did it!! Really simple, huh?\n\n\u003e LeProxy is distributed as a single PHP file that contains everything you need\n  to run LeProxy.\n  The below examples assume you have saved this file as `leproxy.php` locally,\n  but you can use any name you want.\n  If you're interested in the more technical details of this file, you may want\n  to check out the [development instructions](#development) below.\n\n## Usage\n\nOnce [installed](#install), you can start LeProxy by simply running:\n\n```bash\n$ php leproxy.php \n```\n\nBy default, LeProxy will listen on the public address `0.0.0.0:8080`. \nIf you want to listen on another address, you can pass an explicit listening\naddress.\nLeProxy will report an error if it fails to listen on the given address,\nyou may try another address or use port `0` to pick a random free port.\nFor example, if you do not want to allow accessing LeProxy from the outside and\nonly want to listen on the local interface:\n\n```bash\n$ php leproxy.php 127.0.0.1:8080\n```\n\n\u003e The listening address MUST be in the form `ip:port` or just `ip` or `:port`,\n  with the above defaults being applied (or you can use a Unix domain socket\n  path).\n\nNote that LeProxy runs in protected mode by default, so that it only forwards\nrequests from the local host and can not be abused as an open proxy.\nIf you have ensured only legit users can access your system, you can\npass the `--allow-unprotected` flag to forward requests from all hosts.\nIf you want to require the client to send username/password authentication\ndetails, you can include this as part of the listening address:\n\n```bash\n$ php leproxy.php username:password@0.0.0.0:8080\n```\n\n\u003e If the username or password contains special characters, make sure to use\n  URL encoded values (percent-encoding) such as `p%40ss` for `p@ss`.\n\nBy default, LeProxy allows connections to every destination address as given in\neach incoming proxy request.\nIf you want to block access to certain destination hosts and/or ports, you may\nblacklist these by passing the `--block=\u003cdestination\u003e` argument.\nAny number of destination addresses can be given.\nEach destination address can be in the form `host:port` or just `host` or\n`:port` and `host` may contain the `*` wildcard to match anything.\nSubdomains for each host will automatically be blocked.\nFor example, the following can be used to block access to `youtube.com` (and its\nsubdomains such as `www.youtube.com`) and port 80 on all hosts (standard\nplaintext HTTP port):\n\n```bash\n$ php leproxy.php --block=youtube.com --block=*:80\n```\n\n\u003e Note that the block list operates on the destination addresses as given in the\n  incoming proxy request. Some [clients](#clients) use local DNS resolution and\n  do not transmit hostnames, but only the resolved destination IP addresses\n  (particularly common for the SOCKS protocol).\n  Make sure to configure your client to use remote DNS resolution accordingly\n  and/or also block access to relevant IP addresses.\n\nAs an alternative to listing each blocked destination as an individual command\nline argument, you may also pass a path to a `hosts` file instead.\nYou can either create a hosts file mapping yourself if you only want to block\ncertain hosts or you may one of the many great hosts files.\nFor example, you can download a hosts file from https://github.com/StevenBlack/hosts\n(\"hosts files from several well-curated sources like adaway.org, mvps.org,\nmalwaredomainlist.com, someonewhocares.org, and potentially others\")\nto use this as a very simple, yet effective adblocker.\nNote that LeProxy will only block domains (and all its subdomains) that match\nthe IP `0.0.0.0` and ignore all other entries:\n\n```bash\n$ cat hosts.txt\n127.0.0.1 localhost\n0.0.0.0 ads.example.com\n0.0.0.0 socialnetwork.example\n…\n\n$ php leproxy.php --block-hosts=hosts.txt\n```\n\nBy default, Leproxy creates a direct connection to the destination address for\neach incoming proxy request.\nIn this mode, the destination doesn't see the original client address, but only\nthe address of your LeProxy instance.\nIf you want a higher level degree of anonymity, you can use *proxy forwarding*,\nwhere the connection will be tunneled through another upstream proxy server.\nThis may also be useful if your upstream proxy address changes regularly (such\nas when using public proxies), but you do not want to reconfigure your client\nevery time or if your upstream proxy requires a feature that your client does\nnot support, such as requiring authentication or a different proxy protocol.\nYou can simply pass your upstream proxy server address as another URL parameter\nafter the listening address like this:\n\n```bash\n$ php leproxy.php --proxy=socks://user:pass@127.0.0.1:8080\n```\n\n\u003e The upstream proxy server URI MUST contain a hostname or IP and SHOULD include\n  a port unless the proxy happens to use default port `8080` (or you can use a\n  Unix domain socket path).\n  If no scheme is given, the `http://` scheme will be assumed.\n  If no port is given, port `8080` will be assumed regardless of scheme.\n  The `http://` and `socks[5]://` schemes support optional username/password\n  authentication as in the above example.\n\nBy appending additional upstream proxy servers, this can effectively be turned\ninto *proxy chaining*, where each incoming proxy request will be forwarded\nthrough the chain of all upstream proxy servers from left to right.\nThis comes at the price of increased latency, but may provide a higher level\ndegree of anonymity, as each proxy server in the chain only sees its direct\ncommunication partners and the destination only sees the last proxy server in\nthe chain:\n\n```bash\n$ php leproxy.php --proxy=127.1.1.1:8080 --proxy=127.2.2.2:8080 --proxy=127.3.3.3:8080\n```\n\nBy default, LeProxy prints a log message for every connection attempt to the\nconsole output (STDOUT) for debugging and analysis purposes.\nFor privacy reasons, it does not persist (store) these log messages on its own.\nIf you do not want LeProxy to log anything, you may also pass the `--no-log`\nflag.\nIf you want to persist the log to a log file, you may use standard operating\nsystem facilities such as `tee` to redirect the output to a file:\n\n```bash\n$ php leproxy.php | tee -a leproxy.log\n```\n\n## Clients\n\nOnce LeProxy is running, you can start using it with pretty much any client\nsoftware.\nThe below example assumes you want to use a web browser, but LeProxy can\nactually be used with any client software that provides proxy support, such as\nan email or IM client.\n\nMost clients provide settings to manually configure a proxy server in their\nsettings/preferences dialogs.\nYou can simply set the details from the listening address as configured above:\n\n* Protocol: HTTP or SOCKS\n* Server: 127.0.0.1 (or the public hostname or IP where LeProxy runs)\n* Port: 8080\n\n\u003e Note that these settings have to be adjusted to your actual network settings.\n  If you fail to provide correct settings, no further connection will succeed.\n  In this case, simply remove or disable these settings again.\n  The same may apply if you're roaming in another network or the proxy server is\n  temporarily not available.\n\nMany clients (in particular web browsers and mobile phones) also support Proxy\nAuto-Configuration (PAC) by specifying a PAC URL.\nUsing PAC is often beneficial because most clients will simply ignore the proxy\nsettings if the PAC URL can not be reached, such as when you're roaming in\nanother network or the proxy server is temporarily not available.\nSimply use the URL to your LeProxy instance in the following format:\n\n```\nhttp://127.0.0.1:8080/pac\n```\n\n\u003e Note that these settings have to be adjusted to your actual network settings.\n  If you fail to provide correct settings, you may or may not be able to\n  establish further connections, as most clients will simply ignore invalid\n  settings.\n  If your client disallows this, simply remove or disable these settings again.\n  LeProxy's PAC file instructs your client to use LeProxy as an HTTP proxy for\n  all public HTTP requests.\n  This means that hostnames that resolve to IPs from your local network will\n  still use a direct connection without going through a proxy.\n\n## Development\n\nLeProxy is an [open-source project](#license) and encourages everybody to\nparticipate in its development.\nYou're interested in checking out how LeProxy works under the hood and/or want\nto contribute to the development of LeProxy?\nThen this section is for you!\n\nThe recommended way to install LeProxy is to clone (or download) this repository\nand use [Composer](http://getcomposer.org) to download its dependencies.\nTherefore you'll need PHP, git and curl installed.\nFor example, on a recent Ubuntu/debian system, simply run:\n\n```bash\n$ sudo apt-get install php7.0-cli git curl\n$ git clone https://github.com/leproxy/leproxy.git\n$ cd leproxy\n$ curl -s https://getcomposer.org/installer | php\n$ sudo mv composer.phar /usr/local/bin/composer\n$ composer install\n```\n\nThat's it already!\nYou should now be able to run the development version of LeProxy simply by\nrunning the `leproxy.php` file like this:\n\n```bash\n$ php leproxy.php\n```\n\nSee also [usage](#usage) for more details.\n\nLeProxy uses a sophisticated test suite for functional tests and integration\ntests.\nTo run the test suite, go to the project root and run:\n\n```bash\n$ vendor/bin/phpunit\n```\n\nIf you want to distribute LeProxy as a single standalone release file, you may\ncompile the project into a single file like this:\n\n```bash\n$ php compile.php\n```\n\n\u003e Note that compiling will temporarily uninstall all development dependencies\n  for distribution and then re-install the complete set of dependencies.\n  This should only take a second or two if you've previously installed its\n  dependencies already.\n  The compile script optionally accepts the version number (`VERSION` env) and\n  an output file name or will otherwise try to look up the last release tag,\n  such as `leproxy-1.0.0.php`.\n\nIn addition to the above test suite, LeProxy uses a simple bash/curl-based\nacceptance test setup which can also be used to check the resulting release\nfile:\n\n```bash\n$ tests/acceptance.sh\n```\n\n\u003e Note that the acceptance tests will try to locate a `leproxy*.php` file in\n  the project directory to run the tests against. You may optionally supply the\n  output file name to test against.\n\nMade some changes to your local development version?\n\nMake sure to let the world know! :shipit:\nWe welcome PRs and would love to hear from you!\n\nHappy hacking!\n\n## License\n\nLeProxy is an open source project released under the permissive\n[MIT license](LICENSE).\n\nLeProxy is standing on the shoulders of giants.\nBuilding something like LeProxy probably wouldn't be possible if not for the\nexcellent open source projects that it builds on top of.\nIn particular, it uses [ReactPHP](http://reactphp.org/) for its fast,\nevent-driven architecture.\n\nAll of its dependencies are managed through Composer, see also the\n[development section](#development) for more details.\nIf you're using the [development version](#development), you may run\n`$ composer licenses --no-dev` to get a list of all runtime dependencies and their\nrespective licenses.\nAll these requirements are bundled into the single standalone release file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleproxy%2Fleproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleproxy%2Fleproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleproxy%2Fleproxy/lists"}