mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-09 22:28:51 +02:00
Merge bitcoin/bitcoin#33414: tor: enable PoW defenses for automatically created hidden services
c68e3d2c57doc: add release notes for Tor PoW defenses (Vasil Dimov)4bae84c94adoc: add a hint to enable PoW defenses to manual hidden services (Vasil Dimov)4c6798a3d3tor: enable PoW defenses for automatically created hidden services (Vasil Dimov)fb993f7604tor, fuzz: reuse constants instead of duplicating (Vasil Dimov) Pull request description: Enable [PoW defenses](https://tpo.pages.torproject.net/onion-services/ecosystem/technology/security/pow/) for hidden services that we create via Tor Control using the [`ADD_ONION` command](https://spec.torproject.org/control-spec/commands.html#add_onion). The ability to do that has been added in [tor-0.4.9.2-alpha](02c1804446). Previous versions return a syntax error to the `ADD_ONION` command with `PoWDefensesEnabled=1`, so the approach here is to try with PoW and if we get syntax error, then retry without PoW. Also update `doc/tor.md` with a hint on enabling PoW on manually configured Tor hidden services. ACKs for top commit: willcl-ark: ACKc68e3d2c57fjahr: tACKc68e3d2c57sedited: ACKc68e3d2c57Tree-SHA512: 56f57bc770b89389c35a4c0bc2a28804d17b1479ecd4d9b764695d6c9d2994425aee759e71658d7b57088bbe43ce90b94fb972f66d79ef903e0c1a4d6c4562f3
This commit is contained in:
@@ -49,10 +49,13 @@ FUZZ_TARGET(torcontrol, .init = initialize_torcontrol)
|
||||
CallOneOf(
|
||||
fuzzed_data_provider,
|
||||
[&] {
|
||||
tor_control_reply.code = 250;
|
||||
tor_control_reply.code = TOR_REPLY_OK;
|
||||
},
|
||||
[&] {
|
||||
tor_control_reply.code = 510;
|
||||
tor_control_reply.code = TOR_REPLY_UNRECOGNIZED;
|
||||
},
|
||||
[&] {
|
||||
tor_control_reply.code = TOR_REPLY_SYNTAX_ERROR;
|
||||
},
|
||||
[&] {
|
||||
tor_control_reply.code = fuzzed_data_provider.ConsumeIntegral<int>();
|
||||
@@ -65,7 +68,10 @@ FUZZ_TARGET(torcontrol, .init = initialize_torcontrol)
|
||||
CallOneOf(
|
||||
fuzzed_data_provider,
|
||||
[&] {
|
||||
tor_controller.add_onion_cb(dummy_tor_control_connection, tor_control_reply);
|
||||
tor_controller.add_onion_cb(dummy_tor_control_connection, tor_control_reply, /*pow_was_enabled=*/true);
|
||||
},
|
||||
[&] {
|
||||
tor_controller.add_onion_cb(dummy_tor_control_connection, tor_control_reply, /*pow_was_enabled=*/false);
|
||||
},
|
||||
[&] {
|
||||
tor_controller.auth_cb(dummy_tor_control_connection, tor_control_reply);
|
||||
|
||||
Reference in New Issue
Block a user