{"id":42009125,"url":"https://github.com/samnet-dev/iran-conduit-firewall","last_synced_at":"2026-01-30T06:01:27.580Z","repository":{"id":334312748,"uuid":"1140953186","full_name":"SamNet-dev/iran-conduit-firewall","owner":"SamNet-dev","description":" Maximize Psiphon Conduit bandwidth for Iranian users","archived":false,"fork":false,"pushed_at":"2026-01-26T00:49:20.000Z","size":41,"stargazers_count":41,"open_issues_count":0,"forks_count":8,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-26T15:52:16.564Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/SamNet-dev.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":"2026-01-24T01:34:19.000Z","updated_at":"2026-01-26T10:07:23.000Z","dependencies_parsed_at":"2026-01-27T03:00:33.741Z","dependency_job_id":null,"html_url":"https://github.com/SamNet-dev/iran-conduit-firewall","commit_stats":null,"previous_names":["samnet-dev/iran-conduit-firewall"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/SamNet-dev/iran-conduit-firewall","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamNet-dev%2Firan-conduit-firewall","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamNet-dev%2Firan-conduit-firewall/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamNet-dev%2Firan-conduit-firewall/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamNet-dev%2Firan-conduit-firewall/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamNet-dev","download_url":"https://codeload.github.com/SamNet-dev/iran-conduit-firewall/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamNet-dev%2Firan-conduit-firewall/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28798582,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T01:07:07.743Z","status":"online","status_checked_at":"2026-01-27T02:00:07.755Z","response_time":168,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-01-26T02:17:39.954Z","updated_at":"2026-01-27T03:00:40.656Z","avatar_url":"https://github.com/SamNet-dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  Iran-Only Firewall for Psiphon Conduit\n\n\u003cdiv dir=\"rtl\"\u003e\n\n## [ فارسی](#راهنمای-فارسی) | [🇬🇧 English](#english-guide)\n\u003c/div\u003e\n\n---\n\n# English Guide\n\n\n**Maximize your Psiphon Conduit bandwidth for Iranian users during internet shutdowns.**\n\nWhen you run a Psiphon Conduit node, people from ANY country can connect. This tool blocks non-Iran IPs so only Iranians can use your bandwidth.\n\n## ✨ Features\n\n- ✅ **Smart Split Tunneling** - Keeps Conduit \"Active\" while blocking non-Iran data\n- ✅ **Easy IP Updates** - Re-run to fetch the latest Iran IP ranges\n- ✅ **Only affects Conduit** - Your PC works normally\n- ✅ **2000+ Iran IP ranges** - Updated from authoritative sources  \n- ✅ **DNS whitelisted** - Google, Cloudflare, Shekan DNS\n- ✅ **Auto-detects Conduit** - Works with Windows Store version\n\n## 📋 Requirements\n\n| Requirement | Details |\n|-------------|---------|\n| **OS** | Windows 10/11 |\n| **Python** | 3.6+ ([Download](https://python.org)) |\n| **Conduit** | [Psiphon Conduit](https://conduit.psiphon.ca) |\n\n## 🚀 Quick Start (2 Options)\n\n### Option A: Download ZIP (Easiest)\n\n1. Click **[⬇️ Download ZIP](https://github.com/SamNet-dev/iran-conduit-firewall/archive/refs/heads/master.zip)**\n2. Extract the ZIP file\n3. Double-click **`RUN_AS_ADMIN.bat`** (auto-elevates to admin)\n\n### Option B: Git Clone\n\n```powershell\ngit clone https://github.com/SamNet-dev/iran-conduit-firewall.git\ncd iran-conduit-firewall\n```\n\nThen double-click **`RUN_AS_ADMIN.bat`**\n\nOr run manually as Administrator:\n```powershell\npython iran_firewall.py\n```\n\n## 📖 Usage\n\n```\nMAIN MENU\n  1. 🟢 Enable Iran-only mode    ← Block non-Iran IPs\n  2. 🔴 Disable Iran-only mode   ← Allow all countries\n  3. 📊 Check status\n  4. 🚀 Conduit management\n  0. 🚪 Exit\n```\n\n## 🛡️ Filtering Modes\n\nThis script offers two security levels to balance between bandwidth saving and network visibility:\n\n### 1. 🟢 Normal Mode (Recommended)\n*   **Logic:** UDP (Iran only) + TCP (Global)\n*   **Purpose:** Allows Psiphon's global discovery servers (Brokers) to reach your node via TCP so it stays \"Active\" in the network. However, the high-bandwidth data tunnel (UDP) is restricted to Iranian IPs only.\n*   **Best for:** Most users. Ensures you help as many people as possible without being flooded by global traffic.\n\n### 2. 🔒 Strict Mode\n*   **Logic:** UDP (Iran only) + TCP (Iran only)\n*   **Purpose:** Blocks **all** connections from non-Iranian IPs, including Psiphon's own discovery checks.\n*   **Warning:** Since Psiphon's infrastructure (outside Iran) cannot \"ping\" your node via TCP, your node may eventually be dropped from the discovery network and become \"dark\" or less effective over time.\n*   **Best for:** Private nodes or maximum bandwidth conservation.\n\n---\n\n## ❓ FAQ\n\n**Q: Does this affect my PC?**  \nA: No! Only Psiphon Conduit is affected.\n\n**Q: Do rules stay after I close the script?**  \nA: Yes, until you run option 2 (Disable).\n\n## 📜 License\n\nMIT License - Free to use and share.\n\n## 🤝 Contributors \u0026 Credits\n\nSpecial thanks to the community members who forked and improved this script (v1.1.1). Key contributions include:\n- Explicit BLOCK rules for enhanced security.\n- Comprehensive IPv6 support.\n- PowerShell auto-elevation for the batch launcher.\n\n---\n\n---\n\n\u003cdiv dir=\"rtl\"\u003e\n\n# راهنمای فارسی\n\n**پهنای باند Psiphon Conduit خود را برای کاربران ایرانی حداکثر کنید.**\n\n## ✨ ویژگی‌ها\n\n- ✅ **فقط Conduit را تحت تأثیر قرار می‌دهد** - کامپیوتر شما عادی کار می‌کند\n- ✅ **بیش از ۲۰۰۰ رنج IP ایران**\n- ✅ **DNS های مجاز** - گوگل، کلودفلر، شکن\n- ✅ **فعال/غیرفعال آسان**\n\n## 📋 پیش‌نیازها\n\n| پیش‌نیاز | جزئیات |\n|----------|--------|\n| **سیستم عامل** | ویندوز ۱۰/۱۱ |\n| **پایتون** | نسخه ۳.۶+ ([دانلود](https://python.org)) |\n| **Conduit** | [Psiphon Conduit](https://conduit.psiphon.ca) |\n\n## 🚀 شروع سریع (۲ روش)\n\n### روش A: دانلود ZIP (آسان‌ترین)\n\n\u003c/div\u003e\n\n1. Click **[⬇️ Download ZIP](https://github.com/SamNet-dev/iran-conduit-firewall/archive/refs/heads/master.zip)**\n\n\u003cdiv dir=\"rtl\"\u003e\n\n2. فایل ZIP را استخراج کنید\n3. روی **`RUN_AS_ADMIN.bat`** دوبار کلیک کنید\n\n### روش B: Git Clone\n\n\u003c/div\u003e\n\n```powershell\ngit clone https://github.com/SamNet-dev/iran-conduit-firewall.git\ncd iran-conduit-firewall\n```\n\n\u003cdiv dir=\"rtl\"\u003e\n\nسپس روی **`RUN_AS_ADMIN.bat`** دوبار کلیک کنید\n\n## 📖 استفاده\n\n\u003c/div\u003e\n\n```\nMAIN MENU\n  1. 🟢 Enable Iran-only mode    ← مسدود کردن IP های غیر ایرانی\n  2. 🔴 Disable Iran-only mode   ← اجازه به همه کشورها\n  3. 📊 Check status\n  4. 🚀 Conduit management\n  0. 🚪 Exit\n```\n\n\u003cdiv dir=\"rtl\"\u003e\n\n## ❓ سؤالات متداول\n\n**س: آیا روی کامپیوتر من تأثیر می‌گذارد؟**  \nج: خیر! فقط Psiphon Conduit تحت تأثیر قرار می‌گیرد.\n\n**س: قوانین بعد از بستن اسکریپت باقی می‌مانند؟**  \nج: بله، تا زمانی که گزینه ۲ را اجرا نکنید.\n\n## 📜 مجوز\n\nMIT License - آزاد برای استفاده و اشتراک‌گذاری.\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamnet-dev%2Firan-conduit-firewall","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamnet-dev%2Firan-conduit-firewall","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamnet-dev%2Firan-conduit-firewall/lists"}