Browse Source

display version

dev
破娃酱 8 years ago
parent
commit
45e27f9142
  1. 3
      CHANGES
  2. 1
      db_transfer.py
  3. 2
      shadowsocks/server.py
  4. 23
      shadowsocks/shell.py
  5. 3
      version.py

3
CHANGES

@ -1,3 +1,6 @@
2.9.4 2016-10-11
- sync client version
2.6.13 2015-11-02 2.6.13 2015-11-02
- add protocol setting - add protocol setting

1
db_transfer.py

@ -197,6 +197,7 @@ class TransferBase(object):
last_rows = [] last_rows = []
db_instance = obj() db_instance = obj()
ServerPool.get_instance() ServerPool.get_instance()
shell.log_shadowsocks_version()
import resource import resource
logging.info('current process RLIMIT_NOFILE resource: soft %d hard %d' % resource.getrlimit(resource.RLIMIT_NOFILE)) logging.info('current process RLIMIT_NOFILE resource: soft %d hard %d' % resource.getrlimit(resource.RLIMIT_NOFILE))
try: try:

2
shadowsocks/server.py

@ -37,6 +37,8 @@ def main():
config = shell.get_config(False) config = shell.get_config(False)
shell.log_shadowsocks_version()
daemon.daemon_exec(config) daemon.daemon_exec(config)
if config['port_password']: if config['port_password']:

23
shadowsocks/shell.py

@ -54,13 +54,30 @@ def print_exception(e):
def print_shadowsocks(): def print_shadowsocks():
version = '' version_str = ''
try: try:
import pkg_resources import pkg_resources
version = pkg_resources.get_distribution('shadowsocks').version version_str = pkg_resources.get_distribution('shadowsocks').version
except Exception:
try:
from shadowsocks import version
version_str = version.version()
except Exception:
pass
print('ShadowsocksR %s' % version_str)
def log_shadowsocks_version():
version_str = ''
try:
import pkg_resources
version_str = pkg_resources.get_distribution('shadowsocks').version
except Exception:
try:
from shadowsocks import version
version_str = version.version()
except Exception: except Exception:
pass pass
print('Shadowsocks %s' % version) logging.info('ShadowsocksR %s' % version_str)
def find_config(): def find_config():
config_path = 'user-config.json' config_path = 'user-config.json'

3
version.py

@ -0,0 +1,3 @@
def version()
return '2.9.4 update 2016-10-11'
Loading…
Cancel
Save