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.

88 lines
2.3 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. ## Use docker-compose to manage (optional)
  26. It is very handy to use [docker-compose][7] to manage docker containers.
  27. You can download the binary at <https://github.com/docker/compose/releases>.
  28. This is a sample `docker-compose.yml` file.
  29. ```yaml
  30. shadowsocks:
  31. image: shadowsocks-libev
  32. ports:
  33. - "8388:8388"
  34. environment:
  35. - METHOD=aes-256-cfb
  36. - PASSWORD=9MLSpPmNt
  37. restart: always
  38. ```
  39. It is highly recommended that you setup a directory tree to make things easy to manage.
  40. ```bash
  41. $ mkdir -p ~/fig/shadowsocks/
  42. $ cd ~/fig/shadowsocks/
  43. $ curl -sSLO https://github.com/shadowsocks/shadowsocks-libev/raw/master/docker/alpine/docker-compose.yml
  44. $ docker-compose up -d
  45. $ docker-compose ps
  46. ```
  47. ## Finish
  48. At last, download shadowsocks client [here][8].
  49. Don't forget to share internet with your friends.
  50. ```yaml
  51. {
  52. "server": "your-vps-ip",
  53. "server_port": 8388,
  54. "local_address": "0.0.0.0",
  55. "local_port": 1080,
  56. "password": "9MLSpPmNt",
  57. "timeout": 600,
  58. "method": "aes-256-cfb"
  59. }
  60. ```
  61. [1]: https://github.com/shadowsocks/shadowsocks-libev
  62. [2]: https://shadowsocks.org/en/index.html
  63. [3]: https://github.com/docker/docker
  64. [4]: https://hub.docker.com/r/vimagick/shadowsocks-libev/
  65. [5]: https://badge.imagelayers.io/vimagick/shadowsocks-libev:latest.svg
  66. [6]: https://duckduckgo.com/?q=password+12&t=ffsb&ia=answer
  67. [7]: https://github.com/docker/compose
  68. [8]: https://shadowsocks.org/en/download/clients.html