# LaProxy
## Introduction
> An easy to use proxy for A/D CTFs
> You can read the documentation at [rikyiso01.github.io/LaProxy](https://rikyiso01.github.io/LaProxy)
## Code Samples
> ### TCP
>
> ```python
> from laproxy import TCPProxy, TCPHandler
>
>
> class Handler(TCPHandler):
> def process(self, packet: bytes, inbound: bool, /) -> bytes | None:
> if b"ciao" in packet and not inbound:
> return None
> return packet
>
>
> if __name__ == "__main__":
> TCPProxy("0.0.0.0", 1234, "127.0.0.1", 5005, Handler).run()
> ```
>
> ### HTTP
>
> ```python
> from laproxy import TCPProxy, HTTPHandler, HTTPRequest, HTTPResponse
>
>
> class Handler(HTTPHandler):
> def request(self, request: HTTPRequest, /) -> HTTPRequest | None:
> return request
>
> def response(self, response: HTTPResponse, /) -> HTTPResponse | None:
> if b"flag" in response.body:
> return None
> return response
>
> if __name__ == "__main__":
> TCPProxy("0.0.0.0", 1234, "127.0.0.1", 5005, Handler).run()
> ```
>
> You can find more examples in the samples folder
## Installation
> Install locally with:
>
> ```bash
> python3 -m pip install laproxy
> ```
>
> Or use it in a docker compose:
>
> ```yaml
> version: "3.9"
> services:
> proxy:
> image: ghcr.io/rikyiso01/laproxy:latest
> ports:
> - "1234:1234"
> volumes:
> - ./proxy.py:/app/proxy.py
> ```
Raw data
{
"_id": null,
"home_page": "https://github.com/rikyiso01/LaProxy",
"name": "laproxy",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "proxy,ctf-tools,attack-defense-ctf",
"author": "Riccardo Isola",
"author_email": "riky.isola@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/a7/10/12be60e2ce3e9e332cff3f73cd8c743c30e65488f5b024d234dbf126f389/laproxy-1.1.0.tar.gz",
"platform": null,
"description": "# LaProxy\n\n## Introduction\n\n> An easy to use proxy for A/D CTFs \n> You can read the documentation at [rikyiso01.github.io/LaProxy](https://rikyiso01.github.io/LaProxy)\n\n## Code Samples\n\n> ### TCP\n>\n> ```python\n> from laproxy import TCPProxy, TCPHandler\n>\n>\n> class Handler(TCPHandler):\n> def process(self, packet: bytes, inbound: bool, /) -> bytes | None:\n> if b\"ciao\" in packet and not inbound:\n> return None\n> return packet\n>\n>\n> if __name__ == \"__main__\":\n> TCPProxy(\"0.0.0.0\", 1234, \"127.0.0.1\", 5005, Handler).run()\n> ```\n>\n> ### HTTP\n>\n> ```python\n> from laproxy import TCPProxy, HTTPHandler, HTTPRequest, HTTPResponse\n>\n>\n> class Handler(HTTPHandler):\n> def request(self, request: HTTPRequest, /) -> HTTPRequest | None:\n> return request\n>\n> def response(self, response: HTTPResponse, /) -> HTTPResponse | None:\n> if b\"flag\" in response.body:\n> return None\n> return response\n>\n> if __name__ == \"__main__\":\n> TCPProxy(\"0.0.0.0\", 1234, \"127.0.0.1\", 5005, Handler).run()\n> ```\n>\n> You can find more examples in the samples folder\n\n## Installation\n\n> Install locally with:\n>\n> ```bash\n> python3 -m pip install laproxy\n> ```\n>\n> Or use it in a docker compose:\n>\n> ```yaml\n> version: \"3.9\"\n> services:\n> proxy:\n> image: ghcr.io/rikyiso01/laproxy:latest\n> ports:\n> - \"1234:1234\"\n> volumes:\n> - ./proxy.py:/app/proxy.py\n> ```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "An easy to use proxy for A/D CTFs",
"version": "1.1.0",
"project_urls": {
"Documentation": "https://rikyiso01.github.io/LaProxy",
"Homepage": "https://github.com/rikyiso01/LaProxy",
"Repository": "https://github.com/rikyiso01/LaProxy"
},
"split_keywords": [
"proxy",
"ctf-tools",
"attack-defense-ctf"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6e9e256829bab98e5e7067c0f232829645c9e067d72985727db8d69acadf8bf8",
"md5": "5eedc811b6a74d9c44b819a14e2cb651",
"sha256": "b158d2f11b3678db94201380b470bb0bfd6d68867fb7bc8eb1c008a4334147ba"
},
"downloads": -1,
"filename": "laproxy-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5eedc811b6a74d9c44b819a14e2cb651",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 7808,
"upload_time": "2023-07-18T08:45:07",
"upload_time_iso_8601": "2023-07-18T08:45:07.535697Z",
"url": "https://files.pythonhosted.org/packages/6e/9e/256829bab98e5e7067c0f232829645c9e067d72985727db8d69acadf8bf8/laproxy-1.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a71012be60e2ce3e9e332cff3f73cd8c743c30e65488f5b024d234dbf126f389",
"md5": "dc3b29ea621e3a58c8612ae8858e42f1",
"sha256": "2ff9580862b528e775ca8245f51118756a1683d52c742a0cd0ed2ba807260884"
},
"downloads": -1,
"filename": "laproxy-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "dc3b29ea621e3a58c8612ae8858e42f1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 5823,
"upload_time": "2023-07-18T08:45:08",
"upload_time_iso_8601": "2023-07-18T08:45:08.919063Z",
"url": "https://files.pythonhosted.org/packages/a7/10/12be60e2ce3e9e332cff3f73cd8c743c30e65488f5b024d234dbf126f389/laproxy-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-18 08:45:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "rikyiso01",
"github_project": "LaProxy",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "laproxy"
}