mirror of
https://github.com/ACL4SSR/ACL4SSR.git
synced 2026-06-10 14:32:32 +00:00
fix some bugs
This commit is contained in:
2
.github/workflows/update.yml
vendored
2
.github/workflows/update.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
|||||||
echo "Attempt $i/$MAX_RETRIES to download mihomo..."
|
echo "Attempt $i/$MAX_RETRIES to download mihomo..."
|
||||||
if TAG=$(curl -s --fail https://api.github.com/repos/MetaCubeX/mihomo/releases/latest | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/'); then
|
if TAG=$(curl -s --fail https://api.github.com/repos/MetaCubeX/mihomo/releases/latest | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/'); then
|
||||||
echo "Latest mihomo version: $TAG"
|
echo "Latest mihomo version: $TAG"
|
||||||
if curl -L --fail -o mihomo.tar.gz "https://github.com/MetaCubeX/mihomo/releases/download/${TAG}/mihomo-linux-amd64-${TAG}.gz"; then
|
if curl -L --fail -o mihomo.tar.gz "https://github.com/MetaCubeX/mihomo/releases/download/${TAG}/mihomo-linux-amd64-${TAG}.tar.gz"; then
|
||||||
echo "Download succeeded"
|
echo "Download succeeded"
|
||||||
if tar -xzf mihomo.tar.gz; then
|
if tar -xzf mihomo.tar.gz; then
|
||||||
chmod +x mihomo
|
chmod +x mihomo
|
||||||
|
|||||||
@@ -103,9 +103,9 @@ def generate_acl_file(domains, filename, title="GFWList Rules"):
|
|||||||
content = header + '\n'.join(rules) + '\n'
|
content = header + '\n'.join(rules) + '\n'
|
||||||
write_file(filename, content)
|
write_file(filename, content)
|
||||||
|
|
||||||
def generate_clash_provider_yaml(domains, filename, title="Proxy"):
|
def generate_clash_provider_yaml(domains, filename, title="payload"):
|
||||||
unique_domains = sorted(set(domains))
|
unique_domains = sorted(set(domains))
|
||||||
content = f"{title}:\n - https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/ProxyGFWlist.list\n"
|
content = f"{title}:\n"
|
||||||
for domain in unique_domains:
|
for domain in unique_domains:
|
||||||
content += f" - DOMAIN-SUFFIX,{domain}\n"
|
content += f" - DOMAIN-SUFFIX,{domain}\n"
|
||||||
write_file(filename, content)
|
write_file(filename, content)
|
||||||
|
|||||||
Reference in New Issue
Block a user