Compare commits

..

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

5 changed files with 193 additions and 197 deletions

1
.gitignore vendored
View file

@ -6,4 +6,3 @@
/3proxy-0.8.12.tar.gz
/3proxy-0.8.13.tar.gz
/3proxy-0.9.4.tar.gz
/3proxy-0.9.5.tar.gz

View file

@ -1,164 +1,3 @@
--- 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 @@
@ -232,22 +71,183 @@
-instead.
-.SH BUGS
-Report all bugs to
-.BR 3proxy@3proxy.org
-.BR 3proxy@3proxy.ru
-.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 )
-.RI ( 3proxy@3proxy.ru )
--- /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.ru
+.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.ru )
--- 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.ru
.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), 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
@@ -174,7 +174,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)
@@ -1057,7 +1057,7 @@
Report all bugs to
.BR 3proxy@3proxy.ru
.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), 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.ru
.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
--- man/pop3p.8
+++ man/pop3p.8
@@ -75,7 +75,7 @@
Report all bugs to
.BR 3proxy@3proxy.ru
.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
--- man/smtpp.8
+++ man/smtpp.8
@@ -76,7 +76,7 @@
Report all bugs to
.BR 3proxy@3proxy.org
.BR 3proxy@3proxy.ru
.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),
+3proxy(8), ftppr(8), htproxy(8), socks(8), tcppm(8), udppm(8), syslogd(8),
.br
https://3proxy.org/
.SH AUTHORS
@ -255,10 +255,10 @@
+++ man/socks.8
@@ -76,7 +76,7 @@
Report all bugs to
.BR 3proxy@3proxy.org
.BR 3proxy@3proxy.ru
.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),
+3proxy(8), ftppr(8), htproxy(8), pop3p(8), tcppm(8), udppm(8), syslogd(8),
.br
https://3proxy.org/
.SH AUTHORS
@ -266,21 +266,10 @@
+++ man/tcppm.8
@@ -65,7 +65,7 @@
Report all bugs to
.BR 3proxy@3proxy.org
.BR 3proxy@3proxy.ru
.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),
+3proxy(8), ftppr(8), htproxy(8), socks(8), pop3p(8), udppm(8), syslogd(8),
.br
https://3proxy.org/
.SH AUTHORS
@ -288,10 +277,10 @@
+++ man/udppm.8
@@ -71,7 +71,7 @@
Report all bugs to
.BR 3proxy@3proxy.org
.BR 3proxy@3proxy.ru
.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),
+3proxy(8), ftppr(8), htproxy(8), socks(8), pop3p(8), udppm(8), syslogd(8),
.br
https://3proxy.org/
.SH AUTHORS

View file

@ -1,6 +1,6 @@
--- src/common.c
+++ src/common.c
@@ -157,7 +157,7 @@
@@ -156,7 +156,7 @@
WINAPI
#endif
@ -11,7 +11,7 @@
fd_set oobfd;
--- src/structures.h
+++ src/structures.h
@@ -69,6 +69,7 @@
@@ -66,6 +66,7 @@
#ifdef WITH_POLL
#include <poll.h>
#else
@ -19,7 +19,7 @@
#ifdef WITH_WSAPOLL
#define poll(A,B,C) WSAPoll(A,B,C)
@@ -84,7 +85,7 @@
@@ -81,7 +82,7 @@
#ifdef _WIN32
WINAPI
#endif
@ -28,12 +28,21 @@
#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);
@@ -694,7 +695,7 @@
int (WINAPI *_getsockname)(SOCKET s, struct sockaddr * name, int * namelen);
int (WINAPI *_getsockopt)(SOCKET s, int level, int optname, char * optval, int * optlen);
int (WINAPI *_setsockopt)(SOCKET s, int level, int optname, const char *optval, int optlen);
- int (WINAPI *_poll)(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);
int (WINAPI *_send)(SOCKET s, const char *msg, int len, int flags);
int (WINAPI *_sendto)(SOCKET s, const char *msg, int len, int flags, const struct sockaddr *to, int tolen);
int (WINAPI *_recv)(SOCKET s, char *buf, int len, int flags);
@@ -711,7 +712,7 @@
int (*_getsockname)(SOCKET s, struct sockaddr * name, socklen_t * namelen);
int (*_getsockopt)(SOCKET s, int level, int optname, void * optval, socklen_t * optlen);
int (*_setsockopt)(int s, int level, int optname, const void *optval, socklen_t optlen);
- int (*_poll)(struct pollfd *fds, unsigned int nfds, int timeout);
+ int (*_poll)(struct pollfd *fds, nfds_t nfds, int timeout);
size_t (*_send)(SOCKET s, const void *msg, size_t len, int flags);
size_t (*_sendto)(SOCKET s, const void *msg, size_t len, int flags, const struct sockaddr *to, SASIZETYPE tolen);
size_t (*_recv)(SOCKET s, void *buf, size_t len, int flags);

View file

@ -1,7 +1,7 @@
%global _hardened_build 1
Name: 3proxy
Version: 0.9.5
Version: 0.9.4
Release: %autorelease
Summary: Tiny but very powerful proxy
@ -63,7 +63,6 @@ install -m755 -D bin/proxy %{buildroot}%{_bindir}/htproxy
install -m755 -D bin/smtpp %{buildroot}%{_bindir}/smtpp
install -m755 -D bin/socks %{buildroot}%{_bindir}/socks
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 -pD -m644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/%{name}.cfg

View file

@ -1 +1 @@
SHA512 (3proxy-0.9.5.tar.gz) = b668db6438da19ee2479228af744b9b3b9ff2c7e6d97aaf3b20737b165ab2baf656ac9ea92b6f1e169c428784c7d9e3e7eeb7c3effb1c0b77e5038319b6d2bcd
SHA512 (3proxy-0.9.4.tar.gz) = d3316f6ee1217e580ce593a7bfd9d76672487a89862f247373b0acf3ea207887c758168e33b25db9fc974063deab0826c20d455cab2536d03eee49d8bddda6b5