Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

312 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OpenWrt Passwall2 Auto Configuration with optional Iran specific fixes

Automated configuration script for setting up Passwall2 on OpenWrt devices. It supports both newer v25 releases (apk) and older releases (opkg), resolving dependencies and configuring everything.

Minimum hardware profile:

  • Flash 128MB
  • RAM 256MB

Installation

Run via SSH:

rm -f /tmp/set.sh && wget -O /tmp/set.sh https://raw.githubusercontent.com/sadraimam/ax3000t/refs/heads/main/set.sh && chmod +x /tmp/set.sh && sh /tmp/set.sh

Script Options (Flags)

The script accepts several optional arguments so you can customize the installation:

  • -g, --github [VER] : Install from GitHub releases instead of SourceForge feeds. Optionally specify a version (e.g., v2.0.1).
  • -c, --clean : Perform a clean install (removes existing Passwall packages first).
  • -l, --only-luci : Install only the LuCI interface (skip binaries). Used with GitHub mode only.
  • -f, --full : Full feature install (includes chinadns-ng, hysteria, haproxy, microsocks, naiveproxy).
  • -rw, --root-wifi : Setup to configure the Root password and WiFi password to 123456789.
  • -i, --iran : Apply Iran-specific configurations (Timezone, Passwall banner patch, custom DNS, and DNS Rebind fixes).
  • -rb, --reset-button : Modify hardware reset button to clear root password on a 5s press instead of factory reset.
  • -h, --help : Show help message.

Examples:

# Install latest from SourceForge feed with root/wifi setup and Iran configs
sh /tmp/set.sh -rw -i

# Clean install latest from GitHub releases
sh /tmp/set.sh -g -c

Features

  • Package Manager Agnostic: Automatically uses apk or opkg depending on your OpenWrt version.
  • Dual Source Installation: Install from either the official SourceForge feeds or directly from GitHub releases.
  • Dependency Management: Automatically installs required kernels (kmod-nft-tproxy, etc.), swaps dnsmasq for dnsmasq-full, and ensures DNS resolves correctly during the swap.
  • Default Passwords: Set uniform defaults for your WiFi and root password to 123456789 (-rw).
  • Region Specific Fixes: Dedicated Iran configuration flag (-i) to set Asia/Tehran timezone, add regional DNS, and fix DNS rebinding for local carrier portals (Irancell, MCI, TCI).
  • Hardware Reset Recovery: Modify the hardware reset button to clear the root password instead of wiping the device (-rb).

Prerequisites

  • OpenWrt installed
  • Root access to the router
  • Working internet connection

Default Settings

  • Default root & wifi password: 123456789 (You will be prompted to change this if using -rw)
  • Timezone: UTC (Changes to Asia/Tehran if using -i)
  • DNS: Google DNS (8.8.8.8, 8.8.4.4, 1.1.1.1, 1.0.0.1, etc.)

AX3000T note:

On the Xiaomi AX3000T, factory partitioning results in an overlay size of approximately 60 MB, compared to around 90-100 MB available on similar routers. The script is optimized to work with this limited storage space although its recommended to flash the router with a UBoot layout (e.g., OpenWrt V25 AX3000T UBoot layout) to gain more free storage space (You should get 85 MB total).

About

PassWall2 automated install on OpenWrt with optional Iran specific fixes

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages