Skip to content

Commit

Permalink
Merge pull request bisq-network#2235 from alvasw/whonix_tor_controlle…
Browse files Browse the repository at this point in the history
…r_implement_setconf_command

WhonixTorController: Implement SETCONF command
  • Loading branch information
djing-chan authored Jun 1, 2024
2 parents 8bbb1a4 + 513513f commit dde2d57
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ public void resetConf(String configName) throws IOException {
}
}

public void setConfig(String configName, String configValue) throws IOException {
String command = "SETCONF " + configName + "=" + configValue + "\r\n";
sendCommand(command);
String reply = receiveReply();
if (!reply.equals("250 OK")) {
throw new ControlCommandFailedException("Couldn't set config: " + configName + "=" + configValue);
}
}

public void setEvents(List<String> events) throws IOException {
var stringBuilder = new StringBuffer("SETEVENTS");
events.forEach(event -> stringBuilder.append(" ").append(event));
Expand Down

0 comments on commit dde2d57

Please sign in to comment.