Create a DNS forwarded with C++
Budget: €8 – €50 EUR
The application would listen for UDP port and send incoming
messages to an upstream server. Server’s replies are returned to corresponding client endpoints.
Below are implementation details (many items are for reducing complexity of the task):
- Implementation language C++14 or higher
- Compiles and runs on Ubuntu or Debian
- Synchronous application running in one thread and serving one client at a time
* Optionally multi-threaded or event-driven concurrent operation
- Console output to cout/cerr
- Supports IPv4 and IPv6 for both incoming and outgoing requests
- Uses standard socket API, no additional networking libraries
- DNS queries with duplicate trans_id can be ignored
- Error conditions don't require sending error packet to client
- Listen endpoint is hardcoded to 127.0.0.1:9000
- Upstream server endpoint is collected from command line arguments
- Shuts down cleanly when SIGTERM/SIGINT is received
Example usage:
./dns_forwarder 127.0.0.53 53&
dig @127.0.0.1 -p 9000 hs.fi
messages to an upstream server. Server’s replies are returned to corresponding client endpoints.
Below are implementation details (many items are for reducing complexity of the task):
- Implementation language C++14 or higher
- Compiles and runs on Ubuntu or Debian
- Synchronous application running in one thread and serving one client at a time
* Optionally multi-threaded or event-driven concurrent operation
- Console output to cout/cerr
- Supports IPv4 and IPv6 for both incoming and outgoing requests
- Uses standard socket API, no additional networking libraries
- DNS queries with duplicate trans_id can be ignored
- Error conditions don't require sending error packet to client
- Listen endpoint is hardcoded to 127.0.0.1:9000
- Upstream server endpoint is collected from command line arguments
- Shuts down cleanly when SIGTERM/SIGINT is received
Example usage:
./dns_forwarder 127.0.0.53 53&
dig @127.0.0.1 -p 9000 hs.fi