Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Aug 27, 2024
0 parents commit f0950f0
Show file tree
Hide file tree
Showing 20 changed files with 1,246 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# cursor-vip

[中文](./README_CN.md)

`cursor-vip` is a tool service for CURSOR smart code editor to enjoy VIP intelligent prompts without logging in.


### Usage
Install cursor-vip:
```bash
bash <(curl https://mirror.ghproxy.com/https://github.com/kingparks/cursor-vip/releases/download/latest/install.sh) githubReadme
```

Launch cursor-vip:
```bash
cursor-vip
```
For the first time after starting, you need to install the trusted certificate. The certificate will be automatically generated after the first start command, and the path is `~/.cursor-vip/cursor-vip-ca-cert.pem`.
* MacOS: Execute `open ~/.cursor-vip` in the terminal, double-click the cursor-vip-ca-cert.pem file, pop up the "Keychain Access" window, select the certificate, search for cursor-vip, double-click cursor-vip, expand trust, select "Always trust when using this certificate", close the pop-up window, enter the password to confirm, and the certificate is installed.
* Windows: Search for cer in windows, select the `certmgr.msc` function, expand `Trusted Root Certification Authorities`, select `Certificates`, right-click `All Tasks`, select `Import`, next, enter the `%homepath%\.cursor-vip\cursor-vip-ca-cert.pem` file, next all the way, complete; reopen the browser.
* Linux: //TODO

Enjoy cursor-vip:
* Open the CURSOR code editor, click the settings icon in the upper right corner, exit and log in to enjoy


26 changes: 26 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# cursor-vip

[English](./README.md)

`cursor-vip` 是一个用于 CURSOR 智能代码编辑器 无需账号登录即可享受VIP智能提示的工具服务。


### 使用
安装 cursor-vip:
```bash
bash <(curl https://mirror.ghproxy.com/https://github.com/kingparks/cursor-vip/releases/download/latest/install.sh) githubReadme
```

启动 cursor-vip:
```bash
cursor-vip
```
首次启动后需安装信任证书,证书会在首次启动命令后自动生成,路径为 `~/.cursor-vip/cursor-vip-ca-cert.pem`
* MacOS: 在终端执行 `open ~/.cursor-vip`,双击 cursor-vip-ca-cert.pem 文件,弹出“钥匙串访问”窗口,选择证书,搜索 cursor-vip,双击 cursor-vip,展开信任,选择使用此证书时“始终信任”,关闭弹窗,输入密码确认,证书安装完成。
* Windows: 在windows搜索输入 cer,选择`管理用户证书`功能,展开`受信任的根证书颁发机构`,选中`证书`,右键`所有任务`,选择`导入`,下一步,输入`%homepath%\.cursor-vip\cursor-vip-ca-cert.pem`文件,一直下一步,完成; 重新打开浏览器。
* Linux: //TODO

享受 cursor-vip:
* 打开 CURSOR 智能代码编辑器,点击右上角设置图标,退出然后登录即可


22 changes: 22 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
# garble混淆安装: go install mvdan.cc/garble@latest
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 garble -literals -tiny build -ldflags "-w -s" -o build/cursor-vip_darwin_amd64;
GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 garble -literals -tiny build -ldflags "-w -s" -o build/cursor-vip_darwin_arm64;
# rsrc 应用程序图标安装: go install github.com/akavel/rsrc@latest
rsrc -arch amd64 -ico rsrc.ico -o rsrc.syso;
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-s -w" -o build/cursor-vip_windows_amd64.exe;
rm rsrc.syso;
rsrc -arch arm -ico rsrc.ico -o rsrc.syso;
GOOS=windows GOARCH=arm64 CGO_ENABLED=0 go build -ldflags "-w -s" -o build/cursor-vip_windows_arm64.exe;
rm rsrc.syso;

GOOS=linux GOARCH=amd64 CGO_ENABLED=0 garble -literals -tiny build -ldflags "-w -s" -o build/cursor-vip_linux_amd64;
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 garble -literals -tiny build -ldflags "-w -s" -o build/cursor-vip_linux_arm64;

chmod +x build/install.sh;
chmod +x build/cursor-vip_darwin_amd64;
chmod +x build/cursor-vip_darwin_arm64;
chmod +x build/cursor-vip_windows_amd64.exe;
chmod +x build/cursor-vip_windows_arm64.exe;
chmod +x build/cursor-vip_linux_amd64;
chmod +x build/cursor-vip_linux_arm64;
95 changes: 95 additions & 0 deletions build/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
set -e
URLS=("https://mirror.ghproxy.com/https://github.com/kingparks/cursor-vip/releases/download/latest/")
url=${URLS[0]}
lc_type=$(echo $LC_CTYPE | cut -c 1-2)
if [ -z $lc_type ]; then
lc_type=$(echo $LANG | cut -c 1-2)
fi

if [ "$lc_type" = "zh" ]; then
echo "正在安装..."
else
echo "Installing..."
fi

for url0 in ${URLS[@]}; do
if curl -Is --connect-timeout 4 "$url0" | grep -q "HTTP/1.1 404"; then
url=$url0
break
fi
done

os_name=$(uname -s | tr '[:upper:]' '[:lower:]')
if [[ $os_name == *"mingw"* ]]; then
os_name="windows"
fi
raw_hw_name=$(uname -m)
case "$raw_hw_name" in
"amd64")
hw_name="amd64"
;;
"x86_64")
hw_name="amd64"
;;
"arm64")
hw_name="arm64"
;;
"aarch64")
hw_name="arm64"
;;
"i686")
hw_name="386"
;;
"armv7l")
hw_name="arm"
;;
*)
echo "Unsupported hardware: $raw_hw_name"
exit 1
;;
esac

if [ "$lc_type" = "zh" ]; then
echo "当前系统为 ${os_name} ${hw_name}"
else
echo "Current system is ${os_name} ${hw_name}"
fi

if [ ! -z $1 ]; then
echo $1 >~/.cursor-viprc
fi

# 如果是mac或者linux系统
if [[ $os_name == "darwin" || $os_name == "linux" ]]; then
if [ "$lc_type" = "zh" ]; then
echo "请输入开机密码"
else
echo "Please enter the boot password"
fi;
sudo mkdir -p /usr/local/bin
sudo curl -Lo /usr/local/bin/cursor-vip ${url}/cursor-vip_${os_name}_${hw_name}
sudo chmod +x /usr/local/bin/cursor-vip
if [ "$lc_type" = "zh" ]; then
echo "安装完成!自动运行;下次可直接输入 cursor-vip 并回车来运行程序"
else
echo "Installation completed! Automatically run; you can run the program by entering cursor-vip and pressing Enter next time"
fi;

echo ""
cursor-vip
fi;
# 如果是windows系统
if [[ $os_name == "windows" ]]; then
curl -Lo ${USERPROFILE}/Desktop/cursor-vip.exe ${url}/cursor-vip_${os_name}_${hw_name}.exe
if [ "$lc_type" = "zh" ]; then
echo "安装完成!自动运行; 下次可直接输入 ./cursor-vip.exe 并回车来运行程序"
echo "运行后如果360等杀毒软件误报木马,添加信任后,重新输入./cursor-vip.exe 并回车来运行程序"
else
echo "Installation completed! Automatically run; you can run the program by entering ./cursor-vip.exe and pressing Enter next time"
echo "After running, if 360 antivirus software reports a Trojan horse, add trust, and then re-enter ./cursor-vip.exe and press Enter to run the program"
fi

echo ""
chmod +x ${USERPROFILE}/Desktop/cursor-vip.exe
${USERPROFILE}/Desktop/cursor-vip.exe
fi
66 changes: 66 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
module github.com/kingparks/cursor-vip

go 1.22.0

require (
github.com/astaxie/beego v1.12.3
github.com/atotto/clipboard v0.1.4
github.com/edluis37/shortuuid/v4 v4.0.0-20221015205646-3117f62f0327
github.com/gin-gonic/gin v1.10.0
github.com/go-pay/gopay v1.5.103
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
github.com/kingparks/goutil v1.0.0
github.com/lqqyt2423/go-mitmproxy v1.8.5
github.com/robfig/cron/v3 v3.0.1
github.com/sirupsen/logrus v1.8.1
github.com/tidwall/gjson v1.17.1
github.com/unknwon/i18n v0.0.0-20210904045753-ff3a8617e361
golang.org/x/sys v0.22.0
gorm.io/driver/mysql v1.5.7
gorm.io/gorm v1.25.11
howett.net/plist v1.0.1
)

require (
github.com/andybalholm/brotli v1.0.4 // indirect
github.com/bytedance/sonic v1.11.6 // indirect
github.com/bytedance/sonic/loader v0.1.1 // indirect
github.com/cloudwego/base64x v0.1.4 // indirect
github.com/cloudwego/iasm v0.2.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-pay/crypto v0.0.1 // indirect
github.com/go-pay/util v0.0.2 // indirect
github.com/go-pay/xlog v0.0.3 // indirect
github.com/go-pay/xtime v0.0.2 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.20.0 // indirect
github.com/go-sql-driver/mysql v1.7.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.17.8 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/satori/go.uuid v1.2.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect
go.uber.org/atomic v1.11.0 // indirect
golang.org/x/arch v0.8.0 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/text v0.16.0 // indirect
google.golang.org/protobuf v1.34.1 // indirect
gopkg.in/ini.v1 v1.46.0 // indirect
gopkg.in/yaml.v2 v2.2.8 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit f0950f0

Please sign in to comment.