Hot fix for now

This commit is contained in:
Quentin Dufour 2019-03-06 17:46:12 +01:00
parent c54304134b
commit ba0d4fd1b7
2 changed files with 3 additions and 1 deletions

View file

@ -33,7 +33,8 @@ void init_tcp_servers(struct donar_server_ctx* ctx) {
int err, sock = 0; int err, sock = 0;
for (int i = 0; i < PORT_SIZE; i++) { for (int i = 0; i < PORT_SIZE; i++) {
sprintf (buffer, "%d", ctx->ports[i]); sprintf (buffer, "%d", ctx->ports[i]);
sock = create_tcp_server ("127.13.3.7", buffer); //@FIXME shouldn't listen on 0.0.0.0 but 127.13.3.7 is not compatible with docker
sock = create_tcp_server ("0.0.0.0", buffer);
if (sock < 0) goto socket_create_err; if (sock < 0) goto socket_create_err;
err = listen(sock, SOMAXCONN); err = listen(sock, SOMAXCONN);
if (err != 0) goto socket_create_err; if (err != 0) goto socket_create_err;

View file

@ -52,6 +52,7 @@ int tor_ctl_add_onion(struct tor_ctl* ctx, struct tor_os_str* tos, uint16_t* por
/* Complete by creating new onion services */ /* Complete by creating new onion services */
for (int i = tos->filled; i < tos->size; i++) { for (int i = tos->filled; i < tos->size; i++) {
fprintf(ctx->wsock, "add_onion NEW:ED25519-V3 Port=%d\n", port[i]); fprintf(ctx->wsock, "add_onion NEW:ED25519-V3 Port=%d\n", port[i]);
//fprintf(ctx->wsock, "add_onion NEW:RSA1024 Port=%d\n", port[i]);
fscanf(ctx->rsock, "%d", &err); fscanf(ctx->rsock, "%d", &err);