编译丰富插件时,建议修改下面两项默认大小,留足插件空间。( x86/64 )
Target Images ---> (16) Kernel partition size (in MB) #建议修改 (128)
Target Images ---> (160) Root filesystem partition size (in MB) #建议修改 (1024)
取消samba
Extra packages ---> autosamba (取消选定)
支持 iPv6:
Extra packages ---> ipv6helper(选定)
勾选的插件
LuCI ---> Applications ---> luci-app-adguardhome
LuCI ---> Applications ---> luci-app-ddns
LuCI ---> Applications ---> luci-app-diskman #磁盘管理工具
LuCI ---> Applications ---> luci-app-filetransfer #文件传输(可web安装ipk包)
LuCI ---> Applications ---> luci-app-firewall #默认勾选 防火墙
LuCI ---> Applications ---> luci-app-frpc #内网穿透Frp客户端
LuCI ---> Applications ---> luci-app-mwan3 #多线分流
LuCI ---> Applications ---> luci-app-nlbwmon #网络带宽监视器
LuCI ---> Applications ---> luci-app-opkg #默认勾选
LuCI ---> Applications ---> luci-app-qos #upnp需要
LuCI ---> Applications ---> luci-app-passwall #Include Hysteria(另外勾选)
LuCI ---> Applications ---> luci-app-socat #端口转发
LuCI ---> Applications ---> luci-app-ttyd #网页终端命令行
LuCI ---> Applications ---> luci-app-turboacc #Turbo ACC 网络加速(支持 Fast Path 或者 硬件 NAT)
LuCI ---> Applications ---> luci-app-turboacc ---> Enable BBR CCA #BBR拥塞控制算法提升TCP网络性能
LuCI ---> Applications ---> luci-app-upnp #通用即插即用UPnP(端口自动转发)
LuCI ---> Applications ---> luci-app-webadmin #Web管理页面设置
LuCI ---> Protocols ---> luci-proto-wireguard #wireguard
设置默认主题为luci-theme-argon
sed -i 's/luci-theme-bootstrap/luci-theme-argon/g' feeds/luci/collections/luci-light/Makefile
sed -i 's/luci-theme-bootstrap/luci-theme-argon/g' feeds/luci/collections/luci-nginx/Makefile
sed -i 's/luci-theme-bootstrap/luci-theme-argon/g' feeds/luci/collections/luci-ssl-nginx/Makefile
首次编译
export FORCE_UNSAFE_CONFIGURE=1 &&
./scripts/feeds update -a &&
./scripts/feeds install -a &&
make menuconfig &&
make download -j8 &&
make V=s -j$(nproc)
二次编译
apt update -y &&
apt full-upgrade -y &&
cd /root/lede &&
export FORCE_UNSAFE_CONFIGURE=1 &&
git config pull.rebase false &&
git pull &&
./scripts/feeds update -a &&
./scripts/feeds install -a &&
make defconfig &&
make download -j8 &&
make V=s -j$(nproc)
passwall
rm -rf feeds/luci/applications/luci-app-passwall
rm -rf package/feeds/luci/luci-app-passwall
rm -rf package/passwall-packages
git clone https://github.com/xiaorouji/openwrt-passwall-packages.git package/passwall-packages
rm -rf package/passwall
git clone https://github.com/xiaorouji/openwrt-passwall.git package/passwall
拉取上游提交:
git -C package/passwall-packages pull
git -C package/passwall pull
helloworld
rm -rf package/helloworld
git clone https://github.com/fw876/helloworld.git package/helloworld
拉取上游提交:
git -C package/helloworld pull
tailscale
rm -rf feeds/luci/applications/luci-app-tailscale
rm -rf package/feeds/luci/luci-app-tailscale
rm -rf package/luci-app-tailscale
sed -i '/\/etc\/init\.d\/tailscale/d;/\/etc\/config\/tailscale/d;' feeds/packages/net/tailscale/Makefile
git clone https://github.com/asvow/luci-app-tailscale package/luci-app-tailscale
sed -i 's/--authkey=/--auth-key=/g' package/luci-app-tailscale/root/etc/init.d/tailscale
拉取上游提交:
git -C package/luci-app-tailscale pull
lucky
rm -rf package/feeds/luci/luci-app-lucky
rm -rf feeds/luci/applications/luci-app-lucky
rm -rf package/lucky
git clone https://github.com/gdy666/luci-app-lucky.git package/lucky
拉取上游提交:
git -C package/lucky pull
修改webadmin插件监听https端口
修改webadmin.po文件
cat > feeds/luci/applications/luci-app-webadmin/po/zh_Hans/webadmin.po << EOF
msgid ""
msgstr ""
"Language: zh_Hans\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
msgid "Web Admin"
msgstr "Web 管理"
msgid "Web Admin Settings"
msgstr "Web 管理页面设置"
msgid "Web Admin Settings Page"
msgstr "设置更改Web管理页面端口,绑定地址,是否允许从互联网访问等"
msgid "HTTP listeners (address:port)"
msgstr "HTTP 监听 (IP地址:端口)"
msgid "HTTPS listeners (address:port)"
msgstr "HTTPS 监听 (IP地址:端口)"
msgid "Bind to specific interface:port (by specifying interface address"
msgstr "绑定到指定的IP地址:端口"
msgid "Redirect all HTTP to HTTPS"
msgstr "重定向HTTP到HTTPS"
msgid "Redirect all HTTP to HTTPS when SSl cert was installed"
msgstr "当安装了SSL证书后,重定向HTTP到HTTPS管理页面"
msgid "Auto activate"
msgstr "自动激活局域网客户端"
msgid "configfile"
msgstr "配置文件"
msgid "Ignore private IPs on public interface"
msgstr "只允许内网访问"
msgid "Prevent access from private (RFC1918) IPs on an interface if it has an public IP address"
msgstr "拒绝从互联网访问Web管理页面"
EOF
修改webadmin.lua文件
cat > feeds/luci/applications/luci-app-webadmin/luasrc/model/cbi/webadmin.lua << EOF
-- Copyright 2015 Daniel Dickinson <openwrt@daniel.thecshore.com>
-- Licensed to the public under the Apache License 2.0.
local fs = require("nixio.fs")
local m = Map("uhttpd", translate("Web Admin Settings"),
translate("Web Admin Settings Page"))
local ucs = m:section(TypedSection, "uhttpd")
ucs.addremove = false
ucs.anonymous = true
lhttp = ucs:option(DynamicList, "listen_http", translate("HTTP listeners (address:port)"), translate("Bind to specific interface:port (by specifying interface address"))
lhttp.datatype = "list(ipaddrport(1))"
lhttps = ucs:option(DynamicList, "listen_https", translate("HTTPS listeners (address:port)"), translate("Bind to specific interface:port (by specifying interface address"))
lhttps.datatype = "list(ipaddrport(1))"
function lhttp.validate(self, value, section)
local have_https_listener = false
local have_http_listener = false
if lhttp and lhttp:formvalue(section) and (#(lhttp:formvalue(section)) > 0) then
for k, v in pairs(lhttp:formvalue(section)) do
if v and (v ~= "") then
have_http_listener = true
break
end
end
end
if lhttps and lhttps:formvalue(section) and (#(lhttps:formvalue(section)) > 0) then
for k, v in pairs(lhttps:formvalue(section)) do
if v and (v ~= "") then
have_https_listener = true
break
end
end
end
if not (have_http_listener or have_https_listener) then
return nil, "must listen on at list one address:port"
end
return DynamicList.validate(self, value, section)
end
o = ucs:option(Flag, "redirect_https", translate("Redirect all HTTP to HTTPS"))
o.default = o.enabled
o.rmempty = false
o.description = translate("Redirect all HTTP to HTTPS when SSl cert was installed")
o = ucs:option(Flag, "rfc1918_filter", translate("Ignore private IPs on public interface"), translate("Prevent access from private (RFC1918) IPs on an interface if it has an public IP address"))
o.default = o.enabled
o.rmempty = false
return m
EOF
GIT合并失败处理 希望保留本地的修改,pull之后,修改依然存在
git stash
git pull
git stash pop
GIT合并失败处理 不保留本地的修改,直接覆盖
git reset --hard
git pull
修改内核版本
/root/lede/target/linux/x86/Makefile
原版修改Tailscale认证密钥不生效问题,修复方法uthkey修改为authKey(区分大小写),--authkey参数修改为--auth-key
sed -i 's/--authkey=/--auth-key=/g' package/feeds/luci/luci-app-tailscale/root/etc/init.d/tailscale
sed -i 's/authkey/authKey/g' package/feeds/luci/luci-app-tailscale/root/etc/init.d/tailscale