- Fix start failure by systemd

* Make sure /etc/shadowsocks can be read by shadowsocks user
  * Create the PID under /run/shadowsocks

OBS-URL: https://build.opensuse.org/package/show/server:proxy/shadowsocks-libev?expand=0&rev=59
This commit is contained in:
Hillwood Yang 2025-01-06 08:48:58 +00:00 committed by Git OBS Bridge
commit 5083bb2735
17 changed files with 964 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cfc8eded35360f4b67e18dc447b0c00cddb29cc57a3cec48b135e5fb87433488
size 1959146

View File

@ -0,0 +1,28 @@
[Unit]
Description=Daemon to start Shadowsocks-libev-client
Wants=network-online.target
After=network.target
[Service]
# added automatically, for details please see
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
ProtectSystem=full
ProtectHome=true
PrivateDevices=true
ProtectHostname=true
ProtectClock=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
RestrictRealtime=true
# end of automatic additions
Type=forking
PIDFile=/run/shadowsocks/shadowsocks-libev-client.pid
ExecStart=/usr/bin/ss-local -c /etc/shadowsocks/shadowsocks-libev-config.json -f /run/shadowsocks/shadowsocks-libev-client.pid -u --fast-open
Restart=on-failure
User=shadowsocks
Group=shadowsocks
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,28 @@
[Unit]
Description=Daemon to start Shadowsocks-libev-client
Wants=network-online.target
After=network.target
[Service]
# added automatically, for details please see
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
ProtectSystem=full
ProtectHome=true
PrivateDevices=true
ProtectHostname=true
ProtectClock=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
RestrictRealtime=true
# end of automatic additions
Type=forking
PIDFile=/run/shadowsocks/shadowsocks-libev-client@%i.pid
ExecStart=/usr/bin/ss-local -c /etc/shadowsocks/%i.json -f /run/shadowsocks/shadowsocks-libev-client@%i.pid -u --fast-open
Restart=on-failure
User=shadowsocks
Group=shadowsocks
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,8 @@
{
"server":"127.0.0.1",
"server_port":8609,
"local_port":2046,
"password":"1QX1d7jbi/StFBnHvqyJ2BBJclh1eYfRWvRGohuZtTJWO6ma4EREMt4iOaxLrHRJzfUijf+x4O4f+uX0zOLxvw==",
"timeout":"600",
"method":"aes-256-cfb"
}

View File

@ -0,0 +1,28 @@
[Unit]
Description=Daemon to start Shadowsocks-libev-manager
Wants=network-online.target
After=network.target
[Service]
# added automatically, for details please see
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
ProtectSystem=full
ProtectHome=true
PrivateDevices=true
ProtectHostname=true
ProtectClock=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
RestrictRealtime=true
# end of automatic additions
Type=forking
PIDFile=/run/shadowsocks/shadowsocks-libev-manager.pid
ExecStart=/usr/bin/ss-manager -c /etc/shadowsocks/shadowsocks-libev-config.json -f /run/shadowsocks/shadowsocks-libev-manager.pid -u --fast-open
Restart=on-failure
User=shadowsocks
Group=shadowsocks
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,28 @@
[Unit]
Description=Daemon to start Shadowsocks-libev-nat
Wants=network-online.target
After=network.target
[Service]
# added automatically, for details please see
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
ProtectSystem=full
ProtectHome=true
PrivateDevices=true
ProtectHostname=true
ProtectClock=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
RestrictRealtime=true
# end of automatic additions
Type=forking
PIDFile=/run/shadowsocks/shadowsocks-libev-nat.pid
ExecStart=/usr/bin/ss-nat -c /etc/shadowsocks/shadowsocks-libev-config.json -f /run/shadowsocks/shadowsocks-libev-nat.pid -u --fast-open
Restart=on-failure
User=shadowsocks
Group=shadowsocks
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,28 @@
[Unit]
Description=Daemon to start Shadowsocks-libev-nat
Wants=network-online.target
After=network.target
[Service]
# added automatically, for details please see
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
ProtectSystem=full
ProtectHome=true
PrivateDevices=true
ProtectHostname=true
ProtectClock=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
RestrictRealtime=true
# end of automatic additions
Type=forking
PIDFile=/run/shadowsocks/shadowsocks-libev-nat@%i.pid
ExecStart=/usr/bin/ss-nat -c /etc/shadowsocks/%i.json -f /run/shadowsocks/shadowsocks-libev-nat@%i.pid -u --fast-open
Restart=on-failure
User=shadowsocks
Group=shadowsocks
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,28 @@
[Unit]
Description=Daemon to start Shadowsocks-libev-redir
Wants=network-online.target
After=network.target
[Service]
# added automatically, for details please see
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
ProtectSystem=full
ProtectHome=true
PrivateDevices=true
ProtectHostname=true
ProtectClock=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
RestrictRealtime=true
# end of automatic additions
Type=forking
PIDFile=/run/shadowsocks/shadowsocks-libev-redir.pid
ExecStart=/usr/bin/ss-redir -c /etc/shadowsocks/shadowsocks-libev-config.json -f /run/shadowsocks/shadowsocks-libev-redir.pid -u --fast-open
Restart=on-failure
User=shadowsocks
Group=shadowsocks
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,28 @@
[Unit]
Description=Daemon to start Shadowsocks-libev-redir
Wants=network-online.target
After=network.target
[Service]
# added automatically, for details please see
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
ProtectSystem=full
ProtectHome=true
PrivateDevices=true
ProtectHostname=true
ProtectClock=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
RestrictRealtime=true
# end of automatic additions
Type=forking
PIDFile=/run/shadowsocks/shadowsocks-libev-redir@%i.pid
ExecStart=/usr/bin/ss-redir -c /etc/shadowsocks/%i.json -f /run/shadowsocks/shadowsocks-libev-redir@%i.pid -u --fast-open
Restart=on-failure
User=shadowsocks
Group=shadowsocks
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,28 @@
[Unit]
Description=Daemon to start Shadowsocks-libev-server
Wants=network-online.target
After=network.target
[Service]
# added automatically, for details please see
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
ProtectSystem=full
ProtectHome=true
PrivateDevices=true
ProtectHostname=true
ProtectClock=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
RestrictRealtime=true
# end of automatic additions
Type=forking
PIDFile=/run/shadowsocks/shadowsocks-libev-server.pid
ExecStart=/usr/bin/ss-server -c /etc/shadowsocks/shadowsocks-libev-config.json -f /run/shadowsocks/shadowsocks-libev-server.pid -u --fast-open
Restart=on-failure
User=shadowsocks
Group=shadowsocks
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,28 @@
[Unit]
Description=Daemon to start Shadowsocks-libev-server
Wants=network-online.target
After=network.target
[Service]
# added automatically, for details please see
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
ProtectSystem=full
ProtectHome=true
PrivateDevices=true
ProtectHostname=true
ProtectClock=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
RestrictRealtime=true
# end of automatic additions
Type=forking
PIDFile=/run/shadowsocks/shadowsocks-libev-server@%i.pid
ExecStart=/usr/bin/ss-server -c /etc/shadowsocks/%i.json -f /run/shadowsocks/shadowsocks-libev-server@%i.pid -u --fast-open
Restart=on-failure
User=shadowsocks
Group=shadowsocks
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,28 @@
[Unit]
Description=Daemon to start Shadowsocks-libev-tunnel
Wants=network-online.target
After=network.target
[Service]
# added automatically, for details please see
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
ProtectSystem=full
ProtectHome=true
PrivateDevices=true
ProtectHostname=true
ProtectClock=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
RestrictRealtime=true
# end of automatic additions
Type=forking
PIDFile=/run/shadowsocks/shadowsocks-libev-tunnel.pid
ExecStart=/usr/bin/ss-tunnel -c /etc/shadowsocks/shadowsocks-libev-config.json -f /run/shadowsocks/shadowsocks-libev-tunnel.pid -u --fast-open
Restart=on-failure
User=shadowsocks
Group=shadowsocks
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,28 @@
[Unit]
Description=Daemon to start Shadowsocks-libev-tunnel
Wants=network-online.target
After=network.target
[Service]
# added automatically, for details please see
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
ProtectSystem=full
ProtectHome=true
PrivateDevices=true
ProtectHostname=true
ProtectClock=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
RestrictRealtime=true
# end of automatic additions
Type=forking
PIDFile=/run/shadowsocks/shadowsocks-libev-tunnel@%i.pid
ExecStart=/usr/bin/ss-tunnel -c /etc/shadowsocks/%i.json -f /run/shadowsocks/shadowsocks-libev-tunnel@%i.pid -u --fast-open
Restart=on-failure
User=shadowsocks
Group=shadowsocks
[Install]
WantedBy=multi-user.target

381
shadowsocks-libev.changes Normal file
View File

@ -0,0 +1,381 @@
-------------------------------------------------------------------
Mon Jan 6 08:27:53 UTC 2025 - Hillwood Yang <hillwood@opensuse.org>
- Fix start failure by systemd
* Make sure /etc/shadowsocks can be read by shadowsocks user
* Create the PID under /run/shadowsocks
-------------------------------------------------------------------
Wed Dec 13 13:52:10 UTC 2023 - Hillwood Yang <hillwood@opensuse.org>
- Set permissions as 640 for /etc/shadowsocks (boo#1216372)
-------------------------------------------------------------------
Tue Oct 24 06:50:28 UTC 2023 - Hillwood Yang <hillwood@opensuse.org>
- Fix boo#1216372 and boo#1216373, run systemd service as a dedicated user and group
-------------------------------------------------------------------
Mon May 8 11:30:20 UTC 2023 - Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@fastmail.net>
- Require the mbedtls-devel version to be lower than 3.0.0
-------------------------------------------------------------------
Tue Nov 16 16:05:33 UTC 2021 - Johannes Segitz <jsegitz@suse.com>
- Added hardening to systemd service(s) (bsc#1181400). Modified:
* shadowsocks-libev-client.service
* shadowsocks-libev-client@.service
* shadowsocks-libev-manager.service
* shadowsocks-libev-nat.service
* shadowsocks-libev-nat@.service
* shadowsocks-libev-redir.service
* shadowsocks-libev-redir@.service
* shadowsocks-libev-server.service
* shadowsocks-libev-server@.service
* shadowsocks-libev-tunnel.service
* shadowsocks-libev-tunnel@.service
-------------------------------------------------------------------
Sat Sep 19 10:47:47 UTC 2020 - opensuse-packaging <opensuse-packaging@opensuse.org>
- Update version to 3.3.5
* Remove the SNI proxy function.
* Minor bug fixes. (#2581, #2582, #2590, #2595, #2599,
#2600, #2620, #2687, #2692)
-------------------------------------------------------------------
Sun Sep 6 11:35:49 UTC 2020 - opensuse-packaging <opensuse-packaging@opensuse.org>
- Fix shadowsocks-libev-tunnel.service
- Add some systemd profiles
-------------------------------------------------------------------
Tue Jun 9 16:03:02 UTC 2020 - Dominique Leuenberger <dimstar@opensuse.org>
- Revert back to the distro default compiler (i.e. GCC 10.1 on TW):
+ export CFLAGS+="-fcommon" until upstream makes this code
compatible to GCC10.
-------------------------------------------------------------------
Sun Jun 7 11:16:33 UTC 2020 - opensuse-packaging <opensuse-packaging@opensuse.org>
- Update Recommends tag: use shadowsocks-v2ray-plugin instead of simple-obfs
- Fix build on Tumbleweed: don't use gcc10!
-------------------------------------------------------------------
Mon Feb 3 16:29:38 UTC 2020 - Dominique Leuenberger <dimstar@opensuse.org>
- BuildRequire pkgconfig(systemd) instead of systemd: allow OBS to
shortcut through the -mini flavors.
-------------------------------------------------------------------
Wed Jan 15 13:39:42 UTC 2020 - Michael Du <duyizhaozj321@yahoo.com>
- Update version to 3.3.4
* Minor bug fixes. (#2539, #2565, #2566, #2577)
-------------------------------------------------------------------
Thu Nov 14 06:39:43 UTC 2019 - Hillwood Yang <hillwood@opensuse.org>
- Update version to 3.3.3
* Refine the handling of suspicious connections.
* Fix exploitable denial-of-service vulnerability exists in the
UDPRelay functionality (boo#1158251, CVE-2019-5163)
* Fix code execution vulnerability in the ss-manager binary
(boo#1158365, CVE-2019-5164)
-------------------------------------------------------------------
Thu Oct 17 06:26:27 UTC 2019 - Hillwood Yang <hillwood@opensuse.org>
- Update version to 3.3.2
* Refine the handling of fragment request.
* Minor bug fixes.
-------------------------------------------------------------------
Thu Aug 22 17:22:50 UTC 2019 - Michael Du <duyizhaozj321@yahoo.com>
- Update version to 3.3.1
* Fix a high CPU bug introduced in 3.3.0. (#2449)
* Fix MinGW build. (#2438)
* Minor bug fixes. (#2402, #2412, #2427, #2443)
-------------------------------------------------------------------
Mon Jun 10 06:35:27 UTC 2019 - Hillwood Yang <hillwood@opensuse.org>
- Update version to 3.3.0
* Enlarge the socket buffer size to 16KB.
* Fix the empty list bug in ss-manager.
* Fix the IPv6 address parser.
-------------------------------------------------------------------
Tue Mar 26 10:16:49 UTC 2019 - Michael Du <duyizhaozj321@yahoo.com>
- Update version to 3.2.5
* Fix a bug of port parser.
-------------------------------------------------------------------
Mon Mar 25 14:01:01 UTC 2019 - Hillwood Yang <hillwood@opensuse.org>
- Fix postun.
-------------------------------------------------------------------
Mon Mar 4 06:28:42 UTC 2019 - Michael Du <duyizhaozj321@yahoo.com>
- Update version to 3.2.4
* Fix a crash with MinGW.
* Refine SIP003 plugin interface.
* Remove connection timeout from all clients.
-------------------------------------------------------------------
Thu Nov 29 02:40:47 UTC 2018 - Michael Du <duyizhaozj321@yahoo.com>
- Update version to 3.2.3
* Fix the alignment bug again.
-------------------------------------------------------------------
Wed Nov 28 08:06:50 UTC 2018 - Michael Du <duyizhaozj321@yahoo.com>
- Update version to 3.2.2
* Fix a bug on 32-bit arch.
- Changes in version 3.2.1
* Add TCP fast open support to ss-tunnel by @PantherJohn.
* Fix several security issues.
-------------------------------------------------------------------
Tue May 29 07:46:29 UTC 2018 - hillwood@opensuse.org
- Update version to 3.2.0
* Add MinGW support by @linusyang
* Refine c-ares integration by @xnoreq.
* Fix building issues with GCC8 by @FlyingheartCN.
* Minor bug fixes.
-------------------------------------------------------------------
Sat Jan 20 14:02:33 UTC 2018 - hillwood@opensuse.org
- Update version to 3.1.3
* Fix a bug in UDP relay.
-------------------------------------------------------------------
Sat Dec 30 09:14:46 UTC 2017 - jengelh@inai.de
- Instad of removing static libs after the fact, do not even build
them in the first place.
- Fix RPM groups and spelling errors in the description.
-------------------------------------------------------------------
Fri Dec 29 13:39:37 UTC 2017 - hillwood@opensuse.org
- Update to 3.1.2
* Fix a bug in DNS resolver.
* Add new TFO API support.
- Drop fix-Command-Execution-in-ss-manager.patch. Merged by upstream.
-------------------------------------------------------------------
Tue Oct 31 03:31:56 UTC 2017 - hillwood@opensuse.org
- Add fix-Command-Execution-in-ss-manager.patch
* Fix boo#1065619 and CVE-2017-15924
-------------------------------------------------------------------
Sat Sep 28 03:03:17 UTC 2017 - hillwood@opensuse.org
- Fix Request tag.
-------------------------------------------------------------------
Tue Sep 19 02:26:24 UTC 2017 - hillwood@opensuse.org
- Update to 3.1.0
* Replace libudns with libc-ares.
- Merge libbloom, libcork and libipset.
-------------------------------------------------------------------
Thu Aug 10 08:14:18 UTC 2017 - hillwood@opensuse.org
- Update to 3.0.8
* Refine the ping-pong bloom filter.
* Minor bug fixes by @vfreex, @vlolteanu and @jackyyf.
-------------------------------------------------------------------
Thu Jul 20 14:28:00 UTC 2017 - hillwood@opensuse.org
- Set simple-obfs by Recommends.
-------------------------------------------------------------------
Thu Jul 20 01:21:02 UTC 2017 - hillwood@opensuse.org
- Update to 3.0.7
* Fix a bug with AEAD ciphers.
* Refine ACL support by @blackgear.
* Refine manager mode by @mengxd.
* Fix a potential memory leak by @vlolteanu.
-------------------------------------------------------------------
Tue Apr 18 03:25:52 UTC 2017 - hillwood@opensuse.org
- Update to 3.0.5
* Drop dependencies of OpenSSL and PolarSSL.
* Deprecate OTA (One-Time-Auth).
* Add new ciphers for SIP004: aes-128-gcm, aes-192-gcm, aes-256-gcm,
chacha20-poly1305 and chacha20-ietf-poly1305.
* Refine SIP003 to support standalone mode of obfsproxy.
* Fix a crashe when using stream ciphers.
* Fix a protocol bug in AEAD ciphers. (SIP004)
* Allow setting keys directly. (SIP006)
* Add session key for AEAD. (SIP007)
* Replace nonce cache with a ping-pong bloom filter.
* Add CMake files by @wenerme.
* Support TCP Fast Open in ss-redir by @lqs.
* Support TOS/DESCP in ss-redir by @sduponch.
* Refine MPTCP by @sduponch.
* Fix a bug of TCP Fast Open in ss-redir.
-------------------------------------------------------------------
Tue Dec 6 09:38:20 UTC 2016 - jengelh@inai.de
- Use a single call to %service_*
-------------------------------------------------------------------
Mon Dec 5 09:04:22 UTC 2016 - hillwood@opensuse.org
- Fix %pre, %post, %preun and %postun.
-------------------------------------------------------------------
Mon Dec 5 07:26:03 UTC 2016 - hillwood@opensuse.org
- Add system scripts for ss-redir, ss-tunnel, ss-manager and ss-nat.
- Split doc package.
-------------------------------------------------------------------
Fri Dec 2 08:36:56 UTC 2016 - hillwood@opensuse.org
- Update to 2.5.6
* Add outbound ACL for server by @kimw.
* Refine log format by @kimw.
* Refine attack detection.
* Fix a bug of auto blocking mechanism.
* Fix TCP Fast Open on macOS.
* Fix a bug of UDP relay mode of ss-local.
* Refine ACL feature with hostname support.
* Add HTTP/SNI parser for ss-local/ss-redir.
* Fix several bugs of the command line interface.
* Add aes-128/192/256-ctr ciphers.
* Add option MTU for UDP relay.
* Add MultiPath TCP support.
- Fix spec for Fedora.
-------------------------------------------------------------------
Fri Dec 2 06:38:48 UTC 2016 - hillwood@opensuse.org
- update to 2.4.8
* Fix a security bug.
* Refine memory management.
* Minor bug fixes.
* Fix a potential memory leak.
* Fix some compiler related issues.
* Fix build issues on OpenWRT.
* Reduce the latency of redir mode.
* Update manual pages by @kimw.
* Enhance UDP relay mode by @wongsyrone.
* Add ss-nat, a helper script to set up NAT rules for ss-redir,
from @aa65535.
* Fix several issues for debian package by @rogers0.
* Update manual pages with asciidoc by @anonymous-contributor.
* Fix issues of bind_address option by @tim-le.
-------------------------------------------------------------------
Sun Oct 11 14:47:44 UTC 2015 - hillwood@linuxfans.org
- Update to 2.4.0
* Refine the one-time authentication.
- Changes of 2.3.3 and 2.3.2
* Minor bug fixes.
- Changes of 2.3.1
* Fix an issue of connection cache of UDP relay.
* Add support of one time authentication for header verification.
-------------------------------------------------------------------
Sat Aug 22 16:40:51 UTC 2015 - i@marguerite.su
- update version 2.3.0
* add manager mode to support multi-user and traffic stat
- changes in 2.2.3
* Fix some issues for multi-destination UDP relay
-------------------------------------------------------------------
Thu Jun 25 14:52:17 UTC 2015 - i@marguerite.su
- update version 2.2.2
* fix the timer of UDP relay
-------------------------------------------------------------------
Fri Jun 5 16:41:32 UTC 2015 - i@marguerite.su
- update version 2.2.1
* fix an issue of UDF relay.
- changes in 2.2.0
* add TPROXY support for redir mode.
-------------------------------------------------------------------
Sun Mar 15 03:34:24 UTC 2015 - i@marguerite.su
- systemd service:
* restart on failure instead of abort
* enable tcp fast open
-------------------------------------------------------------------
Fri Feb 13 12:29:24 UTC 2015 - i@marguerite.su
- update version 2.1.4
* add acl support to server mode
-------------------------------------------------------------------
Sat Jan 17 14:16:34 UTC 2015 - i@marguerite.su
- update version 2.0.8
* minor bug fixes
- changes in 1.6.3~2.0.7
* refine documents
* implement a real asyncchronous DNS resolver
* fix some issues with MinGW
* refine ss-local, ss-tunnel, and ss-redir
* fix an issue in redir mode
-------------------------------------------------------------------
Sat Jan 3 04:19:06 UTC 2015 - i@marguerite.su
- update version 1.6.2
* minor bugfix
- changes in 1.5.0~1.6.1
* Support to build static or shared library.
* Refine the cache size of UDPRelay.
* Fix a bug introduced by fast open.
* Handle signals properly.
* Fix log on Win32.
* Add salsa20 and chacha20 support
-------------------------------------------------------------------
Sat Oct 25 17:01:16 UTC 2014 - i@marguerite.su
- update version 1.4.8
* Fix a bug of tcp fast open.
- changes in 1.4.7
* Add a new encryptor rc4-md5
-------------------------------------------------------------------
Fri Aug 22 09:51:58 UTC 2014 - i@marguerite.su
- update version 1.4.6
* minor bugfix release
-------------------------------------------------------------------
Fri May 2 04:19:57 UTC 2014 - i@marguerite.su
- initial version 1.4.5
* Fix the compatibility issue of udprelay.
* Enhance asyncns to reduce the latency.
- add shadowsocks-libev-config.json
* random ports, random passwords.
* strongest encryption method
- add systemd services

240
shadowsocks-libev.spec Normal file
View File

@ -0,0 +1,240 @@
#
# spec file for package shadowsocks-libev
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define libver 2
Name: shadowsocks-libev
Version: 3.3.5
Release: 0
Summary: Libev port of Shadowsocks
License: GPL-3.0-or-later
Group: Productivity/Networking/Web/Proxy
URL: https://github.com/shadowsocks/shadowsocks-libev
Source0: https://github.com/shadowsocks/shadowsocks-libev/releases/download/v%{version}/%{name}-%{version}.tar.gz
Source1: %{name}-config.json
Source2: %{name}-client.service
Source3: %{name}-server.service
Source4: %{name}-tunnel.service
Source5: %{name}-nat.service
Source6: %{name}-manager.service
Source7: %{name}-redir.service
Source8: %{name}-client@.service
Source9: %{name}-server@.service
Source10: %{name}-tunnel@.service
Source11: %{name}-nat@.service
Source12: %{name}-redir@.service
BuildRequires: libtool
BuildRequires: mbedtls-devel < 3
BuildRequires: pkgconfig(libcares)
BuildRequires: pkgconfig(libev)
BuildRequires: pkgconfig(libpcre)
BuildRequires: pkgconfig(libsodium) >= 1.0.4
BuildRequires: pkgconfig(openssl)
%if 0%{?fedora} >= 24
BuildRequires: pkgconfig
%else
BuildRequires: pkg-config
%endif
%if 0%{?fedora} == 24
BuildRequires: ghostscript-core
%endif
BuildRequires: asciidoc
BuildRequires: systemd-rpm-macros
BuildRequires: xmlto
BuildRequires: pkgconfig(systemd)
Requires(pre): shadow
Recommends: shadowsocks-v2ray-plugin
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{?systemd_ordering}
%description
shadowsocks-libev is a lightweight secured SOCKS5 proxy for embedded devices and
low-end boxes.
%package -n lib%{name}%{libver}
Summary: Libev port of Shadowsocks
Group: System/Libraries
%description -n lib%{name}%{libver}
shadowsocks-libev is a lightweight secured SOCKS5 proxy for embedded devices and
low-end boxes.
This package provides libraries for it.
%package doc
Summary: Documents for shadowsocks-libev
Group: Documentation/HTML
Requires: %{name} = %{version}
BuildArch: noarch
%description doc
shadowsocks-libev is a lightweight secured SOCKS5 proxy for embedded devices and
low-end boxes.
This package provides Documents for it.
%package devel
Summary: Development headers for shadowsocks-libev
Group: Development/Libraries/C and C++
Requires: lib%{name}%{libver} = %{version}
%description devel
shadowsocks-libev is a lightweight secured SOCKS5 proxy for embedded devices and
low-end boxes.
This package provides development headers for it.
%prep
%setup -q
%build
export CFLAGS="%{optflags} -fcommon"
%configure \
--enable-shared
%make_build
%install
%make_install
rm -rf %{buildroot}/%{_libdir}/*.la
install -d %{buildroot}%{_sysconfdir}/shadowsocks/
install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/shadowsocks/
install -d %{buildroot}%{_unitdir}
install -m 644 %{SOURCE2} %{buildroot}%{_unitdir}
install -m 644 %{SOURCE3} %{buildroot}%{_unitdir}
install -m 644 %{SOURCE4} %{buildroot}%{_unitdir}
install -m 644 %{SOURCE5} %{buildroot}%{_unitdir}
install -m 644 %{SOURCE6} %{buildroot}%{_unitdir}
install -m 644 %{SOURCE7} %{buildroot}%{_unitdir}
install -m 644 %{SOURCE8} %{buildroot}%{_unitdir}
install -m 644 %{SOURCE9} %{buildroot}%{_unitdir}
install -m 644 %{SOURCE10} %{buildroot}%{_unitdir}
install -m 644 %{SOURCE11} %{buildroot}%{_unitdir}
install -m 644 %{SOURCE12} %{buildroot}%{_unitdir}
mkdir -p %{buildroot}%{_sbindir}
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-client
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-server
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-manager
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-nat
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-redir
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-tunnel
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-client@
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-server@
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-nat@
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-redir@
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-tunnel@
%pre
%service_add_pre %{name}-server.service
%service_add_pre %{name}-client.service
%service_add_pre %{name}-manager.service
%service_add_pre %{name}-nat.service
%service_add_pre %{name}-redir.service
%service_add_pre %{name}-tunnel.service
%service_add_pre %{name}-server@.service
%service_add_pre %{name}-client@.service
%service_add_pre %{name}-nat@.service
%service_add_pre %{name}-redir@.service
%service_add_pre %{name}-tunnel@.service
getent group shadowsocks >/dev/null || %{_sbindir}/groupadd --system shadowsocks
getent passwd shadowsocks >/dev/null || %{_sbindir}/useradd --system -c "shadowsocks User" \
-d %{_localstatedir}/shadowsocks -m -g shadowsocks -s %{_sbindir}/nologin \
shadowsocks
%post
%service_add_post %{name}-server.service
%service_add_post %{name}-client.service
%service_add_post %{name}-manager.service
%service_add_post %{name}-nat.service
%service_add_post %{name}-redir.service
%service_add_post %{name}-tunnel.service
%service_add_post %{name}-server@.service
%service_add_post %{name}-client@.service
%service_add_post %{name}-nat@.service
%service_add_post %{name}-redir@.service
%service_add_post %{name}-tunnel@.service
chown root:shadowsocks %{_sysconfdir}/shadowsocks -R
chmod 750 %{_sysconfdir}/shadowsocks
chmod 640 %{_sysconfdir}/shadowsocks/*
%preun
%service_del_preun %{name}-server.service
%service_del_preun %{name}-client.service
%service_del_preun %{name}-manager.service
%service_del_preun %{name}-nat.service
%service_del_preun %{name}-redir.service
%service_del_preun %{name}-tunnel.service
%service_del_preun %{name}-server@.service
%service_del_preun %{name}-client@.service
%service_del_preun %{name}-nat@.service
%service_del_preun %{name}-redir@.service
%service_del_preun %{name}-tunnel@.service
%postun
%service_del_postun %{name}-server.service
%service_del_postun %{name}-client.service
%service_del_postun %{name}-manager.service
%service_del_postun %{name}-nat.service
%service_del_postun %{name}-redir.service
%service_del_postun %{name}-tunnel.service
%service_del_postun %{name}-server@.service
%service_del_postun %{name}-client@.service
%service_del_postun %{name}-nat@.service
%service_del_postun %{name}-redir@.service
%service_del_postun %{name}-tunnel@.service
%post -n lib%{name}2 -p /sbin/ldconfig
%postun -n lib%{name}2 -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc Changes README.md AUTHORS
%dir %{_sysconfdir}/shadowsocks
%config(noreplace) %{_sysconfdir}/shadowsocks/%{name}-config.json
%license COPYING
%{_bindir}/ss-local
%{_bindir}/ss-redir
%{_bindir}/ss-server
%{_bindir}/ss-tunnel
%{_bindir}/ss-manager
%{_bindir}/ss-nat
%{_mandir}/man8/%{name}.8.gz
%{_mandir}/man1/ss-*.1.gz
%{_sbindir}/rcshadowsocks-libev-*
%{_unitdir}/%{name}-*.service
%files -n lib%{name}%{libver}
%defattr(-,root,root)
%{_libdir}/lib%{name}.so.*
%files doc
%defattr(-,root,root)
%dir %{_datadir}/doc/%{name}
%doc %{_datadir}/doc/%{name}/*.html
%files devel
%defattr(-,root,root)
%{_includedir}/shadowsocks.h
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/lib%{name}.so
%changelog