【从零开始】最详细的新手入门软路由指南,家庭全设备科学上网看这篇就够了!什么是软路由?为什么要软路由?小白怎么上手软路由?软路由和硬路由的区别?软路由科普,固件选择,刷机,配置软路由,主路由、旁路由

不良林
17 Jan 202441:47

Summary

TLDRThis comprehensive guide offers an in-depth look into the world of soft routers, addressing the question of why they are essential and how beginners can start using them. The host, 不良林 ('Bu Liang Lin'), aims to demystify soft routers for those new to the concept, focusing on solving common issues related to internet access. The video covers the setup of a soft router using OpenWRT, a popular open-source routing system, and how to install various plugins to enable scientific internet access, commonly known as 'fq' or circumventing internet restrictions. The script provides a step-by-step tutorial on configuring the soft router to work in tandem with a traditional router, effectively allowing all connected devices to access the internet freely. It also touches on the installation of additional plugins for enhanced functionality and customization, making the soft router a powerful tool for network management and internet access.

Takeaways

  • 🌐 **Soft Routers Overview**: The video introduces what a soft router is, its purposes, and how to get started with one, focusing on enabling scientific internet access for all home devices.
  • 🔍 **Why Soft Routers?**: Soft routers are needed to overcome internet access restrictions and to centrally manage internet traffic for devices that can't run proxy tools natively.
  • 🛠️ **Soft vs. Hard Routers**: Soft routers are network devices that can run various software, unlike hard routers which have fixed functionality.
  • 💿 **OpenWRT**: OpenWRT is an open-source, free routing system that allows for extensive customization and is central to achieving the goals of the video tutorial.
  • 📡 **Device Selection**: When choosing a device to run as a soft router, ensure it has at least two network ports and consider the device's CPU performance based on your needs.
  • 📦 **Firmware Installation**: The video outlines how to flash OpenWRT onto a compatible device, emphasizing the use of official firmware for security and reliability.
  • 🔌 **Connectivity Setup**: After installing OpenWRT, the tutorial covers configuring the router's WAN and LAN interfaces, and how to deal with potential dual-NAT issues.
  • 🚀 **Wi-Fi Utilization**: The video shows how to repurpose a traditional router as a Wi-Fi access point (AP) to maintain wireless connectivity throughout the home.
  • 📱 **Scientific Internet Access**: The script details the process of setting up scientific internet access using various plugins like Passwall, Homeproxy, and Openclash within the OpenWRT system.
  • 🛠️ **Plugin Configuration**: Each plugin requires specific configuration, including adding nodes or subscribing to proxy services for scientific internet access.
  • ⚙️ **Network Management**: The video emphasizes the convenience of managing the entire home network through a single soft router rather than configuring each device individually.

Q & A

  • What is a soft router and why is it needed?

    -A soft router is a network device that can run software, potentially turning a mini PC, an industrial PC, or even a laptop into a router by installing a routing system. It is needed because it allows for the installation of various plugins and tools, such as VPN or proxy services, to enable functionalities like scientific internet access, which is not possible with most commercial off-the-shelf (COTS) routers, also known as hard routers.

  • How does a soft router enable scientific internet access for all devices connected to it?

    -A soft router can run proxy tools like v2ray or Clash, which encrypt and route traffic through unblocked servers, thus bypassing internet restrictions. When a device connects to the internet through a soft router, the data is automatically encrypted and sent through these proxy tools, allowing access to otherwise blocked content without the need for each device to run its own proxy application.

  • What are the common issues with using a mobile proxy tool to access blocked websites like Google?

    -While mobile proxy tools like v2ray, Clash, or small rocket can bypass internet restrictions, they require the device to support and run these applications. If a device, such as a TV box or VR headset, does not support these tools, it cannot access blocked content, highlighting the need for a solution like a soft router that can handle this at the network level.

  • What is OpenWRT and why is it significant in the context of soft routers?

    -OpenWRT is an open-source, free routing software that provides full routing functionality and supports the installation of a wide variety of plugins. It is significant because it allows users to turn ordinary devices into fully functional soft routers with advanced features, including the ability to implement scientific internet access for the entire network.

  • How does one determine if their existing router can be flashed with OpenWRT?

    -To determine if a router can be flashed with OpenWRT, one can check the official OpenWRT website's table of supported devices. By searching for the router's brand or model number, users can find out if there is a compatible OpenWRT firmware available for their device.

  • What are the considerations when choosing a device to run OpenWRT?

    -When choosing a device to run OpenWRT, one should consider the number of network ports (preferably two or more), the device's CPU performance, memory, storage capacity, power consumption, and whether it has additional interfaces like USB. The device should meet the user's specific network requirements and budget.

  • What are the steps to install OpenWRT on a new device?

    -The steps to install OpenWRT include downloading the appropriate firmware for the device, writing the firmware image to an SD card or USB drive using a tool like Rufus, inserting the media into the device, and booting it up. Once the device is booted, accessing the OpenWRT web interface allows for further configuration and plugin installation.

  • How can one ensure the security and customization of their OpenWRT firmware?

    -To ensure security and customization, one can choose to compile their own OpenWRT firmware, selecting only the necessary plugins and features. Alternatively, using the official OpenWRT firmware with a trusted third-party software source like ImmortalWRT, which provides a more extensive plugin selection, can also be a secure option.

  • What is the purpose of the ttyd plugin in OpenWRT and how does it enhance the user experience?

    -The ttyd plugin allows users to access a command-line interface through the OpenWRT web interface, providing a convenient way to execute shell commands without the need for direct SSH access. This can enhance the user experience by offering a web-based terminal for easier management and troubleshooting.

  • How does the video script differentiate between the use of a soft router in the main router mode versus the旁路由 (by-pass router) mode?

    -The script focuses on the main router mode, where the soft router acts as the primary router for the network, handling all traffic routing and proxy functions. In contrast, the 旁路由 mode, which is mentioned to be discussed in a future video, involves the soft router operating in parallel to the main router, bypassing some traffic for specific tasks like scientific internet access.

  • What are the potential benefits of using a soft router over a traditional hard router for a home network?

    -Soft routers offer greater flexibility and customization, allowing users to install various plugins and tools that can enhance network functionality, such as VPNs, proxy servers, and traffic control features. They can also enable scientific internet access across all devices without requiring each device to run its own proxy application.

Outlines

00:00

😀 Introduction to Soft Routers and Scientific Internet Access

This paragraph introduces the concept of soft routers, their necessity, and the process of getting started with them. It emphasizes the goal of enabling scientific internet access for all home devices, which allows for unrestricted browsing of websites like Instagram. The speaker, known as '不良林' (Lin), expresses the intention to provide a detailed guide suitable for beginners, focusing on resolving issues related to scientific internet access. The paragraph outlines the common problem of internet censorship and how proxy tools like v2ray, Clash, or WireGuard can be used to circumvent these restrictions. It also discusses the limitations of consumer-grade routers and the potential of soft routers to provide a universal solution for scientific internet access across all devices in a home network.

05:01

🤖 Exploring OpenWRT and Selecting Suitable Hardware for Soft Routers

The second paragraph delves into the history and capabilities of the OpenWRT operating system, which is a focal point of the tutorial series. It discusses the types of devices that can run OpenWRT, including embedded systems and general-purpose platforms like X86. The speaker provides guidance on determining if a specific router model can be flashed with OpenWRT and suggests that beginners start with a small, dedicated device rather than flashing a hard router due to the risks and limitations. The paragraph also offers advice on selecting a device based on needs and budget, highlighting the importance of having at least two network ports and providing examples of suitable devices, such as the NanoPi r2s, Xiaomi routers, and an X86 mini PC.

10:02

💾 Installing OpenWRT on Suitable Hardware

This paragraph explains the process of installing the OpenWRT operating system on the chosen hardware. It outlines three main methods for obtaining the OpenWRT firmware: using pre-compiled firmware from others, compiling the firmware yourself, and using the official firmware. The speaker recommends using the official firmware from the OpenWRT project or its branch, ImmortalWRT, which offers a wide range of plugins and a CDN-accelerated mirror source. The paragraph also describes how to download the appropriate firmware for your device, the differences between EXT4 and SQUASHFS file system formats, and the use of the Image Builder tool for custom firmware compilation.

15:03

🔧 Flashing Firmware and Initial System Configuration

The fourth paragraph focuses on the process of flashing the OpenWRT firmware onto an SD card or USB drive, which involves copying the firmware image to the storage device. It provides instructions for using tools like Rufus for Windows and Etcher for Mac or Linux to perform the flashing process. The speaker also covers the steps to change the boot order in the BIOS to prioritize the USB drive with the OpenWRT system and how to access the OpenWRT command line interface after the system has booted successfully.

20:03

🌐 Configuring OpenWRT for Internet Access and Network Setup

This paragraph covers the initial configuration of the OpenWRT system, including connecting the soft router to the internet and setting up the home network. It explains how to disable IPv6 to avoid complications with transparent proxies, how to bridge additional Ethernet ports to the LAN, and how to configure the WAN interface to connect to the internet via DHCP or PPPoE. The speaker also discusses the potential need to change the LAN IP address to avoid conflicts with the ISP's network and the process of setting up the router in bridge mode to allow the OpenWRT device to handle internet traffic.

25:05

🔌 Utilizing the Hard Router as a Wireless Access Point

The sixth paragraph describes how to repurpose the hard router as a wireless access point (AP) after the OpenWRT soft router is installed. It provides instructions for configuring the hard router in wired repeater mode or manually disabling its DHCP server and changing its management IP address to match the new network setup. The speaker emphasizes the importance of connecting the hard router's WAN or LAN port to the OpenWRT router to restore Wi-Fi access and allow additional devices to connect to the internet.

30:07

🛠️ Installing and Configuring Plugins for Enhanced Functionality

The seventh paragraph details the installation of various plugins on the OpenWRT system to enhance its functionality. It guides the user through updating the package list, installing themes, and adding new plugins such as ttyd for web-based SSH access and three different scientific internet access plugins: openclash, passwall, and homeproxy. The speaker provides a brief overview of how to install and configure these plugins, including adding nodes and subscriptions for proxy services and changing the router's theme.

35:08

🔄 Finalizing the Setup and Future Tutorials

The final paragraph wraps up the tutorial by discussing the successful setup of the OpenWRT system with scientific internet access plugins. It mentions the convenience of using Clash's WebUI for node switching and the option to disable scientific internet access when not needed. The speaker also teases the next tutorial, which will cover the router mode known as '旁路由' (by-pass routing), and asks for understanding regarding the potential delay in the next video due to upcoming busyness and the festive season.

Mindmap

Keywords

💡Soft Router

A soft router refers to a network device that can run software, potentially turning a mini PC, an industrial control microcomputer, or even a laptop into a router by installing a routing system. In the video, the concept of soft routers is central as it allows for the installation of various plugins and tools, such as those used for scientific internet access, which is the main focus of the tutorial.

💡Scientific Internet Access

This term, often colloquially referred to as 'circumventing internet censorship' or 'bypassing the Great Firewall', involves the use of specific tools and methods to access content that is otherwise blocked or restricted in certain regions. The video discusses how soft routers can facilitate scientific internet access for all devices connected to it, without the need for each device to individually run proxy tools.

💡V2Ray

V2Ray is an open-source network proxy application that allows for the secure and efficient transfer of data over the internet. It is one of the proxy tools mentioned in the video that can be used on mobile devices to encrypt data before it is sent to a node server, thereby enabling access to otherwise inaccessible websites like Google.

💡OpenWRT

OpenWRT is a popular open-source router operating system based on the Linux kernel. It is highlighted in the video as a key component for setting up a soft router, providing the flexibility to install various plugins and customize the router's functionality to suit the user's needs, including achieving scientific internet access.

💡Hard Router

A hard router is a commercial, off-the-shelf router with firmware that is typically locked and cannot be modified by the user. The video contrasts hard routers with soft routers, emphasizing that the latter offers more flexibility and functionality, such as the ability to install additional plugins and tools.

💡NAT (Network Address Translation)

NAT is a method used by routers to translate multiple private IP addresses into a single public IP address, allowing multiple devices to share a single internet connection. The video discusses the concept of double NAT, which can occur when a soft router is connected to a hard router and both perform NAT, potentially leading to performance issues.

💡DHCP (Dynamic Host Configuration Protocol)

DHCP is a network protocol used to automatically assign IP addresses to devices on a network. In the context of the video, the soft router is configured to provide DHCP services to devices connected to it, enabling those devices to obtain IP addresses and access the internet.

💡Bridge Mode

Bridge mode is a networking term where a device, such as a router, operates transparently to pass network traffic between different segments of a network. The video explains how to configure a hard router in bridge mode to function as a wireless access point (AP), effectively extending the network capabilities of the soft router.

💡PPPoE (Point-to-Point Protocol over Ethernet)

PPPoE is a protocol for encapsulating PPP frames inside Ethernet frames. It is commonly used by ISPs to connect users to the internet. The video demonstrates how to configure the soft router to use PPPoE for internet connectivity, which involves entering the username and password provided by the ISP.

💡Passwall

Passwall is an OpenWRT plugin that provides advanced routing features and supports various VPN and proxy protocols. It is one of the plugins mentioned in the video for achieving scientific internet access, allowing users to route their traffic through specific nodes to access blocked content.

💡Homeproxy

Homeproxy is another plugin for OpenWRT that enables scientific internet access by utilizing the Socks5 proxy. The video script describes how to install and configure Homeproxy to allow all devices connected to the soft router to access the internet through a proxy, thus enabling scientific internet access.

Highlights

Introduction to the concept of a soft router, its necessity, and how to get started with it.

Explanation of how a router acts as a gateway for all devices in a local network to access the internet.

Discussion on the challenges faced when trying to access geo-restricted or blocked websites like Google from within a region where it is inaccessible.

Demonstration of using proxy tools like v2ray, Clash, or WireGuard on mobile devices to overcome internet restrictions.

Description of the limitations when trying to use proxy tools on devices that do not support them, such as TV boxes or VR headsets.

Introduction of soft routers as a universal solution to enable all network devices to access the internet with scientific internet access (also known as circumventing internet censorship).

Clarification that a soft router is not a specific product but a network device capable of running software, potentially turning a mini PC or an old laptop into a router.

Differentiation between hard routers with fixed functionalities and soft routers that can be customized with additional features like proxy tools.

Highlight of OpenWRT as a popular, open-source routing system that can be installed on compatible devices to turn them into soft routers.

Guidance on how to determine if a device can run OpenWRT by checking the official website or searching for community-made adaptations.

Recommendations for beginners to purchase a small host device with at least two network ports for convenience and flexibility.

Overview of different devices suitable for running OpenWRT, including their prices, features, and use cases.

Explanation of the process to install OpenWRT on a device, including obtaining the correct firmware and the use of tools like Rufus for writing the firmware to an SD card or USB drive.

Instructions for configuring the soft router's network settings, including setting a static IP address for the LAN interface and disabling IPv6.

Demonstration of integrating the soft router into an existing home network by connecting it to the internet via the WAN port and reconfiguring the hard router as a Wi-Fi access point.

Description of how to install and manage plugins on OpenWRT to add functionalities like scientific internet access.

Tutorial on setting up three different scientific internet access plugins: OpenClash, Passwall, and HomeProxy, and how to use them for circumventing internet censorship.

Final walkthrough of ensuring all devices in the home network can access the internet through the soft router without needing individual proxy configurations.

Transcripts

00:00

本期将带大家了解什么是软路由

00:02

为什么需要软路由

00:04

以及怎么上手软路由

00:06

这或许是你看到最详细

00:08

入手软路由的视频

00:09

学会之后就能实现全家设备科学上网

00:12

让隔壁村村花小美天天想上你家蹭网上Instagram

00:19

Hello大家好我是不良林

00:22

从本期开始正式更新软路由相关内容

00:25

我希望的是从来没有接触过软路由的用户

00:28

能弄清楚相关概念

00:30

跟着教程一步步上手软路由

00:32

所以我会尽量讲的详细

00:34

希望已经有所了解的朋友

00:35

不要觉得我啰嗦

00:37

软路由能干很多事情

00:38

我的教程重心主要围绕着

00:40

怎么解决科学上网中的各种问题

00:43

先来看一个在家庭中进行科学上网的痛点

00:46

在大部分的家庭网络中

00:48

路由器作为局域网的网关

00:50

是所有局域网设备通往互联网的出口

00:53

你家的电脑

00:54

手机 电视盒子 游戏机 VR头显等设备

00:58

都会通过网线或者Wifi

01:00

连接到该路由器

01:01

当你使用电脑访问百度的时候

01:04

数据会经过路由器转发到互联网

01:06

百度会将数据返回给你

01:08

同样会经过路由器转发到你的电脑

01:11

当你用手机访问谷歌的时候

01:13

数据同样会经过路由器转发到互联网

01:16

但由于谷歌被墙了

01:19

数据包根本就到不了谷歌的服务器

01:21

也就无法正常访问

01:23

此时可以在手机上运行v2ray

01:24

Clash或者小火箭等代理工具

01:27

访问谷歌的数据

01:28

会先经过代理工具加密

01:30

再由代理工具将加密后的数据

01:32

发给节点服务器

01:34

由于该节点没有被墙

01:36

所以可以正常访问

01:37

节点收到你的加密数据后

01:39

会进行解密获取到你的意图是访问谷歌

01:42

于是会帮你访问

01:44

由于节点都是国外的服务器

01:46

所以没有墙的阻挡

01:48

可以正常访问谷歌

01:50

当节点收到谷歌的数据后

01:52

会将其加密后再发回给你

01:54

路由器收到数据后再返回给手机

01:56

手机解密数据后

01:58

就能成功获取到谷歌的内容了

02:00

这就是通过v2ray等代理工具

02:02

访问谷歌的一般流程

02:04

也就是我们常说的科学上网

02:06

俗称翻墙

02:07

此时你想用电视盒子看YouTube

02:10

数据经过路由器转发到互联网

02:12

但由于YouTube被墙了

02:14

数据包根本就到不了YouTube的服务器

02:16

需要和手机一样

02:17

在电视盒子上运行代理工具

02:20

但你发现

02:20

你的盒子不支持任何代理工具

02:23

无法科学上网

02:24

也就访问不了YouTube了

02:26

再假设你海淘的quest VR设备

02:28

首次使用需要联网激活

02:31

但激活的时候需要访问Facebook相关网站

02:34

而这个网站被墙了

02:35

导致无法正常激活

02:37

也就无法愉快的玩耍了

02:39

我之前分享过将手机或者电脑的科学上网环境

02:42

共享给电视盒子和VR头显

02:44

这种无法使用代理工具的设备

02:46

让其也能够正常科学上网

02:48

不过都有一定的前提条件和局限性

02:51

不一定适合你

02:53

而本期介绍的软路由

02:54

是一个更通用的方法

02:56

可以看到你家里的所有网络设备访问互联网

02:59

都会经过路由器

03:00

如果我直接在路由器上运行v2ray

03:03

或者class等代理工具

03:05

当我使用电视盒子观看YouTube的时候

03:07

数据来到路由器

03:09

会先经过代理工具加密

03:11

然后发给没有被墙的节点服务器

03:13

节点将数据解密后帮我们访问YouTube

03:16

YouTube将结果返回给节点

03:18

节点将数据加密后再发回给路由器

03:21

路由器通过代理工具将数据解密后

03:24

返回给电视盒子

03:25

这样电视盒子就不需要运行任何代理工具

03:28

就能成功访问YouTube了

03:30

VR头显首次激活需要访问Facebook

03:33

数据发给了路由器后也会被加密处理

03:35

成功通过代理访问Facebook

03:38

这样就能顺利激活设备了

03:40

你的电脑和手机

03:41

也不再需要单独运行代理工具

03:43

家里的所有网络设备只要连上路由器

03:46

就能科学上网了

03:47

非常方便

03:49

像有一些跨境电商的朋友需要做群控

03:51

上百台设备更是需要这样的功能

03:54

遗憾的是我们在网上随便买的家用路由器

03:56

并不能安装代理工具

03:58

需要使用一种叫做软路由的网络设备

04:01

软路由并不是某一类具体的产品

04:04

简单理解

04:05

软路由就是可以安装软件的路由器

04:07

从形态上来讲

04:08

它可能都不是一个路由器

04:10

可能是一台迷你PC

04:12

也可能是一台工控小主机

04:14

或者是一台闲置的笔记本电脑

04:16

一块开发板

04:18

你给这个设备安装Windows操作系统

04:20

那它就是一台电脑

04:22

你给它安装一个路由系统

04:24

那它就是一台软路由

04:25

而我们在网上随便买的路由器

04:28

功能基本上都被厂商固化了

04:30

只能满足最基本的路由需求

04:33

无法自行添加新的功能

04:35

所以这种也叫硬路由

04:36

但如果你买的这个硬路由

04:38

能通过一些手段刷成其他路由系统

04:41

那么它的称呼就从硬路由变成了软路由了

04:44

常见的路由系统有OpenWRT

04:47

PFsense ros 爱快 梅林等等

04:51

关于他们各自的特点

04:52

请自行谷歌了解

04:54

我们主要介绍热度最高的OpenWRT系统

04:57

以下简称OP

04:58

OP是一个开源免费的路由系统

05:01

提供了完整的路由功能

05:03

并且能安装各式各样的插件

05:05

最主要的像是安装代理插件

05:07

实现全家科学上网

05:09

这也是本系列教程的重点

05:11

关于OP的历史就不浪费时间介绍了

05:13

我们需要先确定

05:15

什么样的设备能够运行OP系统

05:17

这里说的设备

05:18

是指不同SoC平台的嵌入式设备

05:21

主要指的是硬路由

05:23

像X86这种通用平台不用担心这个问题

05:26

简单理解 除了电脑

05:28

你家其他所有带程序控制的设备

05:30

都算是嵌入式设备

05:32

比如冰箱 空调 洗衣机

05:35

电视 音响 路由器等等

05:36

假设你有一台闲置的路由器

05:38

想知道能不能刷OP

05:40

最简单的方式是直接到官网查看

05:42

网址我会放在视频下方的说明栏

05:45

可以在这里搜索相关品牌

05:47

比如小米

05:51

tp-LAN口

05:54

华硕等等

05:57

也可以直接搜索相关路由器的型号

05:59

比如红米的AX6000

06:01

如果你家刚好有这台路由器

06:03

那么恭喜你

06:04

你可以给他刷入OpenWRT系统

06:07

但我不建议刚接触软路由的新手

06:09

就直接刷硬路由

06:11

因为硬路由的系统

06:12

是安装在Flash闪存里

06:14

是焊死在路由器主板上的芯片

06:16

相当于一块不可更换的硬盘

06:19

刷入OP的操作

06:20

就是把原来保存在Flash里的路由系统替换掉

06:22

Flash有一些重要的分区

06:25

操作不当会导致设备彻底变砖

06:28

难以恢复

06:29

并且由于硬路由Flash闪存容量的限制

06:32

可拓展性大大降低

06:34

而小主机的系统

06:35

是安装在外置的SD卡或者U盘里

06:38

随时可以更换

06:39

所以建议新手还是买台小主机来折腾

06:42

比较方便

06:43

如果列表中没有你的设备型号

06:45

也可以网上搜搜看有没有人做过适配

06:48

如果网上也搜不到的话

06:49

那就可以放弃了

06:51

除非你有能力自己做适配

06:53

这涉及到嵌入式开发领域

06:55

需要对硬件电路有一定的了解

06:57

我对这方面不太懂

06:59

感兴趣的朋友可以自行研究

07:01

没有现成的设备

07:02

那就需要购买了

07:03

先明确自己的需求和预算

07:06

然后网上搜索符合预期的设备

07:08

我手上有三台设备

07:10

分别是价格250的友善NanoPi r2s开发版

07:14

和价格350的红米AX6000硬路由

07:17

以及价格850的某杂牌X86小主机

07:20

这里不是广告

07:22

只是给大家做个参考

07:24

每个人对网络的需求不同

07:25

我只强调买的机器必须要有两个网口以上

07:29

只有一个网口的话局限性比较大

07:31

其他性能指标

07:32

按你的实际网络需求选择

07:35

我自己对网络的要求比较低

07:37

做这期视频之前

07:39

主力路由还是10年前的Wifi4百兆路由器

07:42

丝毫不影响我流畅学习各种姿势

07:45

这三款机器都能跑满千兆带宽

07:48

科学上网能跑500兆

07:50

具体要看你的节点速度

07:51

对我来说性能过剩了

07:53

相信对大部分普通朋友也够用了

07:56

还有更便宜以及更贵的设备

07:59

主要是性能有差异

08:00

总之按需选择

08:02

友善的R2S

08:03

相信接触过软路由的朋友都不陌生

08:05

人气非常高的一个小板子

08:07

买它的主要原因就是颜值高

08:10

价格便宜

08:11

待机功耗不到2W

08:12

非常省电

08:14

两个千兆网口

08:15

一个USB2.0接口

08:17

没有内置存储

08:18

通过外置SD卡启动系统

08:20

可以说R2s就是为软路由而生的

08:23

缺点就是SoC属于arm架构

08:25

不能说是缺点

08:27

只是很多软件和系统仅提供X86架构的版本

08:30

无法在arm架构的机器上运行

08:33

所以局限性比较大

08:34

但如果你只是用来当路由

08:36

科学上网不折腾的话足够了

08:37

红米AX6000有四个千兆网口

08:41

买它的主要原因是硬路由自带无线Wifi

08:44

不需要再额外接AP

08:46

支持硬件NAT转发

08:48

待机功耗7W左右

08:49

没有USB接口

08:51

Flash闪存容量为128兆

08:53

这里要补充说明的是除了硬路由

08:56

其他软路由设备像是R2s

08:58

一般都不会有无线功能

09:00

或者它的无线功能很弱

09:02

需要搭配无线AP使用

09:04

至于X86平台的小主机你随便买就行了

09:07

只要有两个以上的网口就行

09:09

和什么品牌型号没有关系

09:11

和你的钱包有关系

09:13

你平时在网上看到的什么软路由J1900 N5105之类的

09:17

并不是指某个品牌型号

09:19

而是英特尔的CPU型号

09:21

比如你常听到的I5 I7 I9

09:24

这些主要是面向桌面级的酷睿系列CPU

09:27

而低成本低功耗的小主机市场

09:29

主要用的是奔腾和赛扬系列的CPU

09:32

最常见的外观就是这种

09:33

表面是一块巨大的散热片的工控机

09:37

我实在是不喜欢这个外形

09:38

所以买了个mini PC

09:40

小巧但是可拓展性稍差

09:42

CPU型号是N100

09:45

OP待机功耗7W

09:46

3个HDMI接口

09:48

3个USB3.0接口

09:50

两个千兆网口

09:51

16G内存加512G硬盘

09:54

这配置只用来跑OpenWRT简直是暴殄天物

09:57

我主要还有其他用途

09:59

大家买的话主要看CPU的性能参数

10:02

可以在英特尔官网做横向对比

10:04

如果只用来跑OpenWRT的话

10:06

并不需要多高的配置

10:08

但如果你后续还想玩虚拟化all in one啥的那就另说了

10:11

设备有了

10:12

接下来就需要给他安装OpenWRT的系统了

10:15

在嵌入式领域中

10:17

安装系统通常被称为刷入固件

10:19

获取合适你设备的固件主要有三种途径

10:23

第一种方式最简单

10:25

使用网上别人编译好的OP固件

10:27

他们在编译的时候会内置各种插件

10:30

你要做的就是下载他的固件

10:32

刷入之后就能直接使用了

10:34

非常方便省事

10:36

但缺点也很明显

10:37

为了尽量满足所有人

10:39

作者会编译大量

10:41

你可能永远都不会点开的插件

10:43

显得系统很臃肿

10:45

最重要的是

10:45

刷别人的固件存在安全风险

10:48

可能夹带了私货

10:50

跑他的脚本收集你的信息

10:52

甚至给你安装"有主机上线请注意"也说不定

10:55

所以我不推荐这种方式

10:57

你要用的话建议找你信得过的人编译的固件

11:00

第二种方式就是自己编译固件

11:03

你想要啥插件就编译啥

11:04

最大程度满足你的需求

11:07

编译也很简单

11:08

网上有很多教程

11:10

跟着一步步操作就行了

11:12

虽然各位前辈将编译固件的难度

11:14

降低到小白就能操作的水平

11:16

但过程还是非常繁琐

11:18

容易打消大家的积极性

11:20

所以本教程也不使用这种方式

11:23

感兴趣的朋友可以自行了解

11:25

第三种方式也是我比较推荐的方式

11:28

直接使用官方固件

11:29

OpenWRT每次发布新的版本

11:31

都会给所有支持的设备

11:33

编一个最小系统固件

11:35

以及对应的软件源

11:37

该固件没有携带任何第三方插件

11:40

非常纯净

11:41

所以只能满足最基本的路由功能

11:44

可以通过安装软件源里的插件添加新功能

11:47

但遗憾的是官方软件源有点过于纯净了

11:51

插件很少

11:52

四舍五入以下约等于没有

11:54

所以我这里推荐大家使用OpenWRT的分支项目

11:58

immortalwrt同样是免费开源的

12:01

与官方OpenWRT的主要区别在于

12:04

immortal的软件源

12:05

提供了大量常用的第三方插件

12:07

并且提供了CDN加速的镜像源

12:10

可以非常方便的安装和管理插件

12:13

接下来就一步步教大家

12:14

刷入immortalWRT的纯净OP固件

12:17

配置好网络并安装插件

12:19

实现科学上网

12:20

首先进入这个网址

12:21

选择对应的纯净固件

12:23

在这里选择对应的OP版本

12:25

我的视频就以最新的23.05.01版本为例

12:29

实际上作为一个路由器

12:31

应该以稳定为主

12:32

不宜追新

12:33

并且23版对比21版有个非常巨大的改变

12:37

配置防火墙的工具从iptables变成了nftables

12:41

有些插件还没有添加对nftables的支持

12:44

比如SSRP

12:46

并且已经支持nftables的插件

12:48

也可能存在不兼容的情况

12:50

但这已经是大势所趋了

12:52

踩到坑了再说吧

12:54

为了和教程保持一致

12:56

建议和我选择一样的版本

12:58

在这里输入你的设备型号

13:00

官方支持的设备在这里都有

13:02

比如r2s

13:04

只有一个结果

13:06

下方有两个不同文件系统格式的固件

13:09

EXT4和SQUASHFS

13:11

主要的区别是

13:12

SQUASHFS格式修改的配置文件

13:14

会写入到挂载的overlay分区里

13:17

并不是覆盖原来rom的文件

13:20

所以这种格式可以通过抹除overlay分区

13:23

达到恢复出厂设置的效果

13:25

EXT4的话没有这种机制

13:27

所以不能恢复出厂设置

13:29

按你的需求选择即可

13:33

除了使用他们预编译好的OP固件

13:35

我们也可以点击这里

13:36

使用网站提供的imagebuilder

13:38

在线自定义编译固件

13:40

可以在这里设置你要编译到固件里的

13:43

插件输入框里是默认需要编译的

13:46

保证最小系统能够正常提供路由功能

13:49

一般不要去动它

13:51

除非你明确知道自己的需求

13:53

比如你确定你不需要PPPOE拨号

13:56

就可以把这两个删了

13:57

不需要IPV6就可以把IPV6相关组件删掉

14:01

如果想要添加插件

14:03

你需要先知道插件的完整包名

14:05

可以进入这个链接

14:07

查看luci相关软件包

14:09

什么是luci等会再说

14:11

比如我现在要安装openclash

14:13

那么它的完整包名就是luci-app-openclash

14:18

将其添加到预安装列表

14:19

你可以添加多个

14:21

注意用空格隔开

14:23

下方还可以设置固件安装之后

14:25

首次开机运行的脚本