mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
Added IPv6 support for 'external' command and -e
Now, 2 external addresses can be specified: one for IPv4 and one for IPv6
This commit is contained in:
1 parent
a425dc40b3
commit
f1e017394d
6 files changed
+52
-24
No files matched your search
+11
-2
@@ -732,7 +732,16 @@ static int h_internal(int argc, unsigned char ** argv){
|
||||
}
|
||||
|
||||
static int h_external(int argc, unsigned char ** argv){
|
||||
conf.extip = getip(argv[1]);
|
||||
int res;
|
||||
#ifndef NOIPV6
|
||||
struct sockaddr_in6 sa6;
|
||||
res = getip46(46, argv[1], (struct sockaddr *)&sa6);
|
||||
if(!res) return 1;
|
||||
memcpy((*SAFAMILY(&sa6)==AF_INET)?(void *)&conf.extsa:(void *)&conf.extsa6, &sa6, SASIZE(&sa6));
|
||||
#else
|
||||
res = getip46(46, argv[1], (struct sockaddr *)&conf.extsa);
|
||||
if(!res) return 1;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2040,7 +2049,7 @@ int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int
|
||||
|
||||
{
|
||||
char * args[] = {"auth", "iponly", NULL};
|
||||
h_auth(2, args);
|
||||
h_auth(2, (unsigned char **)args);
|
||||
}
|
||||
|
||||
res = readconfig(fp);
|
||||
|
||||
Reference in new issue
Block a user