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
- add protocol setting

1
db_transfer.py

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

2
shadowsocks/server.py

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

23
shadowsocks/shell.py

@ -54,13 +54,30 @@ def print_exception(e):
def print_shadowsocks():
version = ''
version_str = ''
try:
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:
pass
print('Shadowsocks %s' % version)
logging.info('ShadowsocksR %s' % version_str)
def find_config():
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