Add flag when restoring too
This commit is contained in:
parent
8f19f65e85
commit
cd2d6d5fce
1 changed files with 9 additions and 1 deletions
|
@ -38,7 +38,15 @@ int tor_ctl_add_onion(struct tor_ctl* ctx, struct tor_os_str* tos, uint16_t* por
|
||||||
|
|
||||||
/* Add onion services loaded from file */
|
/* Add onion services loaded from file */
|
||||||
for (int i = 0; i < tos->filled; i++) {
|
for (int i = 0; i < tos->filled; i++) {
|
||||||
fprintf(ctx->wsock, "add_onion %s Port=%d,127.13.3.7:%d\n", tos->keys[i].priv, port[i], port[i]);
|
if (flags == TOR_ONION_FLAG_NONE)
|
||||||
|
fprintf(ctx->wsock, "add_onion %s Port=%d,127.13.3.7:%d\n", tos->keys[i].priv, port[i], port[i]);
|
||||||
|
else {
|
||||||
|
fprintf(ctx->wsock, "add_onion %s Port=%d,127.13.3.7:%d Flags=", tos->keys[i].priv, port[i], port[i]);
|
||||||
|
if (flags & TOR_ONION_FLAG_NON_ANONYMOUS)
|
||||||
|
fprintf(ctx->wsock, "NonAnonymous,");
|
||||||
|
fprintf(ctx->wsock, "\n");
|
||||||
|
}
|
||||||
|
|
||||||
fscanf(ctx->rsock, "%d", &err);
|
fscanf(ctx->rsock, "%d", &err);
|
||||||
if (err != 250) {
|
if (err != 250) {
|
||||||
printf("err: %d\n", err);
|
printf("err: %d\n", err);
|
||||||
|
|
Loading…
Reference in a new issue