Skip to content

Commit

Permalink
translation/server/Response: add ALLOW_REMOTE_NETWORK support
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Jun 28, 2024
1 parent 14d5ff3 commit c34d951
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/translation/server/Response.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,13 @@ public:
return Packet(TranslationCommand::DISCARD_QUERY_STRING);
}

auto &AllowRemoteNetwork(SocketAddress address,
const uint8_t &prefix_length) noexcept {
return MultiPacket(TranslationCommand::ALLOW_REMOTE_NETWORK,
static_cast<std::span<const std::byte>>(address),
std::span{&prefix_length, 1});
}

struct RedirectContext {
Response &response;

Expand Down

0 comments on commit c34d951

Please sign in to comment.