mirror of
https://github.com/3proxy/3proxy.git
synced 2026-08-27 03:43:12 +00:00
initial import to git
This commit is contained in:
commit
a060376f1e
217 changed files with 64253 additions and 0 deletions
41
src/tcppm.c
Normal file
41
src/tcppm.c
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
3APA3A simpliest proxy server
|
||||
(c) 2002-2008 by ZARAZA <3APA3A@security.nnov.ru>
|
||||
|
||||
please read License Agreement
|
||||
|
||||
$Id: tcppm.c,v 1.15 2012-02-05 22:29:02 vlad Exp $
|
||||
*/
|
||||
|
||||
#include "proxy.h"
|
||||
|
||||
#ifndef PORTMAP
|
||||
#define PORTMAP
|
||||
#endif
|
||||
#define RETURN(xxx) { param->res = xxx; goto CLEANRET; }
|
||||
|
||||
void * tcppmchild(struct clientparam* param) {
|
||||
int res;
|
||||
|
||||
if(!param->hostname)parsehostname((char *)param->srv->target, param, ntohs(param->srv->targetport));
|
||||
param->operation = CONNECT;
|
||||
res = (*param->srv->authfunc)(param);
|
||||
if(res) {RETURN(res);}
|
||||
RETURN (sockmap(param, conf.timeouts[CONNECTION_L]));
|
||||
CLEANRET:
|
||||
|
||||
(*param->srv->logfunc)(param, NULL);
|
||||
freeparam(param);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
#ifdef WITHMAIN
|
||||
struct proxydef childdef = {
|
||||
tcppmchild,
|
||||
0,
|
||||
0,
|
||||
S_TCPPM,
|
||||
""
|
||||
};
|
||||
#include "proxymain.c"
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue