Code Monkey home page Code Monkey logo

Comments (9)

Toperlock avatar Toperlock commented on August 16, 2024 5

main.py不要动。是修改providers.json文件。

{
    "subscribes":[
        {
            "url": "订阅地址",
            "tag": "机场1", 
            "enabled": true,
            "emoji": 1, 
            "prefix": "", 
            "User-Agent":"clashmeta" 
        },
        {
            "url": "订阅地址",
            "tag": "机场2",
            "enabled": false, 
            "emoji": 0,
            "prefix": "❤️机场前缀 - ",
            "User-Agent":"clashmeta"
        }
    ],
    "auto_set_outbounds_dns":{
        "proxy": "",
        "direct": ""
    },
    "save_config_path": "D:\/singbox\/config.json",
    "auto_backup": false,
    "exclude_protocol": "ssr",
    "config_template": "", 
    "Only-nodes": false
}

from sing-box-subscribe.

Toperlock avatar Toperlock commented on August 16, 2024

现在加了判断条件,应该可以了

from sing-box-subscribe.

caiysmy avatar caiysmy commented on August 16, 2024

现在加了判断条件,应该可以了

谢谢大佬的辛勤付出,替换了大佬修改后的vmess.py,再次转换订阅,vmess节点已经正常了。大佬解决问题的速度杠杠的!!!

from sing-box-subscribe.

caiysmy avatar caiysmy commented on August 16, 2024

大佬,能不能教一下怎么把这个项目部署到cloudflare page,这个生成的链接,可以直连,我用部署到vercel的步骤照葫芦画瓢,总是不成功。只能把网页部署成了,但是python功能部分都不会弄,https://c44388e0.sing-box-subscribe-exl.pages.dev/这是我生成的连接,您帮我看看到底错在哪里了,谢谢了

from sing-box-subscribe.

Toperlock avatar Toperlock commented on August 16, 2024

cloudflare不支持python

from sing-box-subscribe.

caiysmy avatar caiysmy commented on August 16, 2024

大佬,电脑端用命令生成的congfig.json的路径能不能修改?我的想法是把路径改到singbox核心文件夹,直接覆盖旧的congfig.json

from sing-box-subscribe.

Toperlock avatar Toperlock commented on August 16, 2024

image

上面截图意思是保存在D:\singbox文件夹里

from sing-box-subscribe.

caiysmy avatar caiysmy commented on August 16, 2024

大佬,不会弄啊,是修改main.py里的save_config那部分吧,但是我python基础为0,真的无从下手。问了GPT,生成了根本运行不了,。你能在百忙中有时间能帮我改一下吗?
下面是你的源码,你帮我修改一下,行不,万分感谢
def save_config(path, nodes):
if 'auto_backup' in providers and providers['auto_backup']:
now = datetime.now().strftime('%Y%m%d%H%M%S')
if os.path.exists(path):
os.rename(path, f'{path}.{now}.bak')
if os.path.exists(path):
os.remove(path)
print(f"已删除文件,并重新保存:\033[33m{path}\033[0m")
print(f"File cấu hình đã được lưu vào: \033[33m{path}\033[0m")
else:
print(f"文件不存在,正在保存:\033[33m{path}\033[0m")
print(f"File không tồn tại, đang lưu tại: \033[33m{path}\033[0m")
tool.saveFile(path,json.dumps(nodes, indent=2, ensure_ascii=False))

from sing-box-subscribe.

caiysmy avatar caiysmy commented on August 16, 2024

main.py不要动。是修改providers.json文件。

{
    "subscribes":[
        {
            "url": "订阅地址",
            "tag": "机场1", 
            "enabled": true,
            "emoji": 1, 
            "prefix": "", 
            "User-Agent":"clashmeta" 
        },
        {
            "url": "订阅地址",
            "tag": "机场2",
            "enabled": false, 
            "emoji": 0,
            "prefix": "❤️机场前缀 - ",
            "User-Agent":"clashmeta"
        }
    ],
    "auto_set_outbounds_dns":{
        "proxy": "",
        "direct": ""
    },
    "save_config_path": "D:\/singbox\/config.json",
    "auto_backup": false,
    "exclude_protocol": "ssr",
    "config_template": "", 
    "Only-nodes": false
}

谢谢大佬,已经好了,大佬技术很硬!!!

from sing-box-subscribe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.