Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Fejes Ferenc committed Jun 22, 2018
1 parent 4f7baeb commit e41db37
Show file tree
Hide file tree
Showing 45 changed files with 349 additions and 272 deletions.
19 changes: 19 additions & 0 deletions .copr/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.PHONY: deps srpm
.DEFAULT_GOAL := srpm

DOT_COPR := $(dir $(firstword $(MAKEFILE_LIST)))
TOP_DIR := $(realpath $(DOT_COPR)/../)

RPM_DIR := $(TOP_DIR)/rpm
outdir ?= $(RPM_DIR)/SRPMS

HAS_GIT := $(shell command -v git 2> /dev/null)
ifndef HAS_GIT
deps:
dnf -y install git
else
deps:
endif

srpm: deps
$(TOP_DIR)/rpm/genrpm.sh -o $(outdir)
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ rpm/BUILDROOT/

# Ignore per-project vim config
.vimrc
.vscode/

# Ignore garbage of OS X
*.DS_Store
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ script:
branches:
only:
- nocrypto

4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.2)

set(PROJECT_NAME shadowsocks-libev)
set(RELEASE_DATE 2018-1-15)
set(PROJECT_VERSION "3.1.3")
set(RELEASE_DATE 2018-5-28)
set(PROJECT_VERSION "3.2.0")
set(PROJECT_DESC "a lightweight secured socks5 proxy")
set(PROJECT_URL "https://shadowsocks.org")
set(PROJECT_ISSUES_URL "https://github.com/shadowsocks/shadowsocks-libev")
Expand Down
9 changes: 9 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
shadowsocks-libev (3.2.0-1) unstable; urgency=medium

* Add MinGW support by @linusyang.
* Refine c-ares integration by @xnoreq.
* Fix building issues with GCC8 by @FlyingheartCN.
* Minor bug fixes.

-- Max Lv <[email protected]> Mon, 28 May 2018 19:46:21 -0700

shadowsocks-libev (3.1.3-1) unstable; urgency=medium

* Fix a bug in UDP relay.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ The motivation behind this: on router boards with limited CPU resources, the enc
On my Raspberry Pi 2 device, I measured **15 Mbps** on loopback with `aes-128-gcm` and **285 Mbps** with `none` (no encryption).
Obviously, turning off the encryption is optional (set encryption method to `none` for that), and only use if you can sure in the security considerations.


# shadowsocks-libev

## Intro
Expand All @@ -20,8 +19,9 @@ It is a port of [Shadowsocks](https://github.com/shadowsocks/shadowsocks)
created by [@clowwindy](https://github.com/clowwindy), and maintained by
[@madeye](https://github.com/madeye) and [@linusyang](https://github.com/linusyang).

Current version: 3.1.3 | [Changelog](debian/changelog)
Current version: 3.2.0 | [Changelog](debian/changelog)

Travis CI: [![Travis CI](https://travis-ci.org/shadowsocks/shadowsocks-libev.svg?branch=master)](https://travis-ci.org/shadowsocks/shadowsocks-libev)

## Features

Expand Down
2 changes: 1 addition & 1 deletion completions/bash/ss-server
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
_ss_server()
{
local cur prev opts ciphers
opts='-s -p -l -k -m -a -f -t -c -n -i -b -u -U -6 -d -v -h --reuse-port --fast-open --acl --manager-address --mtu --mptcp --key --plugin --plugin-opts --help'
opts='-s -p -l -k -m -a -f -t -c -n -i -b -u -U -6 -d -v -h --reuse-port --fast-open --acl --manager-address --mtu --mptcp --no-delay --key --plugin --plugin-opts --help'
ciphers='none rc4-md5 aes-128-gcm aes-192-gcm aes-256-gcm aes-128-cfb aes-192-cfb aes-256-cfb aes-128-ctr aes-192-ctr aes-256-ctr camellia-128-cfb camellia-192-cfb camellia-256-cfb bf-cfb chacha20-ietf-poly1305 salsa20 chacha20 chacha20-ietf'
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dnl -*- Autoconf -*-
dnl Process this file with autoconf to produce a configure script.

AC_PREREQ([2.67])
AC_INIT([shadowsocks-libev], [3.1.3], [[email protected]])
AC_INIT([shadowsocks-libev], [3.2.0], [[email protected]])
AC_CONFIG_SRCDIR([src/crypto.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR(auto)
Expand Down
9 changes: 9 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
shadowsocks-libev (3.2.0-1) unstable; urgency=medium

* Add MinGW support by @linusyang.
* Refine c-ares integration by @xnoreq.
* Fix building issues with GCC8 by @FlyingheartCN.
* Minor bug fixes.

-- Max Lv <[email protected]> Mon, 28 May 2018 19:46:21 -0700

shadowsocks-libev (3.1.3-1) unstable; urgency=medium

* Fix a bug in UDP relay.
Expand Down
2 changes: 1 addition & 1 deletion doc/shadowsocks-libev.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ aes-128-ctr, aes-192-ctr, aes-256-ctr, bf-cfb,
camellia-128-cfb, camellia-192-cfb, camellia-256-cfb,
chacha20-ietf-poly1305, salsa20, chacha20 and chacha20-ietf.
+
The default cipher is 'rc4-md5'.
The default cipher is 'chacha20-ietf-poly1305'.
+
If built with PolarSSL or custom OpenSSL libraries, some of
these ciphers may not work.
Expand Down
2 changes: 1 addition & 1 deletion doc/ss-local.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ aes-128-ctr, aes-192-ctr, aes-256-ctr, bf-cfb,
camellia-128-cfb, camellia-192-cfb, camellia-256-cfb,
chacha20-ietf-poly1305, salsa20, chacha20 and chacha20-ietf.
+
The default cipher is 'rc4-md5'.
The default cipher is 'chacha20-ietf-poly1305'.
+
If built with PolarSSL or custom OpenSSL libraries, some of
these ciphers may not work.
Expand Down
4 changes: 3 additions & 1 deletion doc/ss-manager.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ Set the cipher or turn off the encryption.
+
To disable encryption use `none` as cipher.
+
Set the cipher.
+
*Shadowsocks-libev* accepts 18 different ciphers:
+
aes-128-gcm, aes-192-gcm, aes-256-gcm,
Expand All @@ -53,7 +55,7 @@ aes-128-ctr, aes-192-ctr, aes-256-ctr, bf-cfb,
camellia-128-cfb, camellia-192-cfb, camellia-256-cfb,
chacha20-ietf-poly1305, salsa20, chacha20 and chacha20-ietf.
+
The default cipher is 'rc4-md5'.
The default cipher is 'chacha20-ietf-poly1305'.
+
If built with PolarSSL or custom OpenSSL libraries, some of
these ciphers may not work.
Expand Down
2 changes: 1 addition & 1 deletion doc/ss-redir.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ aes-128-ctr, aes-192-ctr, aes-256-ctr, bf-cfb,
camellia-128-cfb, camellia-192-cfb, camellia-256-cfb,
chacha20-ietf-poly1305, salsa20, chacha20 and chacha20-ietf.
+
The default cipher is 'rc4-md5'.
The default cipher is 'chacha20-ietf-poly1305'.
+
If built with PolarSSL or custom OpenSSL libraries, some of
these ciphers may not work.
Expand Down
2 changes: 1 addition & 1 deletion doc/ss-tunnel.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ aes-128-ctr, aes-192-ctr, aes-256-ctr, bf-cfb,
camellia-128-cfb, camellia-192-cfb, camellia-256-cfb,
chacha20-ietf-poly1305, salsa20, chacha20 and chacha20-ietf.
+
The default cipher is 'rc4-md5'.
The default cipher is 'chacha20-ietf-poly1305'.
+
If built with PolarSSL or custom OpenSSL libraries, some of
these ciphers may not work.
Expand Down
8 changes: 4 additions & 4 deletions docker/alpine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ $ docker pull shadowsocks/shadowsocks-libev:edge
## Start a container

```bash
$ docker run -p8388:8388 -p8388:8388/udp -d --restart always shadowsocks/shadowsocks-libev:latest
$ docker run -p 8388:8388 -p 8388:8388/udp -d --restart always shadowsocks/shadowsocks-libev:latest
```
This starts a container of the latest release with all the default settings, which is equivalent to
```bash
Expand All @@ -43,7 +43,7 @@ In most cases you'll want to change a thing or two, for instance the port which

Here's an example to start a container that listens on `28388` (both TCP and UDP):
```bash
$ docker run -p28388:8388 -p28388:8388/udp -d --restart always shadowsocks/shadowsocks-libev
$ docker run -p 28388:8388 -p 28388:8388/udp -d --restart always shadowsocks/shadowsocks-libev
```

### With custom password
Expand All @@ -52,7 +52,7 @@ Another thing you may want to change is the password. To change that, you can pa

Here's an example to start a container with `9MLSpPmNt` as the password:
```bash
$ docker run -e PASSWORD=9MLSpPmNt -p8388:8388 -p8388:8388/udp -d --restart always shadowsocks/shadowsocks-libev
$ docker run -e PASSWORD=9MLSpPmNt -p 8388:8388 -p 8388:8388/udp -d --restart always shadowsocks/shadowsocks-libev
```
> :warning: Click [here][6] to generate a strong password to protect your server.
Expand All @@ -65,7 +65,7 @@ Besides `PASSWORD`, the image also defines the following environment variables t

Additional arguments supported by `ss-server` can be passed with the environment variable `ARGS`, for instance to start in verbose mode:
```bash
$ docker run -e ARGS=-v -p8388:8388 -p8388:8388/udp -d --restart always shadowsocks/shadowsocks-libev:latest
$ docker run -e ARGS=-v -p 8388:8388 -p 8388:8388/udp -d --restart always shadowsocks/shadowsocks-libev:latest
```

## Use docker-compose to manage (optional)
Expand Down
2 changes: 1 addition & 1 deletion docker/alpine/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
shadowsocks:
image: shadowsocks-libev
image: shadowsocks/shadowsocks-libev
ports:
- "8388:8388/tcp"
- "8388:8388/udp"
Expand Down
5 changes: 3 additions & 2 deletions docker/mingw/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ build_proj() {
host=$arch-w64-mingw32
prefix=${DIST}/$arch
dep=${PREFIX}/$arch
cpu="$(nproc --all)"

cd "$SRC"
if ! [ -d proj ]; then
Expand All @@ -49,7 +50,7 @@ build_proj() {
--with-cares="$dep" \
CFLAGS="-DCARES_STATICLIB -DPCRE_STATIC"
make clean
make LDFLAGS="-all-static -L${dep}/lib"
make -j$cpu LDFLAGS="-all-static -L${dep}/lib"
make install-strip

# Reference SIP003 plugin (Experimental)
Expand All @@ -72,7 +73,7 @@ build_proj() {
--disable-documentation \
--with-ev="$dep"
make clean
make LDFLAGS="-all-static -L${dep}/lib"
make -j$cpu LDFLAGS="-all-static -L${dep}/lib"
make install-strip
}

Expand Down
14 changes: 7 additions & 7 deletions docker/mingw/deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,18 @@ build_deps() {
host=$arch-w64-mingw32
prefix=${PREFIX}/$arch
args="--host=${host} --prefix=${prefix} --disable-shared --enable-static"
cpu="$(nproc --all)"

# libev
cd "$SRC/$LIBEV_SRC"
./configure $args
make clean
make install
make -j$cpu install

# mbedtls
cd "$SRC/$MBEDTLS_SRC"
make clean
make lib WINDOWS=1 CC="${host}-gcc" AR="${host}-ar"
make -j$cpu lib WINDOWS=1 CC="${host}-gcc" AR="${host}-ar"
## "make install" command from mbedtls
DESTDIR="${prefix}"
mkdir -p "${DESTDIR}"/include/mbedtls
Expand All @@ -54,21 +55,20 @@ build_deps() {
cd "$SRC/$SODIUM_SRC"
./configure $args
make clean
make install
make -j$cpu install

# pcre
cd "$SRC/$PCRE_SRC"
./configure $args \
--enable-jit --disable-cpp \
./configure $args --disable-cpp \
--enable-unicode-properties
make clean
make install
make -j$cpu install

# c-ares
cd "$SRC/$CARES_SRC"
./configure $args
make clean
make install
make -j$cpu install
}

dk_deps() {
Expand Down
36 changes: 0 additions & 36 deletions rpm/SOURCES/0001-systemd-services.patch

This file was deleted.

12 changes: 6 additions & 6 deletions rpm/SPECS/shadowsocks-libev.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@
%if 0%{?suse_version}
%global requires %{?requires} libcap-progs
%endif
%global project_desc shadowsocks-libev is a lightweight secured scoks5 proxy for embedded devices and low end boxes.
%global project_desc shadowsocks-libev is a lightweight secured socks5 proxy for embedded devices and low end boxes.

%if 0%{?fedora} >= 15 || 0%{?rhel} >=7 || 0%{?suse_version} >= 1210
%global use_systemd 1
%else
%global use_systemd 0
%endif

Name: shadowsocks-libev
Version: VERSION
Release: 1%{?dist}
Name: @NAME@
Version: @VERSION@
Release: @RELEASE@%{?dist}
Summary: A lightweight and secure socks5 proxy

Group: Applications/Internet
License: GPLv3+
URL: https://github.com/shadowsocks/%{name}
Source0: %{url}/archive/v%{version}.tar.gz
Source0: @SOURCE@

BuildRequires: make gcc pcre-devel asciidoc xmlto automake libtool mbedtls-devel libsodium-devel >= 1.0.4 libev-devel c-ares-devel
%if 0%{?suse_version}
Expand All @@ -48,7 +48,7 @@ BuildRequires: systemd
%{?project_desc}

%prep
%setup -q
%setup -q -n @NAME_VERSION@

%build
./autogen.sh
Expand Down
Loading

0 comments on commit e41db37

Please sign in to comment.