A brief file description. More...
#include "P_EventSystem.h"
#include "I_Socks.h"
#include "ParentSelection.h"
#include <ts/IpMap.h>
Go to the source code of this file.
Data Structures | |
struct | socks_conf_struct |
struct | SocksEntry |
Typedefs | |
typedef int(* | SocksAuthHandler )(int event, unsigned char *buf, void(**h_ptr)(void)) |
typedef UnixNetVConnection | SocksNetVC |
typedef int(SocksEntry::* | SocksEntryHandler )(int, void *) |
Enumerations | |
enum | { SOCKS_AUTH_OPEN, SOCKS_AUTH_WRITE_COMPLETE, SOCKS_AUTH_READ_COMPLETE, SOCKS_AUTH_FILL_WRITE_BUF } |
Functions | |
void | start_SocksProxy (int port) |
int | loadSocksAuthInfo (int fd, socks_conf_struct *socks_stuff) |
TS_INLINE int | invokeSocksAuthHandler (SocksAuthHandler &h, int arg1, unsigned char *arg2) |
void | loadSocksConfiguration (socks_conf_struct *socks_conf_stuff) |
int | socks5BasicAuthHandler (int event, unsigned char *p, void(**)(void)) |
int | socks5PasswdAuthHandler (int event, unsigned char *p, void(**)(void)) |
int | socks5ServerAuthHandler (int event, unsigned char *p, void(**)(void)) |
Variables | |
struct socks_conf_struct * | g_socks_conf_stuff |
ClassAllocator< SocksEntry > | socksAllocator |
A brief file description.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file P_Socks.h.
typedef int(* SocksAuthHandler)(int event, unsigned char *buf, void(**h_ptr)(void)) |
typedef int(SocksEntry::* SocksEntryHandler)(int, void *) |
typedef UnixNetVConnection SocksNetVC |
anonymous enum |
TS_INLINE int invokeSocksAuthHandler | ( | SocksAuthHandler & | h, | |
int | arg1, | |||
unsigned char * | arg2 | |||
) |
Definition at line 90 of file P_Socks.h.
Referenced by SocksProxy::mainEvent(), and SocksEntry::mainEvent().
int loadSocksAuthInfo | ( | int | fd, | |
socks_conf_struct * | socks_stuff | |||
) |
Definition at line 558 of file Socks.cc.
References ats_malloc(), Debug, memcpy, socks_conf_struct::user_name_n_passwd, socks_conf_struct::user_name_n_passwd_len, and Warning.
Referenced by loadSocksConfiguration().
void loadSocksConfiguration | ( | socks_conf_struct * | socks_conf_stuff | ) |
Definition at line 463 of file Socks.cc.
References socks_conf_struct::accept_enabled, socks_conf_struct::accept_port, ats_free(), socks_conf_struct::connection_attempts, Debug, socks_conf_struct::default_version, Error, Layout::get(), socks_conf_struct::http_port, socks_conf_struct::ip_map, Load_IpMap_From_File(), loadSocksAuthInfo(), PATH_NAME_MAX, socks_conf_struct::per_server_connection_attempts, REC_ConfigReadInteger(), REC_ConfigReadString(), Layout::relative_to(), socks_conf_struct::server_connect_timeout, socks_conf_struct::socks_needed, socks_conf_struct::socks_timeout, and SocksServerConfig::startup().
Referenced by UnixNetProcessor::start().
int socks5BasicAuthHandler | ( | int | event, | |
unsigned char * | p, | |||
void(**)(void) | ||||
) |
Definition at line 605 of file Socks.cc.
References Debug, ink_assert, netProcessor, SOCKS5_VERSION, socks5PasswdAuthHandler(), SOCKS_AUTH_OPEN, SOCKS_AUTH_READ_COMPLETE, SOCKS_AUTH_WRITE_COMPLETE, NetProcessor::socks_conf_stuff, and socks_conf_struct::user_name_n_passwd.
int socks5PasswdAuthHandler | ( | int | event, | |
unsigned char * | p, | |||
void(**)(void) | ||||
) |
Definition at line 677 of file Socks.cc.
References Debug, ink_assert, memcpy, netProcessor, SOCKS_AUTH_OPEN, SOCKS_AUTH_READ_COMPLETE, SOCKS_AUTH_WRITE_COMPLETE, NetProcessor::socks_conf_stuff, socks_conf_struct::user_name_n_passwd, and socks_conf_struct::user_name_n_passwd_len.
Referenced by socks5BasicAuthHandler().
int socks5ServerAuthHandler | ( | int | event, | |
unsigned char * | p, | |||
void(**)(void) | ||||
) |
Definition at line 547 of file SocksProxy.cc.
References Debug, ink_assert, SOCKS5_VERSION, SOCKS_AUTH_FILL_WRITE_BUF, SOCKS_AUTH_READ_COMPLETE, and SOCKS_AUTH_WRITE_COMPLETE.
void start_SocksProxy | ( | int | port | ) |
Definition at line 526 of file SocksProxy.cc.
References Debug, NetProcessor::AcceptOptions::local_port, NetProcessor::main_accept(), netProcessor, NO_FD, RecAllocateRawStatBlock(), RECD_INT, RECP_PERSISTENT, RecRawStatSyncCount(), RecRegisterRawStat, RECT_PROCESS, socksproxy_http_connections_stat, socksproxy_stat_count, and socksproxy_tunneled_connections_stat.
Referenced by main().
struct socks_conf_struct* g_socks_conf_stuff |
Referenced by UnixNetProcessor::connect_re_internal(), and SocksEntry::free().