├── .gitignore
├── LICENSE
├── README.md
├── README_CN.md
├── build.sh
├── go.mod
├── go.sum
├── main.go
├── rsrc.ico
├── tool
├── crypto.go
└── gorm.go
└── tui
├── client.go
├── locales
├── en.ini
├── es.ini
├── hu.ini
├── nl.ini
├── ru.ini
└── tr.ini
├── setProxy_linux.go
├── setProxy_mac.go
├── setProxy_win.go
└── tui.go
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022-2024 KingParks and Licensee contributors
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # windsurf-vip
2 |
3 | > 🌐️ English | [中文](README_CN.md)
4 |
5 | `windsurf-vip` is a tool service for Windsurf smart code editor to enjoy VIP intelligent prompts without logging in.
6 |
7 |
8 | ### Usage
9 |
10 | Open the terminal on MacOS/Linux; Open Git Bash on Windows. Then execute the following command to install:
11 | >some computers may report false positives, need to close the antivirus software/computer housekeeper/security protection and then proceed
12 |
13 | Method 1: Install via GitHub script
14 | ```bash
15 | bash <(curl -Lk https://github.com/kingparks/windsurf-vip/releases/download/latest/i.sh) githubReadme
16 | ```
17 | Method 2: Install via ghp.ci proxy script
18 | ```bash
19 | bash <(curl -Lk https://ghp.ci/https://github.com/kingparks/windsurf-vip/releases/download/latest/install.sh) githubReadme
20 | ```
21 | Method 3: Manually download the binary file
22 | > download the binary file for the corresponding operating system from the [release](https://github.com/kingparks/windsurf-vip/releases) page
23 | ```shell
24 | # MaxOS/Linux
25 | sudo mv windsurf-vip_xx_xxx /usr/local/bin/windsurf-vip;
26 | chmod +x /usr/local/bin/windsurf-vip;
27 | windsurf-vip githubReadme;
28 | # Windows
29 | # double click windsurf-vip_xx_xxx.exe
30 | ```
31 |
32 | Launch windsurf-vip:
33 | ```bash
34 | # MaxOS/Linux
35 | windsurf-vip
36 | # Windows
37 | # double click windsurf-vip_xx_xxx.exe
38 | ```
39 |
40 |
51 |
52 | Enjoy windsurf-vip:
53 | * Open the Windsurf code editor, click the settings icon in the upper right corner, and you can see that you are already a VIP account.
54 | * Enjoy code prompts and chat functions.
55 |
56 | ---
57 | ### Promotion Guide
58 | By promoting windsurf-vip, you can automatically get up to an unlimited amount of free usage time, and the other party can also get 15 days of free (self-registration for 7 days), you can refer to the following methods:
59 | 1. After cloning this repository, replace `githubReadme` in the `README` with your DeviceID.
60 | 2. Post articles on platforms such as SegmentFault/Stack Overflow/GitHub Discussions/Reddit/Dev.to/Hacker News/DZone/V2EX/Quora/WeChat Official Account/Zhihu/Bilibili/CSDN/, promoting the use of windsurf pro in this way, and attach your own promotional installation command or cloned github address.
61 | 3. Comment under Windsurf related articles or videos, for example: "Cooperate with Github's [Your Github Name]/windsurf-vip for low-priced or freelancing Pro"
62 | ---
63 | ### Star History
64 |
65 |
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/README_CN.md:
--------------------------------------------------------------------------------
1 | # windsurf-vip
2 |
3 | > 🌐️ 中文 | [English](README.md)
4 |
5 | `windsurf-vip` 是一个用于 Windsurf 智能代码编辑器 无需账号登录即可享受VIP智能提示的工具服务。
6 |
7 |
8 | ### 使用方式
9 |
10 | 在 MacOS/Linux 中,请打开终端;在 Windows 中,请打开 Git Bash。然后执行以下命令来安装:
11 | > 部分电脑可能会误报毒,需要关闭杀毒软件/电脑管家/安全防护再进行
12 |
13 | 方式1:通过 ghp.ci 代理脚本
14 | ```bash
15 | bash <(curl -Lk https://github.com/kingparks/windsurf-vip/releases/download/latest/i.sh) githubReadme
16 | ```
17 | 方式2:通过 GitHub 脚本
18 | ```bash
19 | bash <(curl -Lk https://ghp.ci/https://github.com/kingparks/windsurf-vip/releases/download/latest/install.sh) githubReadme
20 | ```
21 | 方式3:手动下载二进制文件
22 | > 从 [release](https://github.com/kingparks/windsurf-vip/releases) 页下载对应操作系统的二进制文件
23 | ```shell
24 | # MaxOS/Linux
25 | sudo mv windsurf-vip_xx_xxx /usr/local/bin/windsurf-vip;
26 | chmod +x /usr/local/bin/windsurf-vip;
27 | windsurf-vip githubReadme;
28 | # Windows
29 | # 双击 windsurf-vip_xx_xxx.exe
30 | ```
31 |
32 | 启动 windsurf-vip:
33 | ```bash
34 | # MaxOS/Linux
35 | windsurf-vip
36 | # Windows
37 | # 双击 windsurf-vip_xx_xxx.exe
38 | ```
39 |
40 |
51 |
52 | 享受 windsurf-vip:
53 | * 打开 Windsurf 代码编辑器,点击右上角设置图标,可看到已是VIP账号。
54 | * 尽情享受代码提示和聊天功能。
55 | ---
56 | ### 推广指南
57 | 通过推广 windsurf-vip,您可以自动获得至多无限多的免费使用时间,对方也可以获取15天的免费试用(自主注册为7天), 可参考以下方式:
58 | 1. clone 该仓库后,替换 `README` 中的 `githubReadme` 为您的设备码。
59 | 2. 在公众号/知乎/哔哩哔哩/CSDN/SegmentFault/Stack Overflow/GitHub Discussions/Reddit/Dev.to/Hacker News/DZone/V2EX/Quora 等平台发布文章,安利此种使用 windsurf pro 的方式,附加上自己的推广安装命令或 clone 后的 github 地址。
60 | 3. 在相关 Windsurf 文章或视频下面评论 例如:"可以配合 github 的 [你的github名字]/windsurf-vip 低价或白嫖 Pro"
61 | ---
62 | ### Star History
63 |
64 |
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # garble混淆安装: go install mvdan.cc/garble@latest
3 | GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 garble -literals -tiny build -ldflags "-w -s" -o build/windsurf-vip_darwin_amd64;
4 | GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 garble -literals -tiny build -ldflags "-w -s" -o build/windsurf-vip_darwin_arm64;
5 | # rsrc 应用程序图标安装: go install github.com/akavel/rsrc@latest
6 | rsrc -arch amd64 -ico rsrc.ico -o rsrc.syso;
7 | GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-s -w" -o build/windsurf-vip_windows_amd64.exe;
8 | rm rsrc.syso;
9 | rsrc -arch arm -ico rsrc.ico -o rsrc.syso;
10 | GOOS=windows GOARCH=arm64 CGO_ENABLED=0 go build -ldflags "-w -s" -o build/windsurf-vip_windows_arm64.exe;
11 | rm rsrc.syso;
12 | rsrc -arch 386 -ico rsrc.ico -o rsrc.syso;
13 | GOOS=windows GOARCH=386 CGO_ENABLED=0 go build -ldflags "-w -s" -o build/windsurf-vip_windows_386.exe;
14 | rm rsrc.syso;
15 |
16 | GOOS=linux GOARCH=amd64 CGO_ENABLED=0 garble -literals -tiny build -ldflags "-w -s" -o build/windsurf-vip_linux_amd64;
17 | GOOS=linux GOARCH=arm64 CGO_ENABLED=0 garble -literals -tiny build -ldflags "-w -s" -o build/windsurf-vip_linux_arm64;
18 | GOOS=linux GOARCH=386 CGO_ENABLED=0 garble -literals -tiny build -ldflags "-w -s" -o build/windsurf-vip_linux_386;
19 |
20 | chmod +x build/install.sh;
21 | chmod +x build/windsurf-vip_darwin_amd64;
22 | chmod +x build/windsurf-vip_darwin_arm64;
23 | chmod +x build/windsurf-vip_windows_amd64.exe;
24 | chmod +x build/windsurf-vip_windows_arm64.exe;
25 | chmod +x build/windsurf-vip_windows_386.exe;
26 | chmod +x build/windsurf-vip_linux_amd64;
27 | chmod +x build/windsurf-vip_linux_arm64;
28 | chmod +x build/windsurf-vip_linux_386;
29 |
--------------------------------------------------------------------------------
/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/kingparks/windsurf-vip
2 |
3 | go 1.22.0
4 |
5 | require (
6 | github.com/astaxie/beego v1.12.3
7 | github.com/atotto/clipboard v0.1.4
8 | github.com/denisbrodbeck/machineid v1.0.1
9 | github.com/edluis37/shortuuid/v4 v4.0.0-20221015205646-3117f62f0327
10 | github.com/gin-gonic/gin v1.10.0
11 | github.com/go-pay/gopay v1.5.103
12 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
13 | github.com/jmoiron/sqlx v1.4.0
14 | github.com/kingparks/goutil v1.0.0
15 | github.com/logoove/sqlite v1.16.1
16 | github.com/lqqyt2423/go-mitmproxy v1.8.5
17 | github.com/robfig/cron/v3 v3.0.1
18 | github.com/sirupsen/logrus v1.8.1
19 | github.com/tidwall/gjson v1.17.1
20 | github.com/unknwon/i18n v0.0.0-20210904045753-ff3a8617e361
21 | golang.org/x/sys v0.22.0
22 | gorm.io/driver/mysql v1.5.7
23 | gorm.io/gorm v1.25.11
24 | howett.net/plist v1.0.1
25 | )
26 |
27 | require (
28 | filippo.io/edwards25519 v1.1.0 // indirect
29 | github.com/andybalholm/brotli v1.0.4 // indirect
30 | github.com/bytedance/sonic v1.11.6 // indirect
31 | github.com/bytedance/sonic/loader v0.1.1 // indirect
32 | github.com/cloudwego/base64x v0.1.4 // indirect
33 | github.com/cloudwego/iasm v0.2.0 // indirect
34 | github.com/dustin/go-humanize v1.0.1 // indirect
35 | github.com/gabriel-vasile/mimetype v1.4.3 // indirect
36 | github.com/gin-contrib/sse v0.1.0 // indirect
37 | github.com/go-pay/crypto v0.0.1 // indirect
38 | github.com/go-pay/util v0.0.2 // indirect
39 | github.com/go-pay/xlog v0.0.3 // indirect
40 | github.com/go-pay/xtime v0.0.2 // indirect
41 | github.com/go-playground/locales v0.14.1 // indirect
42 | github.com/go-playground/universal-translator v0.18.1 // indirect
43 | github.com/go-playground/validator/v10 v10.20.0 // indirect
44 | github.com/go-sql-driver/mysql v1.8.1 // indirect
45 | github.com/goccy/go-json v0.10.2 // indirect
46 | github.com/google/uuid v1.6.0 // indirect
47 | github.com/jinzhu/inflection v1.0.0 // indirect
48 | github.com/jinzhu/now v1.1.5 // indirect
49 | github.com/json-iterator/go v1.1.12 // indirect
50 | github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
51 | github.com/klauspost/compress v1.17.8 // indirect
52 | github.com/klauspost/cpuid/v2 v2.2.7 // indirect
53 | github.com/leodido/go-urn v1.4.0 // indirect
54 | github.com/mattn/go-isatty v0.0.20 // indirect
55 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
56 | github.com/modern-go/reflect2 v1.0.2 // indirect
57 | github.com/ncruces/go-strftime v0.1.9 // indirect
58 | github.com/pelletier/go-toml/v2 v2.2.2 // indirect
59 | github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
60 | github.com/satori/go.uuid v1.2.0 // indirect
61 | github.com/tidwall/match v1.1.1 // indirect
62 | github.com/tidwall/pretty v1.2.0 // indirect
63 | github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
64 | github.com/ugorji/go/codec v1.2.12 // indirect
65 | go.uber.org/atomic v1.11.0 // indirect
66 | golang.org/x/arch v0.8.0 // indirect
67 | golang.org/x/crypto v0.25.0 // indirect
68 | golang.org/x/mod v0.19.0 // indirect
69 | golang.org/x/net v0.27.0 // indirect
70 | golang.org/x/sync v0.7.0 // indirect
71 | golang.org/x/text v0.16.0 // indirect
72 | golang.org/x/tools v0.23.0 // indirect
73 | google.golang.org/protobuf v1.34.1 // indirect
74 | gopkg.in/ini.v1 v1.46.0 // indirect
75 | gopkg.in/yaml.v2 v2.2.8 // indirect
76 | gopkg.in/yaml.v3 v3.0.1 // indirect
77 | lukechampine.com/uint128 v1.2.0 // indirect
78 | modernc.org/cc/v3 v3.41.0 // indirect
79 | modernc.org/ccgo/v3 v3.17.0 // indirect
80 | modernc.org/libc v1.60.0 // indirect
81 | modernc.org/mathutil v1.6.0 // indirect
82 | modernc.org/memory v1.8.0 // indirect
83 | modernc.org/opt v0.1.3 // indirect
84 | modernc.org/sqlite v1.32.0 // indirect
85 | modernc.org/strutil v1.2.0 // indirect
86 | modernc.org/token v1.1.0 // indirect
87 | )
88 |
--------------------------------------------------------------------------------
/go.sum:
--------------------------------------------------------------------------------
1 | filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
2 | filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
3 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
4 | github.com/Knetic/govaluate v3.0.0+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
5 | github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
6 | github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
7 | github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
8 | github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
9 | github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc=
10 | github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk=
11 | github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY=
12 | github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
13 | github.com/astaxie/beego v1.12.3 h1:SAQkdD2ePye+v8Gn1r4X6IKZM1wd28EyUOVQ3PDSOOQ=
14 | github.com/astaxie/beego v1.12.3/go.mod h1:p3qIm0Ryx7zeBHLljmd7omloyca1s4yu1a8kM1FkpIA=
15 | github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4=
16 | github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=
17 | github.com/beego/goyaml2 v0.0.0-20130207012346-5545475820dd/go.mod h1:1b+Y/CofkYwXMUU0OhQqGvsY2Bvgr4j6jfT699wyZKQ=
18 | github.com/beego/x2j v0.0.0-20131220205130-a0352aadc542/go.mod h1:kSeGC/p1AbBiEp5kat81+DSQrZenVBZXklMLaELspWU=
19 | github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
20 | github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
21 | github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
22 | github.com/bradfitz/gomemcache v0.0.0-20180710155616-bc664df96737/go.mod h1:PmM6Mmwb0LSuEubjR8N7PtNe1KxZLtOUHtbeikc5h60=
23 | github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0=
24 | github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4=
25 | github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM=
26 | github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
27 | github.com/casbin/casbin v1.7.0/go.mod h1:c67qKN6Oum3UF5Q1+BByfFxkwKvhwW57ITjqwtzR1KE=
28 | github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
29 | github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80=
30 | github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y=
31 | github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=
32 | github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=
33 | github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=
34 | github.com/couchbase/go-couchbase v0.0.0-20200519150804-63f3cdb75e0d/go.mod h1:TWI8EKQMs5u5jLKW/tsb9VwauIrMIxQG1r5fMsswK5U=
35 | github.com/couchbase/gomemcached v0.0.0-20200526233749-ec430f949808/go.mod h1:srVSlQLB8iXBVXHgnqemxUXqN6FCvClgCMPCsjBDR7c=
36 | github.com/couchbase/goutils v0.0.0-20180530154633-e865a1461c8a/go.mod h1:BQwMFlJzDjFDG3DJUdU0KORxn88UlsOULuxLExMh3Hs=
37 | github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76/go.mod h1:vYwsqCOLxGiisLwp9rITslkFNpZD5rz43tf41QFkTWY=
38 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
39 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
40 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
41 | github.com/denisbrodbeck/machineid v1.0.1 h1:geKr9qtkB876mXguW2X6TU4ZynleN6ezuMSRhl4D7AQ=
42 | github.com/denisbrodbeck/machineid v1.0.1/go.mod h1:dJUwb7PTidGDeYyUBmXZ2GphQBbjJCrnectwCyxcUSI=
43 | github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
44 | github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
45 | github.com/edluis37/shortuuid/v4 v4.0.0-20221015205646-3117f62f0327 h1:08sR1+VPyRZPokp28Eozlp81XF62bXIMzOLCaq9TBq8=
46 | github.com/edluis37/shortuuid/v4 v4.0.0-20221015205646-3117f62f0327/go.mod h1:uiUXsMjoybdP5L1LUZQXMb2qUr6lJxGcAYzfSHrVei8=
47 | github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
48 | github.com/elastic/go-elasticsearch/v6 v6.8.5/go.mod h1:UwaDJsD3rWLM5rKNFzv9hgox93HoX8utj1kxD9aFUcI=
49 | github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4=
50 | github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
51 | github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=
52 | github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
53 | github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
54 | github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
55 | github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU=
56 | github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y=
57 | github.com/glendc/gopher-json v0.0.0-20170414221815-dc4743023d0c/go.mod h1:Gja1A+xZ9BoviGJNA2E9vFkPjjsl+CoJxSXiQM1UXtw=
58 | github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
59 | github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
60 | github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
61 | github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
62 | github.com/go-pay/crypto v0.0.1 h1:B6InT8CLfSLc6nGRVx9VMJRBBazFMjr293+jl0lLXUY=
63 | github.com/go-pay/crypto v0.0.1/go.mod h1:41oEIvHMKbNcYlWUlRWtsnC6+ASgh7u29z0gJXe5bes=
64 | github.com/go-pay/gopay v1.5.103 h1:tjteCpcApf0CpiwKywMl6UnbLkMeYLJVEuVBtsQbyb8=
65 | github.com/go-pay/gopay v1.5.103/go.mod h1:4+jKRvgmB8clKN1/E9M60miXKbnZ8wWGcg/Hsxn7k44=
66 | github.com/go-pay/util v0.0.2 h1:goJ4f6kNY5zzdtg1Cj8oWC+Cw7bfg/qq2rJangMAb9U=
67 | github.com/go-pay/util v0.0.2/go.mod h1:qM8VbyF1n7YAPZBSJONSPMPsPedhUTktewUAdf1AjPg=
68 | github.com/go-pay/xlog v0.0.3 h1:avyMhCL/JgBHreoGx/am/kHxfs1udDOAeVqbmzP/Yes=
69 | github.com/go-pay/xlog v0.0.3/go.mod h1:mH47xbobrdsSHWsmFtSF5agWbMHFP+tK0ZbVCk5OAEw=
70 | github.com/go-pay/xtime v0.0.2 h1:7YR4/iuELsEHpJ6LUO0SVK80hQxDO9MLCfuVYIiTCRM=
71 | github.com/go-pay/xtime v0.0.2/go.mod h1:W1yRbJaSt4CSBcdAtLBQ8xajiN/Pl5hquGczUcUE9xE=
72 | github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
73 | github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
74 | github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
75 | github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
76 | github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
77 | github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
78 | github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8=
79 | github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
80 | github.com/go-redis/redis v6.14.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
81 | github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
82 | github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
83 | github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y=
84 | github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=
85 | github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
86 | github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
87 | github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
88 | github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
89 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
90 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
91 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
92 | github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
93 | github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
94 | github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
95 | github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
96 | github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
97 | github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
98 | github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
99 | github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
100 | github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
101 | github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
102 | github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
103 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
104 | github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
105 | github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
106 | github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
107 | github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
108 | github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
109 | github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
110 | github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
111 | github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
112 | github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
113 | github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1ks85zJ1lfDGgIiMDuIptTOhJq+zKyg=
114 | github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
115 | github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
116 | github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
117 | github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
118 | github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
119 | github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
120 | github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
121 | github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
122 | github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o=
123 | github.com/jmoiron/sqlx v1.4.0/go.mod h1:ZrZ7UsYB/weZdl2Bxg6jCRO9c3YHl8r3ahlKmRT4JLY=
124 | github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
125 | github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
126 | github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
127 | github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
128 | github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
129 | github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
130 | github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
131 | github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
132 | github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
133 | github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
134 | github.com/kingparks/goutil v1.0.0 h1:RY9ReXfzRSK8ke1hMKRtX3M/x2J98RrRe/rSIrV3dmE=
135 | github.com/kingparks/goutil v1.0.0/go.mod h1:VeBwPRHwORDtyZrcGPVye1oAjpBuzzjgk2W5RZuW/8Q=
136 | github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU=
137 | github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
138 | github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
139 | github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM=
140 | github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
141 | github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=
142 | github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
143 | github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
144 | github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
145 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
146 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
147 | github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
148 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
149 | github.com/ledisdb/ledisdb v0.0.0-20200510135210-d35789ec47e6/go.mod h1:n931TsDuKuq+uX4v1fulaMbA/7ZLLhjc85h7chZGBCQ=
150 | github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
151 | github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
152 | github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
153 | github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
154 | github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
155 | github.com/logoove/sqlite v1.16.1 h1:O67OSZ6Fnn1cfW8MT36G58RTAIqMGSDlvXEOirDnYqE=
156 | github.com/logoove/sqlite v1.16.1/go.mod h1:mMaqL4e4znHBmvlMeJzwpVzEVsJ0oD6DAjjblkfdRpw=
157 | github.com/lqqyt2423/go-mitmproxy v1.8.5 h1:F/Jt+Z5+LkJVMvjbRNtovCt6EuPArnumSOcRK9ImU7Q=
158 | github.com/lqqyt2423/go-mitmproxy v1.8.5/go.mod h1:dSGnI17tVZ8dtYu9vnaIz7kxVwJNFH0CoNQwEQlTpxE=
159 | github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
160 | github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
161 | github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
162 | github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U=
163 | github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
164 | github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
165 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
166 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
167 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
168 | github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
169 | github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
170 | github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
171 | github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
172 | github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
173 | github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
174 | github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
175 | github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
176 | github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
177 | github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg=
178 | github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
179 | github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
180 | github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
181 | github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
182 | github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
183 | github.com/peterh/liner v1.0.1-0.20171122030339-3681c2a91233/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc=
184 | github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
185 | github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
186 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
187 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
188 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
189 | github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
190 | github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
191 | github.com/prometheus/client_golang v1.7.0/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
192 | github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
193 | github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
194 | github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
195 | github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
196 | github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
197 | github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
198 | github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
199 | github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
200 | github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
201 | github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
202 | github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
203 | github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
204 | github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
205 | github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
206 | github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644/go.mod h1:nkxAfR/5quYxwPZhyDxgasBMnRtBZd0FCEpawpjMUFg=
207 | github.com/siddontang/go v0.0.0-20170517070808-cb568a3e5cc0/go.mod h1:3yhqj7WBBfRhbBlzyOC3gUxftwsU0u8gqevxwIHQpMw=
208 | github.com/siddontang/goredis v0.0.0-20150324035039-760763f78400/go.mod h1:DDcKzU3qCuvj/tPnimWSsZZzvk9qvkvrIL5naVBPh5s=
209 | github.com/siddontang/rdb v0.0.0-20150307021120-fc89ed2e418d/go.mod h1:AMEsy7v5z92TR1JKMkLLoaOQk++LVnOKL3ScbJ8GNGA=
210 | github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
211 | github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
212 | github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
213 | github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
214 | github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
215 | github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304 h1:Jpy1PXuP99tXNrhbq2BaPz9B+jNAvH1JPQQpG/9GCXY=
216 | github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
217 | github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s=
218 | github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337 h1:WN9BUFbdyOsSH/XohnWpXOlq9NBD5sGAB2FciQMUEe8=
219 | github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
220 | github.com/ssdb/gossdb v0.0.0-20180723034631-88f6b59b84ec/go.mod h1:QBvMkMya+gXctz3kmljlUCu/yB3GZ6oee+dUozsezQE=
221 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
222 | github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
223 | github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
224 | github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
225 | github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
226 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
227 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
228 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
229 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
230 | github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
231 | github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
232 | github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
233 | github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
234 | github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
235 | github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
236 | github.com/syndtr/goleveldb v0.0.0-20160425020131-cfa635847112/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0=
237 | github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0=
238 | github.com/tidwall/gjson v1.17.1 h1:wlYEnwqAHgzmhNUFfw7Xalt2JzQvsMx2Se4PcoFCT/U=
239 | github.com/tidwall/gjson v1.17.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
240 | github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
241 | github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
242 | github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs=
243 | github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
244 | github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
245 | github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
246 | github.com/ugorji/go v0.0.0-20171122102828-84cb69a8af83/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ=
247 | github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE=
248 | github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
249 | github.com/unknwon/com v0.0.0-20190804042917-757f69c95f3e/go.mod h1:tOOxU81rwgoCLoOVVPHb6T/wt8HZygqH5id+GNnlCXM=
250 | github.com/unknwon/i18n v0.0.0-20210904045753-ff3a8617e361 h1:4Ij5sX4JEzCCY/CCl8trJHey1tPsIDomYTZf145GKk0=
251 | github.com/unknwon/i18n v0.0.0-20210904045753-ff3a8617e361/go.mod h1:+5rDk6sDGpl3azws3O+f+GpFSyN9GVr0K8cvQLQM2ZQ=
252 | github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b/go.mod h1:Q12BUT7DqIlHRmgv3RskH+UCM/4eqVMgI0EMmlSpAXc=
253 | github.com/yuin/gopher-lua v0.0.0-20171031051903-609c9cd26973/go.mod h1:aEV29XrmTYFr3CiRxZeGHpkvbwq+prZduBqMaascyCU=
254 | go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
255 | go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
256 | golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
257 | golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc=
258 | golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
259 | golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
260 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
261 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
262 | golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30=
263 | golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M=
264 | golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8=
265 | golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
266 | golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
267 | golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
268 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
269 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
270 | golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
271 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
272 | golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=
273 | golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=
274 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
275 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
276 | golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
277 | golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
278 | golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
279 | golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
280 | golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
281 | golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
282 | golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
283 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
284 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
285 | golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
286 | golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
287 | golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
288 | golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
289 | golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
290 | golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
291 | golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
292 | golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
293 | golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
294 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
295 | golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
296 | golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
297 | golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
298 | golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg=
299 | golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI=
300 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
301 | google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
302 | google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
303 | google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
304 | google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
305 | google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
306 | google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
307 | google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
308 | google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
309 | gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
310 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
311 | gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
312 | gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
313 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
314 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
315 | gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
316 | gopkg.in/ini.v1 v1.46.0 h1:VeDZbLYGaupuvIrsYCEOe/L/2Pcs5n7hdO1ZTjporag=
317 | gopkg.in/ini.v1 v1.46.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
318 | gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
319 | gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
320 | gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg=
321 | gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
322 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
323 | gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
324 | gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
325 | gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
326 | gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
327 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
328 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
329 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
330 | gorm.io/driver/mysql v1.5.7 h1:MndhOPYOfEp2rHKgkZIhJ16eVUIRf2HmzgoPmh7FCWo=
331 | gorm.io/driver/mysql v1.5.7/go.mod h1:sEtPWMiqiN1N1cMXoXmBbd8C6/l+TESwriotuRRpkDM=
332 | gorm.io/gorm v1.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
333 | gorm.io/gorm v1.25.11 h1:/Wfyg1B/je1hnDx3sMkX+gAlxrlZpn6X0BXRlwXlvHg=
334 | gorm.io/gorm v1.25.11/go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ=
335 | howett.net/plist v1.0.1 h1:37GdZ8tP09Q35o9ych3ehygcsL+HqKSwzctveSlarvM=
336 | howett.net/plist v1.0.1/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g=
337 | lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI=
338 | lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
339 | modernc.org/cc/v3 v3.41.0 h1:QoR1Sn3YWlmA1T4vLaKZfawdVtSiGx8H+cEojbC7v1Q=
340 | modernc.org/cc/v3 v3.41.0/go.mod h1:Ni4zjJYJ04CDOhG7dn640WGfwBzfE0ecX8TyMB0Fv0Y=
341 | modernc.org/cc/v4 v4.21.4 h1:3Be/Rdo1fpr8GrQ7IVw9OHtplU4gWbb+wNgeoBMmGLQ=
342 | modernc.org/cc/v4 v4.21.4/go.mod h1:HM7VJTZbUCR3rV8EYBi9wxnJ0ZBRiGE5OeGXNA0IsLQ=
343 | modernc.org/ccgo/v3 v3.17.0 h1:o3OmOqx4/OFnl4Vm3G8Bgmqxnvxnh0nbxeT5p/dWChA=
344 | modernc.org/ccgo/v3 v3.17.0/go.mod h1:Sg3fwVpmLvCUTaqEUjiBDAvshIaKDB0RXaf+zgqFu8I=
345 | modernc.org/ccgo/v4 v4.21.0 h1:kKPI3dF7RIag8YcToh5ZwDcVMIv6VGa0ED5cvh0LMW4=
346 | modernc.org/ccgo/v4 v4.21.0/go.mod h1:h6kt6H/A2+ew/3MW/p6KEoQmrq/i3pr0J/SiwiaF/g0=
347 | modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk=
348 | modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ=
349 | modernc.org/fileutil v1.3.0 h1:gQ5SIzK3H9kdfai/5x41oQiKValumqNTDXMvKo62HvE=
350 | modernc.org/fileutil v1.3.0/go.mod h1:XatxS8fZi3pS8/hKG2GH/ArUogfxjpEKs3Ku3aK4JyQ=
351 | modernc.org/gc/v2 v2.5.0 h1:bJ9ChznK1L1mUtAQtxi0wi5AtAs5jQuw4PrPHO5pb6M=
352 | modernc.org/gc/v2 v2.5.0/go.mod h1:wzN5dK1AzVGoH6XOzc3YZ+ey/jPgYHLuVckd62P0GYU=
353 | modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM=
354 | modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM=
355 | modernc.org/libc v1.60.0 h1:XeRF1gXky7JE5E8IErtYAdKj+ykZPdYUsgJNQ8RFWIA=
356 | modernc.org/libc v1.60.0/go.mod h1:xJuobKuNxKH3RUatS7GjR+suWj+5c2K7bi4m/S5arOY=
357 | modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4=
358 | modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo=
359 | modernc.org/memory v1.8.0 h1:IqGTL6eFMaDZZhEWwcREgeMXYwmW83LYW8cROZYkg+E=
360 | modernc.org/memory v1.8.0/go.mod h1:XPZ936zp5OMKGWPqbD3JShgd/ZoQ7899TUuQqxY+peU=
361 | modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4=
362 | modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0=
363 | modernc.org/sortutil v1.2.0 h1:jQiD3PfS2REGJNzNCMMaLSp/wdMNieTbKX920Cqdgqc=
364 | modernc.org/sortutil v1.2.0/go.mod h1:TKU2s7kJMf1AE84OoiGppNHJwvB753OYfNl2WRb++Ss=
365 | modernc.org/sqlite v1.32.0 h1:6BM4uGza7bWypsw4fdLRsLxut6bHe4c58VeqjRgST8s=
366 | modernc.org/sqlite v1.32.0/go.mod h1:UqoylwmTb9F+IqXERT8bW9zzOWN8qwAIcLdzeBZs4hA=
367 | modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA=
368 | modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0=
369 | modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=
370 | modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
371 | nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=
372 | rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
373 |
--------------------------------------------------------------------------------
/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "github.com/kingparks/windsurf-vip/auth"
5 | "github.com/kingparks/windsurf-vip/tui"
6 | "os"
7 | "os/signal"
8 | "syscall"
9 | )
10 |
11 | func main() {
12 | productSelected, modelIndexSelected := tui.Run()
13 | startServer(productSelected, modelIndexSelected)
14 | }
15 |
16 | func startServer(productSelected string, modelIndexSelected int) {
17 | tui.Sigs = make(chan os.Signal, 1)
18 | signal.Notify(tui.Sigs, syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP, syscall.SIGQUIT, syscall.SIGKILL)
19 | go func() {
20 | <-tui.Sigs
21 | auth.UnSetClient(productSelected)
22 | if modelIndexSelected == 2 {
23 | tui.UnSetProxy()
24 | }
25 | os.Exit(0)
26 | }()
27 | if modelIndexSelected == 2 {
28 | tui.SetProxy("localhost", auth.Port)
29 | }
30 | auth.Run(productSelected, modelIndexSelected)
31 | }
32 |
--------------------------------------------------------------------------------
/rsrc.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingparks/coding/dc895383b8009c5171368a325c6886331d849776/rsrc.ico
--------------------------------------------------------------------------------
/tool/crypto.go:
--------------------------------------------------------------------------------
1 | package tool
2 |
3 | import (
4 | "bytes"
5 | "crypto/aes"
6 | "crypto/cipher"
7 | "encoding/base64"
8 | )
9 |
10 | func PKCS5Padding(plaintext []byte, blockSize int) []byte {
11 | padding := blockSize - len(plaintext)%blockSize
12 | padtext := bytes.Repeat([]byte{byte(padding)}, padding)
13 | return append(plaintext, padtext...)
14 | }
15 |
16 | func PKCS5UnPadding(origData []byte) []byte {
17 | length := len(origData)
18 | if length == 0 {
19 | return origData
20 | }
21 | unpadding := int(origData[length-1])
22 | return origData[:(length - unpadding)]
23 | }
24 |
25 | func Encrypt(origData, key []byte) ([]byte, error) {
26 | block, err := aes.NewCipher(key)
27 | if err != nil {
28 | return nil, err
29 | }
30 |
31 | blockSize := block.BlockSize()
32 | origData = PKCS5Padding(origData, blockSize)
33 | blockMode := cipher.NewCBCEncrypter(block, key[:blockSize])
34 | crypted := make([]byte, len(origData))
35 | blockMode.CryptBlocks(crypted, origData)
36 | return crypted, nil
37 | }
38 |
39 | func EncryptToBase64(origData, key []byte) (string, error) {
40 | crypted, err := Encrypt(origData, key)
41 | if err != nil {
42 | return "", err
43 | }
44 | return base64.RawURLEncoding.EncodeToString(crypted), nil
45 | }
46 |
47 | func Decrypt(crypted, key []byte) ([]byte, error) {
48 | block, err := aes.NewCipher(key)
49 | if err != nil {
50 | return nil, err
51 | }
52 |
53 | blockSize := block.BlockSize()
54 | blockMode := cipher.NewCBCDecrypter(block, key[:blockSize])
55 | origData := make([]byte, len(crypted))
56 | blockMode.CryptBlocks(origData, crypted)
57 | origData = PKCS5UnPadding(origData)
58 | return origData, nil
59 | }
60 |
61 | func DecryptFromBase64(data string, key []byte) ([]byte, error) {
62 | crypted, err := base64.RawURLEncoding.DecodeString(data)
63 | if err != nil {
64 | return nil, err
65 | }
66 | return Decrypt(crypted, key)
67 | }
68 |
--------------------------------------------------------------------------------
/tool/gorm.go:
--------------------------------------------------------------------------------
1 | package tool
2 |
3 | import (
4 | "database/sql"
5 | "gorm.io/gorm"
6 | )
7 |
8 | // RawMap sql查询返回[]map[string]string类型
9 | func RawMap(db *gorm.DB, sqlQuery string, sqlValues ...interface{}) (result []map[string]string, err error) {
10 | rows, err := db.Raw(sqlQuery, sqlValues...).Rows()
11 | if err != nil {
12 | return
13 | }
14 | defer rows.Close()
15 |
16 | cols, err := rows.Columns()
17 | if err != nil {
18 | return
19 | }
20 | values := make([]sql.RawBytes, len(cols))
21 | scanArgs := make([]interface{}, len(values))
22 | for i := range values {
23 | scanArgs[i] = &values[i]
24 | }
25 | for rows.Next() {
26 | err = rows.Scan(scanArgs...)
27 | if err != nil {
28 | return
29 | }
30 | var value string
31 | resultC := map[string]string{}
32 | for i, col := range values {
33 | if col == nil {
34 | value = "NULL"
35 | } else {
36 | value = string(col)
37 | }
38 | resultC[cols[i]] = value
39 | }
40 | result = append(result, resultC)
41 | }
42 | return
43 | }
44 |
--------------------------------------------------------------------------------
/tui/client.go:
--------------------------------------------------------------------------------
1 | package tui
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | "github.com/astaxie/beego/httplib"
7 | "github.com/kingparks/windsurf-vip/auth/sign"
8 | "github.com/tidwall/gjson"
9 | "net/http"
10 | "net/url"
11 | "os"
12 | "os/user"
13 | "runtime"
14 | "time"
15 | )
16 |
17 | type Client struct {
18 | Hosts []string // 服务器地址s
19 | host string // 检查后的服务器地址
20 | }
21 |
22 | func (c *Client) SetProxy(lang string) {
23 | defer c.setHost()
24 | proxy := httplib.BeegoHTTPSettings{}.Proxy
25 | proxyText := ""
26 | if os.Getenv("http_proxy") != "" {
27 | proxy = func(request *http.Request) (*url.URL, error) {
28 | return url.Parse(os.Getenv("http_proxy"))
29 | }
30 | proxyText = os.Getenv("http_proxy") + " " + Trr.Tr("经由") + " http_proxy " + Trr.Tr("代理访问")
31 | }
32 | if os.Getenv("https_proxy") != "" {
33 | proxy = func(request *http.Request) (*url.URL, error) {
34 | return url.Parse(os.Getenv("https_proxy"))
35 | }
36 | proxyText = os.Getenv("https_proxy") + " " + Trr.Tr("经由") + " https_proxy " + Trr.Tr("代理访问")
37 | }
38 | if os.Getenv("all_proxy") != "" {
39 | proxy = func(request *http.Request) (*url.URL, error) {
40 | return url.Parse(os.Getenv("all_proxy"))
41 | }
42 | proxyText = os.Getenv("all_proxy") + " " + Trr.Tr("经由") + " all_proxy " + Trr.Tr("代理访问")
43 | }
44 | httplib.SetDefaultSetting(httplib.BeegoHTTPSettings{
45 | Proxy: proxy,
46 | ReadWriteTimeout: 30 * time.Second,
47 | ConnectTimeout: 30 * time.Second,
48 | Gzip: true,
49 | DumpBody: true,
50 | UserAgent: fmt.Sprintf(`{"lang":"%s","GOOS":"%s","ARCH":"%s","version":%d,"deviceID":"%s","machineID":"%s","sign":"%s"}`,
51 | lang, runtime.GOOS, runtime.GOARCH, version, deviceID, machineID, sign.Sign(deviceID)),
52 | })
53 | if len(proxyText) > 0 {
54 | fmt.Printf(yellow, proxyText)
55 | }
56 | }
57 |
58 | func (c *Client) setHost() {
59 | c.host = c.Hosts[0]
60 | for _, v := range c.Hosts {
61 | _, err := httplib.Get(v).SetTimeout(4*time.Second, 4*time.Second).String()
62 | if err == nil {
63 | c.host = v
64 | return
65 | }
66 | }
67 | return
68 | }
69 |
70 | func (c *Client) GetAD() (ad string) {
71 | res, err := httplib.Get(c.host + "/ad").String()
72 | if err != nil {
73 | return
74 | }
75 | return res
76 | }
77 |
78 | func (c *Client) GetPayUrl() (payUrl, orderID string) {
79 | res, err := httplib.Get(c.host + "/payUrl").String()
80 | if err != nil {
81 | fmt.Println(err)
82 | return
83 | }
84 | payUrl = gjson.Get(res, "payUrl").String()
85 | orderID = gjson.Get(res, "orderID").String()
86 | return
87 | }
88 |
89 | func (c *Client) PayCheck(orderID, deviceID string) (isPay bool) {
90 | res, err := httplib.Get(c.host+"/payCheck?orderID="+orderID+"&deviceID="+deviceID).Header("sign", sign.Sign(deviceID)).String()
91 | if err != nil {
92 | fmt.Println(err)
93 | return
94 | }
95 | isPay = gjson.Get(res, "isPay").Bool()
96 | return
97 | }
98 |
99 | func (c *Client) GetMyInfo(deviceID string) (sCount, sPayCount, isPay, ticket, exp string) {
100 | body, _ := json.Marshal(map[string]string{
101 | "device": deviceID,
102 | "deviceMac": getMac_241018(),
103 | "sDevice": getPromotion(),
104 | })
105 | dUser, _ := user.Current()
106 | deviceName := ""
107 | if dUser != nil {
108 | deviceName = dUser.Name
109 | if deviceName == "" {
110 | deviceName = dUser.Username
111 | }
112 | }
113 | res, err := httplib.Post(c.host+"/my").Header("sign", sign.Sign(deviceID)).Header("deviceName", deviceName).Body(body).String()
114 | if err != nil {
115 | panic(fmt.Sprintf("\u001B[31m%s\u001B[0m", err))
116 | return
117 | }
118 | sCount = gjson.Get(res, "sCount").String()
119 | sPayCount = gjson.Get(res, "sPayCount").String()
120 | isPay = gjson.Get(res, "isPay").String()
121 | ticket = gjson.Get(res, "ticket").String()
122 | exp = gjson.Get(res, "exp").String()
123 | return
124 | }
125 |
126 | func (c *Client) CheckVersion(version string) (upUrl string) {
127 | res, err := httplib.Get(c.host + "/version?version=" + version + "&plat=" + runtime.GOOS + "_" + runtime.GOARCH).String()
128 | if err != nil {
129 | return ""
130 | }
131 | upUrl = gjson.Get(res, "url").String()
132 | return
133 | }
134 |
135 | func (c *Client) GetLic() (isOk bool, result string) {
136 | req := httplib.Get(c.host+"/getLic").Header("sign", sign.Sign(deviceID))
137 | res, err := req.String()
138 | if err != nil {
139 | isOk = false
140 | result = err.Error()
141 | return
142 | }
143 | code := gjson.Get(res, "code").Int()
144 | msg := gjson.Get(res, "lic").String()
145 | result = msg
146 | if code != 0 {
147 | isOk = false
148 | return
149 | }
150 | isOk = true
151 | return
152 | }
153 |
--------------------------------------------------------------------------------
/tui/locales/en.ini:
--------------------------------------------------------------------------------
1 | windsurf VIP:windsurf VIP
2 | 设备码:DeviceID
3 | 付费到期时间:Paid expiration time
4 | 推广命令:(已推广:Promotion command:(promoted
5 | 人,推广已付费: paid
6 | 人;每推广10人或推广付费2人可获得一年授权): '; every 10 people promoted or 2 people paid can get a one-year license)'
7 | 专属推广链接:Exclusive promotion link
8 | 选择要授权的产品::Choose the product to authorize:
9 | 请输入产品编号(直接回车默认为1,可以同时输入多个例如 145)::Please enter the product number (press Enter directly to default to 1, you can enter multiple at the same time, such as 145):
10 | 输入有误:Input error
11 | 选择的产品为::The selected product is:
12 | 选择有效期::'Select validity period: '
13 | 小时(免费): ' hours (free)'
14 | 年(购买): ' year (purchase)'
15 | 请输入有效期编号(直接回车默认为1)::Please enter the validity period number (press Enter directly to default to 1):
16 | 选择的有效期为::The selected validity period is:
17 | (已复制到剪贴板):(Copied to clipboard)
18 | 付费已到期,捐赠以获取一年期授权: Payment has expired, donate to get a one-year authorization
19 | 捐赠完成后请回车:Please press Enter after donation
20 | 未捐赠,请捐赠完成后回车:Not donated, please press Enter after donation
21 | 经由:Via
22 | 代理访问:Proxy access
23 | 授权成功!使用过程请不要关闭此窗口:Authorization successful! Please do not close this window during use
24 | 请先按教程信任证书: Please trust the certificate according to the tutorial first
25 | 选择启动模式::Select startup mode:
26 | 强劲代理模式:Strong proxy mode
27 | 极简模式:Minimalist mode
28 | 请输入模式编号(直接回车默认为1)::Please enter the mode number (press Enter directly to default to 1):
29 | 有新版本,请关闭本窗口,将下面命令粘贴到GitBash窗口执行:There is a new version, please close this window and paste the following command into the GitBash window to execute
30 | 有新版本,请关闭本窗口,将下面命令粘贴到新终端窗口执行:There is a new version, please close this window and paste the following command into a new terminal window to execute
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/tui/locales/es.ini:
--------------------------------------------------------------------------------
1 | windsurf VIP:windsurf VIP
2 | 设备码:Código de dispositivo
3 | 付费到期时间:Tiempo de vencimiento pagado
4 | 推广命令:(已推广:Comando de promoción:(promocionado
5 | 人,推广已付费: pagado
6 | 人;每推广10人或推广付费2人可获得一年授权): '; cada 10 personas promocionadas o 2 personas pagadas pueden obtener una licencia de un año)'
7 | 专属推广链接:Enlace de promoción exclusivo
8 | 选择要授权的产品::Elija el producto para autorizar:
9 | 请输入产品编号(直接回车默认为1,可以同时输入多个例如 145)::Ingrese el número de producto (presione Enter directamente para que sea 1, puede ingresar varios al mismo tiempo, como 145):
10 | 输入有误:Error de entrada
11 | 选择的产品为::El producto seleccionado es:
12 | 选择有效期::'Seleccione el período de validez: '
13 | 小时(免费): ' horas (gratis)'
14 | 年(购买): ' año (compra)'
15 | 请输入有效期编号(直接回车默认为1)::Ingrese el número de período de validez (presione Enter directamente para que sea 1):
16 | 选择的有效期为::El período de validez seleccionado es:
17 | (已复制到剪贴板):(Copiado al portapapeles)
18 | 付费已到期,捐赠以获取一年期授权: El pago ha expirado, done para obtener una autorización de un año
19 | 捐赠完成后请回车:Presione Enter después de la donación
20 | 未捐赠,请捐赠完成后回车:No donado, presione Enter después de la donación
21 | 经由:Por
22 | 代理访问:Acceso a través de proxy
23 | 授权成功!使用过程请不要关闭此窗口:¡Autorización exitosa! Por favor, no cierre esta ventana durante el uso
24 | 请先按教程信任证书: Por favor, confíe en el certificado según el tutorial primero
25 | 选择启动模式::Seleccione el modo de inicio:
26 | 强劲代理模式:Modo de proxy fuerte
27 | 极简模式:Modo minimalista
28 | 请输入模式编号(直接回车默认为1)::Ingrese el número de modo (presione Enter directamente para que sea 1):
29 | 有新版本,请关闭本窗口,将下面命令粘贴到GitBash窗口执行:Hay una nueva versión, cierre esta ventana y pegue el siguiente comando en la ventana de GitBash para ejecutar
30 | 有新版本,请关闭本窗口,将下面命令粘贴到新终端窗口执行:Hay una nueva versión, cierre esta ventana y pegue el siguiente comando en una nueva ventana de terminal para ejecutar
31 |
32 |
--------------------------------------------------------------------------------
/tui/locales/hu.ini:
--------------------------------------------------------------------------------
1 | windsurf VIP:windsurf VIP
2 | 设备码:Készülék kód
3 | 付费到期时间:Lejárat dátuma
4 | 推广命令:(已推广: promóció parancs: (már promóció:
5 | 人,推广已付费: megfizetett
6 | 人;每推广10人或推广付费2人可获得一年授权): '; minden 10 promóció vagy 2 fizetett promóció esetén egy éves engedélyt kaphat)'
7 | 专属推广链接:Exkluzív promóciós link
8 | 选择要授权的产品::Válassza ki a terméket, amelyet engedélyezni szeretne:
9 | 请输入产品编号(直接回车默认为1,可以同时输入多个例如 145)::Kérjük, adja meg a cikkszámot (közvetlenül adja meg az alapértelmezett értékeket 1-re, egyszerre többet is megadhat, például 145):
10 | 输入有误:Rossz bemenet
11 | 选择的产品为::A kiválasztott termék:
12 | 选择有效期::'Válassza ki a lejárati időt: '
13 | 小时(免费): ' óra (ingyenes)'
14 | 年(购买): ' év (vásárlás)'
15 | 请输入有效期编号(直接回车默认为1)::Kérjük, adja meg az érvényességi számot (közvetlenül írja be az alapértelmezett értékeket 1-re):
16 | 选择的有效期为::A kiválasztott lejárati idő:
17 | (已复制到剪贴板):(Másolva a vágólapra)
18 | 付费已到期,捐赠以获取一年期授权: A fizetés lejárt, adományozzon egy éves engedélyért
19 | 捐赠完成后请回车:Kérjük, nyomja meg az Enter billentyűt a felajánlás befejezése után
20 | 未捐赠,请捐赠完成后回车:Ön nem adományozott, kérjük, nyomja meg az Enter billentyűt a felajánlás befejezése után
21 | 经由:Által
22 | 代理访问:proxy hozzáférés
23 | 授权成功!使用过程请不要关闭此窗口:Engedélyezés sikeres! Kérjük, ne zárja be ezt az ablakot a használat során
24 | 请先按教程信任证书: Kérjük, először bízzon meg a tanúsítványban az útmutató szerint
25 | 请按教程信任证书: Kérjük, kövesse az útmutatóban szereplő utasításokat a tanúsítvány megbízhatóvá tételéhez
26 | 选择启动模式::Válassza ki a beindítási módot:
27 | 强劲代理模式:Erős proxy mód
28 | 极简模式:Minimalista mód
29 | 请输入模式编号(直接回车默认为1)::Kérjük, adja meg a mód számát (közvetlenül adja meg az alapértelmezett értékeket 1-re):
30 | 有新版本,请关闭本窗口,将下面命令粘贴到GitBash窗口执行:Van egy új verzió, kérjük, zárja be ezt az ablakot, és illessze be az alábbi parancsot a GitBash ablakba a végrehajtáshoz
31 | 有新版本,请关闭本窗口,将下面命令粘贴到新终端窗口执行:Van egy új verzió, kérjük, zárja be ezt az ablakot, és illessze be az alábbi parancsot egy új terminál ablakba a végrehajtáshoz
32 |
33 |
--------------------------------------------------------------------------------
/tui/locales/nl.ini:
--------------------------------------------------------------------------------
1 | windsurf VIP:windsurf VIP
2 | 设备码:Apparaat-ID
3 | 付费到期时间:Betaalde vervaldatum
4 | 推广命令:(已推广:Promotiecommando:(gepromoot
5 | 人,推广已付费: betaald
6 | 人;每推广10人或推广付费2人可获得一年授权): '; elke 10 mensen gepromoot of 2 mensen betaald kunnen een licentie van een jaar krijgen)'
7 | 专属推广链接:Exclusieve promotielink
8 | 选择要授权的产品::Kies het product om te autoriseren:
9 | 请输入产品编号(直接回车默认为1,可以同时输入多个例如 145)::Voer het productnummer in (druk op Enter om standaard naar 1 te gaan, u kunt meerdere tegelijk invoeren, zoals 145):
10 | 输入有误:Invoerfout
11 | 选择的产品为::Het geselecteerde product is:
12 | 选择有效期::'Selecteer de geldigheidsduur: '
13 | 小时(免费): ' uur (gratis)'
14 | 年(购买): ' jaar (aankoop)'
15 | 请输入有效期编号(直接回车默认为1)::Voer het nummer van de geldigheidsduur in (druk op Enter om standaard naar 1 te gaan):
16 | 选择的有效期为::De geselecteerde geldigheidsduur is:
17 | (已复制到剪贴板):(Gekopieerd naar klembord)
18 | 付费已到期,捐赠以获取一年期授权: De betaling is verlopen. Doneer voor een licentie van één jaar
19 | 捐赠完成后请回车:Druk na donatie op Enter
20 | 未捐赠,请捐赠完成后回车:Niet gedoneerd, druk op Enter na donatie
21 | 经由:Via
22 | 代理访问:Proxy-toegang
23 | 授权成功!使用过程请不要关闭此窗口:Authorisatie succesvol! Sluit dit venster niet tijdens gebruik
24 | 请先按教程信任证书: Vertrouw eerst op het certificaat volgens de tutorial
25 | 选择启动模式::Selecteer de opstartmodus:
26 | 强劲代理模式:Sterke proxy-modus
27 | 极简模式:Minimalistische modus
28 | 请输入模式编号(直接回车默认为1)::Voer het modusnummer in (druk op Enter om standaard naar 1 te gaan):
29 | 有新版本,请关闭本窗口,将下面命令粘贴到GitBash窗口执行:Er is een nieuwe versie, sluit dit venster en plak het volgende commando in het GitBash-venster om uit te voeren
30 | 有新版本,请关闭本窗口,将下面命令粘贴到新终端窗口执行:Er is een nieuwe versie, sluit dit venster en plak het volgende commando in een nieuw terminalvenster om uit te voeren
31 |
32 |
--------------------------------------------------------------------------------
/tui/locales/ru.ini:
--------------------------------------------------------------------------------
1 | windsurf VIP:windsurf VIP
2 | 设备码:Идентификатор устройства
3 | 付费到期时间:Оплаченное время истекло
4 | 推广命令:(已推广:Команда продвижения:(продвинутый
5 | 人,推广已付费: оплаченный
6 | 人;每推广10人或推广付费2人可获得一年授权): '; каждые 10 продвинутых или 2 оплаченных человека могут получить лицензию на год)'
7 | 专属推广链接:Эксклюзивная ссылка на продвижение
8 | 选择要授权的产品::Выберите продукт для авторизации:
9 | 请输入产品编号(直接回车默认为1,可以同时输入多个例如 145)::Введите номер продукта (нажмите Enter, чтобы выбрать 1, вы можете ввести несколько одновременно, например 145):
10 | 输入有误:Ошибка ввода
11 | 选择的产品为::Выбранный продукт:
12 | 选择有效期::'Выберите срок действия: '
13 | 小时(免费): ' часа (бесплатно)'
14 | 年(购买): ' год (покупка)'
15 | 请输入有效期编号(直接回车默认为1)::Введите номер срока действия (нажмите Enter, чтобы выбрать 1):
16 | 选择的有效期为::Выбранный срок действия:
17 | (已复制到剪贴板):(Скопировано в буфер обмена)
18 | 付费已到期,捐赠以获取一年期授权: Платеж истек, пожертвуйте, чтобы получить годовую лицензию
19 | 捐赠完成后请回车:Пожалуйста, нажмите Enter после пожертвования
20 | 未捐赠,请捐赠完成后回车:Не пожертвовано, пожалуйста, нажмите Enter после пожертвования
21 | 经由:Через
22 | 代理访问:Доступ через прокси
23 | 授权成功!使用过程请不要关闭此窗口:Авторизация успешна! Пожалуйста, не закрывайте это окно во время использования
24 | 请先按教程信任证书: Пожалуйста, сначала доверьтесь сертификату согласно руководству
25 | 选择启动模式::Выберите режим запуска:
26 | 强劲代理模式:Мощный режим прокси
27 | 极简模式:Минималистский режим
28 | 请输入模式编号(直接回车默认为1)::Введите номер режима (нажмите Enter, чтобы выбрать 1):
29 | 有新版本,请关闭本窗口,将下面命令粘贴到GitBash窗口执行:Есть новая версия, закройте это окно и вставьте следующую команду в окно GitBash для выполнения
30 | 有新版本,请关闭本窗口,将下面命令粘贴到新终端窗口执行:Есть новая версия, закройте это окно и вставьте следующую команду в новое окно терминала для выполнения
31 |
32 |
--------------------------------------------------------------------------------
/tui/locales/tr.ini:
--------------------------------------------------------------------------------
1 | windsurf VIP:VIP İmleci
2 | 设备码:Cihaz Kimliği
3 | 付费到期时间:Ödeme süresi doldu
4 | 推广命令:(已推广:Promosyon komutu:(gelişmiş
5 | 人,推广已付费: ödenmiş
6 | 人;每推广10人或推广付费2人可获得一年授权): '; her 10 gelişmiş veya 2 ödenmiş kişi yıllık lisans alabilir)'
7 | 专属推广链接:Özel promosyon bağlantısı
8 | 选择要授权的产品::Lisanslamak için bir ürün seçin:
9 | 请输入产品编号(直接回车默认为1,可以同时输入多个例如 145)::Ürün numarasını girin (1'i seçmek için Enter'a basın, aynı anda birden fazla girebilirsiniz, örneğin 145):
10 | 输入有误:Hatalı giriş
11 | 选择的产品为::Seçilen ürün:
12 | 选择有效期::'Geçerlilik süresini seçin: '
13 | 小时(免费): ' saat (ücretsiz)'
14 | 年(购买): ' yıl (satın al)'
15 | 请输入有效期编号(直接回车默认为1)::Geçerlilik süresi numarasını girin (1'i seçmek için Enter'a basın):
16 | 选择的有效期为::Seçilen geçerlilik süresi:
17 | (已复制到剪贴板):(Panoya kopyalandı)
18 | 付费已到期,捐赠以获取一年期授权: Ödeme süresi doldu, bir yıllık lisans almak için bağış yapın
19 | 捐赠完成后请回车:Bağış yapın ve ardından Enter tuşuna basın
20 | 未捐赠,请捐赠完成后回车:Bağış yapmadınız, bağış yaptıktan sonra Enter tuşuna basın
21 | 经由:Aracılığıyla
22 | 代理访问:Proxy erişimi
23 | 授权成功!使用过程请不要关闭此窗口:Kimlik doğrulama başarılı! Kullanım sırasında bu pencereyi kapatmayın
24 | 请先按教程信任证书: Lütfen önce belirtilen talimatlara göre sertifikaya güvenin
25 | 选择启动模式::Başlatma modunu seçin:
26 | 强劲代理模式:Güçlü proxy modu
27 | 极简模式:Minimalist mod
28 | 请输入模式编号(直接回车默认为1)::Mod numarasını girin (1'i seçmek için Enter'a basın):
29 | 有新版本,请关闭本窗口,将下面命令粘贴到GitBash窗口执行:Yeni bir sürüm var, lütfen bu pencereyi kapatın ve aşağıdaki komutu GitBash penceresine yapıştırarak çalıştırın
30 | 有新版本,请关闭本窗口,将下面命令粘贴到新终端窗口执行:Yeni bir sürüm var, lütfen bu pencereyi kapatın ve aşağıdaki komutu yeni bir terminal penceresine yapıştırarak çalıştırın
31 |
32 |
--------------------------------------------------------------------------------
/tui/setProxy_linux.go:
--------------------------------------------------------------------------------
1 | //go:build linux
2 | // +build linux
3 |
4 | package tui
5 |
6 | import "fmt"
7 |
8 | func SetProxy(server string, port string) {
9 | fmt.Println("Set HTTP and HTTPS proxy manually: ", server+":"+port)
10 | }
11 |
12 | func UnSetProxy() {
13 | fmt.Println("UnSet HTTP and HTTPS proxy manually: ")
14 | }
15 |
--------------------------------------------------------------------------------
/tui/setProxy_mac.go:
--------------------------------------------------------------------------------
1 | //go:build darwin
2 | // +build darwin
3 |
4 | package tui
5 |
6 | import (
7 | "log"
8 | "os/exec"
9 | )
10 |
11 | func SetProxy(server string, port string) {
12 | // Set HTTP proxy
13 | cmd := exec.Command("networksetup", "-setwebproxy", "Wi-Fi", server, port)
14 | err := cmd.Run()
15 | if err != nil {
16 | log.Fatalf("Failed to set HTTP proxy: %v", err)
17 | }
18 |
19 | // Set HTTPS proxy
20 | cmd = exec.Command("networksetup", "-setsecurewebproxy", "Wi-Fi", server, port)
21 | err = cmd.Run()
22 | if err != nil {
23 | log.Fatalf("Failed to set HTTPS proxy: %v", err)
24 | }
25 | }
26 |
27 | func UnSetProxy() {
28 | // Unset HTTP proxy
29 | cmd := exec.Command("networksetup", "-setwebproxystate", "Wi-Fi", "off")
30 | err := cmd.Run()
31 | if err != nil {
32 | log.Fatalf("Failed to unset HTTP proxy: %v", err)
33 | }
34 |
35 | // Unset HTTPS proxy
36 | cmd = exec.Command("networksetup", "-setsecurewebproxystate", "Wi-Fi", "off")
37 | err = cmd.Run()
38 | if err != nil {
39 | log.Fatalf("Failed to unset HTTPS proxy: %v", err)
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/tui/setProxy_win.go:
--------------------------------------------------------------------------------
1 | //go:build windows
2 | // +build windows
3 |
4 | package tui
5 |
6 | import (
7 | "golang.org/x/sys/windows/registry"
8 | "log"
9 | )
10 |
11 | func SetProxy(server string, port string) {
12 | k, err := registry.OpenKey(registry.CURRENT_USER, `Software\Microsoft\Windows\CurrentVersion\Internet Settings`, registry.ALL_ACCESS)
13 | if err != nil {
14 | log.Fatal(err)
15 | }
16 | defer k.Close()
17 |
18 | err = k.SetStringValue("ProxyServer", server+":"+port)
19 | if err != nil {
20 | log.Fatal(err)
21 | }
22 |
23 | err = k.SetDWordValue("ProxyEnable", 1)
24 | if err != nil {
25 | log.Fatal(err)
26 | }
27 | }
28 |
29 | func UnSetProxy() {
30 | k, err := registry.OpenKey(registry.CURRENT_USER, `Software\Microsoft\Windows\CurrentVersion\Internet Settings`, registry.ALL_ACCESS)
31 | if err != nil {
32 | log.Fatal(err)
33 | }
34 | defer k.Close()
35 |
36 | err = k.SetDWordValue("ProxyEnable", 0)
37 | if err != nil {
38 | log.Fatal(err)
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/tui/tui.go:
--------------------------------------------------------------------------------
1 | package tui
2 |
3 | import (
4 | "crypto/md5"
5 | "embed"
6 | "flag"
7 | "fmt"
8 | "github.com/atotto/clipboard"
9 | "github.com/denisbrodbeck/machineid"
10 | "howett.net/plist"
11 | "net"
12 | "os"
13 | "os/exec"
14 | "runtime"
15 | "sort"
16 | "strconv"
17 | "strings"
18 | "syscall"
19 | "time"
20 |
21 | "github.com/unknwon/i18n"
22 | )
23 |
24 | var version = 116
25 |
26 | var hosts = []string{"http://129.154.205.7:7195", "https://windsurf.jeter.eu.org"}
27 | var host = hosts[1]
28 | var githubPath = "https://ghp.ci/https://github.com/kingparks/windsurf-vip/releases/download/latest/"
29 | var err error
30 |
31 | var green = "\033[32m%s\033[0m\n"
32 | var yellow = "\033[33m%s\033[0m\n"
33 | var hGreen = "\033[1;32m%s\033[0m"
34 | var dGreen = "\033[4;32m%s\033[0m\n"
35 | var red = "\033[31m%s\033[0m\n"
36 | var defaultColor = "%s"
37 | var lang, _ = getLocale()
38 | var deviceID = getMacMD5_241018()
39 | var machineID = getMacMD5_241019()
40 | var Cli = Client{Hosts: hosts}
41 | var Sigs chan os.Signal
42 |
43 | //go:embed all:locales
44 | var localeFS embed.FS
45 |
46 | type Tr struct {
47 | i18n.Locale
48 | }
49 |
50 | var Trr *Tr
51 |
52 | var jbProduct = []string{"Windsurf IDE"}
53 |
54 | func Run() (productSelected string, modelIndexSelected int) {
55 | language := flag.String("l", lang, "set language, eg: zh, en, nl, ru, hu, Trr")
56 | flag.Parse()
57 |
58 | localeFileEn, _ := localeFS.ReadFile("locales/en.ini")
59 | _ = i18n.SetMessage("en", localeFileEn)
60 | localeFileNl, _ := localeFS.ReadFile("locales/nl.ini")
61 | _ = i18n.SetMessage("nl", localeFileNl)
62 | localeFileRu, _ := localeFS.ReadFile("locales/ru.ini")
63 | _ = i18n.SetMessage("ru", localeFileRu)
64 | localeFileHu, _ := localeFS.ReadFile("locales/hu.ini")
65 | _ = i18n.SetMessage("hu", localeFileHu)
66 | localeFileTr, _ := localeFS.ReadFile("locales/Trr.ini")
67 | _ = i18n.SetMessage("Trr", localeFileTr)
68 | localeFileEs, _ := localeFS.ReadFile("locales/es.ini")
69 | _ = i18n.SetMessage("es", localeFileEs)
70 | lang = *language
71 | switch lang {
72 | case "zh":
73 | Trr = &Tr{Locale: i18n.Locale{Lang: "zh"}}
74 | case "nl":
75 | Trr = &Tr{Locale: i18n.Locale{Lang: "nl"}}
76 | case "ru":
77 | Trr = &Tr{Locale: i18n.Locale{Lang: "ru"}}
78 | case "hu":
79 | Trr = &Tr{Locale: i18n.Locale{Lang: "hu"}}
80 | case "Trr":
81 | Trr = &Tr{Locale: i18n.Locale{Lang: "Trr"}}
82 | case "es":
83 | Trr = &Tr{Locale: i18n.Locale{Lang: "es"}}
84 | default:
85 | Trr = &Tr{Locale: i18n.Locale{Lang: "en"}}
86 | }
87 |
88 | fmt.Printf(green, Trr.Tr("Windsurf VIP")+` v`+strings.Join(strings.Split(fmt.Sprint(version), ""), "."))
89 | Cli.SetProxy(lang)
90 | checkUpdate(version)
91 | sCount, sPayCount, _, _, exp := Cli.GetMyInfo(deviceID)
92 | fmt.Printf(green, Trr.Tr("设备码")+":"+deviceID)
93 | expTime, _ := time.ParseInLocation("2006-01-02 15:04:05", exp, time.Local)
94 | fmt.Printf(green, Trr.Tr("付费到期时间")+":"+exp)
95 | fmt.Printf("\033[32m%s\033[0m\u001B[1;32m %s \u001B[0m\033[32m%s\033[0m\u001B[1;32m %s \u001B[0m\u001B[32m%s\u001B[0m\n",
96 | Trr.Tr("推广命令:(已推广"), sCount, Trr.Tr("人,推广已付费"), sPayCount, Trr.Tr("人;每推广10人或推广付费2人可获得一年授权)"))
97 | fmt.Printf(hGreen, "bash <(curl -Lk "+githubPath+"install.sh) "+deviceID+"\n")
98 | fmt.Printf(green, Trr.Tr("专属推广链接")+":"+host+"?p="+deviceID)
99 | fmt.Println()
100 |
101 | printAD()
102 | fmt.Println()
103 |
104 | if false {
105 | fmt.Printf(defaultColor, Trr.Tr("选择启动模式:"))
106 | for i, v := range []string{Trr.Tr("极简模式"), Trr.Tr("强劲代理模式")} {
107 | fmt.Printf(hGreen, fmt.Sprintf("%d. %s\t", i+1, v))
108 | }
109 | fmt.Println()
110 | fmt.Print(Trr.Tr("请输入模式编号(直接回车默认为1):"))
111 | modelIndexSelected = 1
112 | _, _ = fmt.Scanln(&modelIndexSelected)
113 | if modelIndexSelected < 1 || modelIndexSelected > 2 {
114 | fmt.Println(Trr.Tr("输入有误"))
115 | return
116 | }
117 | fmt.Println()
118 | } else {
119 | modelIndexSelected = 1
120 | }
121 |
122 | if len(jbProduct) > 1 {
123 | fmt.Printf(defaultColor, Trr.Tr("选择要授权的产品:"))
124 | for i, v := range jbProduct {
125 | fmt.Printf(hGreen, fmt.Sprintf("%d. %s\t", i+1, v))
126 | }
127 | fmt.Println()
128 | fmt.Print(Trr.Tr("请输入产品编号(直接回车默认为1,可以同时输入多个例如 145):"))
129 | productIndex := 1
130 | _, _ = fmt.Scanln(&productIndex)
131 | if productIndex < 1 {
132 | fmt.Println(Trr.Tr("输入有误"))
133 | return
134 | }
135 | for _, v := range strings.Split(fmt.Sprint(productIndex), "") {
136 | vi, _ := strconv.Atoi(v)
137 | productSelected += jbProduct[vi-1] + ","
138 | }
139 | if len(productSelected) > 1 {
140 | productSelected = productSelected[:len(productSelected)-1]
141 | }
142 | fmt.Println(Trr.Tr("选择的产品为:") + productSelected)
143 | fmt.Println()
144 | } else {
145 | productSelected = jbProduct[0]
146 | }
147 | // 到期了
148 | periodIndex := 1
149 | if expTime.Before(time.Now()) {
150 | fmt.Printf(defaultColor, Trr.Tr("选择有效期:"))
151 | jbPeriod := []string{"1" + Trr.Tr("年(购买)"), "2" + Trr.Tr("小时(免费)")}
152 | for i, v := range jbPeriod {
153 | fmt.Printf(hGreen, fmt.Sprintf("%d. %s\t", i+1, v))
154 | }
155 | fmt.Println()
156 | fmt.Printf("%s", Trr.Tr("请输入有效期编号(直接回车默认为1):"))
157 | _, _ = fmt.Scanln(&periodIndex)
158 | if periodIndex < 1 || periodIndex > len(jbPeriod) {
159 | fmt.Println(Trr.Tr("输入有误"))
160 | return
161 | }
162 | fmt.Println(Trr.Tr("选择的有效期为:") + jbPeriod[periodIndex-1])
163 | fmt.Println()
164 |
165 | if periodIndex == 2 {
166 | fmt.Printf(green, Trr.Tr("授权成功!使用过程请不要关闭此窗口"))
167 | countDown(2 * 60 * 60)
168 | return
169 | }
170 |
171 | payUrl, orderID := Cli.GetPayUrl()
172 | isCopyText := ""
173 | errClip := clipboard.WriteAll(payUrl)
174 | if errClip == nil {
175 | isCopyText = Trr.Tr("(已复制到剪贴板)")
176 | }
177 | fmt.Println(Trr.Tr("付费已到期,捐赠以获取一年期授权") + isCopyText)
178 | fmt.Printf(dGreen, payUrl)
179 | fmt.Println(Trr.Tr("捐赠完成后请回车"))
180 | //检测控制台回车
181 | checkPay:
182 | _, _ = fmt.Scanln()
183 | isPay := Cli.PayCheck(orderID, deviceID)
184 | if !isPay {
185 | fmt.Println(Trr.Tr("未捐赠,请捐赠完成后回车"))
186 | goto checkPay
187 | }
188 | _, _, _, _, exp = Cli.GetMyInfo(deviceID)
189 | expTime, _ = time.ParseInLocation("2006-01-02 15:04:05", exp, time.Local)
190 | fmt.Println()
191 | }
192 | fmt.Printf(green, Trr.Tr("授权成功!使用过程请不要关闭此窗口"))
193 | countDown(int(expTime.Sub(time.Now()).Seconds()))
194 | return
195 | }
196 | func countDown(seconds int) {
197 | go func(seconds int) {
198 | countdown := seconds // Countdown in seconds
199 | for countdown >= 0 {
200 | days := countdown / (24 * 3600)
201 | hours := (countdown % (24 * 3600)) / 3600
202 | minutes := (countdown % 3600) / 60
203 | seconds := countdown % 60
204 |
205 | fmt.Printf("\r%dd %dh %dm %ds", days, hours, minutes, seconds)
206 | time.Sleep(1 * time.Second)
207 | countdown--
208 | }
209 | // 发送退出信号
210 | Sigs <- syscall.SIGTERM
211 | }(seconds)
212 | }
213 |
214 | func getMacMD5() string {
215 | // 获取本机的MAC地址
216 | interfaces, err := net.Interfaces()
217 | if err != nil {
218 | fmt.Println("err:", err)
219 | return ""
220 | }
221 | var macAddress []string
222 | var wifiAddress []string
223 | var bluetoothAddress []string
224 | var macErrorStr string
225 | for _, inter := range interfaces {
226 | // 排除虚拟网卡
227 | hardwareAddr := inter.HardwareAddr.String()
228 | if hardwareAddr == "" {
229 | //fmt.Println(fmt.Sprintf("log: have not hardwareAddr :%+v",inter))
230 | continue
231 | }
232 | macErrorStr += inter.Name + ":" + hardwareAddr + "\n"
233 | virtualMacPrefixes := []string{
234 | "00:05:69", "00:0C:29", "00:1C:14", "00:50:56", // VMware
235 | "00:15:5D", // Hyper-V
236 | "08:00:27", "0A:00:27", // VirtualBox
237 | }
238 | isVirtual := false
239 | for _, prefix := range virtualMacPrefixes {
240 | if strings.HasPrefix(hardwareAddr, strings.ToLower(prefix)) {
241 | isVirtual = true
242 | break
243 | }
244 | }
245 | if isVirtual {
246 | //fmt.Println(fmt.Sprintf("log: isVirtual :%+v",inter))
247 | continue
248 | }
249 | // 大于en6的排除
250 | if strings.HasPrefix(inter.Name, "en") {
251 | numStr := inter.Name[2:]
252 | num, _ := strconv.Atoi(numStr)
253 | if num > 6 {
254 | //fmt.Println(fmt.Sprintf("log: is num>6 :%+v",inter))
255 | continue
256 | }
257 | }
258 | if strings.HasPrefix(inter.Name, "en") || strings.HasPrefix(inter.Name, "Ethernet") || strings.HasPrefix(inter.Name, "以太网") || strings.HasPrefix(inter.Name, "WLAN") {
259 | //fmt.Println(fmt.Sprintf("log: add :%+v",inter))
260 | macAddress = append(macAddress, hardwareAddr)
261 | } else if strings.HasPrefix(inter.Name, "Wi-Fi") || strings.HasPrefix(inter.Name, "无线网络") {
262 | wifiAddress = append(wifiAddress, hardwareAddr)
263 | } else if strings.HasPrefix(inter.Name, "Bluetooth") || strings.HasPrefix(inter.Name, "蓝牙网络连接") {
264 | bluetoothAddress = append(bluetoothAddress, hardwareAddr)
265 | } else {
266 | //fmt.Println(fmt.Sprintf("log: not add :%+v",inter))
267 | }
268 | }
269 | if len(macAddress) == 0 {
270 | macAddress = append(macAddress, wifiAddress...)
271 | if len(macAddress) == 0 {
272 | macAddress = append(macAddress, bluetoothAddress...)
273 | }
274 | if len(macAddress) == 0 {
275 | fmt.Printf(red, "no mac address found,Please contact customer service")
276 | _, _ = fmt.Scanln()
277 | return macErrorStr
278 | }
279 | }
280 | sort.Strings(macAddress)
281 | return fmt.Sprintf("%x", md5.Sum([]byte(strings.Join(macAddress, ","))))
282 | }
283 |
284 | func getMac_241018() string {
285 | interfaces, err := net.Interfaces()
286 | if err != nil {
287 | fmt.Println("err:", err)
288 | return ""
289 | }
290 |
291 | var macError []string
292 | for _, inter := range interfaces {
293 | hardwareAddr := inter.HardwareAddr.String()
294 | if hardwareAddr == "" {
295 | continue
296 | }
297 | macError = append(macError, inter.Name+": "+hardwareAddr)
298 | }
299 | sort.Strings(macError)
300 | return strings.Join(macError, "\n")
301 | }
302 | func getMacMD5_241018() string {
303 | interfaces, err := net.Interfaces()
304 | if err != nil {
305 | fmt.Println("err:", err)
306 | return ""
307 | }
308 |
309 | var macAddress, bluetoothAddress []string
310 | virtualMacPrefixes := []string{
311 | "00:05:69", "00:0C:29", "00:1C:14", "00:50:56", // VMware
312 | "00:15:5D", // Hyper-V
313 | "08:00:27", "0A:00:27", // VirtualBox
314 | }
315 |
316 | for _, inter := range interfaces {
317 | hardwareAddr := inter.HardwareAddr.String()
318 | if hardwareAddr == "" {
319 | continue
320 | }
321 |
322 | isVirtual := false
323 | for _, prefix := range virtualMacPrefixes {
324 | if strings.HasPrefix(hardwareAddr, strings.ToLower(prefix)) {
325 | isVirtual = true
326 | break
327 | }
328 | }
329 | if isVirtual {
330 | continue
331 | }
332 |
333 | switch {
334 | case strings.HasPrefix(inter.Name, "en"), strings.HasPrefix(inter.Name, "Ethernet"), strings.HasPrefix(inter.Name, "以太网"):
335 | macAddress = append(macAddress, hardwareAddr)
336 | case strings.HasPrefix(inter.Name, "Bluetooth"), strings.HasSuffix(inter.Name, "Bluetooth"), strings.HasPrefix(inter.Name, "蓝牙网络连接"):
337 | bluetoothAddress = append(bluetoothAddress, hardwareAddr)
338 | }
339 | }
340 |
341 | if len(macAddress) == 0 {
342 | macAddress = append(macAddress, bluetoothAddress...)
343 | if len(macAddress) == 0 {
344 | //fmt.Printf(red, "no mac address found,Please contact customer service")
345 | //_, _ = fmt.Scanln()
346 | //return macErrorStr
347 | return getMacMD5_241019()
348 | }
349 | }
350 | sort.Strings(macAddress)
351 | return fmt.Sprintf("%x", md5.Sum([]byte(strings.Join(macAddress, ","))))
352 | }
353 | func getMacMD5_241019() string {
354 | id, err := machineid.ID()
355 | if err != nil {
356 | return err.Error()
357 | }
358 | id = strings.ToLower(id)
359 | id = strings.ReplaceAll(id, "-", "")
360 | return id
361 | }
362 |
363 | func printAD() {
364 | ad := Cli.GetAD()
365 | if len(ad) == 0 {
366 | return
367 | }
368 | fmt.Printf(yellow, ad)
369 | }
370 |
371 | func checkUpdate(version int) {
372 | upUrl := Cli.CheckVersion(fmt.Sprint(version))
373 | if upUrl == "" {
374 | return
375 | }
376 | isCopyText := ""
377 | installCmd := `bash -c "$(curl -fsSLk ` + githubPath + `install.sh)"`
378 | errClip := clipboard.WriteAll(installCmd)
379 | if errClip == nil {
380 | isCopyText = Trr.Tr("(已复制到剪贴板)")
381 | }
382 | switch runtime.GOOS {
383 | case "windows":
384 | fmt.Printf(red, Trr.Tr("有新版本,请关闭本窗口,将下面命令粘贴到GitBash窗口执行")+isCopyText+`:`)
385 | default:
386 | fmt.Printf(red, Trr.Tr("有新版本,请关闭本窗口,将下面命令粘贴到新终端窗口执行")+isCopyText+`:`)
387 | }
388 | fmt.Printf(hGreen, installCmd)
389 | _, _ = fmt.Scanln()
390 | os.Exit(0)
391 | return
392 | }
393 |
394 | // 获取推广人
395 | func getPromotion() (promotion string) {
396 | b, _ := os.ReadFile(os.Getenv("HOME") + "/.windsurf-viprc")
397 | promotion = strings.TrimSpace(string(b))
398 | if len(promotion) == 0 {
399 | if len(os.Args) > 1 {
400 | promotion = os.Args[1]
401 | }
402 | }
403 | return
404 | }
405 |
406 | func getLocale() (langRes, locRes string) {
407 | osHost := runtime.GOOS
408 | langRes = "en"
409 | locRes = "US"
410 | switch osHost {
411 | case "windows":
412 | // Exec powershell Get-Culture on Windows.
413 | cmd := exec.Command("powershell", "Get-Culture | select -exp Name")
414 | output, err := cmd.Output()
415 | if err == nil {
416 | langLocRaw := strings.TrimSpace(string(output))
417 | langLoc := strings.Split(langLocRaw, "-")
418 | langRes = langLoc[0]
419 | langRes = strings.Split(langRes, "-")[0]
420 | locRes = langLoc[1]
421 | return
422 | }
423 | case "darwin":
424 | // Exec shell Get-Culture on MacOS.
425 | cmd := exec.Command("sh", "osascript -e 'user locale of (get system info)'")
426 | output, err := cmd.Output()
427 | if err == nil {
428 | langLocRaw := strings.TrimSpace(string(output))
429 | langLoc := strings.Split(langLocRaw, "_")
430 | langRes = langLoc[0]
431 | langRes = strings.Split(langRes, "-")[0]
432 | if len(langLoc) == 1 {
433 | return
434 | }
435 | locRes = langLoc[1]
436 | return
437 | }
438 | plistB, err := os.ReadFile(os.Getenv("HOME") + "/Library/Preferences/.GlobalPreferences.plist")
439 | if err != nil {
440 | panic(err)
441 | }
442 | var a map[string]interface{}
443 | _, err = plist.Unmarshal(plistB, &a)
444 | if err != nil {
445 | panic(err)
446 | }
447 | langLocRaw := a["AppleLocale"].(string)
448 | langLoc := strings.Split(langLocRaw, "_")
449 | langRes = langLoc[0]
450 | langRes = strings.Split(langRes, "-")[0]
451 | if len(langLoc) == 1 {
452 | return
453 | }
454 | locRes = langLoc[1]
455 | return
456 | case "linux":
457 | envlang, ok := os.LookupEnv("LANG")
458 | if ok {
459 | langLocRaw := strings.TrimSpace(envlang)
460 | langLocRaw = strings.Split(envlang, ".")[0]
461 | langLoc := strings.Split(langLocRaw, "_")
462 | langRes = langLoc[0]
463 | langRes = strings.Split(langRes, "-")[0]
464 | if len(langLoc) == 1 {
465 | return
466 | }
467 | locRes = langLoc[1]
468 | return
469 | }
470 | }
471 | if langRes == "" {
472 | langLocRaw := os.Getenv("LC_CTYPE")
473 | langLocRaw = strings.Split(langLocRaw, ".")[0]
474 | langLoc := strings.Split(langLocRaw, "_")
475 | langRes = langLoc[0]
476 | langRes = strings.Split(langRes, "-")[0]
477 | if len(langLoc) == 1 {
478 | return
479 | }
480 | locRes = langLoc[1]
481 | return
482 | }
483 | return
484 | }
485 |
--------------------------------------------------------------------------------