You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.4 KiB

8 years ago
  1. shadowsocks-libev
  2. =================
  3. [shadowsocks-libev][1] is a lightweight secured socks5 proxy for embedded
  4. devices and low end boxes. It is a port of [shadowsocks][2] created by
  5. @clowwindy maintained by @madeye and @linusyang.
  6. Suppose we have a VPS running Debian or Ubuntu.
  7. To deploy the service quickly, we can use [docker][3].
  8. ## Install docker
  9. ```
  10. $ curl -sSL https://get.docker.com/ | sh
  11. $ docker --version
  12. ```
  13. ## Build docker image
  14. ```bash
  15. $ curl -sSL https://github.com/shadowsocks/shadowsocks-libev/raw/master/docker/alpine/Dockerfile | docker build -t shadowsocks-libev -
  16. $ docker images
  17. ```
  18. > You can also use a pre-built docker image: [vimagick/shadowsocks-libev][4] ![][5].
  19. ## Run docker container
  20. ```bash
  21. $ docker run -d -e METHOD=aes-256-cfb -e PASSWORD=9MLSpPmNt -p 8388:8388 --restart always shadowsocks-libev
  22. $ docker ps
  23. ```
  24. > :warning: Click [here][6] to generate a strong password to protect your server.
  25. > You can use `ARGS` environment variable to pass additional arguments
  26. ## Use docker-compose to manage (optional)
  27. It is very handy to use [docker-compose][7] to manage docker containers.
  28. You can download the binary at <https://github.com/docker/compose/releases>.
  29. This is a sample `docker-compose.yml` file.
  30. ```yaml
  31. shadowsocks:
  32. image: shadowsocks-libev
  33. ports:
  34. - "8388:8388"
  35. environment:
  36. - METHOD=aes-256-cfb
  37. - PASSWORD=9MLSpPmNt
  38. restart: always
  39. ```
  40. It is highly recommended that you setup a directory tree to make things easy to manage.
  41. ```bash
  42. $ mkdir -p ~/fig/shadowsocks/
  43. $ cd ~/fig/shadowsocks/
  44. $ curl -sSLO https://github.com/shadowsocks/shadowsocks-libev/raw/master/docker/alpine/docker-compose.yml
  45. $ docker-compose up -d
  46. $ docker-compose ps
  47. ```
  48. ## Finish
  49. At last, download shadowsocks client [here][8].
  50. Don't forget to share internet with your friends.
  51. ```yaml
  52. {
  53. "server": "your-vps-ip",
  54. "server_port": 8388,
  55. "local_address": "0.0.0.0",
  56. "local_port": 1080,
  57. "password": "9MLSpPmNt",
  58. "timeout": 600,
  59. "method": "aes-256-cfb"
  60. }
  61. ```
  62. [1]: https://github.com/shadowsocks/shadowsocks-libev
  63. [2]: https://shadowsocks.org/en/index.html
  64. [3]: https://github.com/docker/docker
  65. [4]: https://hub.docker.com/r/vimagick/shadowsocks-libev/
  66. [5]: https://badge.imagelayers.io/vimagick/shadowsocks-libev:latest.svg
  67. [6]: https://duckduckgo.com/?q=password+12&t=ffsb&ia=answer
  68. [7]: https://github.com/docker/compose
  69. [8]: https://shadowsocks.org/en/download/clients.html