Using AoBai VPN on KWRT / OpenWrt
This guide is for KWRT, official OpenWrt, and iStoreOS after luci-app-passwall-aobai is installed. The interface and the login helper are in that one package. There is one package set and one interface. Open Services → AoBaiVPN. On a Chinese LuCI interface the same menu is 服务 → 鳌拜VPN. Official OpenWrt 24.10 also installs luci-compat, which the Lua menu needs.
Screenshots are from the English interface. Nodes and latency in the pictures are from the moment they were taken, not the state of your router.
1. Where to open it after install
- Open the router admin page in a browser.
http://192.168.1.1is common. It may also be this device’s LAN IP. - Log in to LuCI as
root. - Open Services → AoBaiVPN in the left menu.
Five tabs sit across the top:
| Tab | What it does |
|---|---|
| Status | The Enable service switch, login, subscription sync, dial status, LAN addresses, ports, and conflicts with PassWall, UU, or Xunyou |
| VPN dial | Dial and disconnect. Choosing a row switches to that node and dials again |
| Speed test | App reachability, latency by country, and node latency |
| Security policy | Blocks for ads, trackers, malware and phishing, and adult content, plus country routing and custom rules |
| Rule library | Automatic and manual rule updates |

2. Sign in and sync official nodes
Approve this router from the AoBai app on a phone that is already signed in. Do not scan the code with the system camera.
- Open Status. Before login you see an 8-digit approval code and a QR code.
- On the phone, open the AoBai app → Devices → enter the 8 digits, or scan inside the app.
- After approval, choose Check approval, or wait for the page to refresh.
- After login, choose Sync official subscription. Dialing waits until the node list appears.
When the session expires, approve the router again.
3. Dial
Open VPN dial:

- Dial connects the selected node. Auto picks a line from the speed-test results.
- Disconnect stops the core and removes the LAN proxy and gateway hijack.
- The table is sorted by latency, lowest first. Choosing a row switches to that node and dials again.
- Node names follow the LuCI language. The screen shows the region and TCP/UDP. It does not show the tunnel protocol.
After a successful dial, Status shows:
- Core: running
- Dial: connected
- LAN proxy:
HTTP/SOCKS5 <router IP>:6789(6789 by default, and it can be changed) - LAN gateway:
<router IP> / DNS <router IP>
4. How LAN devices reach the internet
After dialing, a computer or phone can use the router in two ways. If the proxy works and the gateway does not, the gateway or DNS is still pointing at the upstream router, not at the device running AoBai.
As a proxy
This only affects the apps you configure, and it is the steadier choice. In each app that should use the VPN, set:
- Type: HTTP or SOCKS5
- Address: this router’s LAN IP, from the LAN proxy line on Status
- Port: the mixed proxy port, 6789 by default
A browser, a terminal, or an app that honors the system proxy can send the whole device through that port. Leave the computer’s gateway unchanged, and other devices stay unaffected.
As a gateway
All traffic from the device goes through the VPN. Use this when the KWRT / OpenWrt box is the default gateway, whether it is the main router or a side router.
In the IPv4 settings of the computer or phone:
- Set default gateway to this device’s LAN IP.
- Set DNS to the same IP. Do not use
8.8.8.8or the upstream router. - Keep the device’s own IP on the same subnet.
After dialing, the router:
- Sends public TCP into the VPN. That transparent redirect uses port 7895 by default.
- Points local dnsmasq upstream at the core DNS, port 16450 by default, so lookups are not poisoned.
- Turns AAAA off for the moment, which reduces IPv6 bypass.
Disconnect removes that hijack, and DNS returns to what it was.
If this box also has PassWall, OpenClash, UU, or Xunyou, do not run both at once. Turn off Enable service on Status and the gateway is free for the other program. A conflict is shown in yellow or red.
5. Enable service
Enable service is at the top of Status. It is on by default.
| Switch | Behavior |
|---|---|
| On | Dialing is allowed, and the service can still start on boot |
| Off | Stops the core, removes the gateway hijack, and disables start on boot, so UU, Xunyou, or PassWall can take the network |
Choosing Dial while the switch is off asks you to turn it on first. To hand the network to another accelerator, turn AoBai off, then start the other one. To come back, stop the other one, turn this switch on, then dial.
6. Ports and conflicts
The lower half of Status has three ports:
- Mixed proxy (HTTP/SOCKS5): for proxy mode, default
6789 - Transparent redirect (gateway): for gateway mode, default
7895 - Local DNS: core DNS, default
16450
The three ports must differ from each other, and they must not be 22, 53, 80, or 443. Choose Save ports after a change. An active dial restarts automatically.
Status reports conflicts:
| Color | Meaning |
|---|---|
| Green, “No conflict found” | Safe to dial |
| Yellow | The other program is installed and set to start on boot, but it is not running now. Or AoBai is off and the other program is running. Neither case takes the network from the other |
| Red | The other program is running, or 6789, 7895, or 16450 is already taken. Stop the other program, or change AoBai’s ports, then dial |
The check covers PassWall, PassWall2, OpenClash, HomeProxy, Mihomo, Nikki, SSR Plus, Bypass, UU, Xunyou, Leishen, and daed.
7. Speed test

Speed test has three subpages:
- App reachability: whether common sites and apps open, through the mixed proxy.
- Country latency: latency toward each country, through the mixed proxy.

- Node latency: latency of official nodes. Results are written back to the dial list so you can pick the fastest row.

Dial first, then test apps and countries. Node latency can run once the core is up.
8. Security policy and the rule library

Content blocking can enable several lists at once: ads, trackers, malware and phishing, and adult content.
Country routing: after you choose direct for China, Russia, or Iran, sites and IPs in that country go direct and the rest go through the VPN.
Network routing has two modes:
- Listed items bypass the VPN: domains, prefixes, or countries in the list skip the proxy
- Only the list uses the VPN: everything else goes direct
Examples: example.com, 10.0.0.0/8, cn.

Leave the rule library on automatic updates. Update now downloads in the background. While the core is running, new rules take effect on the next dial.
9. Install
KWRT, official OpenWrt, and iStoreOS use the same packages and the same commands. The router must be able to reach https://repos.aobai.app/openwrt/. Package downloads are on the KWRT / OpenWrt download page.
Read the architecture from the second word of the first line:
opkg print-architecture | awk 'NR==1 {print $2}'
# Replace x86_64 with the word from the line above
echo 'src/gz aobai https://repos.aobai.app/openwrt/x86_64' >> /etc/opkg/customfeeds.conf
opkg update
opkg install luci-app-passwall-aobai
/etc/init.d/passwall-aobai enable
Install this one ipk. The interface and the login helper are in it; there is no separate helper package.
luci-app-passwall-aobai pulls in luci-compat. Official OpenWrt 24.10 needs that package before the menu appears. Refresh LuCI, or run:
rm -f /tmp/luci-indexcache
/etc/init.d/rpcd restart
Services → AoBaiVPN is then in the left menu.
To force-reinstall a local ipk of the same version, comment out the src/gz aobai line first, then run opkg install --force-reinstall. Otherwise opkg may fetch the older package from the feed again.
10. Common questions
The proxy opens websites, but the gateway and DNS pointed at this router do not
The computer’s gateway and DNS both have to be this router’s LAN IP, not the upstream gateway. After dialing, the LAN gateway line on Status is the address to enter.
PassWall, UU, or Xunyou fights AoBai for the network
Those programs also change the gateway or DNS. Run only one at a time. Turn off Enable service on Status, then start the other program. To return, stop the other program, turn the switch on, and dial.
Official OpenWrt has no Services → AoBaiVPN
Confirm that luci-app-passwall-aobai and luci-compat are installed. Remove /tmp/luci-indexcache and restart rpcd. The theme does not change the menu path.
The computer cannot connect after 6789 was changed
Change the proxy port in the app to the new value. The firewall allows LAN clients only to reach the mixed proxy port.
Node names stay in Chinese on an English interface
You need a newer luci-app-passwall-aobai. The LuCI language is under System → System → Language and Style.
DNS is wrong after disconnect
Disconnect restores dnsmasq. If DHCP or DNS was edited by hand, check /etc/config/dhcp again.
Languages