Skip to content

Commit

Permalink
show some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
clowwindy committed Jul 4, 2013
1 parent a08e3fa commit 20a657a
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
1.3.6 2013-07-04
- Check config and show some warning messages

1.3.5 2013-06-29
- Make local.js and server.js runnable

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
shadowsocks-nodejs
===========

Current version: 1.3.5
Current version: 1.3.6
[![Build Status](https://travis-ci.org/clowwindy/shadowsocks-nodejs.png)](https://travis-ci.org/clowwindy/shadowsocks-nodejs)

shadowsocks-nodejs is a lightweight tunnel proxy which can help you get through
Expand Down
1 change: 1 addition & 0 deletions lib/shadowsocks/local.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/shadowsocks/server.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion lib/shadowsocks/utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "a tunnel proxy that help you get through firewalls",
"keywords": ["shadowsocks", "proxy", "socks5"],
"author": "clowwindy",
"version": "1.3.5",
"version": "1.3.6",
"licenses": [{
"type": "MIT",
"url": "https://raw.github.com/clowwindy/shadowsocks-nodejs/master/LICENSE"
Expand Down
3 changes: 3 additions & 0 deletions src/local.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ exports.main = ->
config[k] = v
if config.verbose
utils.config(utils.DEBUG)

utils.checkConfig config

SERVER = config.server
REMOTE_PORT = config.server_port
PORT = config.local_port
Expand Down
2 changes: 2 additions & 0 deletions src/server.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ exports.main = ->
config[k] = v
if config.verbose
utils.config(utils.DEBUG)

utils.checkConfig config

timeout = Math.floor(config.timeout * 1000) or 600000
portPassword = config.port_password
Expand Down
9 changes: 8 additions & 1 deletion src/utils.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@ exports.parseArgs = ->
result['verbose'] = true
result

exports.version = "shadowsocks-nodejs v1.3.5"
exports.checkConfig = (config) ->
if config.server in ['127.0.0.1', 'localhost']
exports.warn "Server is set to #{config.server}, maybe it's not correct"
exports.warn "Notice server will listen at #{config.server}:#{config.server_port}"
if (config.method or '').toLowerCase() == 'rc4'
exports.warn 'RC4 is not safe; please use a safer cipher, like AES-256-CFB'

exports.version = "shadowsocks-nodejs v1.3.6"

exports.EVERYTHING = 0
exports.DEBUG = 1
Expand Down

0 comments on commit 20a657a

Please sign in to comment.