Skip to content

Commit

Permalink
support go-cqhttp multiple sign-server
Browse files Browse the repository at this point in the history
📅2023-09-11

- update go-cqhttp -> [f16d72f](https://github.com/Mrs4s/go-cqhttp/actions/runs/6036458147)

修复了对于最新版本go-cqhttp配置文件中关于签名服务器部分的破坏性更新的支持。

脚本只会替换当前配置文件中第一个签名服务器,若需要使用备用签名服务器请自行修改配置文件。

Mrs4s/go-cqhttp#2389
  • Loading branch information
rhwong committed Sep 11, 2023
1 parent 6d8430d commit e44af08
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,14 @@ support:txlib_8.9.58

跟随上游更新了TIM相关协议支持,8.9.71没偷到PAD的protocol文件,所以只能用PHONE,所以请注意在device.json里切换协议。

#### 📅2023-09-11

- update go-cqhttp -> [f16d72f](https://github.com/Mrs4s/go-cqhttp/actions/runs/6036458147)

修复了对于最新版本go-cqhttp配置文件中关于签名服务器部分的破坏性更新的支持。

脚本只会替换当前配置文件中第一个签名服务器,若需要使用备用签名服务器请自行修改配置文件。

## ✨免责声明

- 本仓库所有关于qsign签名服务的二进制文件均来自于[fuqiuluo/unidbg-fetch-qsign](https://github.com/fuqiuluo/unidbg-fetch-qsign)
Expand Down
6 changes: 3 additions & 3 deletions Start_Qsign.bat
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ for %%i in (%targetPattern%) do (

if %fileExists%==1 (
if exist "%config_file%" (
lib\sed.exe -i "/# sign-server:/d" "%config_file%"
lib\sed.exe -i "s/url: 'http:\/\/127.0.0.1:8080'/Example-sign-server/; s/url: 'https:\/\/signserver.example.com'/Example-sign-server/" "%config_file%"
if "!host!"=="0.0.0.0" (
lib\sed.exe -i "s/url:.*/url: 'http:\/\/localhost:!port!'/g; s/key:.*/key: '!key!'/g" "%config_file%"
lib\sed.exe -i "0,/url: '.*'/s/url: '.*'/url: 'http:\/\/localhost:!port!'/; 0,/key: '.*'/s/key: '.*'/key: '!key!'/" "%config_file%"
) else (
lib\sed.exe -i "s/url:.*/url: 'http:\/\/!host!:!port!'/g; s/key:.*/key: '!key!'/g" "%config_file%"
lib\sed.exe -i "0,/url: '.*'/s/url: '.*'/url: 'http:\/\/!host!:!port!'/; 0,/key: '.*'/s/key: '.*'/key: '!key!'/" "%config_file%"
)
) else (
echo Can't find [config.yml]. If you forgot to generate it, please run [go-cqhttp.bat]
Expand Down

0 comments on commit e44af08

Please sign in to comment.