-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated README + linked documentation. Also added some comments to co…
…nfig fields.
- Loading branch information
1 parent
d2c35c7
commit ebc0484
Showing
6 changed files
with
76 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name = "dns_dropper" | |
version = "0.0.1" | ||
edition = "2021" | ||
authors = ["kalev gonvick <[email protected]>"] | ||
description = "DNS" | ||
description = "Customizable light-weight DNS proxy with domain filtering capabilities." | ||
license = "MIT" | ||
readme = "README.md" | ||
|
||
|
@@ -19,7 +19,6 @@ keywords = [ | |
"udp" | ||
] | ||
|
||
|
||
[profile.release] | ||
lto = true | ||
codegen-units = 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
# Config constants internal systems | ||
|
||
# default config directory | ||
default_server_config_dir: "config/server.yaml" | ||
|
||
# max udp packet size | ||
max_udp_packet_size: 4096 | ||
|
||
# worker name prefix displayed in logs | ||
worker_thread_name: "WT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Logging Options | ||
|
||
## Overview | ||
This document covers all logging options available for the DnsDropper config file. | ||
|
||
## Options | ||
|
||
| Property | Type | Description | Example | | ||
|:--------:|:-------:|:----------------------------------------------------------------------:|:------------| | ||
| level | String | Select the level for runtime logging. (TRACE\DEBUG\INFO\WARNING\ERROR) | ```trace``` | | ||
| enabled | Boolean | Enable/disable logging altogether. | ```true``` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Server Options | ||
|
||
## Overview | ||
This document covers all server options available for the DnsDropper config file. | ||
|
||
## Options | ||
|
||
| Property | Type | Description | Example | | ||
|:-------------------:|:-------:|:------------------------------------------------------------:|:--------| | ||
| worker_thread_count | Integer | Choose the number of (hardware) threads the server will use. | ```4``` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Proxy Options | ||
|
||
## Overview | ||
This document covers all server options available for the DnsDropper config file. | ||
|
||
## Options | ||
|
||
| Property | Type | Description | Example | | ||
|:----------------------:|:------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------| | ||
| **timeout** | Integer | Choose the proxy timeout(ms). | ```2000``` | | ||
| **bind** | String | Choose the bind of the udp proxy. Most of the time it will either be 0.0.0.0:53 for external and 127.0.0.1:53 for loopback configurations. The port number *must* be included in the definition. | ```127.0.0.1:53``` | | ||
| **dns_hosts** | List(String) | Specify any number of DNS hosts you want to proxy DNS requests to. The port number *must* be included in each definition. | ```["8.8.8.8:53", "1.1.1.1:53"]``` | | ||
| **domain_block_lists** | List(String) | Specify any number of resources to grab block lists from. It can be any type of resource url (http, file, etc.). The content of these resources *must* be in the format ```<ip>\s<domain>\n```. Domains loaded from multiple resources that contain the same domains will be deduplicated on startup. | ```["8.8.8.8:53", "1.1.1.1:53"]``` | | ||
|
||
## Example Configurations | ||
|
||
### | ||
```yaml | ||
... | ||
udp_proxy: | ||
|
||
# Set a timeout of 2000ms | ||
timeout: 2000 | ||
|
||
# Bind a loopback to the current machine on port 53. | ||
bind: "127.0.0.1:53" | ||
|
||
# Set the DNS destinations | ||
dns_hosts: | ||
- "8.8.8.8:53" | ||
- "8.8.4.4:53" | ||
- "1.0.0.1:53" | ||
- "1.1.1.1:53" | ||
|
||
# Add an external and local resource for our block list. | ||
domain_block_lists: | ||
- https://raw.githubusercontent.com/blocklistproject/Lists/master/ads.txt | ||
- test/config/local_block_list.txt | ||
... | ||
``` |