Less log, fix buffer packet management
This commit is contained in:
parent
6e083d2db2
commit
cb075c8ea1
3 changed files with 6 additions and 4 deletions
|
@ -127,6 +127,8 @@ void mv_buffer_rtow(struct naive_ctx* app_ctx,
|
|||
}
|
||||
|
||||
void mv_buffer_wtor(struct naive_ctx* app_ctx, struct evt_core_fdinfo* fdinfo, struct buffer_packet* bp) {
|
||||
bp->mode = BP_READING;
|
||||
bp->aread = 0;
|
||||
g_queue_push_tail (app_ctx->free_buffer, bp);
|
||||
g_hash_table_remove(app_ctx->used_buffer, &(fdinfo->fd));
|
||||
}
|
||||
|
@ -171,7 +173,7 @@ void on_tcp_read(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo) {
|
|||
mv_buffer_wtor (app_ctx, fdinfo, bp);
|
||||
return;
|
||||
}
|
||||
printf("Pass packet from %s to %s\n", fdinfo->url, url);
|
||||
//printf("Pass packet from %s to %s\n", fdinfo->url, url);
|
||||
|
||||
// 4. We move the buffer and notify the target
|
||||
mv_buffer_rtow (app_ctx, fdinfo, to_fdinfo, bp);
|
||||
|
@ -233,7 +235,7 @@ void on_udp_read(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo) {
|
|||
mv_buffer_wtor (app_ctx, fdinfo, bp);
|
||||
return;
|
||||
}
|
||||
printf("Pass packet from %s to %s\n", fdinfo->url, url);
|
||||
//printf("Pass packet from %s to %s\n", fdinfo->url, url);
|
||||
|
||||
// 4. We move the buffer and notify the target
|
||||
mv_buffer_rtow (app_ctx, fdinfo, to_fdinfo, bp);
|
||||
|
|
|
@ -107,6 +107,7 @@ on_socks5_err:
|
|||
perror("An error occured while connecting to an Onion Service");
|
||||
app_ctx->client_sock[pos].state = SOCKS5_STATE_ERR;
|
||||
evt_core_rm_fd (ctx, fdinfo->fd);
|
||||
sleep(2);
|
||||
init_tcp_client (app_ctx, pos);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
ControlPort 9051
|
||||
UseEntryGuards 0
|
||||
SafeLogging 0
|
||||
SocksPort 9050 OnionTrafficOnly CacheDNS UseDNSCache
|
||||
|
||||
#Log INFO stdout
|
||||
|
|
Loading…
Reference in a new issue