forked from pool/shadowsocks-rust
Accepting request 931466 from home:hillwood:branches:server:proxy
OBS-URL: https://build.opensuse.org/request/show/931466 OBS-URL: https://build.opensuse.org/package/show/server:proxy/shadowsocks-rust?expand=0&rev=1
This commit is contained in:
commit
549d264c0c
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal 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
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
13
_constraints
Normal file
13
_constraints
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<constraints>
|
||||||
|
<overwrite>
|
||||||
|
<conditions>
|
||||||
|
<arch>x86_64</arch>
|
||||||
|
<arch>aarch64</arch>
|
||||||
|
</conditions>
|
||||||
|
<hardware>
|
||||||
|
<physicalmemory>
|
||||||
|
<size unit="G">3</size>
|
||||||
|
</physicalmemory>
|
||||||
|
</hardware>
|
||||||
|
</overwrite>
|
||||||
|
</constraints>
|
3
shadowsocks-rust-1.8.23.tar.gz
Normal file
3
shadowsocks-rust-1.8.23.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:a24602023940b53d9a02017aa182b3ac04eda53c1fc51e822337c902a4061def
|
||||||
|
size 161682
|
13
shadowsocks-rust-client.service
Normal file
13
shadowsocks-rust-client.service
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Daemon to start Shadowsocks-rust-client
|
||||||
|
Wants=network-online.target
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
PIDFile=/var/run/shadowsocks-rust-client.pid
|
||||||
|
ExecStart=/usr/bin/sslocal -c /etc/shadowsocks/shadowsocks-rust.json -f /var/run/shadowsocks-rust-client.pid
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
13
shadowsocks-rust-manager.service
Normal file
13
shadowsocks-rust-manager.service
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Daemon to start Shadowsocks-rust-manager
|
||||||
|
Wants=network-online.target
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
PIDFile=/var/run/shadowsocks-rust-manager.pid
|
||||||
|
ExecStart=/usr/bin/ssmanager -c /etc/shadowsocks/shadowsocks-rust.json -f /var/run/shadowsocks-rust-manager.pid
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
13
shadowsocks-rust-server.service
Normal file
13
shadowsocks-rust-server.service
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Daemon to start Shadowsocks-rust-server
|
||||||
|
Wants=network-online.target
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
PIDFile=/var/run/shadowsocks-rust-server.pid
|
||||||
|
ExecStart=/usr/bin/ssserver -c /etc/shadowsocks/shadowsocks-rust.json -f /var/run/shadowsocks-rust-server.pid
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
4
shadowsocks-rust.changes
Normal file
4
shadowsocks-rust.changes
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Nov 13 12:01:57 UTC 2021 - opensuse-packaging <opensuse-packaging@opensuse.org>
|
||||||
|
|
||||||
|
- Initial package for version 1.8.23
|
10
shadowsocks-rust.json
Normal file
10
shadowsocks-rust.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"server": "my_server_ip",
|
||||||
|
"server_port": 8388,
|
||||||
|
"password": "mypassword",
|
||||||
|
"method": "aes-256-gcm",
|
||||||
|
// ONLY FOR `sslocal`
|
||||||
|
// Delete these lines if you are running `ssserver` or `ssmanager`
|
||||||
|
"local_address": "127.0.0.1",
|
||||||
|
"local_port": 1080
|
||||||
|
}
|
101
shadowsocks-rust.spec
Normal file
101
shadowsocks-rust.spec
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
#
|
||||||
|
# spec file for package shadowsocks-rust
|
||||||
|
#
|
||||||
|
# Copyright (c) 2021 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/
|
||||||
|
#
|
||||||
|
|
||||||
|
Name: shadowsocks-rust
|
||||||
|
Version: 1.8.23
|
||||||
|
Release: 0
|
||||||
|
Summary: Rust port of Shadowsocks
|
||||||
|
License: MIT
|
||||||
|
Group: Productivity/Networking/Web/Proxy
|
||||||
|
Url: https://github.com/shadowsocks/shadowsocks-rust
|
||||||
|
Source0: https://github.com/shadowsocks/shadowsocks-rust/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
||||||
|
Source1: vendor.tar.gz
|
||||||
|
Source2: %{name}.json
|
||||||
|
Source3: %{name}-client.service
|
||||||
|
Source4: %{name}-server.service
|
||||||
|
Source5: %{name}-manager.service
|
||||||
|
BuildRequires: cargo-packaging
|
||||||
|
BuildRequires: cargo
|
||||||
|
BuildRequires: pkgconfig(openssl)
|
||||||
|
BuildRequires: systemd-rpm-macros
|
||||||
|
ExcludeArch: ppc ppc64 ppc64le s390 s390x
|
||||||
|
%{?systemd_ordering}
|
||||||
|
|
||||||
|
%description
|
||||||
|
shadowsocks-rust is a rust port of shadowsocks.
|
||||||
|
|
||||||
|
shadowsocks is a lightweight secured SOCKS5 proxy for embedded devices and low-end boxes.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -a1 -n %{name}-%{version}
|
||||||
|
mkdir .cargo
|
||||||
|
cat >.cargo/config <<EOF
|
||||||
|
[source.crates-io]
|
||||||
|
registry = 'https://github.com/rust-lang/crates.io-index'
|
||||||
|
replace-with = 'vendored-sources'
|
||||||
|
[source.vendored-sources]
|
||||||
|
directory = './vendor'
|
||||||
|
EOF
|
||||||
|
|
||||||
|
%build
|
||||||
|
%cargo_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%cargo_install
|
||||||
|
install -d %{buildroot}%{_sysconfdir}/shadowsocks/
|
||||||
|
install -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/shadowsocks/
|
||||||
|
|
||||||
|
install -d %{buildroot}%{_unitdir}
|
||||||
|
install -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}
|
||||||
|
install -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}
|
||||||
|
install -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}
|
||||||
|
|
||||||
|
install -d %{buildroot}%{_sbindir}
|
||||||
|
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-client
|
||||||
|
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-server
|
||||||
|
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-manager
|
||||||
|
|
||||||
|
%pre
|
||||||
|
%service_add_pre %{name}-client.service
|
||||||
|
%service_add_pre %{name}-server.service
|
||||||
|
%service_add_pre %{name}-manager.service
|
||||||
|
|
||||||
|
%post
|
||||||
|
%service_add_post %{name}-client.service
|
||||||
|
%service_add_post %{name}-server.service
|
||||||
|
%service_add_post %{name}-manager.service
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%service_del_preun %{name}-client.service
|
||||||
|
%service_del_preun %{name}-server.service
|
||||||
|
%service_del_preun %{name}-manager.service
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%service_del_postun %{name}-client.service
|
||||||
|
%service_del_postun %{name}-server.service
|
||||||
|
%service_del_postun %{name}-manager.service
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc README.md
|
||||||
|
%license LICENSE
|
||||||
|
%{_bindir}/ss*
|
||||||
|
%{_sbindir}/rc%{name}-*
|
||||||
|
%{_unitdir}/%{name}-*.service
|
||||||
|
%dir %{_sysconfdir}/shadowsocks
|
||||||
|
%config %{_sysconfdir}/shadowsocks/%{name}.json
|
||||||
|
|
||||||
|
%changelog
|
3
vendor.tar.gz
Normal file
3
vendor.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:9f4054c34a4cbddbdb37f84ff6b22c34159d0f442d88e7e9237d8b8164526d32
|
||||||
|
size 38793319
|
Loading…
Reference in New Issue
Block a user