mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
Support unix sockets for internal and -i
Example configuration: log auto -iunix:/path/to/3proxy.sock test with curl --unix-socket /path/to/3proxy.sock https://3proxy.ru
This commit is contained in:
1 parent
77b0dc3397
commit
c206349ee2
14 files changed
+153
-135
No files matched your search
+5
-13
@@ -255,7 +255,7 @@ int handleredirect(struct clientparam * param, struct ace * acentry){
|
||||
if(!connected){
|
||||
if(cur->type == R_EXTIP){
|
||||
param->sinsl = cur->addr;
|
||||
if(SAISNULL(¶m->sinsl))param->sinsl = param->sincr;
|
||||
if(SAISNULL(¶m->sinsl) && (*SAFAMILY(¶m->sincr) == AF_INET || *SAFAMILY(¶m->sincr) == AF_INET6))param->sinsl = param->sincr;
|
||||
#ifndef NOIPV6
|
||||
else if(cur->cidr && *SAFAMILY(¶m->sinsl) == AF_INET6){
|
||||
uint16_t c;
|
||||
@@ -766,11 +766,8 @@ struct authcache {
|
||||
char * username;
|
||||
char * password;
|
||||
time_t expires;
|
||||
#ifndef NOIPV6
|
||||
struct sockaddr_in6 sa, sinsl;
|
||||
#else
|
||||
struct sockaddr_in sa, sinsl;
|
||||
#endif
|
||||
PROXYSOCKADDRTYPE sa;
|
||||
PROXYSOCKADDRTYPE sinsl;
|
||||
struct ace *acl;
|
||||
struct authcache *next;
|
||||
} *authc = NULL;
|
||||
@@ -1209,13 +1206,8 @@ uint32_t udpresolve(int af, unsigned char * name, unsigned char * value, uint32_
|
||||
int j, k, len, flen;
|
||||
SOCKET sock;
|
||||
uint32_t ttl;
|
||||
#ifndef NOIPV6
|
||||
struct sockaddr_in6 addr;
|
||||
struct sockaddr_in6 *sinsr, *sinsl;
|
||||
#else
|
||||
struct sockaddr_in addr;
|
||||
struct sockaddr_in *sinsr, *sinsl;
|
||||
#endif
|
||||
PROXYSOCKADDRTYPE addr;
|
||||
PROXYSOCKADDRTYPE *sinsr, *sinsl;
|
||||
int usetcp = 0;
|
||||
unsigned short serial = 1;
|
||||
|
||||
|
||||
Reference in new issue
Block a user