GithubHelp home page GithubHelp logo

hykoyb / openwrt-docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zzsrv/openwrt-docker

0.0 0.0 0.0 107 KB

OpenWrt-23.05 (PassWall & OpenClash),基于ImmortalWrt OpenWrt-23.05(每日更新)。

Home Page: https://www.zzsrv.com/openwrt/

License: MIT License

Shell 98.29% Dockerfile 1.71%

openwrt-docker's Introduction

GitHub Stars GitHub Forks Docker Stars Docker Pulls

OpenWrt-23.05 (PassWall & OpenClash),基于ImmortalWrt OpenWrt-23.05(每日更新)。

Github: https://github.com/tyy474/OpenWrt-Docker

DockerHub: https://hub.docker.com/r/tyy474/openwrt

支持设备及镜像版本

本项目基于 ImmortalWrt OpenWrt-23.05,每日上午 8 点编译 OpenWrt 镜像,镜像构建完成后将同时推送到 DockerHub 和 阿里云镜像仓库 (广州) 。

对于国内用户,为提高镜像拉取体验,可以考虑拉取存放于阿里云镜像仓库的镜像,镜像名称及标签如下表所示:

OpenWrt 镜像地址

支持设备/平台 DockerHub 阿里云镜像仓库 (杭州)
x86_64/amd64 tyy474/openwrt:latest registry.cn-guangzhou.aliyuncs.com/tyy474/openwrt:latest
x86_64/amd64 tyy474/openwrt:x86_64 registry.cn-guangzhou.aliyuncs.com/tyy474/openwrt:x86_64
x86_64/amd64 tyy474/openwrt:amd64 registry.cn-guangzhou.aliyuncs.com/tyy474/openwrt:amd64

镜像使用方法

1、打开网卡混杂模式,其中eth0根据ifconfig命令找到自己的本地网卡名称替换

sudo ip link set eth0 promisc on

2、创建名称为macvlan的虚拟网卡,并指定网关gateway、子网网段subnet、虚拟网卡的真实父级网卡parent(第一步中的本地网卡名称)

docker network create -d macvlan --subnet=192.168.1.0/24 --gateway=192.168.1.1 -o parent= eth0 macnet

3、查看虚拟网卡是否创建成功,成功的话能看到名称为“macnet”的虚拟网卡

docker network ls

4、拉取镜像,可以带上阿里云仓库地址的前缀提高拉取速度

docker pull hangzhou.aliyuncs.com/zzsrv/openwrt

5、创建容器并后台运行

docker run --restart always --name openwrt -d --network macnet --privileged zzsrv/openwrt /sbin/init

6、进入容器内部环境

docker exec -it openwrt bash

7、根据自己实际情况修改网络配置,修改完成后保存配置

vi /etc/config/network

8、退出容器内部环境,在宿主机环境执行重启容器命令

docker container restart openwrt

镜像详细使用方法请参考博客文章:

「在 Docker 中运行 OpenWrt 旁路网关」https://mlapp.cn/376.html

鸣谢

SuLingGG/OpenWrt-Docker:

https://github.com/SuLingGG/OpenWrt-Docker

ImmortalWrt OpenWrt Source:

https://github.com/immortalwrt/immortalwrt

P3TERX/Actions-OpenWrt:

https://github.com/P3TERX/Actions-OpenWrt

OpenWrt Source Repository:

https://github.com/openwrt/openwrt

Lean's OpenWrt source:

https://github.com/coolsnowwolf/lede

openwrt-docker's People

Contributors

zzsrv avatar hykoyb 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.