generated from P3TERX/Actions-OpenWrt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
immortalwrt-x86_64.sh
37 lines (31 loc) · 1.37 KB
/
immortalwrt-x86_64.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
#
# https://github.com/P3TERX/Actions-OpenWrt
# File name: diy-part2.sh
# Description: OpenWrt DIY script part 2 (After Update feeds)
#
# Copyright (c) 2019-2024 P3TERX <https://p3terx.com>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
# Add kernel build user
sed -i '/CONFIG_KERNEL_BUILD_USER/d' .config &&
echo 'CONFIG_KERNEL_BUILD_USER="lxl6125"' >>.config
# Add kernel build domain
sed -i '/CONFIG_KERNEL_BUILD_DOMAIN/d' .config &&
echo 'CONFIG_KERNEL_BUILD_DOMAIN="GitHub Actions"' >>.config
sed -i 's/invalid users = root/#invalid users = root/g' feeds/packages/net/samba4/files/smb.conf.template
# 修复因 Docker 导致的 UDP 代理失效,但此步骤会导致 Docker 内部无法代理 UDP 请求,因此需要手动下发默认 DNS 服务器。
cat >> package/base-files/files/etc/sysctl.conf <<EOF
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0
EOF
# 下载 clash 内核
$GITHUB_WORKSPACE/preset-clash-core.sh amd64
# 下载 v2raya 需要的 geoip.dat 文件
mkdir -p files/usr/share/xray
wget -P files/usr/share/xray https://github.com/v2fly/geoip/releases/latest/download/geoip.dat
wget -O files/usr/share/xray/geosite.dat https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat
chmod 644 files/usr/share/xray/*