mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-26 23:59:41 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7959e0f358 | ||
|
|
fdd9f63222 | ||
|
|
34e1fabf11 | ||
|
|
3f6755f7fc |
No files matched your search
+7
-2
@@ -493,7 +493,10 @@ network conditions.
|
||||
\fI<NAS_SECRET>\fR \fI<radius_server_1\fR[:\fIport\fR][/\fIlocal_address_1\fR]\fR \fI<radius_server_2\fR[:\fIport\fR][/\fIlocal_address_2\fR]\fR
|
||||
.br
|
||||
Configures RADIUS servers to be used for logging and authentication (log and auth types
|
||||
must be set to radius). port and local address to use with given server may be specified.
|
||||
must be set to radius). A server is a name or an address, resolved when the
|
||||
configuration is read. port and local address to use with given server may be specified:
|
||||
the port named is the one authentication is asked on, and the accounting requests of
|
||||
the same server go to the port after it (1812 and 1813 by default).
|
||||
.br
|
||||
Attributes within request: User-Name, Password: (username and password if presented by client),
|
||||
Service Type: Authenticate-Only,
|
||||
@@ -517,7 +520,9 @@ Use \fBauthcache\fR to speedup authentication. RADIUS feature is currently exper
|
||||
.br
|
||||
Nameserver to use for name resolutions. If none specified
|
||||
system routines for name resolution is
|
||||
used. Optional port number may be specified.
|
||||
used. A server that answers with an error (FORMERR, SERVFAIL, REFUSED
|
||||
and the like) is passed over for the next one, while a name answered
|
||||
with no data, or as not there, ends the search. Optional port number may be specified.
|
||||
If optional /tcp is added to IP address, name resolution is
|
||||
performed over TCP.
|
||||
An IPv6 address has to be enclosed in square brackets:
|
||||
|
||||
+2
-2
@@ -1456,8 +1456,8 @@ static int h_radius(int argc, unsigned char **argv){
|
||||
*s = 0;
|
||||
s++;
|
||||
}
|
||||
if( !getip46(46, argv[nradservers + 2], (struct sockaddr *)&radiuslist[nradservers].authaddr)) return 1;
|
||||
if( s && !getip46(46, (unsigned char *)s, (struct sockaddr *)&radiuslist[nradservers].localaddr)) return 2;
|
||||
if(parsehost(46, argv[nradservers + 2], (struct sockaddr *)&radiuslist[nradservers].authaddr)) return 1;
|
||||
if(s && parsehost(46, (unsigned char *)s, (struct sockaddr *)&radiuslist[nradservers].localaddr)) return 2;
|
||||
if(!*SAPORT(&radiuslist[nradservers].authaddr))*SAPORT(&radiuslist[nradservers].authaddr) = htons(1812);
|
||||
port = ntohs(*SAPORT(&radiuslist[nradservers].authaddr));
|
||||
radiuslist[nradservers].logaddr = radiuslist[nradservers].authaddr;
|
||||
|
||||
+5
-5
@@ -222,12 +222,12 @@ void * dnsprchild(struct clientparam* param) {
|
||||
}
|
||||
buf[0] = cid[0];
|
||||
buf[1] = cid[1];
|
||||
if(buf[6] || buf[7]){
|
||||
if(socksendto(param, param->clisock, (struct sockaddr *)¶m->sincr, buf, len, conf.timeouts[SINGLEBYTE_L]*1000) != len){
|
||||
RETURN(822);
|
||||
}
|
||||
RETURN(0);
|
||||
/* the answer goes to the client as it is, its code with no records
|
||||
among them: the name not found is the server's word, not ours */
|
||||
if(socksendto(param, param->clisock, (struct sockaddr *)¶m->sincr, buf, len, conf.timeouts[SINGLEBYTE_L]*1000) != len){
|
||||
RETURN(822);
|
||||
}
|
||||
RETURN(0);
|
||||
|
||||
}
|
||||
if(!ip) {
|
||||
|
||||
+7
-1
@@ -156,7 +156,13 @@ uint32_t udpresolve(int af, unsigned char * name, unsigned char * value, uint32_
|
||||
continue; /* question does not match the query */
|
||||
}
|
||||
if((na = buf[7] + (((unsigned short)buf[6])<<8)) < 1) {
|
||||
return 0;
|
||||
switch(buf[3] & 0x0F){
|
||||
case 0: /* the name has no address */
|
||||
case 3: /* the name is not there */
|
||||
return 0;
|
||||
default: /* the server failed: ask the next one */
|
||||
continue;
|
||||
}
|
||||
}
|
||||
for(k = 13; k<len && buf[k]; k++) {
|
||||
}
|
||||
|
||||
+13
-10
@@ -335,6 +335,7 @@ void * tlsprchild(struct clientparam* param) {
|
||||
int lv=-1;
|
||||
char proto[PROTOLEN]="-";
|
||||
int snipos = 0;
|
||||
int snlen = 0;
|
||||
PROXYSERVICE stlsproto = param->clientstarttls? param->clientstarttls : param->srv->srvstarttls;
|
||||
|
||||
if(!param->clientstarttls && stlsproto){
|
||||
@@ -357,16 +358,7 @@ void * tlsprchild(struct clientparam* param) {
|
||||
}
|
||||
else if (parsehostname(sni, param, param->srv->targetport? ntohs(param->srv->targetport):starttlsport(stlsproto))) RETURN (100);
|
||||
if (!param->hostname)param->hostname = (unsigned char *)strdup(sni);
|
||||
if(param->srv->s_option && snipos && res > 1){
|
||||
int len;
|
||||
|
||||
len = socksend(param, param->remsock, param->clibuf+param->clioffset,snipos + (res/2), conf.timeouts[STRING_S]);
|
||||
if(len != snipos + (res/2)){
|
||||
RETURN(310);
|
||||
}
|
||||
param->clioffset += snipos + (res/2);
|
||||
|
||||
}
|
||||
snlen = res;
|
||||
}
|
||||
else if (res < 0 && param->srv->requirecert) RETURN(310-res);
|
||||
}
|
||||
@@ -386,6 +378,17 @@ void * tlsprchild(struct clientparam* param) {
|
||||
return (void *)param->redirectfunc;
|
||||
}
|
||||
|
||||
if(param->srv->s_option && snipos && snlen > 1){
|
||||
int len;
|
||||
|
||||
len = socksend(param, param->remsock, param->clibuf+param->clioffset,snipos + (snlen/2), conf.timeouts[STRING_S]);
|
||||
if(len != snipos + (snlen/2)){
|
||||
RETURN(310);
|
||||
}
|
||||
param->clioffset += snipos + (snlen/2);
|
||||
|
||||
}
|
||||
|
||||
if(stlsproto){
|
||||
res = srvstarttls(param, stlsproto);
|
||||
if(res){
|
||||
|
||||
Reference in new issue
Block a user