Remove debug
This commit is contained in:
parent
99c06ccc8d
commit
a84560c76b
1 changed files with 0 additions and 6 deletions
|
@ -18,7 +18,6 @@ void init_tcp_client(struct donar_client_ctx* ctx, int i) {
|
|||
|
||||
while (1) {
|
||||
fdinfo.fd = create_tcp_client("127.0.0.1", "9050");
|
||||
perror("1");
|
||||
if (fdinfo.fd < 0) goto failed_socks5;
|
||||
ctx->client_sock[i].fd = fdinfo.fd;
|
||||
ctx->client_sock[i].state = SOCKS5_STATE_NEW;
|
||||
|
@ -26,7 +25,6 @@ void init_tcp_client(struct donar_client_ctx* ctx, int i) {
|
|||
evt_core_add_fd (&(ctx->evts), &fdinfo);
|
||||
//@FIXME: We suppose that we will be able to do the whole write at once which is wrong
|
||||
err = socks5_handshake_syn(fdinfo.fd);
|
||||
perror("2");
|
||||
if (err) goto failed_socks5;
|
||||
|
||||
break;
|
||||
|
@ -59,21 +57,17 @@ int configure_tcp_clients(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdin
|
|||
case SOCKS5_STATE_NEW:
|
||||
//@FIXME: We suppose that we will be able to do the whole read at once which is wrong
|
||||
err = socks5_handshake_ack (fdinfo->fd);
|
||||
perror("3");
|
||||
if (err < 0) goto on_socks5_err;
|
||||
//@FIXME: We suppose that we will be able to do the whole write at once which is wrong too
|
||||
err = socks5_connect_dns(fdinfo->fd, target_host, app_ctx->ports[pos]);
|
||||
perror("4");
|
||||
if (err < 0) goto on_socks5_err;
|
||||
app_ctx->client_sock[pos].state = SOCKS5_STATE_ACK;
|
||||
printf("Socket %d/%d %s:%d is connecting...\n", pos+1, CLIENT_PORT_SIZE, target_host, app_ctx->ports[pos]);
|
||||
break;
|
||||
case SOCKS5_STATE_ACK:
|
||||
//@FIXME: We suppose that we will be able to do the whole read at once which is wrong too
|
||||
perror("5");
|
||||
err = socks5_reply (fdinfo->fd);
|
||||
fprintf(stderr, "captured err: %d\n", err);
|
||||
perror("6");
|
||||
if (err < 0) goto on_socks5_err;
|
||||
app_ctx->client_sock[pos].state = SOCKS5_STATE_RDY;
|
||||
int sock1, sock2;
|
||||
|
|
Loading…
Reference in a new issue