Connect back proxy functionality added

-r and -R options added to support connect back functionality between
two instances of proxy
This commit is contained in:
z3APA3A committed 2015-09-20 21:01:50 +03:00
1 parent 6529b9cea1
commit a2b5af6dab
5 files changed
+182 -67

No files matched your search

+18
View File
@@ -216,6 +216,24 @@ int ceparseargs(const char *str){
#endif
void parsehost(int family, char *host, struct sockaddr *sa){
char *sp=NULL,*se=NULL;
unsigned short port;
if(*host == '[') se=strchr(host, ']');
if ( (sp = strchr(se?se:host, ':')) ) *sp = 0;
if(se){
*se = 0;
}
if(sp){
port = atoi(sp+1);
}
getip46(family, host + (se!=0), (struct sockaddr *)sa);
if(se) *se = ']';
if(sp) *sp = ':';
*SAPORT(sa) = htons(port);
}
int parsehostname(char *hostname, struct clientparam *param, unsigned short port){
char *sp=NULL,*se=NULL;