---
title: llarp::dns::Proxy

---

# llarp::dns::Proxy





Inherits from [llarp::dns::PacketHandler](Classes/classllarp_1_1dns_1_1PacketHandler.md), std::enable_shared_from_this< PacketHandler >

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[Proxy](Classes/classllarp_1_1dns_1_1Proxy.md#function-proxy)**(EventLoop_ptr loop, [IQueryHandler](Classes/classllarp_1_1dns_1_1IQueryHandler.md) * handler) |
| virtual bool | **[Start](Classes/classllarp_1_1dns_1_1Proxy.md#function-start)**([SockAddr](Classes/structllarp_1_1SockAddr.md) localaddr, std::vector< [SockAddr](Classes/structllarp_1_1SockAddr.md) > upstreamResolvers, std::vector< fs::path > hostfiles) override |

## Protected Functions

|                | Name           |
| -------------- | -------------- |
| virtual void | **[SendServerMessageBufferTo](Classes/classllarp_1_1dns_1_1Proxy.md#function-sendservermessagebufferto)**(const [SockAddr](Classes/structllarp_1_1SockAddr.md) & to, const [SockAddr](Classes/structllarp_1_1SockAddr.md) & from, [llarp_buffer_t](Classes/structllarp__buffer__t.md) buf) override |

## Additional inherited members

**Public Functions inherited from [llarp::dns::PacketHandler](Classes/classllarp_1_1dns_1_1PacketHandler.md)**

|                | Name           |
| -------------- | -------------- |
| | **[PacketHandler](Classes/classllarp_1_1dns_1_1PacketHandler.md#function-packethandler)**(EventLoop_ptr loop, [IQueryHandler](Classes/classllarp_1_1dns_1_1IQueryHandler.md) * handler) |
| virtual | **[~PacketHandler](Classes/classllarp_1_1dns_1_1PacketHandler.md#function-~packethandler)**() =default |
| void | **[Stop](Classes/classllarp_1_1dns_1_1PacketHandler.md#function-stop)**() |
| void | **[Restart](Classes/classllarp_1_1dns_1_1PacketHandler.md#function-restart)**() |
| void | **[HandlePacket](Classes/classllarp_1_1dns_1_1PacketHandler.md#function-handlepacket)**(const [SockAddr](Classes/structllarp_1_1SockAddr.md) & resolver, const [SockAddr](Classes/structllarp_1_1SockAddr.md) & from, [llarp_buffer_t](Classes/structllarp__buffer__t.md) buf) |
| bool | **[ShouldHandlePacket](Classes/classllarp_1_1dns_1_1PacketHandler.md#function-shouldhandlepacket)**(const [SockAddr](Classes/structllarp_1_1SockAddr.md) & to, const [SockAddr](Classes/structllarp_1_1SockAddr.md) & from, [llarp_buffer_t](Classes/structllarp__buffer__t.md) buf) const |

**Protected Functions inherited from [llarp::dns::PacketHandler](Classes/classllarp_1_1dns_1_1PacketHandler.md)**

|                | Name           |
| -------------- | -------------- |
| virtual bool | **[IsUpstreamResolver](Classes/classllarp_1_1dns_1_1PacketHandler.md#function-isupstreamresolver)**(const [SockAddr](Classes/structllarp_1_1SockAddr.md) & to, const [SockAddr](Classes/structllarp_1_1SockAddr.md) & from) const |


## Public Functions Documentation

### function Proxy

```cpp
explicit Proxy(
    EventLoop_ptr loop,
    IQueryHandler * handler
)
```


### function Start

```cpp
virtual bool Start(
    SockAddr localaddr,
    std::vector< SockAddr > upstreamResolvers,
    std::vector< fs::path > hostfiles
) override
```


**Reimplements**: [llarp::dns::PacketHandler::Start](Classes/classllarp_1_1dns_1_1PacketHandler.md#function-start)


## Protected Functions Documentation

### function SendServerMessageBufferTo

```cpp
virtual void SendServerMessageBufferTo(
    const SockAddr & to,
    const SockAddr & from,
    llarp_buffer_t buf
) override
```


**Reimplements**: [llarp::dns::PacketHandler::SendServerMessageBufferTo](Classes/classllarp_1_1dns_1_1PacketHandler.md#function-sendservermessagebufferto)


-------------------------------

Updated on 2022-08-30 at 18:09:27 +0000