mirror of
https://github.com/3proxy/3proxy.git
synced 2026-04-12 16:00:11 +08:00
Compare commits
2 Commits
00785d0f4a
...
8195e398bf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8195e398bf | ||
|
|
9acb538721 |
4
.github/workflows/build-rpm-arm64.yml
vendored
4
.github/workflows/build-rpm-arm64.yml
vendored
@ -45,7 +45,7 @@ jobs:
|
||||
cd $ret
|
||||
mv ~/rpmbuild/RPMS/aarch64/3proxy-$RELEASE-1.aarch64.rpm 3proxy-$RELEASE.arm64.rpm
|
||||
- name: Get artifact arp
|
||||
uses: actions/upload-artifact@v6
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: "3proxy-${{ env.RELEASE }}-arm64.rpm"
|
||||
path: "*.rpm"
|
||||
@ -65,7 +65,7 @@ jobs:
|
||||
cd $ret
|
||||
cp ~/debian/3proxy_$RELEASE-"$VERSION"_arm64.deb ./3proxy-$RELEASE.arm64.deb
|
||||
- name: Get artifact deb
|
||||
uses: actions/upload-artifact@v6
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: "3proxy-${{ env.RELEASE }}-arm64.deb"
|
||||
path: "*.deb"
|
||||
|
||||
4
.github/workflows/build-rpm-armhf.yml
vendored
4
.github/workflows/build-rpm-armhf.yml
vendored
@ -72,7 +72,7 @@ jobs:
|
||||
cd $ret
|
||||
mv ~/rpmbuild/RPMS/arm/3proxy-$RELEASE-1.arm.rpm 3proxy-$RELEASE.arm.rpm
|
||||
- name: Get artifact
|
||||
uses: actions/upload-artifact@v6
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: "3proxy-${{ env.RELEASE }}-arm.rpm"
|
||||
path: "*.rpm"
|
||||
@ -98,7 +98,7 @@ jobs:
|
||||
cd $ret
|
||||
cp ~/debian/3proxy_$RELEASE-"$VERSION"_armhf.deb ./3proxy-$RELEASE.arm.deb
|
||||
- name: Get artifact deb
|
||||
uses: actions/upload-artifact@v6
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: "3proxy-${{ env.RELEASE }}-arm.deb"
|
||||
path: "*.deb"
|
||||
|
||||
4
.github/workflows/build-rpm-x86-64.yml
vendored
4
.github/workflows/build-rpm-x86-64.yml
vendored
@ -45,7 +45,7 @@ jobs:
|
||||
cd $ret
|
||||
mv ~/rpmbuild/RPMS/x86_64/3proxy-$RELEASE-1.x86_64.rpm 3proxy-$RELEASE.x86_64.rpm
|
||||
- name: Get artifact rpm
|
||||
uses: actions/upload-artifact@v6
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: "3proxy-${{ env.RELEASE }}-x86_64.rpm"
|
||||
path: "*.rpm"
|
||||
@ -65,7 +65,7 @@ jobs:
|
||||
cd $ret
|
||||
cp ~/debian/3proxy_$RELEASE-"$VERSION"_amd64.deb ./3proxy-$RELEASE.x86_64.deb
|
||||
- name: Get artifact deb
|
||||
uses: actions/upload-artifact@v6
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: "3proxy-${{ env.RELEASE }}-x86_64.deb"
|
||||
path: "*.deb"
|
||||
|
||||
2
.github/workflows/build-watcom.yml
vendored
2
.github/workflows/build-watcom.yml
vendored
@ -64,7 +64,7 @@ jobs:
|
||||
copy README dist\3proxy\
|
||||
copy rus.3ps dist\3proxy\
|
||||
- name: Get artifact
|
||||
uses: actions/upload-artifact@v6
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: "3proxy-${{ env.RELEASE }}-lite"
|
||||
path: dist/
|
||||
|
||||
2
.github/workflows/build-win32.yml
vendored
2
.github/workflows/build-win32.yml
vendored
@ -70,7 +70,7 @@ jobs:
|
||||
copy README dist\3proxy\
|
||||
copy rus.3ps dist\3proxy\
|
||||
- name: Get artifact
|
||||
uses: actions/upload-artifact@v6
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: "3proxy-${{ env.RELEASE }}"
|
||||
path: dist/
|
||||
|
||||
2
.github/workflows/build-win64.yml
vendored
2
.github/workflows/build-win64.yml
vendored
@ -72,7 +72,7 @@ jobs:
|
||||
copy README dist\3proxy\
|
||||
copy rus.3ps dist\3proxy\
|
||||
- name: Get artifact
|
||||
uses: actions/upload-artifact@v6
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: "3proxy-${{ env.RELEASE }}-x64"
|
||||
path: dist/
|
||||
|
||||
2
.github/workflows/build-winarm64.yml
vendored
2
.github/workflows/build-winarm64.yml
vendored
@ -70,7 +70,7 @@ jobs:
|
||||
copy README dist\3proxy\
|
||||
copy rus.3ps dist\3proxy\
|
||||
- name: Get artifact
|
||||
uses: actions/upload-artifact@v6
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: "3proxy-${{ env.RELEASE }}-arm64"
|
||||
path: dist/
|
||||
|
||||
@ -148,6 +148,6 @@ install-log:
|
||||
|
||||
install: install-chroot-dir install-bin install-etc install-log install-man install-run install-init
|
||||
@if [ "$(DESTDIR)" = "" ]; then \
|
||||
sh debian/preinst; \
|
||||
sh debian/postinst; \
|
||||
sh scripts/debian/preinst; \
|
||||
sh scripts/debian/postinst; \
|
||||
fi
|
||||
|
||||
@ -57,11 +57,11 @@ connections and UDP portmapping.</p>
|
||||
cellspacing="0" cellpadding="0">
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="4%">
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-I</b></p></td>
|
||||
<td width="5%"></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
@ -69,11 +69,11 @@ connections and UDP portmapping.</p>
|
||||
only.</p> </td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="4%">
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-d</b></p></td>
|
||||
<td width="5%"></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
@ -81,11 +81,11 @@ only.</p> </td></tr>
|
||||
console and run in the background.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="4%">
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-t</b></p></td>
|
||||
<td width="5%"></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
@ -93,11 +93,11 @@ console and run in the background.</p></td></tr>
|
||||
start/stop/accept error records.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="4%">
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-u</b></p></td>
|
||||
<td width="5%"></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
@ -105,11 +105,11 @@ start/stop/accept error records.</p></td></tr>
|
||||
authentication</p> </td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="4%">
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-e</b></p></td>
|
||||
<td width="5%"></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
@ -120,43 +120,25 @@ connections. By default, the system will decide which
|
||||
address to use in accordance with the routing table.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="4%">
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-Ne</b></p></td>
|
||||
<td width="5%"></td>
|
||||
<p style="margin-top: 1em"><b>-N</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">External NAT address 3proxy
|
||||
reports to client for CONNECT/BIND. This is external address
|
||||
of NAT between 3proxy and destination server. By default,
|
||||
the external address is reported. It’s only useful in
|
||||
the case of IP-IP NAT and does not work with port
|
||||
translation.</p> </td></tr>
|
||||
reports to client for BIND and UDPASSOC. By default, the
|
||||
external address is reported. It’s only useful in the
|
||||
case of IP-IP NAT (will not work for PAT).</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="4%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-Ni</b></p></td>
|
||||
<td width="5%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Internal NAT address 3proxy
|
||||
reports to client for UDPASSOC. This is external address of
|
||||
the NAT between 3proxy and the client, client uses to
|
||||
connect to 3proxy. By default, the internal address is
|
||||
reported. It’s only useful in the case of IP-IP NAT
|
||||
and does not work with port translation.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="4%">
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-i</b></p></td>
|
||||
<td width="5%"></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
@ -165,11 +147,11 @@ proxy accepts connections to. By default, connections to any
|
||||
interface are accepted. It´s usually unsafe.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="4%">
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-p</b></p></td>
|
||||
<td width="5%"></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
@ -177,11 +159,11 @@ interface are accepted. It´s usually unsafe.</p></td></tr>
|
||||
incoming connections. Default is 1080.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="4%">
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-l</b></p></td>
|
||||
<td width="5%"></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
@ -191,11 +173,11 @@ Under Unix, if ´<i>@</i>´ preceeds
|
||||
<i>logfile</i>, syslog is used for logging.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="4%">
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-S</b></p></td>
|
||||
<td width="5%"></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
|
||||
14
man/socks.8
14
man/socks.8
@ -33,18 +33,10 @@ from. External IP must be specified if you need incoming connections.
|
||||
By default, the system will decide which address to use in accordance
|
||||
with the routing table.
|
||||
.TP
|
||||
.B -Ne
|
||||
External NAT address 3proxy reports to client for CONNECT/BIND.
|
||||
This is external address of NAT between 3proxy and destination server.
|
||||
.B -N
|
||||
External NAT address 3proxy reports to client for BIND and UDPASSOC.
|
||||
By default, the external address is reported. It's only useful in the case
|
||||
of IP-IP NAT and does not work with port translation.
|
||||
.TP
|
||||
.B -Ni
|
||||
Internal NAT address 3proxy reports to client for UDPASSOC.
|
||||
This is external address of the NAT between 3proxy and the client, client
|
||||
uses to connect to 3proxy.
|
||||
By default, the internal address is reported. It's only useful in the case
|
||||
of IP-IP NAT and does not work with port translation.
|
||||
of IP-IP NAT (will not work for PAT).
|
||||
.TP
|
||||
.B -i
|
||||
Internal address. IP address the proxy accepts connections to.
|
||||
|
||||
@ -437,9 +437,7 @@ int MODULEMAINFUNC (int argc, char** argv){
|
||||
break;
|
||||
#endif
|
||||
case 'N':
|
||||
if(argv[i][3] == 'e') getip46(46, (unsigned char *)argv[i]+3, (struct sockaddr *)&srv.extNat);
|
||||
else if(argv[i][3] == 'i') getip46(46, (unsigned char *)argv[i]+3, (struct sockaddr *)&srv.intNat);
|
||||
else getip46(46, (unsigned char *)argv[i]+2, (struct sockaddr *)&srv.extNat);
|
||||
getip46(46, (unsigned char *)argv[i]+2, (struct sockaddr *)&srv.extNat);
|
||||
break;
|
||||
case 'p':
|
||||
*SAPORT(&srv.intsa) = htons(atoi(argv[i]+2));
|
||||
|
||||
20
src/socks.c
20
src/socks.c
@ -274,21 +274,7 @@ CLEANRET:
|
||||
|
||||
sasize = sizeof(sin);
|
||||
if(command != 3 && param->remsock != INVALID_SOCKET) param->srv->so._getsockname(param->sostate, param->remsock, (struct sockaddr *)&sin, &sasize);
|
||||
if(!SAISNULL(¶m->srv->extNat)){
|
||||
uint16_t port;
|
||||
port = *SAPORT(&sin);
|
||||
sin = param->srv->extNat;
|
||||
*SAPORT(&sin) = port;
|
||||
}
|
||||
else {
|
||||
param->srv->so._getsockname(param->sostate, param->clisock, (struct sockaddr *)&sin, &sasize);
|
||||
if(!SAISNULL(¶m->srv->intNat)){
|
||||
uint16_t port;
|
||||
port = *SAPORT(&sin);
|
||||
sin = param->srv->intNat;
|
||||
*SAPORT(&sin) = port;
|
||||
}
|
||||
}
|
||||
else param->srv->so._getsockname(param->sostate, param->clisock, (struct sockaddr *)&sin, &sasize);
|
||||
#if SOCKSTRACE > 0
|
||||
myinet_ntop(*SAFAMILY(&sin), &sin, tracebuf, SASIZE(&sin));
|
||||
fprintf(stderr, "Sending confirmation to client with code %d for %s with %s:%hu\n",
|
||||
@ -532,9 +518,7 @@ struct proxydef childdef = {
|
||||
1080,
|
||||
0,
|
||||
S_SOCKS,
|
||||
"-Ne(EXTERNAL_IP) External NAT address (between 3proxy and destination server) to report to client for CONNECT / BIND\n"
|
||||
"-Ni(INTERNAL_IP) Internal NAT address (between client and 3proxy) to report to client for UDPASSOC\n"
|
||||
"NAT is required to map IP-to-IP without port translation\n"
|
||||
"-N(EXTERNAL_IP) External NAT address to report to client for BIND\n"
|
||||
};
|
||||
#include "proxymain.c"
|
||||
#endif
|
||||
|
||||
@ -516,12 +516,10 @@ struct srvparam {
|
||||
struct sockaddr_in6 extsa6;
|
||||
struct sockaddr_in6 extsa;
|
||||
struct sockaddr_in6 extNat;
|
||||
struct sockaddr_in6 intNat;
|
||||
#else
|
||||
struct sockaddr_in intsa;
|
||||
struct sockaddr_in extsa;
|
||||
struct sockaddr_in extNat;
|
||||
struct sockaddr_in intNat;
|
||||
#endif
|
||||
pthread_mutex_t counter_mutex;
|
||||
struct pollfd fds;
|
||||
|
||||
@ -9,6 +9,4 @@
|
||||
#define MINOR3PROXY 5
|
||||
#define SUBMINOR3PROXY 0
|
||||
#define RELEASE3PROXY "3proxy-0.9.5(" BUILDDATE ")\0"
|
||||
#ifndef YEAR3PROXY
|
||||
#define YEAR3PROXY "2026"
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user