예제 #1
0
 def __getParserByProxyType(self, proxyType):
     if (proxyType == "SSR" or proxyType == "SSR-C#"):
         return SSRParser()
     elif (proxyType == "SS"):
         return SSParser()
     elif (proxyType == "V2RAY"):
         return V2RayParser()
예제 #2
0
                  SORT_METHOD)
        sys.exit(0)

    if (PROXY_TYPE == "SSR"):
        client = SSRClient()
        uConfigParser = SSRParser()
    elif (PROXY_TYPE == "SSR-C#"):
        client = SSRClient()
        client.useSsrCSharp = True
        uConfigParser = SSRParser()
    elif (PROXY_TYPE == "SS"):
        client = SSClient()
        uConfigParser = SSParser()
    elif (PROXY_TYPE == "V2RAY"):
        client = V2RayClient()
        uConfigParser = V2RayParser()

    if (CONFIG_LOAD_MODE == 1):
        uConfigParser.readGuiConfig(CONFIG_FILENAME)
    else:
        uConfigParser.readSubscriptionConfig(CONFIG_URL)
    uConfigParser.excludeNode([], [], config["excludeRemarks"])
    uConfigParser.filterNode(FILTER_KEYWORD, FILTER_GROUP_KRYWORD,
                             FILTER_REMARK_KEYWORD)
    uConfigParser.excludeNode(EXCLUDE_KEYWORD, EXCLUDE_GROUP_KEYWORD,
                              EXCLUDE_REMARK_KEWORD)
    uConfigParser.printNode()
    logger.info("{} node(s) will be test.".format(
        len(uConfigParser.getAllConfig())))

    if (TEST_MODE == "TCP_PING"):