Skip to content

Commit

Permalink
TorControlProtocol: Implement HSFETCH
Browse files Browse the repository at this point in the history
  • Loading branch information
alvasw committed Jun 8, 2024
1 parent c362f47 commit c597205
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ public String getInfo(String keyword) throws IOException {
return assertTwoLineOkReply(replyStream, "GETINFO");
}

public void hsFetch(String hsAddress) throws IOException {
String command = "HSFETCH " + hsAddress + "\r\n";
sendCommand(command);
String reply = receiveReply().findFirst().orElseThrow();
if (!reply.equals("250 OK")) {
throw new ControlCommandFailedException("Couldn't initiate HSFETCH for : " + hsAddress);
}
}

public void resetConf(String configName) throws IOException {
String command = "RESETCONF " + configName + "\r\n";
sendCommand(command);
Expand Down

0 comments on commit c597205

Please sign in to comment.