3proxy/src/auto.c
Vladimir Dubrovin a20f646169
Some checks are pending
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
Pre-allocate client/server/tmp/etc buffers with client structure
2026-10-12 17:19:55 +03:00

33 lines
627 B
C

/*
3APA3A simplest proxy server
(c) 2002-2026 by Vladimir Dubrovin <vlad@3proxy.org>
please read License Agreement
*/
#include "proxy.h"
void * autochild(struct clientparam* param) {
int len;
len = sockfillbuf(param, CLIENT, 1, CONNECTION_S);
if (len != 1){
param->res = 801;
dolog(param, (unsigned char *)"");
return 0;
}
if(*param->clibuf == 4 || *param->clibuf == 5) {
param->service = S_SOCKS;
return (void *)sockschild;
}
if(*param->clibuf == 22) {
param->service = S_TLSPR;
return (void *)tlsprchild;
}
param->service = S_PROXY;
return (void *)proxychild;
}