diff --git a/ssshare/donation.py b/ssshare/donation.py index 820fb44..98e2e32 100644 --- a/ssshare/donation.py +++ b/ssshare/donation.py @@ -225,18 +225,18 @@ def parse(data): else: number, message = data[:2] if message: - message = ',并留言:”{}“'.format(message) + message = ',并留言:”{}“'.format(message) if len(data) >= 3: - name = data[2] + name = '' + data[2]+ '' else: name = '某位没有留下名字的' if len(data) >= 4: - comment = '
to 这位朋友:{}'.format(data[3]) + comment = '
to 这位朋友:{}'.format(data[3]) else: comment = '' - return_data = '

{name}朋友捐献了{number}元{message}:){comment}

'.format( + return_data = '

{name}朋友捐献了{number}元{message}:){comment}

'.format( name=name, number=number, message=message, 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(