vvbbnn00 / WARP-Clash-API

该项目可以让你通过订阅的方式使用Cloudflare WARP+,自动获取流量。This project enables you to use Cloudflare WARP+ through subscription, automatically acquiring traffic.
GNU General Public License v3.0
8.45k stars 1.16k forks source link

fix: surge config is wrong #30

Closed CorrectRoadH closed 8 months ago

CorrectRoadH commented 8 months ago

What does the PR do?

Surge can't parser the latest config that generated by WARP Clash API. the config look like

#!MANAGED-CONFIG https://subs.zeabur.app/surge interval=43200 strict=true
# Surge 的规则配置手册: https://manual.nssurge.com/
# Thanks @Hackl0us SS-Rule-Snippet
# Thanks @CorrectRoadH WARP+ to Surge[General]
loglevel = notify
doh-server = https://doh.pub/dns-query
dns-server = 223.5.5.5, 114.114.114.114

we need add a extract a new line to the end of sub file.

make it become

#!MANAGED-CONFIG https://subs.zeabur.app/surge interval=43200 strict=true
# Surge 的规则配置手册: https://manual.nssurge.com/
# Thanks @Hackl0us SS-Rule-Snippet
# Thanks @CorrectRoadH WARP+ to Surge
[General]
loglevel = notify
doh-server = https://doh.pub/dns-query
dns-server = 223.5.5.5, 114.114.114.114