{"id":34898954,"url":"https://github.com/amirpooyan-r/segmented-proxy","last_synced_at":"2026-01-13T20:54:33.384Z","repository":{"id":329381608,"uuid":"1119309513","full_name":"amirpooyan-r/segmented-proxy","owner":"amirpooyan-r","description":"SegmentedProxy is a small educational proxy written in Python. It helps students understand how HTTP forwarding, HTTPS CONNECT tunnels, rule-based routing, and traffic segmentation work in practice. The project focuses on clarity, safe defaults, and explainable behavior.","archived":false,"fork":false,"pushed_at":"2025-12-30T08:18:30.000Z","size":170,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-30T09:14:35.012Z","etag":null,"topics":["education","http","http-proxy","https","https-proxy","learning","networking","proxy","python","security-basics"],"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/amirpooyan-r.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-19T04:36:19.000Z","updated_at":"2025-12-30T08:18:34.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/amirpooyan-r/segmented-proxy","commit_stats":null,"previous_names":["amirpooyan-r/segmented-proxy"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/amirpooyan-r/segmented-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirpooyan-r%2Fsegmented-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirpooyan-r%2Fsegmented-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirpooyan-r%2Fsegmented-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirpooyan-r%2Fsegmented-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amirpooyan-r","download_url":"https://codeload.github.com/amirpooyan-r/segmented-proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirpooyan-r%2Fsegmented-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28400344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["education","http","http-proxy","https","https-proxy","learning","networking","proxy","python","security-basics"],"created_at":"2025-12-26T08:02:18.039Z","updated_at":"2026-01-13T20:54:33.379Z","avatar_url":"https://github.com/amirpooyan-r.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SegmentedProxy\n\n[![Docs](https://img.shields.io/badge/docs-GitHub%20Pages-blue)](https://amirpooyan-r.github.io/segmented-proxy/)\n\n## Start here\n- Documentation site: https://amirpooyan-r.github.io/segmented-proxy/\n- About This Project: https://amirpooyan-r.github.io/segmented-proxy/ABOUT_THIS_PROJECT/\n- Learning Path: https://amirpooyan-r.github.io/segmented-proxy/LEARNING_PATH/\n\n## Project Status / Support\n- Educational project (active)\n- Python 3.10+\n- Not production software\n- Issues welcome; best-effort support\n\n## Releases\nYou can find stable versions and release notes here:\n\n- Latest: https://github.com/amirpooyan-r/segmented-proxy/releases/latest\n- History: https://github.com/amirpooyan-r/segmented-proxy/releases\n\n## Overview\nSegmentedProxy is a small HTTP/HTTPS proxy made for learning.\nIt sits between your browser and the internet.\nIt helps you see how rules and segmentation change traffic.\nIt is not production software.\n\n## Project Goals\nSegmentedProxy is an **educational project** designed to help learners understand\nhow HTTP/HTTPS proxies, CONNECT tunnels, routing rules, and traffic segmentation\nwork in practice.\n\nIt is **not production software** and is **not intended for censorship bypass,\nanonymity, or high-performance use**.\n\nFor full details, see:\nhttps://amirpooyan-r.github.io/segmented-proxy/PROJECT_GOALS/\n\n\n## Documentation Site\nDocs are available on GitHub Pages:\nhttps://amirpooyan-r.github.io/segmented-proxy/\n\n## What You Will Learn\n- What HTTP and HTTPS are\n- How a proxy works between a browser and a server\n- What CONNECT tunnels are\n- What \"segmentation\" means in this project (send data in small parts)\n- How rules control traffic behavior\n\n## Who Is This Project For?\nThis project is good for:\n- Students\n- Beginners learning networking\n- People curious about how browsers use proxies\n\n## Quick Start\nStep 1: Get the code (Git)\n`git clone` downloads a copy of this project to your computer.\nGit must be installed.\n```bash\ngit clone git@github.com:amirpooyan-r/segmented-proxy.git\ncd segmented-proxy\n```\n\nStep 2: Create and activate a virtual environment\nLinux/macOS:\n```bash\npython -m venv .venv\nsource .venv/bin/activate\n```\n\nWindows PowerShell:\n```powershell\npython -m venv .venv\n.venv\\Scripts\\Activate.ps1\n```\n\nWindows cmd:\n```bat\npython -m venv .venv\n.venv\\Scripts\\activate.bat\n```\n\nStep 3: Install the project\n```bash\npip install -e .\n```\n\nStep 4: Run the proxy\n```bash\nsegproxy --listen-host 127.0.0.1 --listen-port 8080\n```\n\nStep 5: Test with curl\n```bash\ncurl -x http://127.0.0.1:8080 http://example.com/\ncurl -x http://127.0.0.1:8080 https://example.com/\n```\n\nNote for Windows users (HTTPS and curl)\nWhen testing HTTPS with `curl` on Windows, you may see\ncertificate warnings or TLS errors.\nThis is normal.\nSegmentedProxy does not decrypt HTTPS.\nIt uses a CONNECT tunnel.\nThe TLS connection is between your client and the website.\nWindows `curl` may not trust all certificates by default.\nIf you only want to test the proxy behavior, you can use:\n```bash\ncurl -k -x http://127.0.0.1:8080 https://example.com/\n```\n\n## Learning Path\nSee the documentation site for a guided learning path:\nhttps://amirpooyan-r.github.io/segmented-proxy/\n\n\n## Rules and Configuration (Short)\nRules tell the proxy what to do with matching traffic.\nA rule can match by host, scheme, method, or path.\nActions can be:\n- direct (connect to the server)\n- upstream (connect to another proxy)\n- block (deny the request)\n\nSegmentation can be:\n- none\n- fixed (same chunk size)\n- random (chunk size changes)\n\nExample rules:\nYou can pass rules with repeated `--segment-rule` or load a file with `--rules-file`.\nComment lines start with `#` and blank lines are ignored.\nSee `examples/rules.txt` for a sample rules file you can use with `--rules-file` or copy/paste.\n```\nexample.com=direct\n*.example.com=segment_upstream,action=upstream,upstream=127.0.0.1:3128\n*.example.com=segment_upstream,scheme=https,method=CONNECT,strategy=random,min=256,max=1024,delay=5\n```\nIf a rule is invalid, SegmentedProxy shows the line number.\nIt also shows a short reason to help you fix it.\n\n## DNS Resolution\n\nSegmentedProxy needs DNS to connect to remote hosts.\n\nBy default, it uses your system DNS resolver and DNS caching is disabled.\n\nOptional DNS features:\n- `--dns-cache-size \u003cint\u003e`: enable in-memory DNS cache (use `0` to disable)\n- `--dns-server \u003cip\u003e`: use a specific DNS server (instead of system resolver)\n- `--dns-port \u003cint\u003e`: DNS server port (default: `53`)\n- `--dns-transport {udp,tcp}`: DNS transport (default: `udp`)\n\nWhen `udp` is used (default), the proxy will retry DNS over TCP if UDP fails\nor the UDP response is truncated.\n\nFor full details and examples, see: `docs/DNS_RESOLUTION.md`.\n\n## Limitations\n- HTTP/1.1 only\n- No TLS decryption. HTTPS is a tunnel.\n- Not hardened for production use\n\n## Responsible Use\nThis project is for learning and testing in places you control.\nThis is not a bypass guide.\nSegmentation does not guarantee bypassing DPI.\nModern networks can still detect and block many techniques.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famirpooyan-r%2Fsegmented-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famirpooyan-r%2Fsegmented-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famirpooyan-r%2Fsegmented-proxy/lists"}