Giter Site home page Giter Site logo

shadowsocksr-backup / shadowsocksr-libev Goto Github PK

View Code? Open in Web Editor NEW
769.0 55.0 815.0 8.63 MB

libev port of ShadowsocksR

License: GNU General Public License v3.0

CMake 1.54% Makefile 10.38% Shell 9.45% M4 1.13% C 70.77% C++ 0.80% Roff 4.59% Batchfile 0.02% Assembly 1.28% PHP 0.01% Python 0.03%

shadowsocksr-libev's Introduction

shadowsocks-libev

Intro

Shadowsocks-libev is a lightweight secured SOCKS5 proxy for embedded devices and low-end boxes.

It is a port of Shadowsocks created by @clowwindy, which is maintained by @madeye and @linusyang.

Current version: 2.5.6 | Changelog

Travis CI: Travis CI

Features

Shadowsocks-libev is written in pure C and only depends on libev and OpenSSL or mbedTLS or PolarSSL.

In normal usage, the memory footprint is about 600KB and the CPU utilization is no more than 5% on a low-end router (Buffalo WHR-G300N V2 with a 400MHz MIPS CPU, 32MB memory and 4MB flash).

For a full list of feature comparison between different versions of shadowsocks, refer to the Wiki page.

Installation

Distribution-specific guide


Pre-build configure guide

For a complete list of avaliable configure-time option, try configure --help.

Using alternative crypto library

There are three crypto libraries available:

  • OpenSSL (default)
  • mbedTLS
  • PolarSSL (Deprecated)
mbedTLS

To build against mbedTLS, specify --with-crypto-library=mbedtls and --with-mbedtls=/path/to/mbedtls when running ./configure.

Windows users will need extra work when compiling mbedTLS library, see this issue for detail info.

PolarSSL (Deprecated)

To build against PolarSSL, specify --with-crypto-library=polarssl and --with-polarssl=/path/to/polarssl when running ./configure.

  • PolarSSL 1.2.5 or newer is required. Currently, PolarSSL does NOT support CAST5-CFB, DES-CFB, IDEA-CFB, RC2-CFB and SEED-CFB.
  • RC4 is only support by PolarSSL 1.3.0 or above.

Using shared library from system

Please specify --enable-system-shared-lib. This will replace the bundled libev, libsodium and libudns with the corresponding libraries installed in the system during compilation and linking.

Debian & Ubuntu

Install from repository

Note: The repositories doesn't always contain the latest version. Please build from source if you want the latest version (see below)

Shadowsocks-libev is available in the official repository for Debian 9("Stretch"), unstable, Ubuntu 16.10 and later derivatives:

sudo apt update
sudo apt install shadowsocks-libev

For Debian Jessie users, please install it from jessie-backports:

sudo sh -c 'printf "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list'
sudo apt update
sudo apt -t jessie-backports install shadowsocks-libev

Build deb package from source

Supported Platforms:

  • Debian 7 (see below), 8, 9, unstable
  • Ubuntu 14.04 (see below), Ubuntu 14.10, 15.04, 15.10 or higher

Note for Ubuntu 14.04 users: Packages built on Ubuntu 14.04 may be used in later Ubuntu versions. However, packages built on Debian 7/8/9 or Ubuntu 14.10+ cannot be installed on Ubuntu 14.04.

Note for Debian 7.x users: To build packages on Debian 7 (Wheezy), you need to enable debian-backports to install systemd-compatibility packages like dh-systemd or init-system-helpers. Please follow the instructions on Debian Backports.

This also means that you can only install those built packages on systems that have init-system-helpers installed.

Otherwise, try to build and install directly from source. See the Linux section below.

cd shadowsocks-libev
sudo apt-get install --no-install-recommends build-essential autoconf libtool libssl-dev \
    gawk debhelper dh-systemd init-system-helpers pkg-config asciidoc xmlto apg libpcre3-dev
dpkg-buildpackage -b -us -uc -i
cd ..
sudo dpkg -i shadowsocks-libev*.deb

Configure and start the service

# Edit the configuration file
sudo vim /etc/shadowsocks-libev/config.json

# Edit the default configuration for debian
sudo vim /etc/default/shadowsocks-libev

# Start the service
sudo /etc/init.d/shadowsocks-libev start    # for sysvinit, or
sudo systemctl start shadowsocks-libev      # for systemd

Fedora & RHEL

Supported distributions include

  • Fedora 22, 23, 24
  • RHEL 6, 7 and derivatives (including CentOS, Scientific Linux)

Install from repository

Enable repo via dnf:

su -c 'dnf copr enable librehat/shadowsocks'

Or download yum repo on Fedora Copr and put it inside /etc/yum.repos.d/. The release Epel is for RHEL and its derivatives.

Then, install shadowsocks-libev via dnf:

su -c 'dnf update'
su -c 'dnf install shadowsocks-libev'

or yum:

su -c 'yum update'
su -c 'yum install shadowsocks-libev'

OpenSUSE

Install from repository

Use the following command to install from repository.

sudo zypper install shadowsocks-libev

Build from source

You should install zlib-devel and libopenssl-devel first.

sudo zypper update
sudo zypper install zlib-devel libopenssl-devel

Then download the source package and compile.

git clone https://github.com/shadowsocks/shadowsocks-libev.git
cd shadowsocks-libev
./configure && make
sudo make install

Archlinux

sudo pacman -S shadowsocks-libev

Please refer to downstream PKGBUILD script for extra modifications and distribution-specific bugs.

NixOS

nix-env -iA nixos.shadowsocks-libev

Nix

nix-env -iA nixpkgs.shadowsocks-libev

Linux

For Unix-like systems, especially Debian-based systems, e.g. Ubuntu, Debian or Linux Mint, you can build the binary like this:

# Debian / Ubuntu
sudo apt-get install --no-install-recommends build-essential autoconf libtool libssl-dev libpcre3-dev asciidoc xmlto
# CentOS / Fedora / RHEL
sudo yum install gcc autoconf libtool automake make zlib-devel openssl-devel asciidoc xmlto
./configure && make
sudo make install

FreeBSD

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.

To enable shadowsocks-libev, add the following rc variable to your /etc/rc.conf file:

shadowsocks_libev_enable="YES"

Start the Shadowsocks server:

service shadowsocks_libev start

OpenWRT

The OpenWRT project is maintained here: openwrt-shadowsocks.

OS X

For OS X, use Homebrew to install or build.

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install shadowsocks-libev:

brew install shadowsocks-libev

Windows

For Windows, use either MinGW (msys) or Cygwin to build. At the moment, only ss-local is supported to build against MinGW (msys).

If you are using MinGW (msys), please download OpenSSL or PolarSSL source tarball to the home directory of msys, and build it like this (may take a few minutes):

OpenSSL

tar zxf openssl-1.0.1e.tar.gz
cd openssl-1.0.1e
./config --prefix="$HOME/prebuilt" --openssldir="$HOME/prebuilt/openssl"
make && make install

PolarSSL

tar zxf polarssl-1.3.2-gpl.tgz
cd polarssl-1.3.2
make lib WINDOWS=1
make install DESTDIR="$HOME/prebuilt"

Then, build the binary using the commands below, and all .exe files will be built at $HOME/ss/bin:

OpenSSL

./configure --prefix="$HOME/ss" --with-openssl="$HOME/prebuilt"
make && make install

PolarSSL

./configure --prefix="$HOME/ss" --with-crypto-library=polarssl --with-polarssl=$HOME/prebuilt
make && make install

Usage

For a detailed and complete list of all supported arguments, you may refer to the man pages of the applications, respectively.

    ss-[local|redir|server|tunnel]

       -s <server_host>           host name or ip address of your remote server

       -p <server_port>           port number of your remote server

       -l <local_port>            port number of your local server

       -k <password>              password of your remote server

       [-m <encrypt_method>]      encrypt method: table, rc4, rc4-md5,
                                  aes-128-cfb, aes-192-cfb, aes-256-cfb,
                                  bf-cfb, camellia-128-cfb, camellia-192-cfb,
                                  camellia-256-cfb, cast5-cfb, des-cfb, idea-cfb,
                                  rc2-cfb, seed-cfb, salsa20 ,chacha20 and
                                  chacha20-ietf

       [-f <pid_file>]            the file path to store pid

       [-t <timeout>]             socket timeout in seconds

       [-c <config_file>]         the path to config file

       [-i <interface>]           network interface to bind,
                                  not available in redir mode

       [-b <local_address>]       local address to bind,
                                  not available in server mode

       [-u]                       enable udprelay mode,
                                  TPROXY is required in redir mode

       [-U]                       enable UDP relay and disable TCP relay,
                                  not available in local mode

       [-A]                       enable onetime authentication

       [-L <addr>:<port>]         specify destination server address and port
                                  for local port forwarding,
                                  only available in tunnel mode

       [-d <addr>]                setup name servers for internal DNS resolver,
                                  only available in server mode

       [--fast-open]              enable TCP fast open,
                                  only available in local and server mode,
                                  with Linux kernel > 3.7.0

       [--acl <acl_file>]         config file of ACL (Access Control List)
                                  only available in local and server mode

       [--manager-address <addr>] UNIX domain socket address
                                  only available in server and manager mode

       [--executable <path>]      path to the executable of ss-server
                                  only available in manager mode

       [-v]                       verbose mode

notes:

    ss-redir provides a transparent proxy function and only works on the
    Linux platform with iptables.

Advanced usage

The latest shadowsocks-libev has provided a redir mode. You can configure your Linux-based box or router to proxy all TCP traffic transparently.

# Create new chain
root@Wrt:~# iptables -t nat -N SHADOWSOCKS
root@Wrt:~# iptables -t mangle -N SHADOWSOCKS

# Ignore your shadowsocks server's addresses
# It's very IMPORTANT, just be careful.
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 123.123.123.123 -j RETURN

# Ignore LANs and any other addresses you'd like to bypass the proxy
# See Wikipedia and RFC5735 for full list of reserved networks.
# See ashi009/bestroutetb for a highly optimized CHN route list.
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 0.0.0.0/8 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 10.0.0.0/8 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 127.0.0.0/8 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 169.254.0.0/16 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 172.16.0.0/12 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 192.168.0.0/16 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 224.0.0.0/4 -j RETURN
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 240.0.0.0/4 -j RETURN

# Anything else should be redirected to shadowsocks's local port
root@Wrt:~# iptables -t nat -A SHADOWSOCKS -p tcp -j REDIRECT --to-ports 12345

# Add any UDP rules
root@Wrt:~# ip route add local default dev lo table 100
root@Wrt:~# ip rule add fwmark 1 lookup 100
root@Wrt:~# iptables -t mangle -A SHADOWSOCKS -p udp --dport 53 -j TPROXY --on-port 12345 --tproxy-mark 0x01/0x01
root@Wrt:~# iptables -t mangle -A SHADOWSOCKS_MARK -p udp --dport 53 -j MARK --set-mark 1

# Apply the rules
root@Wrt:~# iptables -t nat -A OUTPUT -p tcp -j SHADOWSOCKS
root@Wrt:~# iptables -t mangle -A PREROUTING -j SHADOWSOCKS
root@Wrt:~# iptables -t mangle -A OUTPUT -j SHADOWSOCKS_MARK

# Start the shadowsocks-redir
root@Wrt:~# ss-redir -u -c /etc/config/shadowsocks.json -f /var/run/shadowsocks.pid

Shadowsocks over KCP

It's quite easy to use shadowsocks and KCP together with kcptun.

The goal of shadowsocks over KCP is to provide a fully configurable, UDP based protocol to improve poor connections, e.g. a high packet loss 3G network.

Setup your server

server_linux_amd64 -l :21 -t 127.0.0.1:443 --crypt none --mtu 1200 --nocomp --mode normal --dscp 46 &
ss-server -s 0.0.0.0 -p 443 -k passwd -m chacha20 -u

Setup your client

client_linux_amd64 -l 127.0.0.1:1090 -r <server_ip>:21 --crypt none --mtu 1200 --nocomp --mode normal --dscp 46 &
ss-local -s 127.0.0.1 -p 1090 -k passwd -m chacha20 -l 1080 -b 0.0.0.0 &
ss-local -s <server_ip> -p 443 -k passwd -m chacha20 -l 1080 -U -b 0.0.0.0

Security Tips

Although shadowsocks-libev can handle thousands of concurrent connections nicely, we still recommend setting up your server's firewall rules to limit connections from each user:

# Up to 32 connections are enough for normal usage
iptables -A INPUT -p tcp --syn --dport ${SHADOWSOCKS_PORT} -m connlimit --connlimit-above 32 -j REJECT --reject-with tcp-reset

License

Copyright (C) 2016 Max Lv [email protected]

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

shadowsocksr-libev's People

Contributors

breakwa11 avatar chion82 avatar clowwindy avatar crvv avatar dheminsgi avatar dndx avatar eataix avatar esdeathlove avatar h2nch2cooh avatar hdid avatar hosiet avatar huiyiqun avatar johnnysun avatar kery avatar kimw avatar krazyivan- avatar librehat avatar linusyang avatar lqs avatar madeye avatar mygod avatar nanpuyue avatar noisyfox avatar rogers0 avatar shadowsocksr-backup-release avatar tim-le avatar vfreex avatar vimagick avatar vinna avatar wongsyrone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shadowsocksr-libev's Issues

CRASH: [ssr-redir] In redir.c when auth_chain_b protocol is used

Please answer these questions before submitting your issue. Thanks!

What version of shadowsocks-libev are you using?

Commit: 1797741

What operating system are you using?

Ubuntu 16.04.02LTS

What did you do?

Run ./ss-redir -c /etc/shadowsocks.json and
Use iptable to redirect traffic to ss-redir

What did you expect to see?

No crash

What did you see instead?

ss-redir crash. Following is gdb output:
root@ubuntu:/shadowsocksr-libev/src# gdb ./ss-redir
GNU gdb (Ubuntu 7.11.1-0ubuntu1
16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./ss-redir...done.
(gdb) set args -c /etc/shadowsocks.json -v
(gdb) run
Starting program: /root/shadowsocksr-libev/src/ss-redir -c /etc/shadowsocks.json -v
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
2017-08-01 13:52:15 INFO: protocol auth_chain_b
2017-08-01 13:52:15 INFO: protocol_param
2017-08-01 13:52:15 INFO: method none
2017-08-01 13:52:15 INFO: obfs tls1.2_ticket_auth
2017-08-01 13:52:15 INFO: obfs_param
2017-08-01 13:52:15 INFO: initializing ciphers... none
2017-08-01 13:52:15 INFO: tcp port reuse enabled
2017-08-01 13:52:15 INFO: listening at 0.0.0.0:1080
2017-08-01 13:52:15 INFO: running from root user
2017-08-01 13:52:23 INFO: connect to 23.239.1.72:80
2017-08-01 13:52:23 INFO: redir to 23.239.1.72:80, len=132, recv=132
*** Error in `/root/shadowsocksr-libev/src/ss-redir': free(): invalid next size (normal): 0x00000000006810b0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7ffff6eaa7e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7ffff6eb337a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7ffff6eb753c]
/root/shadowsocksr-libev/src/ss-redir[0x408f01]
/root/shadowsocksr-libev/src/ss-redir[0x412b4d]
/root/shadowsocksr-libev/src/ss-redir[0x426ee4]
/root/shadowsocksr-libev/src/ss-redir[0x427dd3]
/root/shadowsocksr-libev/src/ss-redir[0x404645]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7ffff6e53830]
/root/shadowsocksr-libev/src/ss-redir[0x405299]
======= Memory map: ========
00400000-00473000 r-xp 00000000 08:01 6037137 /root/shadowsocksr-libev/src/ss-redir
00673000-00674000 r--p 00073000 08:01 6037137 /root/shadowsocksr-libev/src/ss-redir
00674000-00675000 rw-p 00074000 08:01 6037137 /root/shadowsocksr-libev/src/ss-redir
00675000-0069b000 rw-p 00000000 00:00 0 [heap]
7ffff0000000-7ffff0021000 rw-p 00000000 00:00 0
7ffff0021000-7ffff4000000 ---p 00000000 00:00 0
7ffff6a19000-7ffff6a2f000 r-xp 00000000 08:01 3801609 /lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff6a2f000-7ffff6c2e000 ---p 00016000 08:01 3801609 /lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff6c2e000-7ffff6c2f000 rw-p 00015000 08:01 3801609 /lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff6c2f000-7ffff6c32000 r-xp 00000000 08:01 3805618 /lib/x86_64-linux-gnu/libdl-2.23.so
7ffff6c32000-7ffff6e31000 ---p 00003000 08:01 3805618 /lib/x86_64-linux-gnu/libdl-2.23.so
7ffff6e31000-7ffff6e32000 r--p 00002000 08:01 3805618 /lib/x86_64-linux-gnu/libdl-2.23.so
7ffff6e32000-7ffff6e33000 rw-p 00003000 08:01 3805618 /lib/x86_64-linux-gnu/libdl-2.23.so
7ffff6e33000-7ffff6ff3000 r-xp 00000000 08:01 3805629 /lib/x86_64-linux-gnu/libc-2.23.so
7ffff6ff3000-7ffff71f3000 ---p 001c0000 08:01 3805629 /lib/x86_64-linux-gnu/libc-2.23.so
7ffff71f3000-7ffff71f7000 r--p 001c0000 08:01 3805629 /lib/x86_64-linux-gnu/libc-2.23.so
7ffff71f7000-7ffff71f9000 rw-p 001c4000 08:01 3805629 /lib/x86_64-linux-gnu/libc-2.23.so
7ffff71f9000-7ffff71fd000 rw-p 00000000 00:00 0
7ffff71fd000-7ffff7215000 r-xp 00000000 08:01 3805612 /lib/x86_64-linux-gnu/libpthread-2.23.so
7ffff7215000-7ffff7414000 ---p 00018000 08:01 3805612 /lib/x86_64-linux-gnu/libpthread-2.23.so
7ffff7414000-7ffff7415000 r--p 00017000 08:01 3805612 /lib/x86_64-linux-gnu/libpthread-2.23.so
7ffff7415000-7ffff7416000 rw-p 00018000 08:01 3805612 /lib/x86_64-linux-gnu/libpthread-2.23.so
7ffff7416000-7ffff741a000 rw-p 00000000 00:00 0
7ffff741a000-7ffff7488000 r-xp 00000000 08:01 3801663 /lib/x86_64-linux-gnu/libpcre.so.3.13.2
7ffff7488000-7ffff7688000 ---p 0006e000 08:01 3801663 /lib/x86_64-linux-gnu/libpcre.so.3.13.2
7ffff7688000-7ffff7689000 r--p 0006e000 08:01 3801663 /lib/x86_64-linux-gnu/libpcre.so.3.13.2
7ffff7689000-7ffff768a000 rw-p 0006f000 08:01 3801663 /lib/x86_64-linux-gnu/libpcre.so.3.13.2
7ffff768a000-7ffff7792000 r-xp 00000000 08:01 3805624 /lib/x86_64-linux-gnu/libm-2.23.so
7ffff7792000-7ffff7991000 ---p 00108000 08:01 3805624 /lib/x86_64-linux-gnu/libm-2.23.so
7ffff7991000-7ffff7992000 r--p 00107000 08:01 3805624 /lib/x86_64-linux-gnu/libm-2.23.so
7ffff7992000-7ffff7993000 rw-p 00108000 08:01 3805624 /lib/x86_64-linux-gnu/libm-2.23.so
7ffff7993000-7ffff7bad000 r-xp 00000000 08:01 3801562 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7ffff7bad000-7ffff7dac000 ---p 0021a000 08:01 3801562 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7ffff7dac000-7ffff7dc8000 r--p 00219000 08:01 3801562 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7ffff7dc8000-7ffff7dd4000 rw-p 00235000 08:01 3801562 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7ffff7dd4000-7ffff7dd7000 rw-p 00000000 00:00 0
7ffff7dd7000-7ffff7dfd000 r-xp 00000000 08:01 3805607 /lib/x86_64-linux-gnu/ld-2.23.so
7ffff7fe8000-7ffff7fed000 rw-p 00000000 00:00 0
7ffff7ff5000-7ffff7ff8000 rw-p 00000000 00:00 0
7ffff7ff8000-7ffff7ffa000 r--p 00000000 00:00 0 [vvar]
7ffff7ffa000-7ffff7ffc000 r-xp 00000000 00:00 0 [vdso]
7ffff7ffc000-7ffff7ffd000 r--p 00025000 08:01 3805607 /lib/x86_64-linux-gnu/ld-2.23.so
7ffff7ffd000-7ffff7ffe000 rw-p 00026000 08:01 3805607 /lib/x86_64-linux-gnu/ld-2.23.so
7ffff7ffe000-7ffff7fff000 rw-p 00000000 00:00 0
7ffffffde000-7ffffffff000 rw-p 00000000 00:00 0 [stack]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]

Program received signal SIGABRT, Aborted.
0x00007ffff6e68428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x00007ffff6e68428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1 0x00007ffff6e6a02a in __GI_abort () at abort.c:89
#2 0x00007ffff6eaa7ea in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7ffff6fc3e98 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
#3 0x00007ffff6eb337a in malloc_printerr (ar_ptr=, ptr=, str=0x7ffff6fc3ff0 "free(): invalid next size (normal)", action=3) at malloc.c:5006
#4 _int_free (av=, p=, have_lock=0) at malloc.c:3867
#5 0x00007ffff6eb753c in __GI___libc_free (mem=) at malloc.c:2968
#6 0x0000000000408f01 in bfree (ptr=ptr@entry=0x7fffffffdff0) at encrypt.c:279
#7 0x0000000000412b4d in remote_send_cb (loop=0x6791a0 <default_loop_struct>, w=0x67c2c0, revents=) at redir.c:567
#8 0x0000000000426ee4 in ev_invoke_pending (loop=0x6791a0 <default_loop_struct>) at ev.c:3288
#9 0x0000000000427dd3 in ev_run (loop=0x6791a0 <default_loop_struct>, flags=0) at ev.c:3688
#10 0x0000000000404645 in main (argc=, argv=) at redir.c:1469
(gdb)

What is your config in detail (with all sensitive info masked)?

{
"server":"xxx",
"server_port":"xxx",
"local_address":"0.0.0.0",
"local_port":1080,
"password":"xxx",
"timeout":120,
"method":"none",
"protocol":"auth_chain_b",
"protocol_param":"",
"obfs":"tls1.2_ticket_auth",
"obfs_param":"",
"fast_open":false
}

iOS能不能用

Please answer these questions before submitting your issue. Thanks!

What version of shadowsocks-libev are you using?

What operating system are you using?

What did you do?

What did you expect to see?

What did you see instead?

What is your config in detail (with all sensitive info masked)?

Can't build ss-server

Please answer these questions before submitting your issue. Thanks!

What version of shadowsocks-libev are you using?

e2373d7

What operating system are you using?

CentOS 6.x 64bit

What did you do?

compile ss-server, I found commit "Don't compile ss-manager ss-server and ss-tunnel", but how can i use ss-server?

What did you expect to see?

compile ss-server successful

What did you see instead?

compile successful but no ss-server ss-manager ss-tunnel

What is your config in detail (with all sensitive info masked)?

none

warning:dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

i just got error when compiling shadowsocks
src/udprelay.c:557:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
ev_io_init(&ctx->io, server_recv_cb, fd, EV_READ);
^
src/udprelay.c:557:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
src/udprelay.c:557:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
src/udprelay.c:557:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
In file included from ./libcork/core/byte-order.h:16:0,
from ./libcork/core/hash.h:16,
from ./libcork/core/callbacks.h:14,
from ./libcork/core/allocator.h:18,
from ./libcork/core.h:15,
from src/udprelay.c:50:
src/udprelay.c: In function 'remote_timeout_cb':
./libcork/core/types.h:79:59: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]
((struct_type *) (- offsetof(struct_type, field_name) +
^
src/udprelay.c:604:11: note: in expansion of macro 'cork_container_of'
= cork_container_of(watcher, remote_ctx_t, watcher);
^
src/udprelay.c: In function 'remote_recv_cb':
src/udprelay.c:710:32: warning: cast increases required alignment of target type [-Wcast-align]
remote_ctx_t *remote_ctx = (remote_ctx_t *)w;
^
src/udprelay.c: In function 'server_recv_cb':
src/udprelay.c:1259:17: warning: implicit declaration of function 'set_broadcast' [-Wimplicit-function-declaration]
set_broadcast(remotefd);
^
src/udprelay.c:1279:35: error: 'remote_ctx_t' has no member named 'dst_addr'
memcpy(&remote_ctx->dst_addr, &dst_addr, sizeof(struct sockaddr_storage));
^
compilation terminated due to -Wfatal-errors.

How to install on buntu14.04?(如何在Ubuntu14.04安装?)

Please answer these questions before submitting your issue. Thanks!

What version of shadowsocks-libev are you using?

What operating system are you using?

Ubuntu 14.04

What did you do?

What did you expect to see?

What did you see instead?

What is your config in detail (with all sensitive info masked)?

ERROR: [udp] remote_recv_sendto: 提供了一个无效的参数

Please answer these questions before submitting your issue. Thanks!

What version of shadowsocks-libev are you using?

2.5.6

What operating system are you using?

win10

What did you do?

我在windows使用msys编译ssr local,运行访问udp包的时候,报如下错误:
2017-07-28 23:10:45 INFO: [udp] cache hit: 64.37.170.208:20042 <-> 127.0.0.1:56530
2017-07-28 23:10:45 INFO: [udp] cache hit: 64.37.170.208:20042 <-> 127.0.0.1:56530
2017-07-28 23:10:45 ERROR: [udp] remote_recv_sendto: 提供了一个无效的参数。

2017-07-28 23:10:45 ERROR: [udp] remote_recv_sendto: 提供了一个无效的参数。

2017-07-28 23:10:45 ERROR: [udp] remote_recv_sendto: 提供了一个无效的参数。

2017-07-28 23:10:45 ERROR: [udp] remote_recv_sendto: 提供了一个无效的参数。

2017-07-28 23:10:45 ERROR: [udp] remote_recv_sendto: 提供了一个无效的参数。

2017-07-28 23:10:45 ERROR: [udp] remote_recv_sendto: 提供了一个无效的参数。

2017-07-28 23:10:45 ERROR: [udp] remote_recv_sendto: 提供了一个无效的参数。

2017-07-28 23:10:45 ERROR: [udp] remote_recv_sendto: 提供了一个无效的参数。

What did you expect to see?

What did you see instead?

What is your config in detail (with all sensitive info masked)?

ubuntu下不显示托盘图标

系统ubuntu desktop 19,用appimage安装之后,不显示托盘小飞机图标,但是可以运行,尝试过安装 libappindicator1,但是还是无效

deepin下如何配置啊

Please answer these questions before submitting your issue. Thanks!

What version of shadowsocks-libev are you using?latest

What operating system are you using?deepin

What did you do?

What did you expect to see?

What did you see instead?

What is your config in detail (with all sensitive info masked)?

Ubuntu 16.04 multiple definition of `tls_protocol'

Please answer these questions before submitting your issue. Thanks!

What version of shadowsocks-libev are you using?

The lastest version from you github.

What operating system are you using?

Ubuntu 16.04

What did you do?

I downloaded your code using git clone.
Then I followed this part.

# Debian / Ubuntu
sudo apt-get install --no-install-recommends build-essential autoconf libtool libssl-dev libpcre3-dev asciidoc xmlto

./configure && make
sudo make install

Probably I forgot to use make install.

Then I tried to configure the configuration file.

# Edit the configuration file
sudo nano /etc/shadowsocks-libev/config.json

In this part I filled the configuration.

Then I

# Edit the default configuration for debian
sudo vim /etc/default/shadowsocks-libev

In this part I found this default configuration for debian is empty.

And I was not able to start service:

# Start the service
sudo /etc/init.d/shadowsocks-libev start    # for sysvinit, or

Then I tried:

sudo apt-get install --no-install-recommends build-essential autoconf libtool libssl-dev \
    gawk debhelper dh-systemd init-system-helpers pkg-config asciidoc xmlto apg libpcre3-dev
dpkg-buildpackage -b -us -uc -i

but I got the multiple definition error.

What did you expect to see?

I expect to get a solution on how to make the ss-local working with configuration file.

What did you see instead?

I saw the multiple definition message.

What is your config in detail (with all sensitive info masked)?


{
"weight" : ,
"title" : "",
"host" : "
",
"ota" : "",
"file" : "",
"uuid" : "
",
"obfs" : "tls1.2_ticket_auth",
"flag" : "RU",
"method" : "chacha20",
"type" : "ShadowsocksR",
"user" : "",
"port" : "
",
"protoParam" : "",
"proto" : "",
"password" : "
",
"data" : "https://www.***********.com
***************&token=****************",
"obfsParam" : ""
}

configure: error: "zlib header files not found."

Please answer these questions before submitting your issue. Thanks!

What version of shadowsocks-libev are you using?

2.5.6

What operating system are you using?

ubuntu18.04

What did you do?

./confirgure && make

What did you expect to see?

configure successfully.

What did you see instead?

checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking whether make supports nested variables... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking whether make supports nested variables... (cached) yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... no
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for pcre-config... pcre-config
checking for pcre headers in ... not found
checking for library containing pcre_exec... -lpcre
checking pcre.h usability... yes
checking pcre.h presence... yes
checking for pcre.h... yes
checking pcre/pcre.h usability... no
checking pcre/pcre.h presence... no
checking for pcre/pcre.h... no
checking for asciidoc... /usr/bin/asciidoc
checking for xmlto... /usr/bin/xmlto
checking for gzip... /bin/gzip
checking for rm... /bin/rm
checking for mv... /bin/mv
checking for a sed that does not truncate output... (cached) /bin/sed
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking sys/inotify.h usability... yes
checking sys/inotify.h presence... yes
checking for sys/inotify.h... yes
checking sys/epoll.h usability... yes
checking sys/epoll.h presence... yes
checking for sys/epoll.h... yes
checking sys/event.h usability... no
checking sys/event.h presence... no
checking for sys/event.h... no
checking port.h usability... no
checking port.h presence... no
checking for port.h... no
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/eventfd.h usability... yes
checking sys/eventfd.h presence... yes
checking for sys/eventfd.h... yes
checking sys/signalfd.h usability... yes
checking sys/signalfd.h presence... yes
checking for sys/signalfd.h... yes
checking for inotify_init... yes
checking for epoll_ctl... yes
checking for kqueue... no
checking for port_create... no
checking for poll... yes
checking for select... yes
checking for eventfd... yes
checking for signalfd... yes
checking for clock_gettime... yes
checking for nanosleep... yes
checking for library containing floor... -lm
checking for thread local storage (TLS) class... __thread
checking zlib.h usability... no
checking zlib.h presence... no
checking for zlib.h... no
configure: error: "zlib header files not found."

What is your config in detail (with all sensitive info masked)?

ss-redir混淆参数

Please answer these questions before submitting your issue. Thanks!

What version of shadowsocks-libev are you using?

2.5.6

What operating system are you using?

ubuntu16.04

What did you do?

shadowsocksr-libev的ss-redir支持混淆参数吗?

What did you expect to see?

是否有文档

What did you see instead?

What is your config in detail (with all sensitive info masked)?

How to setup on ubuntu ? i have installed but dont know to start the vpn

Please answer these questions before submitting your issue. Thanks!

What version of shadowsocks-libev are you using?

the latest

What operating system are you using?

Ubuntu

What did you do?

Nothing yet

What did you expect to see?

i just want to use internet

What did you see instead?

nothing

What is your config in detail (with all sensitive info masked)?

装错了,这个怎么卸载,我也没看出来他安装到哪儿去了

Please answer these questions before submitting your issue. Thanks!
装错了,这个怎么卸载,我也没看出来他安装到哪儿去了

What version of shadowsocks-libev are you using?

What operating system are you using?

What did you do?

What did you expect to see?

What did you see instead?

What is your config in detail (with all sensitive info masked)?

Compile error: '%s' directive writing up to 63 bytes into a region of size between 53 and 179 [-Werror=format-overflow=]

Please answer these questions before submitting your issue. Thanks!

What version of shadowsocks-libev are you using?

shadowsocksr-libev 2.4.1.366.gbf324d8-1 (2020年03月27日 星期五 12时59分51秒)

What operating system are you using?

Archlinux 64bit.

What did you do?

Install shadowsocksr-libev from AUR using yaourt (i.e. compile from source).

What did you expect to see?

Install success.

What did you see instead?

acl.c: In function 'init_block_list':
acl.c:74:90: error: '%s' directive writing up to 63 bytes into a region of size between 50 and 176 [-Werror=format-overflow=]
   74 |     "ip6tables -N %s; ip6tables -F %s; ip6tables -A OUTPUT -p tcp --tcp-flags RST RST -j %s";
      |                                                                                          ^~
......
  158 |         sprintf(cli, ip6tables_init_chain, chain_name, chain_name, chain_name);
      |                                                                    ~~~~~~~~~~             
In file included from /usr/include/stdio.h:867,
                 from ../libipset/include/ipset/ipset.h:14,
                 from acl.c:23:
/usr/include/bits/stdio2.h:36:10: note: '__builtin___sprintf_chk' output between 81 and 270 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
acl.c:67:87: error: '%s' directive writing up to 63 bytes into a region of size between 53 and 179 [-Werror=format-overflow=]
   67 |     "iptables -N %s; iptables -F %s; iptables -A OUTPUT -p tcp --tcp-flags RST RST -j %s";
      |                                                                                       ^~
......
  160 |         sprintf(cli, iptables_init_chain, chain_name, chain_name, chain_name);
      |                                                                   ~~~~~~~~~~           
In file included from /usr/include/stdio.h:867,
                 from ../libipset/include/ipset/ipset.h:14,
                 from acl.c:23:
/usr/include/bits/stdio2.h:36:10: note: '__builtin___sprintf_chk' output between 78 and 267 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
acl.c:92:5: error: ';      firewall-cmd --direct...' directive writing 88 bytes into a region of size between 33 and 159 [-Werror=format-overflow=]
   92 |     "firewall-cmd --direct --add-chain ipv6 filter %s; \
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   93 |      firewall-cmd --direct --passthrough ipv6 -F %s; \
      |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   94 |      firewall-cmd --direct --passthrough ipv6 -A OUTPUT -p tcp --tcp-flags RST RST -j %s";
      |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../libipset/include/ipset/ipset.h:14,
                 from acl.c:23:
/usr/include/bits/stdio2.h:36:10: note: '__builtin___sprintf_chk' output between 186 and 375 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
acl.c:81:5: error: ';      firewall-cmd --direct...' directive writing 88 bytes into a region of size between 33 and 159 [-Werror=format-overflow=]
   81 |     "firewall-cmd --direct --add-chain ipv4 filter %s; \
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   82 |      firewall-cmd --direct --passthrough ipv4 -F %s; \
      |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   83 |      firewall-cmd --direct --passthrough ipv4 -A OUTPUT -p tcp --tcp-flags RST RST -j %s";
      |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../libipset/include/ipset/ipset.h:14,
                 from acl.c:23:
/usr/include/bits/stdio2.h:36:10: note: '__builtin___sprintf_chk' output between 186 and 375 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
acl.c: In function 'free_block_list':
acl.c:96:5: error: '%s' directive writing up to 63 bytes into a region of size between 61 and 124 [-Werror=format-overflow=]
   96 |     "firewall-cmd --direct --passthrough ipv6 -D OUTPUT -p tcp --tcp-flags RST RST -j %s; \
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   97 |      firewall-cmd --direct --passthrough ipv6 -F %s; \
      |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   98 |      firewall-cmd --direct --remove-chain ipv6 filter %s";
      |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......
  184 |         sprintf(cli, firewalld6_remove_chain, chain_name, chain_name, chain_name);
      |                                                           ~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../libipset/include/ipset/ipset.h:14,
                 from acl.c:23:
/usr/include/bits/stdio2.h:36:10: note: '__builtin___sprintf_chk' output between 189 and 378 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
acl.c:85:5: error: '%s' directive writing up to 63 bytes into a region of size between 61 and 124 [-Werror=format-overflow=]
   85 |     "firewall-cmd --direct --passthrough ipv4 -D OUTPUT -p tcp --tcp-flags RST RST -j %s; \
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   86 |      firewall-cmd --direct --passthrough ipv4 -F %s; \
      |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   87 |      firewall-cmd --direct --remove-chain ipv4 filter %s";
      |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......
  186 |         sprintf(cli, firewalld_remove_chain, chain_name, chain_name, chain_name);
      |                                                          ~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from ../libipset/include/ipset/ipset.h:14,
                 from acl.c:23:
/usr/include/bits/stdio2.h:36:10: note: '__builtin___sprintf_chk' output between 189 and 378 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
acl.c:76:90: error: '%s' directive writing up to 63 bytes into a region of size between 50 and 176 [-Werror=format-overflow=]
   76 |     "ip6tables -D OUTPUT -p tcp --tcp-flags RST RST -j %s; ip6tables -F %s; ip6tables -X %s";
      |                                                                                          ^~
......
  179 |         sprintf(cli, ip6tables_remove_chain, chain_name, chain_name, chain_name);
      |                                                                      ~~~~~~~~~~           
In file included from /usr/include/stdio.h:867,
                 from ../libipset/include/ipset/ipset.h:14,
                 from acl.c:23:
/usr/include/bits/stdio2.h:36:10: note: '__builtin___sprintf_chk' output between 81 and 270 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
acl.c:69:87: error: '%s' directive writing up to 63 bytes into a region of size between 53 and 179 [-Werror=format-overflow=]
   69 |     "iptables -D OUTPUT -p tcp --tcp-flags RST RST -j %s; iptables -F %s; iptables -X %s";
      |                                                                                       ^~
......
  181 |         sprintf(cli, iptables_remove_chain, chain_name, chain_name, chain_name);
      |                                                                     ~~~~~~~~~~         
In file included from /usr/include/stdio.h:867,
                 from ../libipset/include/ipset/ipset.h:14,
                 from acl.c:23:
/usr/include/bits/stdio2.h:36:10: note: '__builtin___sprintf_chk' output between 78 and 267 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:778:libshadowsocks_libev_la-acl.lo] 错误 1
make[2]: 离开目录“/tmp/yaourt-tmp-bate/aur-shadowsocksr-libev/src/shadowsocksr-libev/src”
make[1]: *** [Makefile:478:all-recursive] 错误 1
make[1]: 离开目录“/tmp/yaourt-tmp-bate/aur-shadowsocksr-libev/src/shadowsocksr-libev”
make: *** [Makefile:387:all] 错误 2

What is your config in detail (with all sensitive info masked)?

Not installed yet.

ubuntu 下编译不过啊

ubuntu 16.04 按照教程编译,最后报错

.libs/libshadowsocks_libev_la-tls.o:(.data.rel.ro.local+0x10): multiple definition of `tls_protocol'
.libs/libshadowsocks_libev_la-local.o:(.bss+0x20): first defined here
collect2: error: ld returned 1 exit status
Makefile:573: recipe for target 'libshadowsocks-libev.la' failed
make[3]: *** [libshadowsocks-libev.la] Error 1
make[3]: Leaving directory '/home/selphy/shadowsocksr-libev/src'
Makefile:478: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/selphy/shadowsocksr-libev'
Makefile:387: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/selphy/shadowsocksr-libev'
dh_auto_build: make -j1 returned exit code 2
debian/rules:25: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: 错误: debian/rules build 提供错误退出状态 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.