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

[Enhancement] DNS name can't be started with number #602

Open
Gaojianli opened this issue Aug 8, 2024 · 4 comments
Open

[Enhancement] DNS name can't be started with number #602

Gaojianli opened this issue Aug 8, 2024 · 4 comments

Comments

@Gaojianli
Copy link

Improvement Suggestion

Not Work:

    upstream {
        # Value can be scheme://host:port, where the scheme can be tcp/udp/tcp+udp.
        # If host is a domain and has both IPv4 and IPv6 record, dae will automatically choose
        # IPv4 or IPv6 to use according to group policy (such as min latency policy).
        # Please make sure DNS traffic will go through and be forwarded by dae, which is REQUIRED for domain routing.
        # If dial_mode is "ip", the upstream DNS answer SHOULD NOT be polluted, so domestic public DNS is not recommended.

        114dns:'udp://114.114.114.114:53'
        googledns:'tcp+udp://dns.google.com:53'
    }

Which will got:

# dae validate -c config.dae 
failed to parse config file config.dae:
line 136:14         114dns:'udp://114.114.114.114:53'
                          ^: mismatched input ':' expecting '}'

Worked:

 upstream {
        # Value can be scheme://host:port, where the scheme can be tcp/udp/tcp+udp.
        # If host is a domain and has both IPv4 and IPv6 record, dae will automatically choose
        # IPv4 or IPv6 to use according to group policy (such as min latency policy).
        # Please make sure DNS traffic will go through and be forwarded by dae, which is REQUIRED for domain routing.
        # If dial_mode is "ip", the upstream DNS answer SHOULD NOT be polluted, so domestic public DNS is not recommended.

        dns114:'udp://114.114.114.114:53'
        googledns:'tcp+udp://dns.google.com:53'
    }

Potential Benefits

To support more number dns name like 114

@dae-prow
Copy link
Contributor

dae-prow bot commented Aug 8, 2024

Thanks for opening this issue!

@mzz2017
Copy link
Contributor

mzz2017 commented Aug 8, 2024

@Gaojianli 这是符合预期的,约定俗成,不会支持数字开头的变量

@mzz2017
Copy link
Contributor

mzz2017 commented Aug 8, 2024

@Gaojianli 支持数字开头的变量会给 parser 增加很多挑战和约束

@Gaojianli
Copy link
Author

@Gaojianli 支持数字开头的变量会给 parser 增加很多挑战和约束

大部分编程语言确实是这样的,但是对于dns这里,dns名称是个数字的情况还挺多的,算个特殊情况。另外文档似乎没有提到不允许,这里也应该完善一下?

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

No branches or pull requests

2 participants