├── .gitignore
├── q-and-a
├── how-to-solve-problems.md
└── how-to-get-k2p-online-more-wisely.md
├── tutorial
├── install-the-firmware.md
├── update-the-firmware.md
└── install-custom-packages.md
├── .gitbook
└── assets
│ └── 10.10.10.2_cgi-bin_luci_admin_system_flashops.png
├── SUMMARY.md
├── diy-part1.sh
├── diy-part2.sh
├── LICENSE
├── README.md
└── .github
└── workflows
└── build-openwrt.yml
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
--------------------------------------------------------------------------------
/q-and-a/how-to-solve-problems.md:
--------------------------------------------------------------------------------
1 | # 问题的通用解决方法
2 |
3 | 对于所有的问题,最好的解决办法就是进breed,⚠️斐讯布局⚠️重刷(老是有人其他固件用惯了,天天用公版刷出各种奇怪的bug🤯),然后只设置出现了问题的地方,看能不能复现问题,可以复现问题的话再在群里带上`web后台的"状态"->"系统日志"`反馈
4 |
5 |
--------------------------------------------------------------------------------
/tutorial/install-the-firmware.md:
--------------------------------------------------------------------------------
1 | # 安装固件
2 |
3 | > 只有k2p的a1/a2型号才能使用本固件
4 |
5 | 进入breed,选择⚠️斐讯布局⚠️⚠️斐讯布局⚠️⚠️斐讯布局⚠️刷入[频道](https://t.me/k2ppasswall)中的`openwrt-k2p-sysupgrade[版本号]`文件即可
6 |
7 |
--------------------------------------------------------------------------------
/.gitbook/assets/10.10.10.2_cgi-bin_luci_admin_system_flashops.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DreamWalkerXZ/Actions-OpenWrt-K2P/HEAD/.gitbook/assets/10.10.10.2_cgi-bin_luci_admin_system_flashops.png
--------------------------------------------------------------------------------
/tutorial/update-the-firmware.md:
--------------------------------------------------------------------------------
1 | # 更新固件
2 |
3 | ## 图解
4 |
5 | 
6 |
7 | ## 注意事项
8 |
9 | 1. 更新需谨慎,⚠️因为更新后你的配置与额外安装的软件将会丢失⚠️。
10 | 2. 如果你想从软件源安装新的软件,建议升级至最新版本。
11 |
12 |
--------------------------------------------------------------------------------
/SUMMARY.md:
--------------------------------------------------------------------------------
1 | # Table of contents
2 |
3 | * [关于这个固件](README.md)
4 |
5 | ## 教程
6 |
7 | * [安装固件](tutorial/install-the-firmware.md)
8 | * [更新固件](tutorial/update-the-firmware.md)
9 | * [安装软件包](tutorial/install-custom-packages.md)
10 |
11 | ## 常见问题解答
12 |
13 | * [问题的通用解决方法](q-and-a/how-to-solve-problems.md)
14 | * [K2P应该怎样更科学地上网](q-and-a/how-to-get-k2p-online-more-wisely.md)
15 |
16 |
--------------------------------------------------------------------------------
/q-and-a/how-to-get-k2p-online-more-wisely.md:
--------------------------------------------------------------------------------
1 | # K2P应该怎样更科学地上网
2 |
3 | 虽然在\[2020-05-02\]版本中,trojan协议回归。但我仍希望你们能知道以下几点:
4 |
5 | 1. k2p永远首推⚠️ss/ssr协议⚠️的⚠️专线中转⚠️机场(不想知道原理的知道这个结论就可以了)
6 | 2. 现在的ss/ssr协议已经不是为了通过防火墙了,它们现在的意义是你的机器与中转机场国内的入口之间的通讯协议,不过墙,由它们的中转节点走专线直接绕过防火墙
7 | 3. 不推荐v2ray/trojan,是因为它们现在一般都是用来进行强加密或者强伪装来过墙的,一般用这类协议的机场都是直连(要过墙)的廉价机场,不仅可能导致体验差,更主要的是k2p的性能玩不起强加密与强伪装
8 |
9 | 注:本频道固件用ssr协议极限速率在70mbps左右,可以轻松油管4k60fps
10 |
11 |
--------------------------------------------------------------------------------
/diy-part1.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Copyright (c) 2019-2020 P3TERX
4 | #
5 | # This is free software, licensed under the MIT License.
6 | # See /LICENSE for more information.
7 | #
8 | # https://github.com/P3TERX/Actions-OpenWrt
9 | # File name: diy-part1.sh
10 | # Description: OpenWrt DIY script part 1 (Before Update feeds)
11 | #
12 |
13 | # Add helloworld :D
14 | echo "src-git helloworld https://github.com/fw876/helloworld.git" >> feeds.conf.default
--------------------------------------------------------------------------------
/diy-part2.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Copyright (c) 2019-2020 P3TERX
4 | #
5 | # This is free software, licensed under the MIT License.
6 | # See /LICENSE for more information.
7 | #
8 | # https://github.com/P3TERX/Actions-OpenWrt
9 | # File name: diy-part2.sh
10 | # Description: OpenWrt DIY script part 2 (After Update feeds)
11 | #
12 |
13 | # Modify default IP
14 | sed -i 's/192.168.1.1/10.0.0.1/g' package/base-files/files/bin/config_generate
15 |
16 | # # Install theme
17 | # rm -rf package/lean/luci-theme-argon
18 | # git clone -b 18.06 https://github.com/jerrykuku/luci-theme-argon.git package/lean/luci-theme-argon
19 | # git clone https://github.com/jerrykuku/luci-app-argon-config.git package/lean/luci-theme-argon-config
20 |
21 | # # Change opkg source
22 | # echo "sed -i 's#https://mirrors.cloud.tencent.com/lede/snapshots#https://k2p.dreamwalkerxz.workers.dev/k2p-repo#g' /etc/opkg/distfeeds.conf" >> package/lean/default-settings/files/zzz-default-settings
23 |
--------------------------------------------------------------------------------
/tutorial/install-custom-packages.md:
--------------------------------------------------------------------------------
1 | # 安装软件包
2 |
3 | ## 步骤
4 |
5 | 1. 进入web后台
6 | 2. 进入“系统”->“软件包”
7 | 3. 点击“刷新列表”,并等待页面刷新完成
8 | 4. 在“过滤器”框中输入你要安装的软件包名称,然后按“查找软件包”
9 | 5. 点击“可用软件包”
10 | 6. 在你想要安装的软件包左侧点击“安装”(请把名称中带“zh-cn”字样的语言包也装上)
11 | 7. 稍等片刻后,页面上方会出现一个框,里面有你软件包安装过程的日志。🐛如果出错,请将此日志截图到讨论群里`@DreamWalkerXZ`上报(毕竟这些包太多了,我测不过来,还是要靠你们😝)
12 |
13 | ⚠️就算你选了"保留配置",自定义软件包会在系统升级时被清除
14 |
15 | ## 软件包名称<->功能对查表\[2021-06-24\]
16 |
17 | | 名称 | 功能 |
18 | | :--- | :--- |
19 | | luci-app-adbyby-plus | 广告屏蔽大师 Plus + |
20 | | luci-app-argon-config | Argon 主题配置 |
21 | | luci-app-ddns | 动态域名 DNS |
22 | | ddns-scripts\_aliyun 等 | 动态域名 DNS 附加插件(dnspod等服务商同理) |
23 | | luci-app-frpc | 内网穿透 Frp 客户端 |
24 | | luci-app-frps | 内网穿透 Frp 服务端 |
25 | | luci-app-unblockmusic | 网易云音乐解锁 |
26 | | luci-app-jd-dailybonus | 京东签到 |
27 | | luci-app-uugamebooster | UU加速器 |
28 | | luci-app-sqm | 流量智能队列管理(QoS) |
29 | | luci-app-syncdial | 多拨 |
30 | | luci-app-vlmcsd | KMS 服务器 |
31 | | luci-app-zerotier | ZeroTier 内网穿透 |
32 | | luci-app-netdata | Netdata 实时监控 |
33 | | luci-app-xlnetacc | 迅雷快鸟 |
34 |
35 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 DreamWalkerXZ
4 | Copyright (c) 2019-2020 P3TERX
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 关于这个固件
2 |
3 | > 这个仓库基于[P3TERX/Actions-OpenWrt](https://github.com/P3TERX/Actions-OpenWrt)
4 |
5 | 用Github Actions为K2P自动编译固件
6 |
7 | Telegram频道: 🚀[k2pfirmware](https://t.me/k2pfirmware)
8 |
9 | ## 特性
10 |
11 | * SSRPlus
12 | * Turbo ACC
13 | * Argon主题
14 | * 可自定义软件包\(内置了由我托管的软件源\)
15 |
16 | ## 用法
17 |
18 | 1. 上传自己的`.config`文件
19 | 2. 进入Actions页面手动启动编译
20 | 3. 当编译完成后,在Actions页面的右上角,点击Artifacts按钮下载含编译出的固件的压缩包
21 | 4. 进入breed,选择⚠️斐讯布局⚠️刷入压缩包中含`sysupgrade`字样的文件
22 | 5. | 项目 | 值 |
23 | | :--- | :--- |
24 | | 默认后台地址 | `10.0.0.1` |
25 | | 默认后台密码 | `password` |
26 |
27 | ## 截图
28 |
29 | 
30 |
31 | ## 致谢名单
32 |
33 | - [Microsoft Azure](https://azure.microsoft.com)
34 | - [GitHub Actions](https://github.com/features/actions)
35 | - [OpenWrt](https://github.com/openwrt/openwrt)
36 | - [Lean's OpenWrt](https://github.com/coolsnowwolf/lede)
37 | - [tmate](https://github.com/tmate-io/tmate)
38 | - [mxschmitt/action-tmate](https://github.com/mxschmitt/action-tmate)
39 | - [csexton/debugger-action](https://github.com/csexton/debugger-action)
40 | - [Cowtransfer](https://cowtransfer.com)
41 | - [WeTransfer](https://wetransfer.com/)
42 | - [Mikubill/transfer](https://github.com/Mikubill/transfer)
43 | - [softprops/action-gh-release](https://github.com/softprops/action-gh-release)
44 | - [ActionsRML/delete-workflow-runs](https://github.com/ActionsRML/delete-workflow-runs)
45 | - [dev-drprasad/delete-older-releases](https://github.com/dev-drprasad/delete-older-releases)
46 | - [peter-evans/repository-dispatch](https://github.com/peter-evans/repository-dispatch)
47 |
48 | ## 许可证
49 |
50 | [MIT](https://github.com/DreamWalkerXZ/Actions-OpenWrt-K2P/blob/master/LICENSE) © P3TERX & DreamWalkerXZ
51 |
--------------------------------------------------------------------------------
/.github/workflows/build-openwrt.yml:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2019-2020 P3TERX
3 | #
4 | # This is free software, licensed under the MIT License.
5 | # See /LICENSE for more information.
6 | #
7 | # https://github.com/P3TERX/Actions-OpenWrt
8 | # Description: Build OpenWrt using GitHub Actions
9 | #
10 |
11 | name: Build OpenWrt
12 |
13 | on:
14 | repository_dispatch:
15 | workflow_dispatch:
16 | inputs:
17 | ssh:
18 | description: 'SSH connection to Actions'
19 | required: false
20 | default: 'false'
21 |
22 | env:
23 | REPO_URL: https://github.com/coolsnowwolf/lede
24 | REPO_BRANCH: master
25 | FEEDS_CONF: feeds.conf.default
26 | CONFIG_FILE: .config
27 | DIY_P1_SH: diy-part1.sh
28 | DIY_P2_SH: diy-part2.sh
29 | UPLOAD_BIN_DIR: true
30 | UPLOAD_FIRMWARE: true
31 | UPLOAD_COWTRANSFER: true
32 | UPLOAD_WETRANSFER: true
33 | UPLOAD_RELEASE: false
34 | TZ: Asia/Shanghai
35 |
36 | jobs:
37 | build:
38 | runs-on: ubuntu-20.04
39 |
40 | steps:
41 | - name: Checkout
42 | uses: actions/checkout@main
43 |
44 | - name: Initialization environment
45 | env:
46 | DEBIAN_FRONTEND: noninteractive
47 | run: |
48 | sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc
49 | sudo -E apt-get -qq update
50 | sudo -E apt-get -qq install $(curl -fsSL git.io/depends-ubuntu-2004)
51 | sudo -E apt-get -qq autoremove --purge
52 | sudo -E apt-get -qq clean
53 | sudo timedatectl set-timezone "$TZ"
54 | sudo mkdir -p /workdir
55 | sudo chown $USER:$GROUPS /workdir
56 |
57 | - name: Clone source code
58 | working-directory: /workdir
59 | run: |
60 | df -hT $PWD
61 | git clone $REPO_URL -b $REPO_BRANCH openwrt
62 | ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt
63 |
64 | - name: Load custom feeds
65 | run: |
66 | [ -e $FEEDS_CONF ] && mv $FEEDS_CONF openwrt/feeds.conf.default
67 | chmod +x $DIY_P1_SH
68 | cd openwrt
69 | $GITHUB_WORKSPACE/$DIY_P1_SH
70 |
71 | - name: Update feeds
72 | run: cd openwrt && ./scripts/feeds update -a
73 |
74 | - name: Install feeds
75 | run: cd openwrt && ./scripts/feeds install -a
76 |
77 | - name: Load custom configuration
78 | run: |
79 | [ -e files ] && mv files openwrt/files
80 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config
81 | chmod +x $DIY_P2_SH
82 | cd openwrt
83 | $GITHUB_WORKSPACE/$DIY_P2_SH
84 |
85 | - name: SSH connection to Actions
86 | uses: P3TERX/ssh2actions@v1.0.0
87 | if: (github.event.inputs.ssh == 'true' && github.event.inputs.ssh != 'false') || contains(github.event.action, 'ssh')
88 | env:
89 | TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
90 | TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
91 |
92 | - name: Download package
93 | id: package
94 | run: |
95 | cd openwrt
96 | make defconfig
97 | make download -j8
98 | find dl -size -1024c -exec ls -l {} \;
99 | find dl -size -1024c -exec rm -f {} \;
100 |
101 | - name: Compile the firmware
102 | id: compile
103 | run: |
104 | cd openwrt
105 | echo -e "$(nproc) thread compile"
106 | make -j$(nproc) || make -j1 || make -j1 V=s
107 | echo "::set-output name=status::success"
108 | grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME
109 | [ -s DEVICE_NAME ] && echo "DEVICE_NAME=_$(cat DEVICE_NAME)" >> $GITHUB_ENV
110 | echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV
111 |
112 | - name: Check space usage
113 | if: (!cancelled())
114 | run: df -hT
115 |
116 | - name: Upload bin directory
117 | uses: actions/upload-artifact@main
118 | if: steps.compile.outputs.status == 'success' && env.UPLOAD_BIN_DIR == 'true'
119 | with:
120 | name: OpenWrt_bin${{ env.DEVICE_NAME }}${{ env.FILE_DATE }}
121 | path: openwrt/bin
122 |
123 | - name: Organize files
124 | id: organize
125 | if: env.UPLOAD_FIRMWARE == 'true' && !cancelled()
126 | run: |
127 | cd openwrt/bin/targets/*/*
128 | rm -rf packages
129 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV
130 | echo "::set-output name=status::success"
131 |
132 | - name: Upload firmware directory
133 | uses: actions/upload-artifact@main
134 | if: steps.organize.outputs.status == 'success' && !cancelled()
135 | with:
136 | name: OpenWrt_firmware${{ env.DEVICE_NAME }}${{ env.FILE_DATE }}
137 | path: ${{ env.FIRMWARE }}
138 |
139 | - name: Upload firmware to cowtransfer
140 | id: cowtransfer
141 | if: steps.organize.outputs.status == 'success' && env.UPLOAD_COWTRANSFER == 'true' && !cancelled()
142 | run: |
143 | curl -fsSL git.io/file-transfer | sh
144 | ./transfer cow --block 2621440 -s -p 64 --no-progress ${FIRMWARE} 2>&1 | tee cowtransfer.log
145 | echo "::warning file=cowtransfer.com::$(cat cowtransfer.log | grep https)"
146 | echo "::set-output name=url::$(cat cowtransfer.log | grep https | cut -f3 -d" ")"
147 |
148 | - name: Upload firmware to WeTransfer
149 | id: wetransfer
150 | if: steps.organize.outputs.status == 'success' && env.UPLOAD_WETRANSFER == 'true' && !cancelled()
151 | run: |
152 | curl -fsSL git.io/file-transfer | sh
153 | ./transfer wet -s -p 16 --no-progress ${FIRMWARE} 2>&1 | tee wetransfer.log
154 | echo "::warning file=wetransfer.com::$(cat wetransfer.log | grep https)"
155 | echo "::set-output name=url::$(cat wetransfer.log | grep https | cut -f3 -d" ")"
156 |
157 | - name: Generate release tag
158 | id: tag
159 | if: env.UPLOAD_RELEASE == 'true' && !cancelled()
160 | run: |
161 | echo "::set-output name=release_tag::$(date +"%Y.%m.%d-%H%M")"
162 | touch release.txt
163 | [ $UPLOAD_COWTRANSFER = true ] && echo "🔗 [Cowtransfer](${{ steps.cowtransfer.outputs.url }})" >> release.txt
164 | [ $UPLOAD_WETRANSFER = true ] && echo "🔗 [WeTransfer](${{ steps.wetransfer.outputs.url }})" >> release.txt
165 | echo "::set-output name=status::success"
166 |
167 | - name: Upload firmware to release
168 | uses: softprops/action-gh-release@v1
169 | if: steps.tag.outputs.status == 'success' && !cancelled()
170 | env:
171 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
172 | with:
173 | tag_name: ${{ steps.tag.outputs.release_tag }}
174 | body_path: release.txt
175 | files: ${{ env.FIRMWARE }}/*
176 |
177 | - name: Delete workflow runs
178 | uses: GitRML/delete-workflow-runs@main
179 | with:
180 | retain_days: 1
181 | keep_minimum_runs: 3
182 |
183 | - name: Remove old Releases
184 | uses: dev-drprasad/delete-older-releases@v0.1.0
185 | if: env.UPLOAD_RELEASE == 'true' && !cancelled()
186 | with:
187 | keep_latest: 3
188 | delete_tags: true
189 | env:
190 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
191 |
--------------------------------------------------------------------------------