Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script changes zone to DNS Only after running #311

Closed
Townie-au opened this issue Feb 25, 2022 · 5 comments · Fixed by #314
Closed

Script changes zone to DNS Only after running #311

Townie-au opened this issue Feb 25, 2022 · 5 comments · Fixed by #314

Comments

@Townie-au
Copy link

Townie-au commented Feb 25, 2022

Hi
Running the script changes zone to DNS Only after updating.
config.json proxy is null

@Townie-au Townie-au changed the title Crontab task disables cloudflare proxy to off Script disables cloudflare proxy to off after running Feb 25, 2022
@Townie-au Townie-au changed the title Script disables cloudflare proxy to off after running Script changes zone to DNS Only after running Feb 25, 2022
@NewFuture
Copy link
Owner

it does not keep the previous setting in DNS Server.

Related #115

@NewFuture
Copy link
Owner

you can help modified those lines

DDNS/dns/cloudflare.py

Lines 139 to 140 in 9cfdc14

res = request('PUT', '/' + zoneid + '/dns_records/' + record['id'],
type=record_type, content=value, name=domain, ttl=Config.TTL)

to (keep the proxied value))

                res = request('PUT', '/' + zoneid + '/dns_records/' + record['id'],
                              type=record_type, content=value, name=domain, proxied=record['proxied'] ,ttl=Config.TTL)
-type=record_type, content=value, name=domain, ttl=Config.TTL)
+type=record_type, content=value, name=domain, proxied=record['proxied'] ,ttl=Config.TTL)

My cloud flare account was lost. Please help me test it.

If it works, please create a pull request.

@Townie-au
Copy link
Author

you can help modified those lines

DDNS/dns/cloudflare.py

Lines 139 to 140 in 9cfdc14

res = request('PUT', '/' + zoneid + '/dns_records/' + record['id'],
type=record_type, content=value, name=domain, ttl=Config.TTL)

to (keep the proxied value))

                res = request('PUT', '/' + zoneid + '/dns_records/' + record['id'],
                              type=record_type, content=value, name=domain, proxied=record['proxied'] ,ttl=Config.TTL)
-type=record_type, content=value, name=domain, ttl=Config.TTL)
+type=record_type, content=value, name=domain, proxied=record['proxied'] ,ttl=Config.TTL)

My cloud flare account was lost. Please help me test it.

If it works, please create a pull request.

I'll give it a go

@Townie-au
Copy link
Author

you can help modified those lines

DDNS/dns/cloudflare.py

Lines 139 to 140 in 9cfdc14

res = request('PUT', '/' + zoneid + '/dns_records/' + record['id'],
type=record_type, content=value, name=domain, ttl=Config.TTL)

to (keep the proxied value))

                res = request('PUT', '/' + zoneid + '/dns_records/' + record['id'],
                              type=record_type, content=value, name=domain, proxied=record['proxied'] ,ttl=Config.TTL)
-type=record_type, content=value, name=domain, ttl=Config.TTL)
+type=record_type, content=value, name=domain, proxied=record['proxied'] ,ttl=Config.TTL)

My cloud flare account was lost. Please help me test it.

If it works, please create a pull request.

It works!
I also had to run this command
sudo ln -s /usr/bin/python3.7 /usr/bin/python for the script to successfully run.
I dont know how to do a pull request but Im trying to learn now.

@NewFuture
Copy link
Owner

@Townie-au

  1. folk this repo
  2. edit this file in your repo and test again
  3. commit and push
  4. create a pull-request to this repo

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants