Brush OpenWRT routers use a transparent proxy ShadowSocks Advanced Configuration

Speaking on how the articleInstall SHADOWSOCKS on OPENWRT to use transparent proxy + DNS poisoning,But finished only configuration orThere are many drawbacksof。

For example, the block list is dead,The ever-changing Internet content,I'm afraid you could not pass a list of a few weeks out of date;

For example, software updates,You can not always bother to manually upload,scp ...... blah blah blah ......

so,We must have a permanent solution,Let all the automation!

First of all,It is

Automatic Updates DNS forwarding list

In the catalog/usr/binDirectory do the following command:

Then enter the following to updatednsmasq:

input:wqThen press Enter to exit the save。

This created a new list to update the two scripts,We then create a scheduled task,Let it run once every day 12:00。

In your router management web page,turn up"system"→"Scheduled Tasks”,As shown below

Then enter the following in the blank box in:

Such,Every day 12:00,As long as there is network,Then the DNS on both lists are updated once!

Software update

The authors provide software update source,Then later you can use the package management tool on OpenWRT directly updated! Including CLI and web pages!

http://openwrt-dist.sourceforge.net/releases/

then,Open the router administration page,turn up"system"→"Package"→"Configuration"Tab,Where you can add the following two lines:

but,due tosourceforge.netIt is named domain,So you needAfter successful configuration SS,To update the two lists。

Update package list by SS

Update package list by SS

This update source has the shelf,I would not have been updated ......

Detection SS state long,Kneeling automatic restart

Long hung SS,Inevitably kneel,So we can also write a script,It can be detected after a predetermined time of connection state SS,If the normal,Exit;If broken,Then restart SS service。

We use wget command to test,Let wget try to download at Google Japan homepage,It is to try,Not really downloaded,Once a successful connection then the SS normal,Then if they fail,The test Baidu Home,Description SS kneeling success,Restart Service;If this does not succeed,Description Network kneeling,drop out。

Code is as follows,According to the script written on top of the process of creating scripts in the directory / usr / bin directory and give execute permissions,Follows:

equally,The following statement is added to the Scheduled Tasks,Including test once every ten minutes a day and SS 1:00 empty the log file to avoid excessive log fill your router pathetic memory ╮(╯▽╰)╭

 

Original article written by LogStudio:R0uter's Blog » Brush OpenWRT routers use a transparent proxy ShadowSocks Advanced Configuration

Reproduced Please keep the source and description link:https://www.logcg.com/archives/868.html

About the Author

R0uter

The non-declaration,I have written articles are original,Reproduced, please indicate the link on this page and my name。

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *