diff options
| author | 韩丁康 <[email protected]> | 2023-12-18 20:09:30 +0800 |
|---|---|---|
| committer | 韩丁康 <[email protected]> | 2023-12-18 20:09:30 +0800 |
| commit | ee7992841b9b14d02336b16b15a69f5748955cd7 (patch) | |
| tree | a8a5cb89399bc60dea6d861ecdeaa6569f440857 | |
| parent | b66e464ab3ea29ed2766052296a88e4615f27d04 (diff) | |
若干问题修复
| -rw-r--r-- | coremain/version.go | 4 | ||||
| -rw-r--r-- | plugin/v64dns/v64dns_policy.go | 4 | ||||
| -rw-r--r-- | plugin/v64dns/v64dnsutil.go | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/coremain/version.go b/coremain/version.go index a1f993d..c9e5f53 100644 --- a/coremain/version.go +++ b/coremain/version.go @@ -2,7 +2,7 @@ package coremain // Various CoreDNS constants. const ( - CoreVersion = "1.11.1" - coreName = "CoreDNS" + CoreVersion = "v1.0" + coreName = "Ohmydns" serverType = "dns" ) diff --git a/plugin/v64dns/v64dns_policy.go b/plugin/v64dns/v64dns_policy.go index 5e57556..510a269 100644 --- a/plugin/v64dns/v64dns_policy.go +++ b/plugin/v64dns/v64dns_policy.go @@ -130,9 +130,9 @@ func (v V64dns) ResponseCNAME(msg *dns.Msg, state request.Request) *dns.Msg { // 调用Python脚本 step, _ := strconv.Atoi(string(rune(state.QName()[1]))) if step == 1 { - go v.a.Go2py([]string{iaddr, oaddr, "0"}) + go v.a.Go2py([]string{iaddr, oaddr, "0", state.QName(), state.Type()}) } else { - go v.a.Go2py([]string{iaddr, oaddr, "1"}) + go v.a.Go2py([]string{iaddr, oaddr, "1", state.QName(), state.Type()}) } } diff --git a/plugin/v64dns/v64dnsutil.go b/plugin/v64dns/v64dnsutil.go index c1b6232..6848fb1 100644 --- a/plugin/v64dns/v64dnsutil.go +++ b/plugin/v64dns/v64dnsutil.go @@ -77,7 +77,7 @@ func (v *V64dns) AdditionalInfo(d *dns.Msg, state request.Request, iptype int) ( return d, nil } -// 根据各级域名特征判断其类型,0为zone,1为水印部分,2为v4/v6子域名,3为随机数,4为进度标识,5为实验对象 +// MatchType 根据各级域名特征判断其类型,0为zone,1为水印部分,2为v4/v6子域名,3为随机数,4为进度标识,5为实验对象 func (v V64dns) MatchType(s string) int { if strings.Contains(s, "rip") { return 5 @@ -118,7 +118,7 @@ func (v V64dns) changeSubDomain(s string) string { // 修改进度标识 func nextProgress(s string) string { - n, _ := strconv.Atoi(string(s[1])) + n, _ := strconv.Atoi(s[1:]) n = n + 1 return string(s[0]) + strconv.Itoa(n) } |
