Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能否增加通过命令行参数输入订阅网址? #56

Closed
AndrewGoal opened this issue Feb 26, 2020 · 2 comments
Closed

能否增加通过命令行参数输入订阅网址? #56

AndrewGoal opened this issue Feb 26, 2020 · 2 comments

Comments

@AndrewGoal
Copy link

类似这样:
$ ./stairspeedtest https://raw.githubusercontent.com/cdp2020/v2ray/master/README.md
现在这样没有办法自动化测试
每次需要手动输入订阅地址

@tindy2013
Copy link
Owner

tindy2013 commented Feb 26, 2020

@AndrewGoal /u 订阅地址 /g 自定义组名

@AndrewGoal
Copy link
Author

@tindy2013 非常感谢,辛苦拉!刚才没想到去代码里搜一下

void chkArg(int argc, char* argv[])
{
    for(int i = 0; i < argc; i++)
    {
        if(!strcmp(argv[i], "/rpc"))
            rpcmode = true;
        else if(!strcmp(argv[i], "/web"))
            webserver_mode = true;
        else if(!strcmp(argv[i], "/u") && argc > i + 1)
            sub_url.assign(argv[++i]);
        else if(!strcmp(argv[i], "/g") && argc > i + 1)
            custom_group.assign(argv[++i]);
    }
}

void chkArg(int argc, char* argv[])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants