Browse Source

Merge pull request #2521 from xiaoding/master

Update FreeBSD section in README.md
pull/2531/head
Max Lv 5 years ago
committed by GitHub
parent
commit
3125c8c96b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 29 additions and 3 deletions
  1. 32
      README.md

32
README.md

@ -59,6 +59,10 @@ sudo snap install shadowsocks-libev --edge
- [Nix](#nix) - [Nix](#nix)
- [Directly build and install on UNIX-like system](#linux) - [Directly build and install on UNIX-like system](#linux)
- [FreeBSD](#freebsd) - [FreeBSD](#freebsd)
+ [Install](#install)
+ [Configuration](#configuration)
+ [Run](#run)
+ [Run as client](#run-as-client)
- [OpenWRT](#openwrt) - [OpenWRT](#openwrt)
- [OS X](#os-x) - [OS X](#os-x)
- [Windows (MinGW)](#windows-mingw) - [Windows (MinGW)](#windows-mingw)
@ -294,27 +298,49 @@ sudo make install
You may need to manually install missing softwares. You may need to manually install missing softwares.
### FreeBSD ### FreeBSD
#### Install
Shadowsocks-libev is available in FreeBSD Ports Collection. You can install it in either way, `pkg` or `ports`.
**pkg (recommended)**
```bash
pkg install shadowsocks-libev
```
**ports**
```bash ```bash
su
cd /usr/ports/net/shadowsocks-libev cd /usr/ports/net/shadowsocks-libev
make install make install
``` ```
Edit your config.json file. By default, it's located in /usr/local/etc/shadowsocks-libev.
#### Configuration
Edit your `config.json` file. By default, it's located in `/usr/local/etc/shadowsocks-libev`.
To enable shadowsocks-libev, add the following rc variable to your /etc/rc.conf file:
To enable shadowsocks-libev, add the following rc variable to your `/etc/rc.conf` file:
``` ```
shadowsocks_libev_enable="YES" shadowsocks_libev_enable="YES"
``` ```
#### Run
Start the Shadowsocks server: Start the Shadowsocks server:
```bash ```bash
service shadowsocks_libev start service shadowsocks_libev start
``` ```
#### Run as client
By default, shadowsocks-libev is running as a server in FreeBSD. If you would like to start shadowsocks-libev in client mode, you can modify the rc script (`/usr/local/etc/rc.d/shadowsocks_libev`) manually.
```
# modify the following line from "ss-server" to "ss-local"
command="/usr/local/bin/ss-local"
```
Note that is simply a workaround, each time you upgrade the port your changes will be overwritten by the new version.
### OpenWRT ### OpenWRT
The OpenWRT project is maintained here: The OpenWRT project is maintained here:

Loading…
Cancel
Save