{{ t('aboutTitle') }}
73 |{{ t('aboutDesc') }}
74 |75 | {{ t('update') }}: {{ lastUpdate }} 76 |
77 |├── .gitignore
├── go.mod
├── data
├── lite
└── full
├── update.sh
├── LICENSE
├── README_CN.md
├── .github
└── workflows
│ ├── update-warpkey.yml
│ └── release.yml
├── README.md
├── main.go
└── index.html
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/go.mod:
--------------------------------------------------------------------------------
1 | module warpkey
2 |
3 | go 1.22.5
4 |
--------------------------------------------------------------------------------
/data/lite:
--------------------------------------------------------------------------------
1 | g7986MvH-c29Bn43b-14UR93np
2 | 2YU6k87m-69bUE05L-759jk4bF
3 | kWl5n384-1V7Dx34r-r8jQ70i9
4 | fK591wG4-To24V76B-12lAE0y4
5 | gTX9305C-eh3gb107-QV9q601j
6 | 92B0itT7-H37ace19-jc72V1E9
7 | L0s8J76o-j95Na0r1-5JE762PZ
8 | 5w36i2dD-836pTs2k-5oT73M4v
9 | d2Vg90q1-c42bl0z1-ks0qJ413
10 | WZH4M192-Z4oxX810-Kme06u43
11 | 78Yx4WH9-gb984Mn1-KHY45l26
12 | 3j681LeP-B48aUF51-9ST1U05v
13 | 2Bq5s89S-Ki3J9B84-1dRw407J
14 | O4z9b8x1-5RG9g1p7-OP98F34H
15 | 67JXM09d-ZJd3D947-Uo23wF98
--------------------------------------------------------------------------------
/update.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # Author: geeklinux-io(GitHub)
3 | # Blog: https://wanghaoyu.com.cn
4 | # Regularly update scripts
5 | # You can use crontab to schedule tasks to execute this script and submit updates to your GitHub repository
6 |
7 | # Set Env
8 | TOOL_DIR=""
9 | PROJECT_DIR=""
10 | DATA_DIR="$TOOL_DIR/data"
11 | PROJECT_DATA_DIR="$PROJECT_DIR/data"
12 | EXECUTABLE="$TOOL_DIR/warpkey-linux-amd64"
13 |
14 | cd "$TOOL_DIR" || exit 1
15 | if [ -x "$EXECUTABLE" ]; then
16 | "$EXECUTABLE" || exit 1
17 | else
18 | echo "Executable $EXECUTABLE not found or not executable"
19 | exit 1
20 | fi
21 |
22 | rm -rf "$PROJECT_DATA_DIR"/*
23 | cp -r "$DATA_DIR"/* "$PROJECT_DATA_DIR/"
24 | cd "$PROJECT_DIR" || exit 1
25 |
26 | if git status --porcelain | grep -q '^'; then
27 | current_time=$(date +"%Y-%m-%d %H:%M:%S")
28 | git add ./data
29 | git commit -m "🚀Automatic update - $current_time"
30 | git push || exit 1
31 | else
32 | echo "No changes to commit"
33 | fi
34 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2024 geeklinux-io
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README_CN.md:
--------------------------------------------------------------------------------
1 | # CloudFlare Warp KEY 收集工具
2 |
3 | [English](README.md) | [简体中文](README_CN.md)
4 |
5 | 我的博客:https://www.wanghaoyu.com.cn/archives/cloudflare-warp-key.html
6 |
7 | ## 获取KEY
8 |
9 | 可以从以下 URL 直接获取 Warp KEY(每隔一小时更新数据):
10 |
11 | - [https://raw.githubusercontent.com/nas-tool/warpkey/main/data/full](https://raw.githubusercontent.com/nas-tool/warpkey/main/data/lite)
12 | - [https://raw.githubusercontent.com/nas-tool/warpkey/main/data/full](https://raw.githubusercontent.com/nas-tool/warpkey/main/data/full)
13 |
14 | 也可以通过我的GitHub Pages中获取:[CloudFlare WARP Key (nas-tool.github.io)](https://nas-tool.github.io/warpkey/)
15 |
16 |
17 |
18 | ## 私有化部署
19 |
20 | ### 1. 安装 Go
21 |
22 | 请确保你已经安装了 Go。你可以从 [Go 官方网站](https://golang.org/dl/) 下载并安装 Go。
23 |
24 | ### 2. 克隆项目
25 |
26 | 将此仓库克隆到你的本地环境中:
27 |
28 | ```bash
29 | git clone https://github.com/nas-tool/warpkey.git
30 | cd warpkey
31 | ```
32 |
33 | ### 3. 配置
34 |
35 | 如有需要,可以编辑 `main.go` 文件以调整配置。
36 |
37 | ### 4. 运行/构建
38 |
39 | 在配置好 Go 环境之后,可以使用以下命令打包程序:
40 |
41 | ```bash
42 | chmod a+x build.sh
43 | ./build.sh
44 | ```
45 |
46 | 构建好的应用程序会自动放置到当前所在目录的`build`目录中。
47 |
48 | 该工具将从 Telegram 收集密钥,并将其保存在当前目录下的`/data`目录中。
49 |
50 | 你也可以通过特定的Socket 或者HTTP代理去请求获取 CloudFlare Key 可以使用 --proxy 参数,当然,你也可以使用 程序 -h 查看具体的使用帮助。
51 |
52 | ## 5. 自动更新
53 |
54 | 您可以使用crontab计划任务执行项目中的update.sh脚本,并将更新提交到您的GitHub存储库中。
55 |
56 | ## 许可
57 |
58 | 该项目使用 MIT 许可。有关详细信息,请参阅 [LICENSE](LICENSE) 文件。
59 |
60 |
--------------------------------------------------------------------------------
/.github/workflows/update-warpkey.yml:
--------------------------------------------------------------------------------
1 | name: Update WarpKey Data
2 |
3 | on:
4 | schedule:
5 | - cron: '2 */1 * * *'
6 | workflow_dispatch:
7 |
8 | jobs:
9 | update:
10 | runs-on: ubuntu-latest
11 | steps:
12 | - name: Checkout repository
13 | uses: actions/checkout@v3
14 |
15 | - name: Set up Go
16 | uses: actions/setup-go@v4
17 | with:
18 | go-version: '1.23.5'
19 |
20 | - name: Build warpkey
21 | run: |
22 | go build -o warpkey-linux-amd64 main.go
23 | chmod +x warpkey-linux-amd64
24 |
25 | - name: Run warpkey to update data
26 | run: |
27 | ./warpkey-linux-amd64
28 |
29 | - name: Update timestamp in index.html
30 | run: |
31 | current_time=$(TZ="Asia/Shanghai" date +"%Y-%m-%d %H:%M:%S")
32 | sed -i "s/Keys are updated to GitHub daily at Every Hour\./Keys are updated to GitHub daily at Every Hour. Last update: $current_time\./g" index.html
33 | sed -i "s/密钥会每个小时自动push到本仓库中,你可以通过本站获取/密钥会每个小时自动push到本仓库中,你可以通过本站获取。最后更新: $current_time/g" index.html
34 |
35 | - name: Commit and push if there are changes
36 | run: |
37 | git config --global user.name "GitHub Actions"
38 | git config --global user.email "actions@github.com"
39 |
40 | if git status --porcelain | grep -q '^'; then
41 | export TZ="Asia/Shanghai"
42 | commit_time=$(date +"%Y-%m-%d %H:%M:%S %z")
43 | export GIT_AUTHOR_DATE="$commit_time"
44 | export GIT_COMMITTER_DATE="$commit_time"
45 |
46 | git add ./data index.html
47 | git commit -m "🚀Automatic update - $commit_time"
48 | git push
49 | else
50 | echo "No changes to commit"
51 | fi
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CloudFlare Warp KEY Collection Tool
2 |
3 | [English](README.md) | [简体中文](README_CN.md)
4 |
5 | ## Direct Access
6 |
7 | You can directly access Warp KEY from the following URL (Update data every hour):
8 |
9 | - [https://raw.githubusercontent.com/nas-tool/warpkey/main/data/lite](https://raw.githubusercontent.com/nas-tool/warpkey/main/data/lite)
10 | - [https://raw.githubusercontent.com/nas-tool/warpkey/main/data/full](https://raw.githubusercontent.com/nas-tool/warpkey/main/data/full)
11 |
12 | You can also obtain it through my GitHub Pages:[CloudFlare WARP Key (nas-tool.github.io)](https://nas-tool.github.io/warpkey/)
13 |
14 | ## Private Deployment
15 |
16 | ### 1. Install Go
17 |
18 | Make sure you have Go installed. You can download and install Go from the [official Go website](https://golang.org/dl/).
19 |
20 | ### 2. Clone the Project
21 |
22 | Clone this repository to your local environment:
23 |
24 | ```bash
25 | git clone https://github.com/nas-tool/warpkey.git
26 | cd warpkey
27 | ```
28 |
29 | ### 3. Configure
30 |
31 | If needed, you can edit the `main.go` file to adjust configurations.
32 |
33 | ### 4. Run/Build
34 |
35 | Once the Go environment is set up, you can use the following command to package the application:
36 |
37 | ```bash
38 | chmod a+x build.sh
39 | ./build.sh
40 | ```
41 | You can find the program you have compiled in the `./build` directory under the current directory.
42 |
43 | The tool will collect keys from Telegram and save them in the `./data` directory under the current directory.
44 |
45 | If you want to request the CloudFlare Key through a specific Socket or HTTP proxy, you can use the -- proxy parameter. Of course, you can also use the program - h to view specific usage help
46 |
47 |
48 | ## 5. Auto Update
49 |
50 | You can use crontab to schedule tasks to execute the `update.sh `script in your project and submit the updates to your GitHub repository
51 |
52 | ## License
53 |
54 | This project is licensed under the MIT License. For more details, please see the [LICENSE](LICENSE) file.
55 |
56 |
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: Build and Release
2 |
3 | on:
4 | workflow_dispatch: # 只允许手动触发
5 |
6 | jobs:
7 | build:
8 | runs-on: ubuntu-latest
9 | steps:
10 | - name: Checkout repository
11 | uses: actions/checkout@v3
12 |
13 | - name: Set up Go
14 | uses: actions/setup-go@v4
15 | with:
16 | go-version: '1.23.5'
17 |
18 | - name: Build for all platforms
19 | run: |
20 | # 创建发布目录
21 | mkdir -p release
22 |
23 | # 定义目标平台
24 | PLATFORMS=("linux/amd64" "linux/arm64" "darwin/amd64" "darwin/arm64" "windows/amd64" "windows/arm64")
25 |
26 | # 遍历并编译每个平台的版本
27 | for PLATFORM in "${PLATFORMS[@]}"; do
28 | # 分割操作系统和架构
29 | IFS="/" read -r -a array <<< "$PLATFORM"
30 | GOOS="${array[0]}"
31 | GOARCH="${array[1]}"
32 |
33 | # 设置输出文件名
34 | if [ "$GOOS" = "windows" ]; then
35 | OUTPUT_NAME="warpkey-${GOOS}-${GOARCH}.exe"
36 | else
37 | OUTPUT_NAME="warpkey-${GOOS}-${GOARCH}"
38 | fi
39 |
40 | echo "Building for $GOOS/$GOARCH..."
41 | GOOS=$GOOS GOARCH=$GOARCH go build -o "release/$OUTPUT_NAME" main.go
42 |
43 | # 为非 Windows 版本添加执行权限
44 | if [ "$GOOS" != "windows" ]; then
45 | chmod +x "release/$OUTPUT_NAME"
46 | fi
47 |
48 | # 创建压缩包
49 | if [ "$GOOS" = "windows" ]; then
50 | zip -j "release/${OUTPUT_NAME%.exe}.zip" "release/$OUTPUT_NAME"
51 | rm "release/$OUTPUT_NAME"
52 | else
53 | tar -czf "release/${OUTPUT_NAME}.tar.gz" -C release "$OUTPUT_NAME"
54 | rm "release/$OUTPUT_NAME"
55 | fi
56 | done
57 |
58 | - name: Generate release tag
59 | id: tag
60 | run: |
61 | echo "release_tag=release-$(date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
62 |
63 | - name: Create Release
64 | uses: softprops/action-gh-release@v1
65 | with:
66 | tag_name: ${{ steps.tag.outputs.release_tag }}
67 | name: Release ${{ steps.tag.outputs.release_tag }}
68 | files: release/*
69 | draft: false
70 | prerelease: false
71 | generate_release_notes: true
72 | env:
73 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
--------------------------------------------------------------------------------
/data/full:
--------------------------------------------------------------------------------
1 | 9hL8R3M2-9yrEh180-7J3h9fj0
2 | mpA260T9-7YI3MZ29-J7h6lH35
3 | 5l0Uc76Z-x28r54at-09UVmS46
4 | 6FX97PC0-c08Ig3h5-730M5lns
5 | R2Yy537I-sKF34d25-L192D3fa
6 | 8jSO140i-0S9i72tA-6C53BJf4
7 | JOt9074K-8W30vF1N-m9EYj647
8 | 85NwO97q-9f0n82Wg-fy9L80V4
9 | Y5g167wK-a170KOR2-4b97L0kg
10 | 6X5pni38-58XRBG63-8Wg1a5R6
11 | GmrF3940-mR18e5E7-6F4vu28g
12 | Fj4La872-2Zp971fD-9jaol108
13 | UM234J8w-52h0FXQ8-dR7045ha
14 | FJP4L180-T8P5G0M6-7nt9g6J0
15 | 86EgOn27-AzZ126a5-a9YN048z
16 | U5woD147-roO15n87-i31mx72v
17 | 1PK932EH-r873apw1-Se15Xp38
18 | 278lv6pL-TF9f4k17-R0X8x65U
19 | 67JXM09d-ZJd3D947-Uo23wF98
20 | 2ND91H0U-eh948X0w-qFu784b6
21 | 53pom79g-sGWm8614-57T1dDM0
22 | 7s14i2tv-17zSd9Y5-pfQ1964b
23 | 238bQki0-PTF8y023-9f61AuQ5
24 | a0kp5W69-1BJ7F8Q3-COY7P654
25 | 5w36i2dD-836pTs2k-5oT73M4v
26 | 1B2t6g5U-bp106xP4-Hj1l495q
27 | 6N1l23ek-3ijB1v27-3pJ1Fx76
28 | 08UdXb35-60bzW7P5-0B3j9U2R
29 | ka5y804h-rgj860C9-j8910Big
30 | r06cvZ84-6Gz2Ej83-9xmB1F54
31 | 78y1zV4x-49QkW85I-0ew5DB48
32 | 7Jd1g0H4-A0c693iL-y6c015Oe
33 | P631vaT2-gp74iE98-9c1bD02O
34 | Q3S1Z9b8-63CK0t2c-7A231rWv
35 | 9kin480d-4uM18U6O-D2q173Os
36 | zA837fI4-h82aQ0b1-mes83L79
37 | 58t9Ec2B-Xqa38h75-B1425vHe
38 | 17vdIO90-17IoL8l3-9moVX708
39 | dj5r60w8-8z4Pf67h-Sq4680vB
40 | 0Mq84k1S-01lO26qg-U03YlP98
41 | 49SRM31J-q1G7DT24-1coG2n45
42 | i728QVq6-KWe421q5-9Q5HJ4s7
43 | 9fDp801b-C08z1Px5-2N39GUL5
44 | bR764F8J-PCl17A28-OM9a0p87
45 | An19jq63-SN7U89L2-PN37J60q
46 | K6erj819-x14UB8i9-5x23E1tN
47 | D2LF8R75-S37aj1Y4-O3TR0H72
48 | P73b5x1q-261UYz5Q-591hxNo8
49 | 4b95t7jg-f7542KHt-qZT45L03
50 | I7Wnw651-Q483dvO7-058aUXW7
51 | jDc5386w-6K9DT38G-p0ys873S
52 | 9iy45g2d-bl86aN03-91Z47GuE
53 | 7e1PSK28-H2UD43m6-9O547xwu
54 | 37aN08JI-83ySGO24-X6524Tdk
55 | AC0NJ957-fG2c461h-F6CbE120
56 | k0CG375Y-ga09v2n7-0QoY8U75
57 | cWb5190u-mJ30ZO71-1h3b6lQ9
58 | 3j06UoP5-U9ba08L5-2V93dU6i
59 | Q7kcK538-f3m98e0c-RgT2x916
60 | Tls739j6-0h4c6O2S-2AO1o36q
61 | 18ZDcM35-4o1q98ED-vRV3072Y
62 | d2g9B8t4-731fuwB8-rN86j39c
63 | 92IkK48l-17zndI04-H0R81bd3
64 | do3vg910-6em41ga9-42Q3Tr0Z
65 | 38Pe0b9B-n2VO0w36-30THjC49
66 | yf0X25T7-mP107H3X-18W9B3oq
67 | YB5I879V-t5jY9N73-ui79o10W
68 | y7Sv368m-6y1kEe93-AQ546HK3
69 | 65Rr9A1J-3G56FW0j-62nY8aL4
70 | 580IB3DL-t6K170ET-3b9ji6B4
71 | jz46W3b2-WN87zQ45-48s5i1Jm
72 | w249VC1q-46d80XEN-z264Sfx5
73 | Uy89e60R-17c93YFh-0Yq745Vx
74 | 29ls16Mz-W35F8Vi4-rR872h0U
75 | 8Wdj50V4-T8z529iu-Hm790Ll1
76 | Px874w2i-zt803Hr7-bC0345hx
77 | Z36Ovs18-s3G56Fg7-8D1ce9R0
78 | d4MY685t-71VT3Ad5-C7iP310f
79 | 984C2zox-fg1K758s-73Ai9lm5
80 | 4so5P29v-742f3RvB-67vXp92H
81 | L0s8J76o-j95Na0r1-5JE762PZ
82 | b6a8q7T3-tY64M95g-3s5v4tQ8
83 | 1749lQug-1j8P35XD-hAJ2315t
84 | oW179Z5g-mxR352j7-0PR1V98J
85 | kWl5n384-1V7Dx34r-r8jQ70i9
86 | g40Pv1W9-lj3C27u4-Mk568i9Z
87 | S8Yk36s2-594F3PUB-13K0u2Mw
88 | L4c53Qh8-3dXb5e21-50wP17he
89 | 4Z7gk8m2-3ZT9C57N-J762Yp3U
90 | Lg10n87Z-C29f6E4q-23w94nGp
91 | 1G53Tv8M-fwD6C408-zq0f28I4
92 | 01YHj39V-7RIz52Q0-m01xc62o
93 | ldo7w415-L2FGM738-it5f67h1
94 | 8mSa95J4-vL9048yf-92l86Pcj
95 | Hvd0298V-2P8o16dp-61G0m8cZ
96 | Re2y537g-Yld3402S-2mR08hL9
97 | 31u4eQ7G-9kS8H43P-J7BM4Z23
98 | 07F5Z4yV-3zC61BN8-L01G4i7Z
99 | MU4vj921-K48Bw1d2-72U1vlD5
100 | E943gb6S-TG51c84p-Fr3124KL
--------------------------------------------------------------------------------
/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "flag"
5 | "fmt"
6 | "io/ioutil"
7 | "log"
8 | "math/rand"
9 | "net/http"
10 | "net/url"
11 | "os"
12 | "regexp"
13 | "time"
14 | )
15 |
16 | const (
17 | outputDir = "data"
18 | fullPath = "data/full"
19 | litePath = "data/lite"
20 | )
21 |
22 | // fetchKeysFromURL fetches the content from the given URL and extracts keys
23 | func fetchKeysFromURL(urlStr string, proxyURL *url.URL) ([]string, error) {
24 | var client *http.Client
25 |
26 | if proxyURL != nil {
27 | transport := &http.Transport{
28 | Proxy: http.ProxyURL(proxyURL),
29 | }
30 | client = &http.Client{Transport: transport}
31 | } else {
32 | client = &http.Client{}
33 | }
34 |
35 | response, err := client.Get(urlStr)
36 | if err != nil {
37 | return nil, err
38 | }
39 | defer response.Body.Close()
40 |
41 | body, err := ioutil.ReadAll(response.Body)
42 | if err != nil {
43 | return nil, err
44 | }
45 |
46 | // Regular expression to find keys in the format key
47 | pattern := `([A-Za-z0-9-]+)`
48 | re := regexp.MustCompile(pattern)
49 | matches := re.FindAllStringSubmatch(string(body), -1)
50 |
51 | var keys []string
52 | for _, match := range matches {
53 | keys = append(keys, match[1])
54 | }
55 | return keys, nil
56 | }
57 |
58 | // writeKeysToFile writes the list of keys to the specified file path
59 | func writeKeysToFile(keys []string, path string) error {
60 | file, err := os.Create(path)
61 | if err != nil {
62 | return err
63 | }
64 | defer file.Close()
65 |
66 | for i, key := range keys {
67 | if i > 0 {
68 | file.WriteString("\n")
69 | }
70 | file.WriteString(key)
71 | }
72 | return nil
73 | }
74 |
75 | func main() {
76 | proxy := flag.String("proxy", "", "HTTP or SOCKS5 proxy URL (e.g., http://proxy.example.com:8080 or socks5://localhost:1080)")
77 | flag.Parse()
78 |
79 | var proxyURL *url.URL
80 | if *proxy != "" {
81 | var err error
82 | proxyURL, err = url.Parse(*proxy)
83 | if err != nil {
84 | log.Fatalf("Invalid proxy URL: %v", err)
85 | }
86 | }
87 |
88 | sources := []string{
89 | "https://t.me/s/warpplus",
90 | "https://t.me/s/warppluscn",
91 | "https://t.me/s/warpPlusHome",
92 | "https://t.me/s/warp_veyke",
93 | }
94 |
95 | var allKeys []string
96 | for _, url := range sources {
97 | keys, err := fetchKeysFromURL(url, proxyURL)
98 | if err != nil {
99 | log.Printf("Error fetching keys from %s: %v", url, err)
100 | continue
101 | }
102 | allKeys = append(allKeys, keys...)
103 | }
104 |
105 | // Remove duplicates from the keys list
106 | uniqueKeys := make(map[string]struct{})
107 | for _, key := range allKeys {
108 | uniqueKeys[key] = struct{}{}
109 | }
110 |
111 | var keysList []string
112 | for key := range uniqueKeys {
113 | keysList = append(keysList, key)
114 | }
115 |
116 | if len(keysList) > 0 {
117 | // Create output directory if it does not exist
118 | if err := os.MkdirAll(outputDir, os.ModePerm); err != nil {
119 | log.Fatalf("Error creating directory %s: %v", outputDir, err)
120 | }
121 |
122 | // Generate full file with up to 100 keys
123 | x := 0
124 | var fullKeys []string
125 | for _, key := range keysList {
126 | if x >= 100 {
127 | break
128 | }
129 | fullKeys = append(fullKeys, key)
130 | x++
131 | }
132 | if err := writeKeysToFile(fullKeys, fullPath); err != nil {
133 | log.Fatalf("Error writing to file %s: %v", fullPath, err)
134 | }
135 |
136 | // Generate lite file with up to 15 keys, shuffled
137 | rand.Seed(time.Now().UnixNano())
138 | rand.Shuffle(len(keysList), func(i, j int) {
139 | keysList[i], keysList[j] = keysList[j], keysList[i]
140 | })
141 |
142 | i := 0
143 | var liteKeys []string
144 | for _, key := range keysList {
145 | if i >= 15 {
146 | break
147 | }
148 | liteKeys = append(liteKeys, key)
149 | i++
150 | }
151 | if err := writeKeysToFile(liteKeys, litePath); err != nil {
152 | log.Fatalf("Error writing to file %s: %v", litePath, err)
153 | }
154 |
155 | fmt.Println("successfully.")
156 | } else {
157 | fmt.Println("No keys found.")
158 | }
159 | }
160 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
{{ t('aboutDesc') }}
74 |75 | {{ t('update') }}: {{ lastUpdate }} 76 |
77 |