Giter Site home page Giter Site logo

Comments (6)

TimothyYe avatar TimothyYe commented on August 22, 2024 1

后续版本可以更新成同时更新IPv4和IPv6

from godns.

wangzexi avatar wangzexi commented on August 22, 2024

我看了下代码,没有同时支持的逻辑。

if provider.configuration.IPType == "" || strings.ToUpper(provider.configuration.IPType) == utils.IPV4 {
value.Add("record_type", "A")
} else if strings.ToUpper(provider.configuration.IPType) == utils.IPV6 {
value.Add("record_type", "AAAA")

我是写了两个配置文件,分别运行。

# docker-compose.yaml

version: "3.9"

services:

  godns-ipv4:
    image: timothyye/godns:latest
    restart: unless-stopped
    network_mode: host
    command: -c /IPv4.yaml
    volumes:
      - ./IPv4.yaml:/IPv4.yaml

  godns-ipv6:
    image: timothyye/godns:latest
    restart: unless-stopped
    network_mode: host
    command: -c /IPv6.yaml
    volumes:
      - ./IPv6.yaml:/IPv6.yaml
# IPv4.yaml

provider: DNSPod
login_token: "123456,aaaaaaaaaaaaaaaaaaaaaaaa"
domains:
  - domain_name: example.com
    sub_domains:
      - www
ip_urls: [https://4.ipw.cn]
ip_type: IPv4
interval: 300
resolver: 8.8.8.8
# IPv6.yaml

provider: DNSPod
login_token: "123456,aaaaaaaaaaaaaaaaaaaaaaaa"
domains:
  - domain_name: example.com
    sub_domains:
      - www
ipv6_urls: [https://6.ipw.cn]
ip_type: IPv6
interval: 300
resolver: "2001:4860:4860::8888"

from godns.

lhbdhr avatar lhbdhr commented on August 22, 2024

跑两个实例是可以解决问题,但是不太优雅

from godns.

lhbdhr avatar lhbdhr commented on August 22, 2024

后续版本可以更新成同时更新IPv4和IPv6

好的,非常感谢。

from godns.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.