TimothyYe / godns

A dynamic DNS client tool that supports AliDNS, Cloudflare, Google Domains, DNSPod, HE.net & DuckDNS & DreamHost, etc, written in Go.
https://timothyye.github.io/godns/
Apache License 2.0
1.5k stars 220 forks source link

each google subdomain can have(?) or has it's own email and password #183

Open UniqueUserajs opened 2 years ago

UniqueUserajs commented 2 years ago

A DelegatedSubDomain has its own 'email' and password, instead of using the 'email' and password of the domain. If a server is somehow compromised, only the subdomains delegated to that server are exposed. See the config file I'm using below in my minikube godns cconfig.

{ "provider": "Google", "domains": [{ "domain_name": "", "delegated_sub_domains": [ { "domain_name": "", "email": "", "password": "" }, { "email": "", "password": "", "domain_name": "" } ] } ], "resolver": "8.8.8.8", "ip_url": "https://api.ipify.org", "ip_type": "IPv4", "interval": 300, "socks5_proxy": "" }

On Fri, Aug 26, 2022 at 11:31 AM Timothy @.***> wrote:

@.**** commented on this pull request.

In internal/handler/handler.go https://github.com/TimothyYe/godns/pull/183#discussion_r956166465:

@@ -109,6 +109,38 @@ func (handler Handler) updateDNS(domain settings.Domain, ip string) error { } } }

  • for _, designated := range domain.DelegatedSubDomains {

May I know what does the DelegatedSubDomains used for?

— Reply to this email directly, view it on GitHub https://github.com/TimothyYe/godns/pull/183#pullrequestreview-1087141602, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARQAHVFXSADREXD3CMPTTBTV3DPOJANCNFSM57E7IKMQ . You are receiving this because you authored the thread.Message ID: @.***>

UniqueUserajs commented 2 years ago

I don't know what the other handlers support. I have a Google account, so that is what I focused on.

I'm happy to check out the other providers you think it's useful.

On Sat, Aug 27, 2022, 12:00 Timothy @.***> wrote:

@.**** commented on this pull request.

In internal/handler/handler.go https://github.com/TimothyYe/godns/pull/183#discussion_r956597333:

@@ -109,6 +109,38 @@ func (handler Handler) updateDNS(domain settings.Domain, ip string) error { } } }

  • for _, designated := range domain.DelegatedSubDomains {

If so, this part of the code is only available for the Google handler?

— Reply to this email directly, view it on GitHub https://github.com/TimothyYe/godns/pull/183#discussion_r956597333, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARQAHVB3ILFOAVYFRKDRKN3V3I3THANCNFSM57E7IKMQ . You are receiving this because you authored the thread.Message ID: @.***>

UniqueUserajs commented 2 years ago

I only changed the config handler for google, which now accepts either configuration. (see internal/utils/settings.go). If other providers support this configuration I would move the either/or check into its own function.

On Sat, Aug 27, 2022 at 2:03 PM Timothy @.***> wrote:

@.**** commented on this pull request.

In internal/handler/handler.go https://github.com/TimothyYe/godns/pull/183#discussion_r956608286:

@@ -109,6 +109,38 @@ func (handler Handler) updateDNS(domain settings.Domain, ip string) error { } } }

  • for _, designated := range domain.DelegatedSubDomains {

I think no need to check the other providers. I'm not sure if this change will affect the other providers. For example, is the config DelegatedSubDomains compulsory? Or for the other providers can just ignore it from the config file?

— Reply to this email directly, view it on GitHub https://github.com/TimothyYe/godns/pull/183#discussion_r956608286, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARQAHVF7BKAYEETSEVVWGPTV3JJ5JANCNFSM57E7IKMQ . You are receiving this because you authored the thread.Message ID: @.***>

TimothyYe commented 2 years ago

I only changed the config handler for google, which now accepts either configuration. (see internal/utils/settings.go). If other providers support this configuration I would move the either/or check into its own function. On Sat, Aug 27, 2022 at 2:03 PM Timothy @.> wrote: @*.*** commented on this pull request. ------------------------------ In internal/handler/handler.go <#183 (comment)>: > @@ -109,6 +109,38 @@ func (handler Handler) updateDNS(domain settings.Domain, ip string) error { } } } + for _, designated := range domain.DelegatedSubDomains { I think no need to check the other providers. I'm not sure if this change will affect the other providers. For example, is the config DelegatedSubDomains compulsory? Or for the other providers can just ignore it from the config file? — Reply to this email directly, view it on GitHub <#183 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARQAHVF7BKAYEETSEVVWGPTV3JJ5JANCNFSM57E7IKMQ . You are receiving this because you authored the thread.Message ID: @.>

OK, let me test the compatibility.