# Generated by go2rpm 1
%bcond_without check
# https://gitlab.com/yawning/obfs4.git
%global goipath gitlab.com/yawning/obfs4.git
%global forgeurl https://gitlab.com/yawning/obfs4
Version: 0.0.11
%global tag obfs4proxy-0.0.11
%global distprefix %{nil}
%gometa
%global goname obfs4
%global common_description %{expand:
This is a look-like nothing obfuscation protocol that incorporates ideas and
concepts from Philipp Winter's ScrambleSuit protocol. The obfs naming was
chosen primarily because it was shorter, in terms of protocol ancestry obfs4
is much closer to ScrambleSuit than obfs2/obfs3.
The notable differences between ScrambleSuit and obfs4:
* The handshake always does a full key exchange (no such thing as a Session
Ticket Handshake).
* The handshake uses the Tor Project's ntor handshake with public keys
obfuscated via the Elligator 2 mapping.
* The link layer encryption uses NaCl secret boxes (Poly1305/XSalsa20).
As an added bonus, obfs4proxy also supports acting as an obfs2/3 client and
bridge to ease the transition to the new protocol.}
%global golicenses LICENSE LICENSE-GPL3.txt
%global godocs README.md ChangeLog
Name: %{goname}
Release: 3%{?dist}
Summary: The obfourscator, a pluggable transport for Tor
License: GPLv3 and BSD
URL: %{gourl}
Source0: %{gosource}
Source1: obfs4.torrc
BuildRequires: golang(git.torproject.org/pluggable-transports/goptlib.git)
BuildRequires: golang(github.com/agl/ed25519/extra25519)
BuildRequires: golang(github.com/dchest/siphash)
BuildRequires: golang(gitlab.com/yawning/utls.git)
BuildRequires: golang(golang.org/x/crypto/curve25519)
BuildRequires: golang(golang.org/x/crypto/hkdf)
BuildRequires: golang(golang.org/x/crypto/nacl/secretbox)
BuildRequires: golang(golang.org/x/net/http2)
BuildRequires: golang(golang.org/x/net/idna)
BuildRequires: golang(golang.org/x/net/proxy)
%description
%{common_description}
%gopkg
%prep
%goprep
%build
for cmd in obfs4proxy; do
%gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
done
%install
%gopkginstall
install -m 0755 -vd %{buildroot}%{_bindir}
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
install -m 0755 -vd %{buildroot}%{_mandir}/man1
install -m 0644 -vp doc/obfs4proxy.1 %{buildroot}%{_mandir}/man1/
install -m 0755 -vd %{buildroot}%{_sysconfdir}/tor
install -m 0644 -vp %{SOURCE1} %{buildroot}%{_sysconfdir}/tor/
%if %{with check}
%check
%gocheck
%endif
%files
%license LICENSE LICENSE-GPL3.txt
%doc doc README.md ChangeLog
%{_bindir}/*
%{_mandir}/man1/obfs4proxy.1*
%dir %{_sysconfdir}/tor
%config(noreplace) %{_sysconfdir}/tor/obfs4.torrc
%gopkgfiles
%changelog
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.11-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Aug 07 21:36:59 CEST 2019 Robert-André Mauchin <zebob.m@gmail.com> - 0.0.11-1
- Release 0.0.11
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.7-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.7-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sun Feb 04 2018 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 0.0.7-3
- Mark obfs4.torrc as config file, so that local changes won't be overriden
* Thu Jan 18 2018 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 0.0.7-2
- Add a sample config file: obfs4.torrc in /etc/tor/
* Thu Sep 28 2017 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 0.0.7-1
- First package for Fedora