NginxProxyManager / NginxProxyManager/nginx-proxy-manager
Make "NPM automatically create custom DNS with pihole" an option.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 34.2k
- Forks
- 3.9k
- Avg merge
- 21h 12m
- Merged PRs (30d)
- 20
Description
I'm using nginx-proxy-manager and it is one of the greatest tools ever!
I would like to automate the creation of custom DNS Records in Pihole so users can have fully automatic domain creation in a closed off environment.
The API of pihole can do this, here's the documentation: https://github.com/pi-hole/web/blob/6c320a42574f9f0944ded71d84b7331557dbc6ea/api.php
Is your feature request related to a problem? Please describe.
When I create a new proxy host and try it, my computer doesnt route to it since I'm in a closed off home network and pihole needs to know which IP belongs to the domain.
Describe the solution you'd like
I would love to have nginx proxy manager communicate any new, changed and deleted domains directly to pihole if the option is ticked and the contact info (web adress, docker adress, whatever is possible) is ticked.
Describe alternatives you've considered
An alternative would be to have pihole wildcard any subdomains of the base domain to the server IP but this leads to the issue of having to use different domains for different machines which isnt necessary with the above solution.
Additional context
I believe this is the entry of pihole API to talk to:
elseif(isset($_GET['customdns']) && $auth)
{
if (isset($_GET["auth"])) {
if ($_GET["auth"] !== $pwhash) {
die("Not authorized!");
}
} else {
// Skip token validation if explicit auth string is given
check_csrf($_GET['token']);
}
switch ($_GET["action"]) {
case 'get':
$data = echoCustomDNSEntries();
break;
case 'add':
$data = addCustomDNSEntry();
break;
case 'delete':
$data = deleteCustomDNSEntry();
break;
Again the above mentioned documentation: https://github.com/pi-hole/web/blob/6c320a42574f9f0944ded71d84b7331557dbc6ea/api.php
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Pi-hole api.php documentation, focusing on the customdns get, add, and delete actions and their authentication requirements. Done means an optional integration can communicate new, changed, and deleted proxy domains to Pi-hole using the supplied web or Docker address and credentials.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nginx
- Domain
- backend-api-design, networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100