display version
This commit is contained in:
parent
c48190fe7a
commit
45e27f9142
5 changed files with 30 additions and 4 deletions
3
CHANGES
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
|
||||||
|
|
||||||
|
|
|
@ -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:
|
||||||
|
|
|
@ -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']:
|
||||||
|
|
|
@ -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:
|
except Exception:
|
||||||
pass
|
try:
|
||||||
print('Shadowsocks %s' % version)
|
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
|
||||||
|
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
Normal file
3
version.py
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
def version()
|
||||||
|
return '2.9.4 update 2016-10-11'
|
||||||
|
|
Loading…
Add table
Reference in a new issue