Browse Source

Update FreeBSD section

Update FreeBSD section, including install / configuration / run / run as client.
pull/2521/head^2
Xiaoding Liu 5 years ago
committed by GitHub
parent
commit
488987927d
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)
- [Directly build and install on UNIX-like system](#linux)
- [FreeBSD](#freebsd)
+ [Install](#install)
+ [Configuration](#configuration)
+ [Run](#run)
+ [Run as client](#run-as-client)
- [OpenWRT](#openwrt)
- [OS X](#os-x)
- [Windows (MinGW)](#windows-mingw)
@ -294,27 +298,49 @@ sudo make install
You may need to manually install missing softwares.
### 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
su
cd /usr/ports/net/shadowsocks-libev
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"
```
#### Run
Start the Shadowsocks server:
```bash
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
The OpenWRT project is maintained here:

Loading…
Cancel
Save