diff --git a/src/socks5.c b/src/socks5.c index 02a6a34..277bfdf 100644 --- a/src/socks5.c +++ b/src/socks5.c @@ -15,8 +15,6 @@ struct socks5_ctx { uint8_t sr_host_read; }; -int on_socks5_send_handshake(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo); - void socks5_free_ctx(void* elem) { struct socks5_ctx* ctx = elem; free(ctx); @@ -100,6 +98,7 @@ int on_socks5_send_handshake(struct evt_core_ctx* ctx, struct evt_core_fdinfo* f if (s5ctx->ch_cursor < s5ctx->ch_size) return 0; evt_core_mv_fd2(ctx, fdinfo, "socks5-recv-handshake"); + fdinfo->cat->cb(ctx, fdinfo); return 1; } @@ -148,6 +147,7 @@ int on_socks5_send_client_req(struct evt_core_ctx* ctx, struct evt_core_fdinfo* if (s5ctx->cr_cursor < s5ctx->cr_size) return 0; evt_core_mv_fd2 (ctx, fdinfo, "socks5-recv-server-reply"); + fdinfo->cat->cb(ctx, fdinfo); return 1; }