{"id":20292527,"url":"https://github.com/mauricelambert/simplehttpproxy","last_synced_at":"2025-03-04T05:13:47.455Z","repository":{"id":57753667,"uuid":"527223977","full_name":"mauricelambert/SimpleHttpProxy","owner":"mauricelambert","description":"This package implements a simple HTTP(S) proxy.","archived":false,"fork":false,"pushed_at":"2025-01-27T08:13:52.000Z","size":578,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-27T09:22:49.330Z","etag":null,"topics":["asynchronous","asyncio","browser","http","http-proxy","https","proxy","python3","tcp","web"],"latest_commit_sha":null,"homepage":"","language":"Python","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/mauricelambert.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}},"created_at":"2022-08-21T14:04:25.000Z","updated_at":"2025-01-27T08:13:55.000Z","dependencies_parsed_at":"2022-08-22T20:40:37.124Z","dependency_job_id":null,"html_url":"https://github.com/mauricelambert/SimpleHttpProxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauricelambert%2FSimpleHttpProxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauricelambert%2FSimpleHttpProxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauricelambert%2FSimpleHttpProxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauricelambert%2FSimpleHttpProxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mauricelambert","download_url":"https://codeload.github.com/mauricelambert/SimpleHttpProxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241787485,"owners_count":20020101,"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":["asynchronous","asyncio","browser","http","http-proxy","https","proxy","python3","tcp","web"],"created_at":"2024-11-14T15:17:39.386Z","updated_at":"2025-03-04T05:13:47.449Z","avatar_url":"https://github.com/mauricelambert.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![SimpleHttpProxy logo](https://mauricelambert.github.io/info/python/code/SimpleHttpProxy_small.png \"SimpleHttpProxy logo\")\n\n# SimpleHttpProxy\n\n## Description\n\nThis package implements a simple and partially asynchronous HTTP(S) proxy.\n\n## Requirements\n\nThis package require:\n\n - python3\n - python3 Standard Library\n\n## Installation\n\n### Pip\n\n```bash\npython3 -m pip install SimpleHttpProxy\n```\n\n### Git\n\n```bash\ngit clone \"https://github.com/mauricelambert/SimpleHttpProxy.git\"\ncd \"SimpleHttpProxy\"\npython3 -m pip install .\n```\n\n### Wget\n\n```bash\nwget https://github.com/mauricelambert/SimpleHttpProxy/archive/refs/heads/main.zip\nunzip main.zip\ncd SimpleHttpProxy-main\npython3 -m pip install .\n```\n\n### cURL\n\n```bash\ncurl -O https://github.com/mauricelambert/SimpleHttpProxy/archive/refs/heads/main.zip\nunzip main.zip\ncd SimpleHttpProxy-main\npython3 -m pip install .\n```\n\n## Usages\n\n### Default proxy printer using command line\n\n```bash\npython3 SimpleHttpProxy.py -h\npython3 ProxyPrinter.pyz --help\n\nProxyPrinter --interface 0.0.0.0 --port 8012 --unsecure\nProxyPrinter -i 0.0.0.0 -p 8012 -s\n```\n\n### Custom proxy using Python\n\nProxy Server:\n\n```python\nfrom SimpleHttpProxy import AbcHttpProxy\n\nclass ProxyRestrict(AbcHttpProxy):\n\tdef handle_request(self, data: bytes) -\u003e bytes:\n\t\tif b'://www.ruby-lang.org' in data.split(b\"\\r\\n\", 1)[0]:\n\t\t\treturn data.replace(b'www.ruby-lang.org', b'www.python.org', 2)\n\t\treturn data\n\tdef handle_response(self, data: bytes) -\u003e bytes:\n\t\treturn data.replace(b'www.ruby-lang.org', b'www.python.org')\n\nproxy = ProxyRestrict()\nproxy.start()\n```\n\nPython Client:\n\n```python\nfrom urllib.request import Request, urlopen\nr = Request(\"http://ruby-lang.org/\")\nr.set_proxy('127.0.0.1:8012', 'http')\nprint(urlopen(r).read()[3150:4000].decode())\n```\n\n#### Screenshots\n\n![Firefox proxy configuration](https://raw.githubusercontent.com/mauricelambert/SimpleHttpProxy/main/FirefoxConfig.PNG \"Firefox proxy configuration\")\n\n![Default: Proxy Printer](https://raw.githubusercontent.com/mauricelambert/SimpleHttpProxy/main/ProxyPrinter.png \"Default: Proxy Printer\")\n\n![Custom: Proxy Restriction](https://raw.githubusercontent.com/mauricelambert/SimpleHttpProxy/main/ProxyRestriction.png \"Proxy Restriction\")\n\n## Links\n\n - [Pypi](https://pypi.org/project/SimpleHttpProxy/)\n - [Github](https://github.com/mauricelambert/SimpleHttpProxy/)\n - [Documentation](https://mauricelambert.github.io/info/python/code/SimpleHttpProxy.html)\n - [Executable](https://mauricelambert.github.io/info/python/code/ProxyPrinter.pyz)\n - [Python Windows executable](https://mauricelambert.github.io/info/python/code/ProxyPrinter.exe)\n\n## Licence\n\nLicensed under the [GPL, version 3](https://www.gnu.org/licenses/).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauricelambert%2Fsimplehttpproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmauricelambert%2Fsimplehttpproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauricelambert%2Fsimplehttpproxy/lists"}