mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-23 23:59:41 +08:00
IPv6 support for authnserver
This commit is contained in:
1 parent
8a6632f0d1
commit
50db0015d3
6 files changed
+23
-29
No files matched your search
+9
-1
@@ -1022,8 +1022,16 @@ static int h_nserver(int argc, unsigned char **argv){
|
||||
}
|
||||
|
||||
static int h_authnserver(int argc, unsigned char **argv){
|
||||
char *str;
|
||||
|
||||
authnserver = getip(argv[1]);
|
||||
if((str = strchr((char *)argv[1], '/')))
|
||||
*str = 0;
|
||||
if(!getip46(46, argv[1], (struct sockaddr *)&authnserver.addr)) return 1;
|
||||
*SAPORT(&authnserver.addr) = htons(53);
|
||||
if(str) {
|
||||
authnserver.usetcp = strstr(str + 1, "tcp")? 1:0;
|
||||
*str = '/';
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user