Giter Club home page Giter Club logo

asus-router-stock-firmware-clash's Introduction

asus-router-stock-firmware-clash

Install clash on asus router with stock firmware

Why

  1. Stick with stock firmware! No Asuswrt-Merlin, no KoolShare.
  2. Need clash

This repo is barely a message to give you confidence that this is feaible.

Steps

Enable ssh/jffs

https://github.com/gygy/asus_factory_image

Enable usb

https://github.com/RMerl/asuswrt-merlin/wiki/Disk-formatting

Install clash

Download binary from https://github.com/Dreamacro/clash/releases, put it under usb disk.

Up to here, should be able to run clash on router.

Configure iptables

Refer to start-clash.sh

iptables -t nat -A CLASH -p tcp --dport 15643 -j RETURN is meant to bypass clash for traffic to your proxy server, in my case all the servers are using port 15643 so the rule looks like this, you'll need to figure proper rule for your servers.
iptables -t nat -A CLASH -p tcp -j REDIRECT --to-ports 9090 is meant to redirect traffic to clash, so 9090 should be the port you configured in redir-port. iptables -t nat -A PREROUTING -p udp -m udp --dport 53 -j DNAT --to-destination 192.168.50.1:12358 is meant to let clash handle all dns traffic, 12358 needs to be aligned with the config in dns -> listen, if you don't have the DNS poisoning issue, you can remove this rule.

Auto start

https://www.snbforums.com/threads/is-there-a-clear-guide-how-to-run-custom-scripts-on-stock-firmware.48512/

Refer to script_usbmount_hook.sh

Now, transparent proxy is enabled.

Tags

华硕,路由器,原生固件,原厂固件

asus-router-stock-firmware-clash's People

Contributors

iloahz avatar katehoang1989 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.