Giter VIP home page Giter VIP logo

shadowsocks-nodejs's Introduction

Removed according to regulations.

shadowsocks-nodejs's People

Contributors

chenshaoju avatar clowwindy avatar gaochun avatar librehat avatar mengskysama avatar nekolab avatar readmecritic avatar reusee avatar yorkie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shadowsocks-nodejs's Issues

请问一个服务端的test错误

calculating ciphers
server listening at port 60001
server listening at port 60002

  • About to connect() to proxy 127.0.0.1 port 1080 (#0)
  • Trying 127.0.0.1...
    Connection refused
  • couldn't connect to host
  • Closing connection #0

curl: (7) couldn't connect to host


我该怎么办呢?

test里的port_Password有作用么?

我看test里的json配置有一个port_Password,似乎是设置sock5帐号密码的,但是我把它加在config.json里之后,运行server.js后会报错,不知是哪里设置错了?
'shadowsocks-nodejs v0.9.6

node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
SyntaxError: Unexpected string
at Object.parse (native)
at Object. (/root/shadowsocks/shadowsocks-nodejs/server.js:45:17)
at Object. (/root/shadowsocks/shadowsocks-nodejs/server.js:213:4)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:32)
at Function._load (module.js:308:12)
at Array.0 (module.js:479:10)
at EventEmitter._tickCallback (node.js:192:41)'

1.2.1服务器端错误

查看log

shadowsocks-nodejs v1.2.1
26 May 18:25:31 - server listening at ...:****
26 May 18:25:36 - unsupported addrtype: 69
26 May 18:25:36 - unsupported addrtype: 69
26 May 18:25:36 - unsupported addrtype: 147
26 May 18:25:37 - unsupported addrtype: 69
26 May 18:25:38 - unsupported addrtype: 147
26 May 18:25:38 - unsupported addrtype: 69
26 May 18:25:38 - unsupported addrtype: 147
26 May 18:25:40 - unsupported addrtype: 69
26 May 18:25:40 - unsupported addrtype: 227
26 May 18:25:40 - unsupported addrtype: 69
26 May 18:25:40 - unsupported addrtype: 147

什么原因?

Problem with online video

I can not see videos (ex: in youtube) more than 2 minute. The proxy stops receiving data.

Is there any way to pass username and password through socks5?

thanks.

开个donation button 啊

自从架了这个, 上网不再以前那么痛苦了.
好东西想支持下作者, 没看到donation 的渠道. 或者给Alipay 帐号也行.

运行以后IP地址的还是自己本身的IP

    在buyvm上架设的OPENVZ上架设的...
    架设的时候一切都显示正常..
    跟着说明修改了IP地址端口等等..
    然后也在本地成功的运行了local.js
    VPS跟本地都显示server listening at port 1110
    但是问题是..在我设置了以后我试着在chrome设置后使用
    然后去看IP..发现依旧是自己原来的IP..并没有改变....
    因为从来没有显示过任何出错提示..所以也不知道问题出在哪里..

crash on invalid data

22 May 20:42:04 - unsupported addrtype: 27
node-crypto : Invalid IV length 14

crypto.js:343
  this._binding.initiv(cipher, toBuf(key), toBuf(iv));
                ^

Test cases `indexOf()` issue

In test.coffee

data.toString().indexOf 'listening at port'

will be compiled to

data.toString().indexOf('listening at port' >= 0)

当一个域名同时包含A记录和AAAA记录的时候解析地址的优先级问题

比如 The KAME project 的官方网站
www.kame.net
网站本身是双栈的 域名同时包含A记录和AAAA记录
我观察到nodejs版本的shadosocks的解析优先级是以A记录优先的 也就是说 即使我有IPv6 通过shadowsocks-nodejs 也是默认访问的他的V4站点
这点和Linux里面的一些软件的行为 比如wget,不一样
wget什么的优先访问的是V6的地址。另一个shadowsocks的C实现:shadowsocks-libuv 也是如此,默认V6优先。
虽然很难说这两种模式的优劣,但是我也不想在HOST里面强制绑定一些网站使用V6(太多了 没法举穷)
能不能实现此软件的一些选项 使得解析的时候 DNS的解析行为可以被无痛的按需调整为IPv6优先/IPv4优先?

TypeError: Cannot call method 'destroy' of null

node -v
v0.8.21
git branch -v

timers.js:103
if (!process.listeners('uncaughtException').length) throw e;
^
TypeError: Cannot call method 'destroy' of null
at Socket. (/var/ss9/server.js:208:22)
at Socket.g (events.js:192:14)
at Socket.EventEmitter.emit (events.js:93:17)
at Socket._onTimeout (net.js:188:8)
at Timer.list.ontimeout (timers.js:101:19)
shadowsocks-nodejs v1.2.3

server.js memory leak

steps to reproduce:

start server and client
open a long Youtube video
sit and watch server memory usage

expected:

memory usage should be in an acceptable range

what you see:

it just goes up and up, until used up all the physical memory

RC4 key stream only needs to be initialized once

Just a little optimization tip.

We can create a RC4 cipher and create a copy of that cipher for each new connection. This can avoid some performance overhead of initializing RC4 key stream.

I implemented this optimization in both the Go and libuv version. Here's the libuv code

I don't know how to change coffee script, otherwise I'll implement this and send a pull request.

不好意思,又有问题...node总会自动关闭

我之前的命令
nohup node /var/shadowsocks/server.js >/var/shadowsocks/log 2>&1 &
,看log,大概每次都会在15-20分钟自动关闭,并没有报错..
请问这是何原因,系统是ubuntu12.04,用apt-get装的nodejs

另外上不了youtube和facebook,莫非是被劫持了么?但pptp上去并没有问题,我在v2ex上发的帖子http://www.v2ex.com/t/61744

config是

{
    "server":"myip",
    "server_port":443,
    "local_port":1080,
    "password":"mypw",
    "timeout":600,
    "method":"rc4"
}

断言错误

服务端版本

 node -v
v0.10.8

git branch -v
* node-v0.10 123dcb6 ignore null data

客户端软件: GoAgentX

加密方式: rc4

错误:

node: ../deps/uv/src/unix/stream.c:1319: uv_read_stop: Assertion `!uv__io_active(&stream->io_watcher, 4) || !(&stream->write_completed_queue == (&stream->write_completed_queue)->prev) || !(&stream->write_queue == (&stream->write_queue)->prev) || stream->shutdown_req != ((void *)0) || stream->connect_req != ((void *)0)' failed.

A small bug in server.js?

line 220 of server.js:
util.warn("Address in use, aborting");

maybe util.log? With nodejs v0.8.24 , it will throw an error "no such method for util". Hopefully this can be fixed in next release. Thanks!

license?

。。。能给明确下?打包 RPM 使。。。

Error: connect ETIMEDOUT 错误

shadowsocks-nodejs 版本,Error: connect ETIMEDOUT 错误。
vps:CentOS 6 32-bit,
客户端为WIN7 64-bit,
编译安装最新的nodejs v0.8.19,
shadowsocks-nodejs代码通过git clone git://github.com/clowwindy/shadowsocks-nodejs.git获得。

偶尔出现连接twitter或google时,网页打不开,窗户显示如下错误:Error: connect ETIMEDOUT 。该如何解决?帮忙诊断一下吧,谢谢。

config multi password?

Hello, is there any new example for config multi password (with encryption methods)?
thanks

an exmple of multi-server config

Just in case someone needs this.

{
"server_password":{"server1.com:1001": "password", "server2.com:1002": "password"},
"local_port":8080,
"timeout":600
}

HTTP Header

Hi,
Is there a way to add HTTP header to requests to bypass DPI system?

多用户配置,客户端连接后服务端报异常

多用户运行报异常,单用户配置正常
主要同时监听多个端口,端口被封了马上换个,而无需连接到服务器改配置

version: git commit a1364ee
node: v0.8.16

crypto.js:144
  return (new Cipher).init(cipher, password);
                      ^
Error: Must give cipher-type, key
    at Object.exports.createCipher (crypto.js:144:23)
    at new Encryptor (/home/outman/webroot/shadowsocks-nodejs/encrypt.js:68:30)
    at Server.<anonymous> (/home/outman/webroot/shadowsocks-nodejs/server.js:77:19)
    at Server.EventEmitter.emit (events.js:96:17)
    at TCP.onconnection (net.js:1039:8)

服务器配置文件

{
        "server":"127.0.0.1",
                "server_port":8888,
                "local_port":1081,
                "password":"xxxxx!",
                "port_password": {
                        "4433": "xxxxx!",
                        "8080": "xxxxx!"
                },
                "timeout":60
}

客户端配置

{
    "server":["x.xxx.xxx"],
    "server_port":4433,
    "local_port":3439,
    "password":"xxxxx!",
    "timeout":60,
    "method":null
}

SSL Support (enhancement)

shadowsocks-nodejs的效率很高,但是这种简单加密被Wall嗅探出来是迟早的问题。
因此能否考虑支持Apache的反向代理(某个路径,如 https://aaa.bbb.com/ccc/ ),或者直接支持TLS(SSL)方式连接?

我对node.js所知甚少,如有错误,请包涵,谢谢。

有时会出现cpu超过100%的情况

我用的多端口,日志里有很多这样的内容:

1829 这个端口通常是端口列表里最后一个端口。奇怪的是我用 netstat 和 iptables -L 查看,1829 这个端口并没有流量。

9 Mar 00:56:20 - local port: 1829. local error: Error: read EHOSTUNREACH
9 Mar 00:57:37 - local port: 1829. local error: Error: This socket is closed.
9 Mar 00:57:43 - local port: 1829. local error: Error: read EHOSTUNREACH
9 Mar 00:57:45 - local port: 1829. local error: Error: This socket is closed.
9 Mar 00:58:08 - local port: 1829. local error: Error: This socket is closed.
9 Mar 00:58:16 - local port: 1829. local error: Error: This socket is closed.
9 Mar 00:58:18 - local port: 1829. local error: Error: This socket is closed.
9 Mar 00:58:19 - local port: 1829. local error: Error: This socket is closed.
9 Mar 00:58:19 - local port: 1829. local error: Error: This socket is closed.
9 Mar 00:58:19 - local port: 1829. local error: Error: This socket is closed.
9 Mar 00:58:19 - local port: 1829. local error: Error: This socket is closed.
9 Mar 00:58:24 - unsupported addrtype: 232
<Buffer e8 a3 c6 76 7c 76 24 c6 c6 86 7c 05 ca 05 59 47 59 47>
9 Mar 00:58:36 - local port: 1829. local error: Error: This socket is closed.
9 Mar 00:58:36 - local port: 1829. local error: Error: This socket is closed.
9 Mar 00:58:36 - local port: 1829. local error: Error: This socket is closed.
9 Mar 00:58:36 - local port: 1829. local error: Error: This socket is closed.
9 Mar 00:59:12 - local port: 1829. local error: Error: write EPIPE
9 Mar 00:59:12 - local port: 1829. local error: Error: write EPIPE
9 Mar 00:59:22 - local port: 1829. local error: Error: This socket is closed.

另外日志里还有一些remote乱码请求:
9 Mar 00:50:10 - local port: 1829. remote hxsesrspes:80 error: Error: getaddrinfo ENOENT
9 Mar 00:50:10 - local port: 1829. remote eqvlyxjiva:80 error: Error: getaddrinfo ENOENT
9 Mar 00:50:10 - local port: 1829. remote nfpyphqxjq:80 error: Error: getaddrinfo ENOENT
9 Mar 00:50:10 - local port: 1829. local error: Error: This socket is closed.
9 Mar 00:50:21 - local port: 1829. local error: Error: This socket is closed.
9 Mar 00:50:24 - local port: 1829. remote pfdozahxnp:80 error: Error: getaddrinfo ENOENT
9 Mar 00:50:24 - local port: 1829. remote ouifefexsa:80 error: Error: getaddrinfo ENOENT
9 Mar 00:50:24 - local port: 1829. remote juzcpwitwz:80 error: Error: getaddrinfo ENOENT
9 Mar 00:50:25 - local port: 1829. local error: Error: This socket is closed.
9 Mar 00:50:26 - local port: 1829. local error: Error: This socket is closed.
9 Mar 00:50:26 - local port: 1829. local error: Error: This socket is closed.
9 Mar 00:50:30 - local port: 1829. local error: Error: This socket is closed.
9 Mar 00:50:41 - local port: 1829. local error: Error: This socket is closed.
9 Mar 00:50:58 - calculating ciphers
9 Mar 00:51:04 - local port: 1829. remote jmlgryngsg:80 error: Error: getaddrinfo ENOENT
9 Mar 00:51:05 - local port: 1829. remote aabqiljige:80 error: Error: getaddrinfo ENOENT
9 Mar 00:51:05 - local port: 1829. remote wsoszsuyix:80 error: Error: getaddrinfo ENOENT

Shadowsocks thread ends unexpectedly at "calculating ciphers" while running

shadowsocks-nodejs v0.9.6

"calculating ciphers" at start after "listening..." won't cause this problem but "calculating ciphers" when running will cause the Shadowsocks thread to exit.

Strangely this problem occurs much more frequently on one of my VPS servers. I can provide you with root account details if it can help you diagnose.

4 Apr 22:36:43 - connecting ajax.googleapis.com:443
4 Apr 22:36:44 - connecting d.adroll.com:443
4 Apr 22:36:44 - connecting d.dropbox.com:443
4 Apr 22:36:55 - connecting www.woopra.com:443
4 Apr 22:37:06 - calculating ciphers

Limit ports data transfer

With mutiuser support, each user is assigned a port number. Would be great if we can limit monthly/weekly/daily data transfer for each port.

e.g.

instead of

"port_password": {"1681": "pswd"}
Add
"port_password_limit": {"1681": "pswd", "mlimit": 10}

Or simply add a global limit for each user:
...
"timeout": 600,
"mlimit": 10

meaning there is a monthly data transfer cap of 10Gib for this user.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.