Compare commits

..

No commits in common. "rawhide" and "epel10.2" have entirely different histories.

8 changed files with 382 additions and 275 deletions

3
.gitignore vendored
View file

@ -7,6 +7,3 @@
/3proxy-0.8.13.tar.gz
/3proxy-0.9.4.tar.gz
/3proxy-0.9.5.tar.gz
/3proxy-0.9.6.tar.gz
/3proxy-0.9.7.tar.gz
/3proxy-1.0.0.tar.gz

View file

@ -0,0 +1,20 @@
--- man/3proxy.8.orig 2009-07-13 17:52:25.000000000 +0400
+++ man/3proxy.8 2010-05-30 21:39:19.000000000 +0400
@@ -84,7 +84,7 @@
configuration from stdin. It makes it possible to use 3proxy.cfg file as
executable script just by setting +x mode and adding
.br
-#!/usr/local/3proxy/3proxy
+#!/etc/3proxy
.br
as a first line in 3proxy.cfg
.TP
@@ -133,7 +133,7 @@
wget to automate this task.
.SH FILES
.TP
-.I "/usr/local/3proxy/3proxy.cfg (3proxy.cfg)"
+.I "/etc/3proxy.cfg (3proxy.cfg)"
.BR 3proxy
configuration file
.SH BUGS

297
3proxy-0.9.4-manpage.patch Normal file
View file

@ -0,0 +1,297 @@
--- man/3proxy.8
+++ man/3proxy.8
@@ -26,7 +26,7 @@
gateways with HTTP and HTTPS proxy with FTP over HTTP support, SOCKS v4,
v4.5 and v5, POP3 proxy, UDP and TCP portmappers. Each gateway is started
from configuration file like independant service
-.BR proxy (8)
+.BR htproxy (8)
.BR socks (8)
.BR pop3p (8)
.BR tcppm (8)
@@ -140,7 +140,7 @@
Report all bugs to
.BR 3proxy@3proxy.org
.SH SEE ALSO
-3proxy.cfg(3), proxy(8), ftppr(8), socks(8), pop3p(8), tcppm(8), udppm(8),
+3proxy.cfg(3), ftppr(8), htproxy(8), socks(8), pop3p(8), tcppm(8), tlspr(8), udppm(8),
kill(1), syslogd(8),
.br
https://3proxy.org/
--- man/3proxy.cfg.3
+++ man/3proxy.cfg.3
@@ -46,7 +46,7 @@
Next commands start gateway services:
.br
-.B proxy
+.B htproxy
[options]
.br
.B socks
@@ -74,7 +74,7 @@
.br
Descriptions:
.br
-.B proxy
+.B htproxy
HTTP/HTTPS proxy (default port 3128)
.br
.B socks
@@ -185,7 +185,7 @@
of IP-IP NAT (will not work for PAT)
.br
Also, all options mentioned for
-.BR proxy (8)
+.BR htproxy (8)
.BR socks (8)
.BR pop3p (8)
.BR tcppm (8)
@@ -1078,7 +1078,7 @@
Report all bugs to
.BR 3proxy@3proxy.org
.SH SEE ALSO
-3proxy(8), proxy(8), ftppr(8), socks(8), pop3p(8), tcppm(8), udppm(8), syslogd(8),
+3proxy(8), ftppr(8), htproxy(8), socks(8), pop3p(8), tcppm(8), tlspr(8), udppm(8), syslogd(8),
.br
https://3proxy.org/
.SH TRIVIA
--- man/ftppr.8
+++ man/ftppr.8
@@ -79,7 +79,7 @@
Report all bugs to
.BR 3proxy@3proxy.org
.SH SEE ALSO
-3proxy(8), proxy(8), pop3p(8), socks(8), tcppm(8), udppm(8), syslogd(8),
+3proxy(8), htproxy(8), pop3p(8), socks(8), tcppm(8), tlspr(8), udppm(8), syslogd(8),
.br
https://3proxy.org/
.SH AUTHORS
--- /dev/null
+++ man/htproxy.8
@@ -0,0 +1,78 @@
+.TH proxy "8" "January 2019" "3proxy 0.9" "Universal proxy server"
+.SH NAME
+.B htproxy
+\- HTTP proxy gateway service
+.SH SYNOPSIS
+.BR "htproxy " [ -d ][ -a ]
+.IB \fR[ -l \fR[ \fR[ @ \fR] logfile \fR]]
+.IB \fR[ -p port\fR]
+.IB \fR[ -i internal_ip\fR]
+.IB \fR[ -e external_ip\fR]
+.SH DESCRIPTION
+.B htproxy
+is HTTP gateway service with HTTPS and FTP over HTTPS support.
+.SH OPTIONS
+.TP
+.B -I
+Inetd mode. Standalone service only.
+.TP
+.B -d
+Daemonise. Detach service from console and run in the background.
+.TP
+.B -t
+Be silenT. Do not log start/stop/accept error records.
+.TP
+.B -u
+Never ask for username authentication
+.TP
+.B -e
+External address. IP address of interface proxy should initiate connections
+from.
+By default system will deside which address to use in accordance
+with routing table.
+.TP
+.B -i
+Internal address. IP address proxy accepts connections to.
+By default connection to any interface is accepted. It\'s usually unsafe.
+.TP
+.B -a
+Anonymous. Hide information about client.
+.TP
+.B -a1
+Anonymous. Show fake information about client.
+.TP
+.B -p
+Port. Port proxy listens for incoming connections. Default is 3128.
+.TP
+.B -l
+Log. By default logging is to stdout. If
+.I logfile
+is specified logging is to file. Under Unix, if
+.RI \' @ \'
+preceeds
+.IR logfile ,
+syslog is used for logging.
+.TP
+.B -S
+Increase or decrease stack size. You may want to try something like -S8192 if you experience 3proxy
+crashes.
+.SH CLIENTS
+You should use client with HTTP proxy support or configure router to redirect
+HTTP traffic to proxy (transparent proxy). Configure client to connect to
+.I internal_ip
+and
+.IR port .
+HTTPS support allows to use almost any TCP based protocol. If you need to
+limit clients, use
+.BR 3proxy (8)
+instead.
+.SH BUGS
+Report all bugs to
+.BR 3proxy@3proxy.org
+.SH SEE ALSO
+3proxy(8), ftppr(8), socks(8), pop3p(8), tcppm(8), tlspr(8), udppm(8), syslogd(8),
+.br
+https://3proxy.org/
+.SH AUTHORS
+3proxy is designed by Vladimir 3APA3A Dubrovin
+.RI ( 3proxy@3proxy.org )
--- man/pop3p.8
+++ man/pop3p.8
@@ -75,7 +75,7 @@
Report all bugs to
.BR 3proxy@3proxy.org
.SH SEE ALSO
-3proxy(8), ftppr(8), proxy(8), socks(8), tcppm(8), udppm(8), syslogd(8),
+3proxy(8), ftppr(8), htproxy(8), socks(8), tcppm(8), tlspr(8), udppm(8), syslogd(8),
.br
https://3proxy.org/
.SH AUTHORS
--- man/proxy.8
+++ /dev/null
@@ -1,78 +0,0 @@
-.TH proxy "8" "January 2019" "3proxy 0.9" "Universal proxy server"
-.SH NAME
-.B proxy
-\- HTTP proxy gateway service
-.SH SYNOPSIS
-.BR "proxy " [ -d ][ -a ]
-.IB \fR[ -l \fR[ \fR[ @ \fR] logfile \fR]]
-.IB \fR[ -p port\fR]
-.IB \fR[ -i internal_ip\fR]
-.IB \fR[ -e external_ip\fR]
-.SH DESCRIPTION
-.B proxy
-is HTTP gateway service with HTTPS and FTP over HTTPS support.
-.SH OPTIONS
-.TP
-.B -I
-Inetd mode. Standalone service only.
-.TP
-.B -d
-Daemonise. Detach service from console and run in the background.
-.TP
-.B -t
-Be silenT. Do not log start/stop/accept error records.
-.TP
-.B -u
-Never ask for username authentication
-.TP
-.B -e
-External address. IP address of interface proxy should initiate connections
-from.
-By default system will deside which address to use in accordance
-with routing table.
-.TP
-.B -i
-Internal address. IP address proxy accepts connections to.
-By default connection to any interface is accepted. It\'s usually unsafe.
-.TP
-.B -a
-Anonymous. Hide information about client.
-.TP
-.B -a1
-Anonymous. Show fake information about client.
-.TP
-.B -p
-Port. Port proxy listens for incoming connections. Default is 3128.
-.TP
-.B -l
-Log. By default logging is to stdout. If
-.I logfile
-is specified logging is to file. Under Unix, if
-.RI \' @ \'
-preceeds
-.IR logfile ,
-syslog is used for logging.
-.TP
-.B -S
-Increase or decrease stack size. You may want to try something like -S8192 if you experience 3proxy
-crashes.
-.SH CLIENTS
-You should use client with HTTP proxy support or configure router to redirect
-HTTP traffic to proxy (transparent proxy). Configure client to connect to
-.I internal_ip
-and
-.IR port .
-HTTPS support allows to use almost any TCP based protocol. If you need to
-limit clients, use
-.BR 3proxy (8)
-instead.
-.SH BUGS
-Report all bugs to
-.BR 3proxy@3proxy.org
-.SH SEE ALSO
-3proxy(8), ftppr(8), socks(8), pop3p(8), tcppm(8), udppm(8), syslogd(8),
-.br
-https://3proxy.org/
-.SH AUTHORS
-3proxy is designed by Vladimir 3APA3A Dubrovin
-.RI ( 3proxy@3proxy.org )
--- man/smtpp.8
+++ man/smtpp.8
@@ -76,7 +76,7 @@
Report all bugs to
.BR 3proxy@3proxy.org
.SH SEE ALSO
-3proxy(8), ftppr(8), proxy(8), socks(8), tcppm(8), udppm(8), syslogd(8),
+3proxy(8), ftppr(8), htproxy(8), socks(8), tcppm(8), tlspr(8), udppm(8), syslogd(8),
.br
https://3proxy.org/
.SH AUTHORS
--- man/socks.8
+++ man/socks.8
@@ -76,7 +76,7 @@
Report all bugs to
.BR 3proxy@3proxy.org
.SH SEE ALSO
-3proxy(8), proxy(8), ftppr(8), pop3p(8), tcppm(8), udppm(8), syslogd(8),
+3proxy(8), ftppr(8), htproxy(8), pop3p(8), tcppm(8), tlspr(8), udppm(8), syslogd(8),
.br
https://3proxy.org/
.SH AUTHORS
--- man/tcppm.8
+++ man/tcppm.8
@@ -65,7 +65,7 @@
Report all bugs to
.BR 3proxy@3proxy.org
.SH SEE ALSO
-3proxy(8), proxy(8), ftppr(8), socks(8), pop3p(8), udppm(8), syslogd(8),
+3proxy(8), ftppr(8), htproxy(8), socks(8), pop3p(8), tlspr(8), udppm(8), syslogd(8),
.br
https://3proxy.org/
.SH AUTHORS
--- man/tlspr.8
+++ man/tlspr.8
@@ -78,7 +78,7 @@
Report all bugs to
.BR 3proxy@3proxy.org
.SH SEE ALSO
-3proxy(8), ftppr(8), proxy(8), socks(8), pop3p(8), smtpp(8), tcppm(8), udppm(8), syslogd(8),
+3proxy(8), ftppr(8), htproxy(8), socks(8), pop3p(8), smtpp(8), tcppm(8), udppm(8), syslogd(8),
.br
https://3proxy.org/
.SH AUTHORS
--- man/udppm.8
+++ man/udppm.8
@@ -71,7 +71,7 @@
Report all bugs to
.BR 3proxy@3proxy.org
.SH SEE ALSO
-3proxy(8), proxy(8), ftppr(8), socks(8), pop3p(8), udppm(8), syslogd(8),
+3proxy(8), ftppr(8), htproxy(8), socks(8), pop3p(8), tlspr(8), udppm(8), syslogd(8),
.br
https://3proxy.org/
.SH AUTHORS

View file

@ -0,0 +1,39 @@
--- src/common.c
+++ src/common.c
@@ -157,7 +157,7 @@
WINAPI
#endif
- mypoll(struct mypollfd *fds, unsigned int nfds, int timeout){
+ mypoll(struct mypollfd *fds, nfds_t nfds, int timeout){
fd_set readfd;
fd_set writefd;
fd_set oobfd;
--- src/structures.h
+++ src/structures.h
@@ -69,6 +69,7 @@
#ifdef WITH_POLL
#include <poll.h>
#else
+typedef unsigned int nfds_t;
#ifdef WITH_WSAPOLL
#define poll(A,B,C) WSAPoll(A,B,C)
@@ -84,7 +85,7 @@
#ifdef _WIN32
WINAPI
#endif
- mypoll(struct mypollfd *fds, unsigned int nfds, int timeout);
+ mypoll(struct mypollfd *fds, nfds_t nfds, int timeout);
#ifndef POLLIN
#define POLLIN 1
#endif
@@ -434,7 +435,7 @@
int (WINAPI *_getsockname)(void* state, SOCKET s, struct sockaddr * name, int * namelen);
int (WINAPI *_getsockopt)(void* state, SOCKET s, int level, int optname, char * optval, int * optlen);
int (WINAPI *_setsockopt)(void* state, SOCKET s, int level, int optname, const char *optval, int optlen);
- int (WINAPI *_poll)(void* state, struct pollfd *fds, unsigned int nfds, int timeout);
+ int (WINAPI *_poll)(struct pollfd *fds, nfds_t nfds, int timeout);
int (WINAPI *_send)(void* state, SOCKET s, const char *msg, int len, int flags);
int (WINAPI *_sendto)(void* state, SOCKET s, const char *msg, int len, int flags, const struct sockaddr *to, int tolen);
int (WINAPI *_recv)(void* state, SOCKET s, char *buf, int len, int flags);

View file

@ -1,31 +0,0 @@
diff --git a/man/3proxy.8 b/man/3proxy.8
index 2379308..b48f95c 100644
--- a/man/3proxy.8
+++ b/man/3proxy.8
@@ -75,7 +75,7 @@ compatibility with existing log file parsers. It makes it possible to use
.TP
.B config_file
Name of config file. See
-.BR 3proxy.cfg (3)
+.BR 3proxy.cfg (5)
for configuration file format. Under Windows, if config_file is not specified,
.BR 3proxy
looks for a file named
@@ -85,7 +85,7 @@ looks for a file named
configuration from stdin. It makes it possible to use the 3proxy.cfg file as
an executable script just by setting +x mode and adding
.br
-#!/usr/local/3proxy/3proxy
+#!/usr/bin/3proxy
.br
as a first line in 3proxy.cfg
.TP
@@ -134,7 +134,7 @@ Web admin service can also be used to reload configuration. Use
wget to automate this task.
.SH FILES
.TP
-.I "/usr/local/3proxy/3proxy.cfg (3proxy.cfg)"
+.I "/etc/3proxy.cfg (3proxy.cfg)"
.BR 3proxy
configuration file
.SH BUGS

View file

@ -1,192 +0,0 @@
diff --git a/man/3proxy.8 b/man/3proxy.8
index 7b89b36..aaef4af 100644
--- a/man/3proxy.8
+++ b/man/3proxy.8
@@ -26,7 +26,7 @@ It can establish multiple
gateways with HTTP and HTTPS proxy with FTP over HTTP support, SOCKS v4,
v4.5 and v5, POP3 proxy, UDP and TCP portmappers. Each gateway is started
from the configuration file like an independent service
-.BR proxy (8)
+.BR htproxy (8)
.BR socks (8)
.BR pop3p (8)
.BR imapp (8)
@@ -141,7 +141,7 @@ configuration file
Report all bugs to
.BR 3proxy@3proxy.org
.SH SEE ALSO
-3proxy.cfg(5), proxy(8), ftppr(8), socks(8), pop3p(8), imapp(8), tcppm(8), udppm(8),
+3proxy.cfg(5), ftppr(8), htproxy(8), socks(8), pop3p(8), imapp(8), tcppm(8), tlspr(8), udppm(8),
kill(1), syslogd(8),
.br
https://3proxy.org/
diff --git a/man/3proxy.cfg.5 b/man/3proxy.cfg.5
index 416bb17..e100b1c 100644
--- a/man/3proxy.cfg.5
+++ b/man/3proxy.cfg.5
@@ -46,7 +46,7 @@ Recursion is not allowed.
Next commands start gateway services:
.br
-.B proxy
+.B htproxy
[options]
.br
.B socks
@@ -80,7 +80,7 @@ Recursion is not allowed.
.br
Descriptions:
.br
-.B proxy
+.B htproxy
HTTP/HTTPS proxy (default port 3128)
.br
.B socks
@@ -240,7 +240,7 @@ Never ask for username/password
(for proxy) generate Via: and X-Forwarded-For: instead of Forwarded:
.br
Also, all options mentioned for
-.BR proxy (8)
+.BR htproxy (8)
.BR socks (8)
.BR pop3p (8)
.BR imapp (8)
@@ -1498,7 +1498,7 @@ authentication and/or allow/deny ACLs.
Report all bugs to
.BR 3proxy@3proxy.org
.SH SEE ALSO
-3proxy(8), 3proxy_crypt(8), proxy(8), ftppr(8), socks(8), pop3p(8), imapp(8), smtpp(8), tlspr(8), tcppm(8), udppm(8), syslogd(8),
+3proxy(8), 3proxy_crypt(8), ftppr(8), htproxy(8), socks(8), pop3p(8), imapp(8), smtpp(8), tlspr(8), tcppm(8), udppm(8), syslogd(8),
.br
https://3proxy.org/
.SH AUTHORS
diff --git a/man/ftppr.8 b/man/ftppr.8
index 93665d4..d623dad 100644
--- a/man/ftppr.8
+++ b/man/ftppr.8
@@ -102,7 +102,7 @@ Only cleartext authentication is currently supported.
Report all bugs to
.BR 3proxy@3proxy.org
.SH SEE ALSO
-3proxy(8), proxy(8), pop3p(8), socks(8), tcppm(8), udppm(8), syslogd(8),
+3proxy(8), htproxy(8), pop3p(8), socks(8), tcppm(8), udppm(8), syslogd(8),
.br
https://3proxy.org/
.SH AUTHORS
diff --git a/man/proxy.8 b/man/htproxy.8
similarity index 98%
rename from man/proxy.8
rename to man/htproxy.8
index d3c4385..6136bc8 100644
--- a/man/proxy.8
+++ b/man/htproxy.8
@@ -1,15 +1,15 @@
.TH proxy "8" "May 2026" "3proxy 0.9" "Universal proxy server"
.SH NAME
-.B proxy
+.B htproxy
\- HTTP proxy gateway service
.SH SYNOPSIS
-.BR "proxy " [ -d ][ -a ]
+.BR "htproxy " [ -d ][ -a ]
.IB \fR[ -l \fR[ \fR[ @ \fR] logfile \fR]]
.IB \fR[ -p port\fR]
.IB \fR[ -i internal_ip\fR]
.IB \fR[ -e external_ip\fR]
.SH DESCRIPTION
-.B proxy
+.B htproxy
is HTTP gateway service with HTTPS and FTP over HTTPS support.
.SH OPTIONS
.TP
diff --git a/man/imapp.8 b/man/imapp.8
index 13e1dee..a5a043f 100644
--- a/man/imapp.8
+++ b/man/imapp.8
@@ -117,7 +117,7 @@ with the client fails.
Report all bugs to
.BR 3proxy@3proxy.org
.SH SEE ALSO
-3proxy(8), ftppr(8), pop3p(8), proxy(8), smtpp(8), socks(8), tcppm(8), tlspr(8), udppm(8), syslogd(8),
+3proxy(8), ftppr(8), pop3p(8), htproxy(8), smtpp(8), socks(8), tcppm(8), tlspr(8), udppm(8), syslogd(8),
.br
https://3proxy.org/
.SH AUTHORS
diff --git a/man/pop3p.8 b/man/pop3p.8
index 19c7382..458e88c 100644
--- a/man/pop3p.8
+++ b/man/pop3p.8
@@ -113,7 +113,7 @@ with the client fails.
Report all bugs to
.BR 3proxy@3proxy.org
.SH SEE ALSO
-3proxy(8), ftppr(8), proxy(8), socks(8), tcppm(8), udppm(8), syslogd(8),
+3proxy(8), ftppr(8), htproxy(8), socks(8), tcppm(8), udppm(8), syslogd(8),
.br
https://3proxy.org/
.SH AUTHORS
diff --git a/man/smtpp.8 b/man/smtpp.8
index 8f25403..7d2c7a5 100644
--- a/man/smtpp.8
+++ b/man/smtpp.8
@@ -114,7 +114,7 @@ with the client fails.
Report all bugs to
.BR 3proxy@3proxy.org
.SH SEE ALSO
-3proxy(8), ftppr(8), proxy(8), socks(8), tcppm(8), udppm(8), syslogd(8),
+3proxy(8), ftppr(8), htproxy(8), socks(8), tcppm(8), udppm(8), syslogd(8),
.br
https://3proxy.org/
.SH AUTHORS
diff --git a/man/socks.8 b/man/socks.8
index ec49d53..dc533f0 100644
--- a/man/socks.8
+++ b/man/socks.8
@@ -107,7 +107,7 @@ instead.
Report all bugs to
.BR 3proxy@3proxy.org
.SH SEE ALSO
-3proxy(8), proxy(8), ftppr(8), pop3p(8), tcppm(8), udppm(8), syslogd(8),
+3proxy(8), htproxy(8), ftppr(8), pop3p(8), tcppm(8), udppm(8), syslogd(8),
.br
https://3proxy.org/
.SH AUTHORS
diff --git a/man/tcppm.8 b/man/tcppm.8
index 0145977..102263b 100644
--- a/man/tcppm.8
+++ b/man/tcppm.8
@@ -96,7 +96,7 @@ as the destination in the client application. The connection is forwarded to
Report all bugs to
.BR 3proxy@3proxy.org
.SH SEE ALSO
-3proxy(8), proxy(8), ftppr(8), socks(8), pop3p(8), udppm(8), syslogd(8),
+3proxy(8), htproxy(8), ftppr(8), socks(8), pop3p(8), udppm(8), syslogd(8),
.br
https://3proxy.org/
.SH AUTHORS
diff --git a/man/tlspr.8 b/man/tlspr.8
index 6bd903d..f75d853 100644
--- a/man/tlspr.8
+++ b/man/tlspr.8
@@ -113,7 +113,7 @@ instead.
Report all bugs to
.BR 3proxy@3proxy.org
.SH SEE ALSO
-3proxy(8), ftppr(8), proxy(8), socks(8), pop3p(8), smtpp(8), tcppm(8), udppm(8), syslogd(8),
+3proxy(8), ftppr(8), htproxy(8), socks(8), pop3p(8), smtpp(8), tcppm(8), udppm(8), syslogd(8),
.br
https://3proxy.org/
.SH AUTHORS
diff --git a/man/udppm.8 b/man/udppm.8
index 03cbed3..a96442f 100644
--- a/man/udppm.8
+++ b/man/udppm.8
@@ -89,7 +89,7 @@ as the destination in the client application. All datagrams are forwarded to
Report all bugs to
.BR 3proxy@3proxy.org
.SH SEE ALSO
-3proxy(8), proxy(8), ftppr(8), socks(8), pop3p(8), udppm(8), syslogd(8),
+3proxy(8), htproxy(8), ftppr(8), socks(8), pop3p(8), udppm(8), syslogd(8),
.br
https://3proxy.org/
.SH AUTHORS

View file

@ -1,12 +1,14 @@
%global _hardened_build 1
Name: 3proxy
Version: 1.0.0
Version: 0.9.5
Release: %autorelease
Summary: Tiny but very powerful proxy
Summary(ru): Маленький, но крайне мощный прокси-сервер
License: BSD-3-Clause OR Apache-2.0 OR GPL-2.0-or-later OR LGPL-2.1-or-later
Url: https://3proxy.org/
Url: http://3proxy.ru/?l=EN
Source0: https://github.com/%{name}/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source2: 3proxy.cfg
Source3: 3proxy.service
@ -14,14 +16,14 @@ Source3: 3proxy.service
BuildRequires: gcc
BuildRequires: make
BuildRequires: openssl-devel
BuildRequires: pam-devel
BuildRequires: pcre2-devel
BuildRequires: systemd-rpm-macros
# I correct config path in man only. It is fully Fedora related.
Patch0: 3proxy-1.0.0-config-path.patch
Patch0: 3proxy-0.6.1-config-path.patch
# Fixes *_poll build error
Patch1: 3proxy-0.9.4-poll-build.patch
# Adapt manpages to reflect renamed proxy binary
Patch1: 3proxy-1.0.0-manpage.patch
Patch2: 3proxy-0.9.4-manpage.patch
%description
%{name} -- light proxy server.
@ -40,25 +42,22 @@ SOCKS v5, FTP, POP3, UDP и TCP проброс портов (portmapping), сп
%prep
%autosetup -p1
%autosetup -p0
# To use "fedora" CFLAGS (exported)
sed -i -e "s/^CFLAGS [?]=\+/CFLAGS +=/" -e "s/^CFLAGS =/CFLAGS +=/" Makefile.Linux
sed -i -e "s/^CFLAGS =/CFLAGS +=/" Makefile.Linux
%build
%set_build_flags
%make_build -f Makefile.Linux PREFIX=
make -f Makefile.Linux
%install
install -d %{buildroot}%{_sysconfdir}
install -d %{buildroot}%{_mandir}/man{5,8}
install -d %{buildroot}%{_localstatedir}/log/%{name}
install -d %{buildroot}%{_libdir}/%{name}
mkdir -p %{buildroot}%{_sysconfdir}
mkdir -p %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/
mkdir -p %{buildroot}%{_mandir}/man{3,8}
mkdir -p %{buildroot}%{_localstatedir}/log/%{name}
install -m755 -D bin/%{name} %{buildroot}%{_bindir}/%{name}
install -m755 -D bin/ftppr %{buildroot}%{_bindir}/ftppr
install -m755 -D bin/imapp %{buildroot}%{_bindir}/imapp
install -m755 -D bin/crypt %{buildroot}%{_bindir}/mycrypt
install -m755 -D bin/mycrypt %{buildroot}%{_bindir}/mycrypt
install -m755 -D bin/pop3p %{buildroot}%{_bindir}/pop3p
install -m755 -D bin/proxy %{buildroot}%{_bindir}/htproxy
install -m755 -D bin/smtpp %{buildroot}%{_bindir}/smtpp
@ -67,23 +66,13 @@ install -m755 -D bin/tcppm %{buildroot}%{_bindir}/tcppm
install -m755 -D bin/tlspr %{buildroot}%{_bindir}/tlspr
install -m755 -D bin/udppm %{buildroot}%{_bindir}/udppm
install -m755 -D bin/*.ld.so %{buildroot}%{_libdir}/%{name}/
install -pD -m644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/%{name}.cfg
install -pD -m755 %{SOURCE3} %{buildroot}/%{_unitdir}/%{name}.service
install -p -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/%{name}.cfg
install -p -m644 -D %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service
for man in man/*.5 ; do
install -p -m644 "$man" "%{buildroot}%{_mandir}/man5/"
for man in man/*.{3,8} ; do
install "$man" "%{buildroot}%{_mandir}/man${man:(-1)}/"
done
for man in man/*.8 ; do
install -p -m644 "$man" "%{buildroot}%{_mandir}/man8/"
done
echo ".so 3proxy_crypt.8" > %{buildroot}%{_mandir}/man8/mycrypt.8
%check
# Upstream does not provide an automated test suite.
# Smoke test the built binaries.
%{buildroot}%{_bindir}/mycrypt test password
%post
%systemd_post %{name}.service
@ -96,24 +85,12 @@ echo ".so 3proxy_crypt.8" > %{buildroot}%{_mandir}/man8/mycrypt.8
%files
%license copying
%doc README.md authors
%{_bindir}/%{name}
%{_bindir}/ftppr
%{_bindir}/htproxy
%{_bindir}/imapp
%{_bindir}/mycrypt
%{_bindir}/pop3p
%{_bindir}/smtpp
%{_bindir}/socks
%{_bindir}/tcppm
%{_bindir}/tlspr
%{_bindir}/udppm
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/*.ld.so
%doc README authors
%{_bindir}/*
%config(noreplace) %{_sysconfdir}/%{name}.cfg
%dir %{_localstatedir}/log/%{name}
%{_mandir}/man5/*.5*
%{_mandir}/man8/*.8*
%{_localstatedir}/log/%{name}
%{_mandir}/man8/*.8.gz
%{_mandir}/man3/*.3.gz
%{_unitdir}/%{name}.service
%changelog

View file

@ -1 +1 @@
SHA512 (3proxy-1.0.0.tar.gz) = 3516935698b199a17a3f92c567353836723906b8c44cdfec9511bf1840fbf086b04d9e1b4f6a1d4b622f588151badce019cbc397b6a77a6aaf5930743e242669
SHA512 (3proxy-0.9.5.tar.gz) = b668db6438da19ee2479228af744b9b3b9ff2c7e6d97aaf3b20737b165ab2baf656ac9ea92b6f1e169c428784c7d9e3e7eeb7c3effb1c0b77e5038319b6d2bcd