mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
parent: support fraction and % syntaxis for weight; support fallbacks with 0 weight
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Has been cancelled
This commit is contained in:
1 parent
2c382f370a
commit
bf1930789d
7 files changed
+610
-34
No files matched your search
+13
-1
@@ -62,6 +62,13 @@ typedef struct _3proxy_sem_s {
|
||||
#endif
|
||||
#endif
|
||||
#define MAXBANDLIMS 10
|
||||
#define MAXFAILEDPARENTS 16
|
||||
/* Parent weights are kept as a share of WEIGHTSCALE, which is what the
|
||||
weights of a group add up to. WEIGHTFUZZ is how far short of it a group may
|
||||
fall and still be taken for a whole one, a thousandth of the share: three
|
||||
weights of 333, or of .333333333, otherwise leave a remainder. */
|
||||
#define WEIGHTSCALE 1000000000u
|
||||
#define WEIGHTFUZZ 1000000u
|
||||
|
||||
#ifdef WITH_POLL
|
||||
#include <poll.h>
|
||||
@@ -336,7 +343,7 @@ struct chain {
|
||||
unsigned char * exthost;
|
||||
unsigned char * extuser;
|
||||
unsigned char * extpass;
|
||||
unsigned short weight;
|
||||
unsigned weight;
|
||||
unsigned short cidr;
|
||||
/* local port range for extport/intport, first in the low half */
|
||||
uint32_t range;
|
||||
@@ -764,6 +771,11 @@ struct clientparam {
|
||||
one connection rather than for the service, which is how a redirect
|
||||
and a service name standing in for a mail proxy reach tlspr. */
|
||||
PROXYSERVICE starttls;
|
||||
/* Parents which failed for this connection. A retry picks another
|
||||
member of the group instead of the same one again, and a zero weight
|
||||
member is only reached once every weighted one is in here. */
|
||||
struct chain *failedparents[MAXFAILEDPARENTS];
|
||||
int nfailedparents;
|
||||
};
|
||||
|
||||
struct filemon {
|
||||
|
||||
Reference in new issue
Block a user