commit
f7288e3490
14 changed files with 378 additions and 0 deletions
5
debian/changelog
vendored
Normal file
5
debian/changelog
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
shadowsocks (2.1.0-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* Initial release (Closes: 758900)
|
||||||
|
|
||||||
|
-- Shell.Xu <shell909090@gmail.com> Sat, 23 Aug 2014 00:56:04 +0800
|
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
8
|
11
debian/config.json
vendored
Normal file
11
debian/config.json
vendored
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"server":"my_server_ip",
|
||||||
|
"server_port":8388,
|
||||||
|
"local_address": "127.0.0.1",
|
||||||
|
"local_port":1080,
|
||||||
|
"password":"mypassword",
|
||||||
|
"timeout":300,
|
||||||
|
"method":"aes-256-cfb",
|
||||||
|
"fast_open": false,
|
||||||
|
"workers": 1
|
||||||
|
}
|
18
debian/control
vendored
Normal file
18
debian/control
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
Source: shadowsocks
|
||||||
|
Section: python
|
||||||
|
Priority: extra
|
||||||
|
Maintainer: Shell.Xu <shell909090@gmail.com>
|
||||||
|
Build-Depends: debhelper (>= 8), python, python-setuptools
|
||||||
|
Standards-Version: 3.9.3
|
||||||
|
Homepage: https://github.com/clowwindy/shadowsocks
|
||||||
|
#Vcs-Git: git://git.debian.org/collab-maint/shadowsocks.git
|
||||||
|
#Vcs-Browser: http://git.debian.org/?p=collab-maint/shadowsocks.git;a=summary
|
||||||
|
|
||||||
|
Package: shadowsocks
|
||||||
|
Architecture: all
|
||||||
|
Depends: ${shlibs:Depends}, ${misc:Depends}, python, python-setuptools, python-m2crypto
|
||||||
|
Description: Fast tunnel proxy that helps you bypass firewalls
|
||||||
|
A secure socks5 proxy, designed to protect your Internet traffic.
|
||||||
|
.
|
||||||
|
This package contain local and server part of shadowsocks, a fast,
|
||||||
|
powerful tunnel proxy to bypass firewalls.
|
45
debian/copyright
vendored
Normal file
45
debian/copyright
vendored
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
|
Upstream-Name: shadowsocks
|
||||||
|
Source: https://github.com/clowwindy/shadowsocks
|
||||||
|
|
||||||
|
Files: *
|
||||||
|
Copyright: 2014 clowwindy <clowwindy42@gmail.com>
|
||||||
|
License: MIT
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
.
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
.
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
|
Files: debian/*
|
||||||
|
Copyright: 2014 Shell.Xu <shell909090@gmail.com>
|
||||||
|
License: MIT
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
.
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
.
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
2
debian/docs
vendored
Normal file
2
debian/docs
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
README.md
|
||||||
|
README.rst
|
149
debian/init.d
vendored
Normal file
149
debian/init.d
vendored
Normal file
|
@ -0,0 +1,149 @@
|
||||||
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: shadowsocks
|
||||||
|
# Required-Start: $network $local_fs $remote_fs
|
||||||
|
# Required-Stop: $network $local_fs $remote_fs
|
||||||
|
# Default-Start: 2 3 4 5
|
||||||
|
# Default-Stop: 0 1 6
|
||||||
|
# Short-Description: Fast tunnel proxy that helps you bypass firewalls
|
||||||
|
# Description: A secure socks5 proxy, designed to protect your Internet traffic.
|
||||||
|
# This package contain local and server part of shadowsocks, a fast,
|
||||||
|
# powerful tunnel proxy to bypass firewalls.
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
# Author: Shell.Xu <shell909090@gmail.com>
|
||||||
|
|
||||||
|
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
||||||
|
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||||
|
DESC=shadowsocks # Introduce a short description here
|
||||||
|
NAME=shadowsocks # Introduce the short server's name here
|
||||||
|
DAEMON=/usr/bin/ssserver # Introduce the server's location here
|
||||||
|
DAEMON_ARGS="" # Arguments to run the daemon with
|
||||||
|
PIDFILE=/var/run/$NAME.pid
|
||||||
|
SCRIPTNAME=/etc/init.d/$NAME
|
||||||
|
LOGFILE=/var/log/$NAME.log
|
||||||
|
|
||||||
|
# Exit if the package is not installed
|
||||||
|
[ -x $DAEMON ] || exit 0
|
||||||
|
|
||||||
|
# Read configuration variable file if it is present
|
||||||
|
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
|
||||||
|
|
||||||
|
# Load the VERBOSE setting and other rcS variables
|
||||||
|
. /lib/init/vars.sh
|
||||||
|
|
||||||
|
# Define LSB log_* functions.
|
||||||
|
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
||||||
|
. /lib/lsb/init-functions
|
||||||
|
|
||||||
|
#
|
||||||
|
# Function that starts the daemon/service
|
||||||
|
#
|
||||||
|
do_start()
|
||||||
|
{
|
||||||
|
# Return
|
||||||
|
# 0 if daemon has been started
|
||||||
|
# 1 if daemon was already running
|
||||||
|
# 2 if daemon could not be started
|
||||||
|
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON \
|
||||||
|
--background --make-pidfile --chdir / --chuid $USERID --no-close --test > /dev/null \
|
||||||
|
|| return 1
|
||||||
|
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON \
|
||||||
|
--background --make-pidfile --chdir / --chuid $USERID --no-close -- \
|
||||||
|
$DAEMON_ARGS $DAEMON_OPTS >> $LOGFILE 2>&1 \
|
||||||
|
|| return 2
|
||||||
|
# Add code here, if necessary, that waits for the process to be ready
|
||||||
|
# to handle requests from services started subsequently which depend
|
||||||
|
# on this one. As a last resort, sleep for some time.
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Function that stops the daemon/service
|
||||||
|
#
|
||||||
|
do_stop()
|
||||||
|
{
|
||||||
|
# Return
|
||||||
|
# 0 if daemon has been stopped
|
||||||
|
# 1 if daemon was already stopped
|
||||||
|
# 2 if daemon could not be stopped
|
||||||
|
# other if a failure occurred
|
||||||
|
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
|
||||||
|
RETVAL="$?"
|
||||||
|
[ "$RETVAL" = 2 ] && return 2
|
||||||
|
# Many daemons don't delete their pidfiles when they exit.
|
||||||
|
rm -f $PIDFILE
|
||||||
|
return "$RETVAL"
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Function that sends a SIGHUP to the daemon/service
|
||||||
|
#
|
||||||
|
do_reload() {
|
||||||
|
#
|
||||||
|
# If the daemon can reload its configuration without
|
||||||
|
# restarting (for example, when it is sent a SIGHUP),
|
||||||
|
# then implement that here.
|
||||||
|
#
|
||||||
|
start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
|
||||||
|
do_start
|
||||||
|
case "$?" in
|
||||||
|
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||||
|
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
||||||
|
do_stop
|
||||||
|
case "$?" in
|
||||||
|
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||||
|
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
|
||||||
|
;;
|
||||||
|
#reload|force-reload)
|
||||||
|
#
|
||||||
|
# If do_reload() is not implemented then leave this commented out
|
||||||
|
# and leave 'force-reload' as an alias for 'restart'.
|
||||||
|
#
|
||||||
|
#log_daemon_msg "Reloading $DESC" "$NAME"
|
||||||
|
#do_reload
|
||||||
|
#log_end_msg $?
|
||||||
|
#;;
|
||||||
|
restart|force-reload)
|
||||||
|
#
|
||||||
|
# If the "reload" option is implemented then remove the
|
||||||
|
# 'force-reload' alias
|
||||||
|
#
|
||||||
|
log_daemon_msg "Restarting $DESC" "$NAME"
|
||||||
|
do_stop
|
||||||
|
case "$?" in
|
||||||
|
0|1)
|
||||||
|
do_start
|
||||||
|
case "$?" in
|
||||||
|
0) log_end_msg 0 ;;
|
||||||
|
1) log_end_msg 1 ;; # Old process is still running
|
||||||
|
*) log_end_msg 1 ;; # Failed to start
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# Failed to stop
|
||||||
|
log_end_msg 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
|
||||||
|
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
|
||||||
|
exit 3
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
:
|
1
debian/install
vendored
Normal file
1
debian/install
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
debian/config.json etc/shadowsocks/
|
13
debian/rules
vendored
Executable file
13
debian/rules
vendored
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/usr/bin/make -f
|
||||||
|
# -*- makefile -*-
|
||||||
|
# Sample debian/rules that uses debhelper.
|
||||||
|
# This file was originally written by Joey Hess and Craig Small.
|
||||||
|
# As a special exception, when this file is copied by dh-make into a
|
||||||
|
# dh-make output file, you may use that output file without restriction.
|
||||||
|
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
||||||
|
|
||||||
|
# Uncomment this to turn on verbose mode.
|
||||||
|
#export DH_VERBOSE=1
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@ --with python2 --buildsystem=python_distutils
|
12
debian/shadowsocks.default
vendored
Normal file
12
debian/shadowsocks.default
vendored
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# Defaults for shadowsocks initscript
|
||||||
|
# sourced by /etc/init.d/shadowsocks
|
||||||
|
# installed at /etc/default/shadowsocks by the maintainer scripts
|
||||||
|
|
||||||
|
USERID="nobody"
|
||||||
|
|
||||||
|
#
|
||||||
|
# This is a POSIX shell fragment
|
||||||
|
#
|
||||||
|
|
||||||
|
# Additional options that are passed to the Daemon.
|
||||||
|
DAEMON_OPTS="-c /etc/shadowsocks/config.json"
|
2
debian/shadowsocks.manpages
vendored
Normal file
2
debian/shadowsocks.manpages
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
debian/sslocal.1
|
||||||
|
debian/ssserver.1
|
1
debian/source/format
vendored
Normal file
1
debian/source/format
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
3.0 (quilt)
|
59
debian/sslocal.1
vendored
Normal file
59
debian/sslocal.1
vendored
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
.\" Hey, EMACS: -*- nroff -*-
|
||||||
|
.\" (C) Copyright 2014 Shell.Xu <shell909090@gmail.com>,
|
||||||
|
.\"
|
||||||
|
.TH SHADOWSOCKS 1 "August 23, 2014"
|
||||||
|
.SH NAME
|
||||||
|
shadowsocks \- Fast tunnel proxy that helps you bypass firewalls
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B ssserver
|
||||||
|
.RI [ options ]
|
||||||
|
.br
|
||||||
|
.B sslocal
|
||||||
|
.RI [ options ]
|
||||||
|
.SH DESCRIPTION
|
||||||
|
shadowsocks is a tunnel proxy helps you bypass firewall.
|
||||||
|
.B ssserver
|
||||||
|
is the server part, and
|
||||||
|
.B sslocal
|
||||||
|
is the local part.
|
||||||
|
.SH OPTIONS
|
||||||
|
.TP
|
||||||
|
.B \-h, \-\-help
|
||||||
|
Show this help message and exit.
|
||||||
|
.TP
|
||||||
|
.B \-s SERVER_ADDR
|
||||||
|
Server address, default: 0.0.0.0.
|
||||||
|
.TP
|
||||||
|
.B \-p SERVER_PORT
|
||||||
|
Server port, default: 8388.
|
||||||
|
.TP
|
||||||
|
.B \-k PASSWORD
|
||||||
|
Password.
|
||||||
|
.TP
|
||||||
|
.B \-m METHOD
|
||||||
|
Encryption method, default: aes-256-cfb.
|
||||||
|
.TP
|
||||||
|
.B \-t TIMEOUT
|
||||||
|
Timeout in seconds, default: 300.
|
||||||
|
.TP
|
||||||
|
.B \-c CONFIG
|
||||||
|
Path to config file.
|
||||||
|
.TP
|
||||||
|
.B \-\-fast-open
|
||||||
|
Use TCP_FASTOPEN, requires Linux 3.7+.
|
||||||
|
.TP
|
||||||
|
.B \-\-workers WORKERS
|
||||||
|
Number of workers, available on Unix/Linux.
|
||||||
|
.TP
|
||||||
|
.B \-v, \-vv
|
||||||
|
Verbose mode.
|
||||||
|
.TP
|
||||||
|
.B \-q, \-qq
|
||||||
|
Quiet mode, only show warnings/errors.
|
||||||
|
.SH SEE ALSO
|
||||||
|
.br
|
||||||
|
The programs are documented fully by
|
||||||
|
.IR "Shell Xu <shell909090@gmail.com>"
|
||||||
|
and
|
||||||
|
.IR "Clowwindy <clowwindy42@gmail.com>",
|
||||||
|
available via the Info system.
|
59
debian/ssserver.1
vendored
Normal file
59
debian/ssserver.1
vendored
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
.\" Hey, EMACS: -*- nroff -*-
|
||||||
|
.\" (C) Copyright 2014 Shell.Xu <shell909090@gmail.com>,
|
||||||
|
.\"
|
||||||
|
.TH SHADOWSOCKS 1 "August 23, 2014"
|
||||||
|
.SH NAME
|
||||||
|
shadowsocks \- Fast tunnel proxy that helps you bypass firewalls
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B ssserver
|
||||||
|
.RI [ options ]
|
||||||
|
.br
|
||||||
|
.B sslocal
|
||||||
|
.RI [ options ]
|
||||||
|
.SH DESCRIPTION
|
||||||
|
shadowsocks is a tunnel proxy helps you bypass firewall.
|
||||||
|
.B ssserver
|
||||||
|
is the server part, and
|
||||||
|
.B sslocal
|
||||||
|
is the local part.
|
||||||
|
.SH OPTIONS
|
||||||
|
.TP
|
||||||
|
.B \-h, \-\-help
|
||||||
|
Show this help message and exit.
|
||||||
|
.TP
|
||||||
|
.B \-s SERVER_ADDR
|
||||||
|
Server address, default: 0.0.0.0.
|
||||||
|
.TP
|
||||||
|
.B \-p SERVER_PORT
|
||||||
|
Server port, default: 8388.
|
||||||
|
.TP
|
||||||
|
.B \-k PASSWORD
|
||||||
|
Password.
|
||||||
|
.TP
|
||||||
|
.B \-m METHOD
|
||||||
|
Encryption method, default: aes-256-cfb.
|
||||||
|
.TP
|
||||||
|
.B \-t TIMEOUT
|
||||||
|
Timeout in seconds, default: 300.
|
||||||
|
.TP
|
||||||
|
.B \-c CONFIG
|
||||||
|
Path to config file.
|
||||||
|
.TP
|
||||||
|
.B \-\-fast-open
|
||||||
|
Use TCP_FASTOPEN, requires Linux 3.7+.
|
||||||
|
.TP
|
||||||
|
.B \-\-workers WORKERS
|
||||||
|
Number of workers, available on Unix/Linux.
|
||||||
|
.TP
|
||||||
|
.B \-v, \-vv
|
||||||
|
Verbose mode.
|
||||||
|
.TP
|
||||||
|
.B \-q, \-qq
|
||||||
|
Quiet mode, only show warnings/errors.
|
||||||
|
.SH SEE ALSO
|
||||||
|
.br
|
||||||
|
The programs are documented fully by
|
||||||
|
.IR "Shell Xu <shell909090@gmail.com>"
|
||||||
|
and
|
||||||
|
.IR "Clowwindy <clowwindy42@gmail.com>",
|
||||||
|
available via the Info system.
|
Loading…
Reference in a new issue