dndx / shadowsocks-libuv Goto Github PK
View Code? Open in Web Editor NEWA Lightweight and Super Fast Server for shadowsocks.
A Lightweight and Super Fast Server for shadowsocks.
After shadowsocks-python update and use sendall(), server will sometimes not be able to complete handshake process. The problem had been identified. If you are using shadowsocks-python, please use commit 8c5c40915ea8fbd22a0f1a6a9596010565118b35 as a temporary solution, I will fix server ASAP.
when run with user nobody at port 10086
I got this error
2013-01-09 12:02:50 FATAL: fopen failed, Permission denied on File: server.c Line: 563
change the port to another heigher port did not work ,either.
Is there any possible to run this with out root privilege? (Or add this into Your @todo)?
Thanks for reading this.
RC4 have a very simple algorithm and can be implemented in just few lines of code. According to my test, we only need the EVP_BytesToKey(3)
to make password derivation. It seems that EVP_BytesToKey(3)
is using PKCS#5 v1.5 so it's possible just implement this algorithm and throw openssl dependency away.
In my encrypt.c
, I just used EVP_BytesToKey(3)
to do derivation. After that I used a rc4 implementation I found in OpenBSD Directory
and it's working very well.
Looks like travis do not have openssl installed on their worker, trying to put openssl into project.
when I use make to build this project in mac. I get a unknow error.
$ make
cc -Wall -O2 -DNDEBUG -I libuv/include -std=gnu99 -L/usr/local/opt/openssl/lib -I/usr/local/opt/openssl/include -o
server server.c utils.c encrypt.c md5.c rc4.c
libuv/libuv.a -lpthread -lcrypto -lm -framework CoreServices
Undefined symbols for architecture x86_64:
"_GetCurrentProcess", referenced from:
_uv__set_process_title in libuv.a(darwin-proctitle.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [all] Error 1
How to solve that?!!Please
For easy deployment, I choose to use static linking by adding -static
to CFLAGS
. This will result getaddrinfo
segfault.
There's some problem in static linked program which loads pthread and uses getaddrinfo
. More info in ths glibc bugzilla thread.
No problem in your code, just create this issue to notify you about this problem. Maybe you can add this in README so other people will not waste time doing this again.
错误如下:
cc -Wall -O2 -DNDEBUG -I libuv/include -std=gnu99 -o
server server.c utils.c encrypt.c md5.c rc4.c
libuv/libuv.a -lpthread -lcrypto -lm -lrt
server.c: In function after_write_cb :
server.c:151: warning: dereferencing type-punned pointer will break strict-aliasing rules
I built shadowsocks-libuv by MinGW32 toolchain with some small fix in Makefile:
LIBUVFLAGS = "OS=mingw"
CFLAGS += -D_WIN32_WINNT=0x0600 -I"f:/openssl-0.9.8k_WIN32/include"
LDFLAGS += f:/openssl-0.9.8k_WIN32/lib/ssleay32.lib f:/openssl-0.9.8k_WIN32/lib/libeay32.lib -lws2_32 -lmswsock -lkernel32 -luser32 -lgdi32 -lpsapi -liphlpapi -lmsvcr110
Building is successful, but report error when running, never succeed:
F:\Shareware\shadowsocks-libuv>server
�[01;32m INFO: �[0mShadowsocks server Version:0.2 libuv(0.9) Written by Dndx(id
ndx.com)
�[01;32m INFO: �[0mUsing shadowcrypt crypto
�[01;32m INFO: �[0mCrypto ready
�[01;32m INFO: �[0mListening on 0.0.0.0:8888
�[01;32m INFO: �[0mAccepted connection from 127.0.0.1
�[01;32m INFO: �[0mDomain is: www.google.com
�[01;32m INFO: �[0mConnected to 203.208.46.200
�[01;35m ERROR: �[0mlibuv error: not enough memory on File: server.c Line: 150
�[01;32m INFO: �[0mAccepted connection from 127.0.0.1
�[01;32m INFO: �[0mDomain is: www.google.com
�[01;32m INFO: �[0mConnected to 203.208.46.200
�[01;35m ERROR: �[0mlibuv error: not enough memory on File: server.c Line: 150
…………
Debian 6, 2.6.32
配置里用的是 IPv4 的格式 #define SERVER_LISTEN "::ffff:123.123.123.123"
$ ./server
2013-03-28 13:46:32 INFO: Shadowsocks Version:0.2 libuv(0.9) Written by Dndx(idndx.com)
2013-03-28 13:46:32 INFO: Using shadowcrypt crypto
2013-03-28 13:46:32 INFO: Crypto ready
2013-03-28 13:46:32 ERROR: libuv error: address family not supported on File: server.c Line: 591
2013-03-28 13:46:32 ERROR: Fatal error, terminating... on File: server.c Line: 591
encryption updates such as aes-128-cfb, aes-192-cfb, aes-256-cfb, bf-cfb?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.