Skip to content

SamNet-dev/iran-conduit-firewall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Iran-Only Firewall for Psiphon Conduit


English Guide

Maximize your Psiphon Conduit bandwidth for Iranian users during internet shutdowns.

When 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.

✨ Features

  • Smart Split Tunneling - Keeps Conduit "Active" while blocking non-Iran data
  • Easy IP Updates - Re-run to fetch the latest Iran IP ranges
  • Only affects Conduit - Your PC works normally
  • 2000+ Iran IP ranges - Updated from authoritative sources
  • DNS whitelisted - Google, Cloudflare, Shekan DNS
  • Auto-detects Conduit - Works with Windows Store version

📋 Requirements

Requirement Details
OS Windows 10/11
Python 3.6+ (Download)
Conduit Psiphon Conduit

🚀 Quick Start (2 Options)

Option A: Download ZIP (Easiest)

  1. Click ⬇️ Download ZIP
  2. Extract the ZIP file
  3. Double-click RUN_AS_ADMIN.bat (auto-elevates to admin)

Option B: Git Clone

git clone https://github.com/SamNet-dev/iran-conduit-firewall.git
cd iran-conduit-firewall

Then double-click RUN_AS_ADMIN.bat

Or run manually as Administrator:

python iran_firewall.py

📖 Usage

MAIN MENU
  1. 🟢 Enable Iran-only mode    ← Block non-Iran IPs
  2. 🔴 Disable Iran-only mode   ← Allow all countries
  3. 📊 Check status
  4. 🚀 Conduit management
  0. 🚪 Exit

🛡️ Filtering Modes

This script offers two security levels to balance between bandwidth saving and network visibility:

1. 🟢 Normal Mode (Recommended)

  • Logic: UDP (Iran only) + TCP (Global)
  • 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.
  • Best for: Most users. Ensures you help as many people as possible without being flooded by global traffic.

2. 🔒 Strict Mode

  • Logic: UDP (Iran only) + TCP (Iran only)
  • Purpose: Blocks all connections from non-Iranian IPs, including Psiphon's own discovery checks.
  • 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.
  • Best for: Private nodes or maximum bandwidth conservation.

❓ FAQ

Q: Does this affect my PC?
A: No! Only Psiphon Conduit is affected.

Q: Do rules stay after I close the script?
A: Yes, until you run option 2 (Disable).

📜 License

MIT License - Free to use and share.

🤝 Contributors & Credits

Special thanks to the community members who forked and improved this script (v1.1.1). Key contributions include:

  • Explicit BLOCK rules for enhanced security.
  • Comprehensive IPv6 support.
  • PowerShell auto-elevation for the batch launcher.


راهنمای فارسی

پهنای باند Psiphon Conduit خود را برای کاربران ایرانی حداکثر کنید.

✨ ویژگی‌ها

  • فقط Conduit را تحت تأثیر قرار می‌دهد - کامپیوتر شما عادی کار می‌کند
  • بیش از ۲۰۰۰ رنج IP ایران
  • DNS های مجاز - گوگل، کلودفلر، شکن
  • فعال/غیرفعال آسان

📋 پیش‌نیازها

پیش‌نیاز جزئیات
سیستم عامل ویندوز ۱۰/۱۱
پایتون نسخه ۳.۶+ (دانلود)
Conduit Psiphon Conduit

🚀 شروع سریع (۲ روش)

روش A: دانلود ZIP (آسان‌ترین)

  1. Click ⬇️ Download ZIP
  1. فایل ZIP را استخراج کنید
  2. روی RUN_AS_ADMIN.bat دوبار کلیک کنید

روش B: Git Clone

git clone https://github.com/SamNet-dev/iran-conduit-firewall.git
cd iran-conduit-firewall

سپس روی RUN_AS_ADMIN.bat دوبار کلیک کنید

📖 استفاده

MAIN MENU
  1. 🟢 Enable Iran-only mode    ← مسدود کردن IP های غیر ایرانی
  2. 🔴 Disable Iran-only mode   ← اجازه به همه کشورها
  3. 📊 Check status
  4. 🚀 Conduit management
  0. 🚪 Exit

❓ سؤالات متداول

س: آیا روی کامپیوتر من تأثیر می‌گذارد؟
ج: خیر! فقط Psiphon Conduit تحت تأثیر قرار می‌گیرد.

س: قوانین بعد از بستن اسکریپت باقی می‌مانند؟
ج: بله، تا زمانی که گزینه ۲ را اجرا نکنید.

📜 مجوز

MIT License - آزاد برای استفاده و اشتراک‌گذاری.

About

Maximize Psiphon Conduit bandwidth for Iranian users

Resources

License

Stars

Watchers

Forks

Packages

No packages published