From f6aae6bb4f4506103c7e8e9dd00ede6baaec32a8 Mon Sep 17 00:00:00 2001 From: Charles Xu Date: Mon, 4 Mar 2019 15:32:17 +0800 Subject: [PATCH] bug fixed for freess.site --- ssshare/ss/crawler.py | 4 ++-- ssshare/ss/ssr_check.py | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ssshare/ss/crawler.py b/ssshare/ss/crawler.py index c5f9971..eba5537 100644 --- a/ssshare/ss/crawler.py +++ b/ssshare/ss/crawler.py @@ -208,8 +208,8 @@ def get_value(char): 'remarks': x[6], 'server': x[1], 'server_port': x[2], - 'password': x[4], - 'method': x[3], + 'password': x[3], + 'method': x[4], } for x in data] except Exception as e: logging.exception(e, stack_info=True) diff --git a/ssshare/ss/ssr_check.py b/ssshare/ss/ssr_check.py index b26f251..8b84167 100644 --- a/ssshare/ss/ssr_check.py +++ b/ssshare/ss/ssr_check.py @@ -3,6 +3,7 @@ import time import threading from ssshare.ss import ss_local +import random def test_connection( @@ -25,7 +26,9 @@ def test_connection( return ok, content -def test_socks_server(dictionary=None, str_json=None, port=2001): +def test_socks_server(dictionary=None, str_json=None, port=None): + if not port: + port = random.randint(2000, 3000) try: try: loop, tcps, udps = ss_local.main(