MCPcopy Create free account
hub / github.com/apache/trafficserver / state_send_socks5_auth_method

Method state_send_socks5_auth_method

src/traffic_server/SocksProxy.cc:412–435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

410}
411
412int
413SocksProxy::state_send_socks5_auth_method(int event, [[maybe_unused]] void *data)
414{
415 ink_assert(state == SOCKS_ACCEPT);
416 switch (event) {
417 case VC_EVENT_WRITE_COMPLETE:
418 state = AUTH_DONE;
419
420 buf->reset();
421 timeout = this_ethread()->schedule_in(this, HRTIME_SECONDS(netProcessor.socks_conf_stuff->socks_timeout));
422
423 // We always send "No authentication is required" to client,
424 // so the next is socks5 request.
425 vc_handler = &SocksProxy::state_read_socks5_client_request;
426 clientVC->do_io_read(this, INT64_MAX, buf);
427 break;
428 case VC_EVENT_WRITE_READY:
429 default:
430 Dbg(dbg_ctl_SocksProxy, "Received unexpected event: %s\n", get_vc_event_name(event));
431 break;
432 }
433
434 return EVENT_DONE;
435}
436
437int
438SocksProxy::state_read_socks5_client_request(int event, [[maybe_unused]] void *data)

Callers

nothing calls this directly

Calls 5

this_ethreadFunction · 0.85
get_vc_event_nameFunction · 0.85
resetMethod · 0.45
schedule_inMethod · 0.45
do_io_readMethod · 0.45

Tested by

no test coverage detected