Git Product home page Git Product logo

shadowsocks-libuv's Introduction

shadowsocks-libuv

Build Status

shadowsocks is a lightweight tunnel proxy which can help you get through firewalls.

protol made by clowwindy, libuv port by dndx

This is only a server, it should works with any shadowsocks client.

Current version: 0.1

This is an Open Source project and released under The MIT License

Features

  • Super fast and low resource consume (thanks to libuv), it can run very smoothly on almost any VPS.
  • Fully compatible to other port of shadowsocks.

Attention

This is an initial release and may not considered very stable, please open an issue if you encounter any bugs. Be sure to attach the error message so I can identify it.

How to Build

$ git clone --recursive https://github.com/dndx/shadowsocks-libuv.git
$ cd shadowsocks-libuv/
$ vim config.h
$ make

Note that you need to rebuild it every time you modify config.h, just run make again and it will do rest of the work.

Tested and confirmed to work on:

  • Max OS X 10.8.2 x64 using clang 4.1
  • CentOS 5.8 x86 using gcc 4.1.2
  • CentOS 6.3 x64 using gcc 4.4.6

How to Use

After you build shadowsocks successfully, you can rename the file server and move it to anywhere you want.

Also there are command line options that can be used to override settings in config.h:

$ ./server -?
./server: invalid option -- ?
Shadowsocks Version:0.1 libuv(0.9) Written by Dndx(idndx.com)
Usage: ./server [-l listen] [-p port] [-k keyfile] [-f pidfile]

Options:
  -l : Override the listening IP
  -p : Override the listening port
  -k : Override the listening password
  -f : Override the pidfile path

If you want to run server in background, you can:

$ nohup /path/to/server &

Note this will redirect all log generated by program to nohup.out. If you do not like any log to be saved, you can run:

$ nohup /path/to/server > /dev/null 2>&1 &

This will throw all the message to a black hole.

I suggest the first way. If your program does not run as expected, log file will be very important for me to identify the bug.

Known Issues

Build Failed

src/unix/linux/syscalls.h:74: error: expected specifier-qualifier-list before ‘__u64’
  1. First, make sure you have the latest kernel-headers by running yum install kernel-headers
  2. Try make again, if it still complains, see next
  3. cd to shadowsocks-libuv and $ vim libuv/config-unix.mk
  4. At about line 22, you will see CSTDFLAG=--std=c89 -pedantic -Wall -Wextra -Wno-unused-parameter
  5. Change it to CSTDFLAG=--std=gnu99 -pedantic -Wall -Wextra -Wno-unused-parameter
  6. Save the file and run make again

Performance

I did not fully benchmark it yet, but according to my use on TinyVZ (OpenVZ 128M RAM and CentOS 5.8 x86). When streaming YouTube 1080p vedio at about 20Mbit/s bandwidth, it use at most 3% of RAM (RSS about 7500) and almost no CPU time. During webpage browse it use less than 0.7% RAM (RSS about 1164). Which can be considered effective.

##Contributors

I appreciate all the people who have made this project better. Contribution is always welcome!

TODO List

  • IPv6 Support !important
  • RC4 Crypto Support
  • Add Multi Port Support
  • Client Implement
  • …to be continued…

shadowsocks-libuv's People

Contributors

dndx avatar clowwindy avatar

Watchers

James Cloos avatar  avatar

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.