From 48780fed2422ca79ca4a078f702460647f68c0f4 Mon Sep 17 00:00:00 2001 From: "Shell.Xu" Date: Sat, 23 Aug 2014 01:51:46 +0800 Subject: [PATCH] * adjust some config, look almostly done. --- debian/README.Debian | 6 --- debian/README.source | 9 ----- debian/changelog | 2 +- debian/config.json | 11 ++++++ debian/control | 9 +++-- debian/{init.d.ex => init.d} | 16 ++++---- debian/install | 1 + debian/menu.ex | 2 - debian/postinst.ex | 39 ------------------- debian/postrm.ex | 37 ------------------ debian/preinst.ex | 35 ----------------- debian/prerm.ex | 38 ------------------ debian/rules | 2 +- ...owsocks.default.ex => shadowsocks.default} | 2 +- 14 files changed, 29 insertions(+), 180 deletions(-) delete mode 100644 debian/README.Debian delete mode 100644 debian/README.source create mode 100644 debian/config.json rename debian/{init.d.ex => init.d} (88%) create mode 100644 debian/install delete mode 100644 debian/menu.ex delete mode 100644 debian/postinst.ex delete mode 100644 debian/postrm.ex delete mode 100644 debian/preinst.ex delete mode 100644 debian/prerm.ex rename debian/{shadowsocks.default.ex => shadowsocks.default} (83%) diff --git a/debian/README.Debian b/debian/README.Debian deleted file mode 100644 index c3a2cad..0000000 --- a/debian/README.Debian +++ /dev/null @@ -1,6 +0,0 @@ -shadowsocks for Debian ----------------------- - - - - -- Shell.Xu Sat, 23 Aug 2014 00:56:04 +0800 diff --git a/debian/README.source b/debian/README.source deleted file mode 100644 index 50cd37d..0000000 --- a/debian/README.source +++ /dev/null @@ -1,9 +0,0 @@ -shadowsocks for Debian ----------------------- - - - - - - diff --git a/debian/changelog b/debian/changelog index 445c1b6..323b8f1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -shadowsocks (2.1.0-1) unstable; urgency=low +python-shadowsocks (2.1.0-1) unstable; urgency=low * Initial release (Closes: 758900) diff --git a/debian/config.json b/debian/config.json new file mode 100644 index 0000000..35cb14a --- /dev/null +++ b/debian/config.json @@ -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 +} \ No newline at end of file diff --git a/debian/control b/debian/control index 3e6cad6..85f144c 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: python-shadowsocks Section: python Priority: extra Maintainer: Shell.Xu -Build-Depends: debhelper (>= 8), python-setuptools +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 @@ -10,6 +10,9 @@ Homepage: https://github.com/clowwindy/shadowsocks Package: python-shadowsocks Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends}, python-m2crypto -Description: A fast tunnel proxy that helps you bypass firewalls +Depends: ${shlibs:Depends}, ${misc:Depends}, python, 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. \ No newline at end of file diff --git a/debian/init.d.ex b/debian/init.d similarity index 88% rename from debian/init.d.ex rename to debian/init.d index 8a14b5b..1413cbd 100644 --- a/debian/init.d.ex +++ b/debian/init.d @@ -1,14 +1,14 @@ #!/bin/sh ### BEGIN INIT INFO # Provides: shadowsocks -# Required-Start: $network $local_fs -# Required-Stop: +# 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: -# Description: -# <...> -# <...> +# 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 @@ -17,8 +17,8 @@ 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/sbin/shadowsocks # Introduce the server's location here -DAEMON_ARGS="" # Arguments to run the daemon with +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 diff --git a/debian/install b/debian/install new file mode 100644 index 0000000..a614864 --- /dev/null +++ b/debian/install @@ -0,0 +1 @@ +debian/config.json etc/shadowsocks/ \ No newline at end of file diff --git a/debian/menu.ex b/debian/menu.ex deleted file mode 100644 index 52519c7..0000000 --- a/debian/menu.ex +++ /dev/null @@ -1,2 +0,0 @@ -?package(shadowsocks):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\ - title="shadowsocks" command="/usr/bin/shadowsocks" diff --git a/debian/postinst.ex b/debian/postinst.ex deleted file mode 100644 index c520dc5..0000000 --- a/debian/postinst.ex +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# postinst script for shadowsocks -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-remove' -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - configure) - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/debian/postrm.ex b/debian/postrm.ex deleted file mode 100644 index 180abc0..0000000 --- a/debian/postrm.ex +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# postrm script for shadowsocks -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `remove' -# * `purge' -# * `upgrade' -# * `failed-upgrade' -# * `abort-install' -# * `abort-install' -# * `abort-upgrade' -# * `disappear' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - ;; - - *) - echo "postrm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/debian/preinst.ex b/debian/preinst.ex deleted file mode 100644 index 2306c07..0000000 --- a/debian/preinst.ex +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# preinst script for shadowsocks -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `install' -# * `install' -# * `upgrade' -# * `abort-upgrade' -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - install|upgrade) - ;; - - abort-upgrade) - ;; - - *) - echo "preinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/debian/prerm.ex b/debian/prerm.ex deleted file mode 100644 index 13a5919..0000000 --- a/debian/prerm.ex +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -# prerm script for shadowsocks -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `remove' -# * `upgrade' -# * `failed-upgrade' -# * `remove' `in-favour' -# * `deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - remove|upgrade|deconfigure) - ;; - - failed-upgrade) - ;; - - *) - echo "prerm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/debian/rules b/debian/rules index 4556a26..01e5f9b 100755 --- a/debian/rules +++ b/debian/rules @@ -10,4 +10,4 @@ #export DH_VERBOSE=1 %: - dh --with python2 --buildsystem=python_distutils $@ + dh $@ --with python2 --buildsystem=python_distutils diff --git a/debian/shadowsocks.default.ex b/debian/shadowsocks.default similarity index 83% rename from debian/shadowsocks.default.ex rename to debian/shadowsocks.default index 24334b7..62831c2 100644 --- a/debian/shadowsocks.default.ex +++ b/debian/shadowsocks.default @@ -7,4 +7,4 @@ # # Additional options that are passed to the Daemon. -DAEMON_OPTS="" +DAEMON_OPTS="-c /etc/shadowsocks/config.json"