Exemplo n.º 1
0
def update_servers():
    try:
        # servers
        global servers
        servers = ss_free.main()
        # subscription
        global encoded
        global full_encoded
        global jsons
        global full_jsons
        jsons = list()
        decoded = list()
        full_decoded = list()
        for website in servers:
            for server in website['data']:
                full_decoded.append(server['ssr_uri'])
                full_jsons.append(server['json'])
                if server['status'] is True:
                    decoded.append(server['ssr_uri'])
                    jsons.append(server['json'])

        decoded = '\n'.join(decoded)
        encoded = base64.urlsafe_b64encode(bytes(decoded, 'utf-8'))
        full_decoded = '\n'.join(full_decoded)
        full_encoded = base64.urlsafe_b64encode(bytes(full_decoded, 'utf-8'))
    except Exception as e:
        logging.exception(e, stack_info=True)
Exemplo n.º 2
0
def update_servers():
    try:
        # servers
        global servers
        servers = ss_free.main()
        # subscription
        global encoded
        global full_encoded
        global jsons
        global full_jsons
        jsons = list()
        decoded = list()
        full_decoded = list()
        for website in servers:
            for server in website['data']:
                full_decoded.append(server['ssr_uri'])
                full_jsons.append(server['json'])
                if server['status'] is True:
                    decoded.append(server['ssr_uri'])
                    jsons.append(server['json'])

        decoded = '\n'.join(decoded)
        encoded = base64.urlsafe_b64encode(bytes(decoded, 'utf-8'))
        full_decoded = '\n'.join(full_decoded)
        full_encoded = base64.urlsafe_b64encode(bytes(full_decoded, 'utf-8'))
    except Exception as e:
        logging.exception(e, stack_info=True)
def test4():
    data = ss_free.main(debug=['no_validate'])
    data = ssr_check.validate(data)

    for i in data:
        print(i['info'])
        for j in i['data']:
            print(j['status'])
Exemplo n.º 4
0
def test4():
    data = ss_free.main(debug=['no_validate'])
    data = ssr_check.validate(data)

    for i in data:
        print(i['info'])
        for j in i['data']:
            print(j['status'])
def test3():
    data = ss_free.main()
    for i in data:
        print(i['info'])
        for j in i['data']:
            w = ssr_check.test_socks_server(str_json=j['json'])
            print('>>>>>>>结果:', w)
            if w is True:
                print(j['json'])
            elif w == -1:
                print(j['json'])
Exemplo n.º 6
0
def test3():
    data = ss_free.main()
    for i in data:
        print(i['info'])
        for j in i['data']:
            w = ssr_check.test_socks_server(str_json=j['json'])
            print('>>>>>>>结果:', w)
            if w is True:
                print(j['json'])
            elif w == -1:
                print(j['json'])
Exemplo n.º 7
0
def update_servers():
    try:
        global servers
        servers = ss_free.main()
        global encoded
        decoded = list()
        for i in servers:
            for j in i['data']:
                if j['uri'][2] is 'r':
                    decoded.append(j['uri'])
        decoded = '\n'.join(decoded)
        encoded = base64.urlsafe_b64encode(bytes(decoded, 'utf-8'))
    except Exception as e:
        logging.exception(e, stack_info=True)
Exemplo n.º 8
0
#!/usr/bin/env python3
from test import test_sodium
from app import *
from app.ss import ss_free, ssr_check
ss_free.main()
exit(0)
Exemplo n.º 9
0
#!/usr/bin/env python3
from test import test_sodium
from app.ss import ss_free
ss_free.main()
exit(0)