diff --git a/.claude/settings.local.json b/.claude/settings.local.json
new file mode 100644
index 0000000..065620b
--- /dev/null
+++ b/.claude/settings.local.json
@@ -0,0 +1,28 @@
+{
+ "permissions": {
+ "allow": [
+ "Bash(grep:*)",
+ "Bash(protoc:*)",
+ "Bash(go version:*)",
+ "Bash(go build:*)",
+ "Bash(go vet:*)",
+ "Bash(go get:*)",
+ "Bash(python3:*)",
+ "Bash(python:*)",
+ "Bash(chmod +x:*)",
+ "Bash(tr }:*)",
+ "Bash(xxd:*)",
+ "Bash(curl:*)",
+ "Bash(/tmp/protoc-install/bin/protoc.exe:*)",
+ "Bash(protoc-gen-go-grpc:*)",
+ "Bash(netstat:*)",
+ "Bash(tasklist:*)",
+ "Bash(tail:*)",
+ "Bash(echo:*)",
+ "Bash(where protoc:*)",
+ "Bash(/c/Users/robin/AppData/Local/Temp/protoc-install/bin/protoc.exe:*)",
+ "Bash(protoc-gen-go:*)",
+ "Bash(cp:*)"
+ ]
+ }
+}
diff --git a/EdgeAPI/internal/db/models/httpdns_app_dao.go b/EdgeAPI/internal/db/models/httpdns_app_dao.go
index 641dab3..bbcd9e0 100644
--- a/EdgeAPI/internal/db/models/httpdns_app_dao.go
+++ b/EdgeAPI/internal/db/models/httpdns_app_dao.go
@@ -1,6 +1,8 @@
package models
import (
+ "encoding/json"
+
_ "github.com/go-sql-driver/mysql"
"github.com/iwind/TeaGo/Tea"
"github.com/iwind/TeaGo/dbs"
@@ -35,12 +37,17 @@ func init() {
})
}
-func (this *HTTPDNSAppDAO) CreateApp(tx *dbs.Tx, name string, appId string, primaryClusterId int64, backupClusterId int64, isOn bool, userId int64) (int64, error) {
+func (this *HTTPDNSAppDAO) CreateApp(tx *dbs.Tx, name string, appId string, clusterIdsJSON []byte, isOn bool, userId int64) (int64, error) {
var op = NewHTTPDNSAppOperator()
op.Name = name
op.AppId = appId
- op.PrimaryClusterId = primaryClusterId
- op.BackupClusterId = backupClusterId
+
+ if len(clusterIdsJSON) > 0 {
+ op.ClusterIdsJSON = string(clusterIdsJSON)
+ } else {
+ op.ClusterIdsJSON = "[]"
+ }
+
op.IsOn = isOn
op.UserId = userId
op.SNIMode = HTTPDNSSNIModeFixedHide
@@ -54,18 +61,37 @@ func (this *HTTPDNSAppDAO) CreateApp(tx *dbs.Tx, name string, appId string, prim
return types.Int64(op.Id), nil
}
-func (this *HTTPDNSAppDAO) UpdateApp(tx *dbs.Tx, appDbId int64, name string, primaryClusterId int64, backupClusterId int64, isOn bool, userId int64) error {
+func (this *HTTPDNSAppDAO) UpdateApp(tx *dbs.Tx, appDbId int64, name string, clusterIdsJSON []byte, isOn bool, userId int64) error {
var op = NewHTTPDNSAppOperator()
op.Id = appDbId
op.Name = name
- op.PrimaryClusterId = primaryClusterId
- op.BackupClusterId = backupClusterId
+
+ if len(clusterIdsJSON) > 0 {
+ op.ClusterIdsJSON = string(clusterIdsJSON)
+ } else {
+ op.ClusterIdsJSON = "[]"
+ }
+
op.IsOn = isOn
op.UserId = userId
op.UpdatedAt = time.Now().Unix()
return this.Save(tx, op)
}
+// ReadAppClusterIds reads cluster IDs from ClusterIdsJSON.
+func (this *HTTPDNSAppDAO) ReadAppClusterIds(app *HTTPDNSApp) []int64 {
+ if app == nil {
+ return nil
+ }
+ if len(app.ClusterIdsJSON) > 0 {
+ var ids []int64
+ if err := json.Unmarshal([]byte(app.ClusterIdsJSON), &ids); err == nil && len(ids) > 0 {
+ return ids
+ }
+ }
+ return nil
+}
+
func (this *HTTPDNSAppDAO) DisableApp(tx *dbs.Tx, appDbId int64) error {
_, err := this.Query(tx).
Pk(appDbId).
diff --git a/EdgeAPI/internal/db/models/httpdns_app_model.go b/EdgeAPI/internal/db/models/httpdns_app_model.go
index 113fe9f..58d5b29 100644
--- a/EdgeAPI/internal/db/models/httpdns_app_model.go
+++ b/EdgeAPI/internal/db/models/httpdns_app_model.go
@@ -6,8 +6,7 @@ type HTTPDNSApp struct {
Name string `field:"name"` // app name
AppId string `field:"appId"` // external app id
IsOn bool `field:"isOn"` // enabled
- PrimaryClusterId uint32 `field:"primaryClusterId"` // primary cluster id
- BackupClusterId uint32 `field:"backupClusterId"` // backup cluster id
+ ClusterIdsJSON string `field:"clusterIdsJSON"` // cluster ids json
SNIMode string `field:"sniMode"` // sni mode
UserId int64 `field:"userId"` // owner user id
CreatedAt uint64 `field:"createdAt"` // created unix ts
@@ -21,8 +20,7 @@ type HTTPDNSAppOperator struct {
Name any // app name
AppId any // external app id
IsOn any // enabled
- PrimaryClusterId any // primary cluster id
- BackupClusterId any // backup cluster id
+ ClusterIdsJSON any // cluster ids json
SNIMode any // sni mode
UserId any // owner user id
CreatedAt any // created unix ts
diff --git a/EdgeAPI/internal/db/models/user_dao.go b/EdgeAPI/internal/db/models/user_dao.go
index f4a4a66..0a495b7 100644
--- a/EdgeAPI/internal/db/models/user_dao.go
+++ b/EdgeAPI/internal/db/models/user_dao.go
@@ -246,7 +246,7 @@ func (this *UserDAO) CreateUser(tx *dbs.Tx, username string,
}
// UpdateUser 修改用户
-func (this *UserDAO) UpdateUser(tx *dbs.Tx, userId int64, username string, password string, fullname string, mobile string, tel string, email string, remark string, isOn bool, nodeClusterId int64, bandwidthAlgo systemconfigs.BandwidthAlgo) error {
+func (this *UserDAO) UpdateUser(tx *dbs.Tx, userId int64, username string, password string, fullname string, mobile string, tel string, email string, remark string, isOn bool, nodeClusterId int64, bandwidthAlgo systemconfigs.BandwidthAlgo, httpdnsClusterIdsJSON []byte) error {
if userId <= 0 {
return errors.New("invalid userId")
}
@@ -265,6 +265,11 @@ func (this *UserDAO) UpdateUser(tx *dbs.Tx, userId int64, username string, passw
op.ClusterId = nodeClusterId
op.BandwidthAlgo = bandwidthAlgo
op.IsOn = isOn
+ if len(httpdnsClusterIdsJSON) > 0 {
+ op.HttpdnsClusterIds = string(httpdnsClusterIdsJSON)
+ } else {
+ op.HttpdnsClusterIds = "[]"
+ }
err := this.Save(tx, op)
if err != nil {
return err
@@ -466,6 +471,21 @@ func (this *UserDAO) FindUserClusterId(tx *dbs.Tx, userId int64) (int64, error)
FindInt64Col(0)
}
+// UpdateUserHttpdnsClusterIds 更新用户的HTTPDNS关联集群ID列表
+func (this *UserDAO) UpdateUserHttpdnsClusterIds(tx *dbs.Tx, userId int64, httpdnsClusterIdsJSON []byte) error {
+ if userId <= 0 {
+ return errors.New("invalid userId")
+ }
+ if len(httpdnsClusterIdsJSON) == 0 {
+ httpdnsClusterIdsJSON = []byte("[]")
+ }
+ _, err := this.Query(tx).
+ Pk(userId).
+ Set("httpdnsClusterIds", httpdnsClusterIdsJSON).
+ Update()
+ return err
+}
+
// UpdateUserFeatures 更新单个用户Features
func (this *UserDAO) UpdateUserFeatures(tx *dbs.Tx, userId int64, featuresJSON []byte) error {
if userId <= 0 {
diff --git a/EdgeAPI/internal/db/models/user_model.go b/EdgeAPI/internal/db/models/user_model.go
index d259100..ed85eb6 100644
--- a/EdgeAPI/internal/db/models/user_model.go
+++ b/EdgeAPI/internal/db/models/user_model.go
@@ -37,6 +37,7 @@ const (
UserField_BandwidthAlgo dbs.FieldName = "bandwidthAlgo" // 带宽算法
UserField_BandwidthModifier dbs.FieldName = "bandwidthModifier" // 带宽修正值
UserField_Lang dbs.FieldName = "lang" // 语言代号
+ UserField_HttpdnsClusterIds dbs.FieldName = "httpdnsClusterIds" // HTTPDNS关联集群ID列表
)
// User 用户
@@ -75,6 +76,7 @@ type User struct {
BandwidthAlgo string `field:"bandwidthAlgo"` // 带宽算法
BandwidthModifier float64 `field:"bandwidthModifier"` // 带宽修正值
Lang string `field:"lang"` // 语言代号
+ HttpdnsClusterIds dbs.JSON `field:"httpdnsClusterIds"` // HTTPDNS关联集群ID列表
}
type UserOperator struct {
@@ -112,6 +114,7 @@ type UserOperator struct {
BandwidthAlgo any // 带宽算法
BandwidthModifier any // 带宽修正值
Lang any // 语言代号
+ HttpdnsClusterIds any // HTTPDNS关联集群ID列表
}
func NewUserOperator() *UserOperator {
diff --git a/EdgeAPI/internal/installers/fluent_bit.go b/EdgeAPI/internal/installers/fluent_bit.go
index 09ab0ff..9357b1d 100644
--- a/EdgeAPI/internal/installers/fluent_bit.go
+++ b/EdgeAPI/internal/installers/fluent_bit.go
@@ -33,11 +33,13 @@ const (
fluentBitServiceName = "fluent-bit"
fluentBitDefaultBinPath = "/opt/fluent-bit/bin/fluent-bit"
fluentBitLocalPackagesRoot = "packages"
- fluentBitHTTPPathPattern = "/var/log/edge/edge-node/*.log"
- fluentBitDNSPathPattern = "/var/log/edge/edge-dns/*.log"
- fluentBitManagedMarker = "managed-by-edgeapi"
- fluentBitRoleNode = "node"
- fluentBitRoleDNS = "dns"
+ fluentBitHTTPPathPattern = "/var/log/edge/edge-node/*.log"
+ fluentBitDNSPathPattern = "/var/log/edge/edge-dns/*.log"
+ fluentBitHTTPDNSPathPattern = "/var/log/edge/edge-httpdns/*.log"
+ fluentBitManagedMarker = "managed-by-edgeapi"
+ fluentBitRoleNode = "node"
+ fluentBitRoleDNS = "dns"
+ fluentBitRoleHTTPDNS = "httpdns"
)
var errFluentBitLocalPackageNotFound = errors.New("fluent-bit local package not found")
@@ -57,10 +59,11 @@ type fluentBitManagedMeta struct {
}
type fluentBitDesiredConfig struct {
- Roles []string
- ClickHouse *systemconfigs.ClickHouseSetting
- HTTPPathPattern string
- DNSPathPattern string
+ Roles []string
+ ClickHouse *systemconfigs.ClickHouseSetting
+ HTTPPathPattern string
+ DNSPathPattern string
+ HTTPDNSPathPattern string
}
// SetupFluentBit 安装并托管 Fluent Bit 配置(离线包 + 平台渲染配置)。
@@ -344,7 +347,7 @@ func mapNodeRole(role nodeconfigs.NodeRole) (string, error) {
case nodeconfigs.NodeRoleDNS:
return fluentBitRoleDNS, nil
case nodeconfigs.NodeRoleHTTPDNS:
- return fluentBitRoleDNS, nil
+ return fluentBitRoleHTTPDNS, nil
default:
return "", fmt.Errorf("unsupported fluent-bit role '%s'", role)
}
@@ -354,7 +357,7 @@ func normalizeRoles(rawRoles []string) []string {
roleSet := map[string]struct{}{}
for _, role := range rawRoles {
role = strings.ToLower(strings.TrimSpace(role))
- if role != fluentBitRoleNode && role != fluentBitRoleDNS {
+ if role != fluentBitRoleNode && role != fluentBitRoleDNS && role != fluentBitRoleHTTPDNS {
continue
}
roleSet[role] = struct{}{}
@@ -420,6 +423,7 @@ func (this *BaseInstaller) buildDesiredFluentBitConfig(roles []string) (*fluentB
httpPathPattern := fluentBitHTTPPathPattern
dnsPathPattern := fluentBitDNSPathPattern
+ httpdnsPathPattern := fluentBitHTTPDNSPathPattern
publicPolicyPath, err := this.readPublicAccessLogPolicyPath()
if err != nil {
return nil, err
@@ -429,13 +433,15 @@ func (this *BaseInstaller) buildDesiredFluentBitConfig(roles []string) (*fluentB
pattern := strings.TrimRight(policyDir, "/") + "/*.log"
httpPathPattern = pattern
dnsPathPattern = pattern
+ httpdnsPathPattern = pattern
}
return &fluentBitDesiredConfig{
- Roles: normalizeRoles(roles),
- ClickHouse: ch,
- HTTPPathPattern: httpPathPattern,
- DNSPathPattern: dnsPathPattern,
+ Roles: normalizeRoles(roles),
+ ClickHouse: ch,
+ HTTPPathPattern: httpPathPattern,
+ DNSPathPattern: dnsPathPattern,
+ HTTPDNSPathPattern: httpdnsPathPattern,
}, nil
}
@@ -556,6 +562,7 @@ func renderManagedConfig(desired *fluentBitDesiredConfig) (string, error) {
insertHTTP := url.QueryEscape(fmt.Sprintf("INSERT INTO %s.logs_ingest FORMAT JSONEachRow", desired.ClickHouse.Database))
insertDNS := url.QueryEscape(fmt.Sprintf("INSERT INTO %s.dns_logs_ingest FORMAT JSONEachRow", desired.ClickHouse.Database))
+ insertHTTPDNS := url.QueryEscape(fmt.Sprintf("INSERT INTO %s.httpdns_access_logs_ingest FORMAT JSONEachRow", desired.ClickHouse.Database))
lines := []string{
"# " + fluentBitManagedMarker,
@@ -604,6 +611,23 @@ func renderManagedConfig(desired *fluentBitDesiredConfig) (string, error) {
)
}
+ if hasRole(desired.Roles, fluentBitRoleHTTPDNS) {
+ lines = append(lines,
+ "[INPUT]",
+ " Name tail",
+ " Path "+desired.HTTPDNSPathPattern,
+ " Tag app.httpdns.logs",
+ " Parser json",
+ " Refresh_Interval 2",
+ " Read_from_Head false",
+ " DB /var/lib/fluent-bit/httpdns-logs.db",
+ " storage.type filesystem",
+ " Mem_Buf_Limit 256MB",
+ " Skip_Long_Lines On",
+ "",
+ )
+ }
+
if hasRole(desired.Roles, fluentBitRoleNode) {
lines = append(lines,
"[OUTPUT]",
@@ -666,6 +690,37 @@ func renderManagedConfig(desired *fluentBitDesiredConfig) (string, error) {
lines = append(lines, "")
}
+ if hasRole(desired.Roles, fluentBitRoleHTTPDNS) {
+ lines = append(lines,
+ "[OUTPUT]",
+ " Name http",
+ " Match app.httpdns.logs",
+ " Host "+desired.ClickHouse.Host,
+ " Port "+strconv.Itoa(desired.ClickHouse.Port),
+ " URI /?query="+insertHTTPDNS,
+ " Format json_lines",
+ " http_user ${CH_USER}",
+ " http_passwd ${CH_PASSWORD}",
+ " json_date_key timestamp",
+ " json_date_format epoch",
+ " workers 2",
+ " net.keepalive On",
+ " Retry_Limit False",
+ )
+ if useTLS {
+ lines = append(lines, " tls On")
+ if desired.ClickHouse.TLSSkipVerify {
+ lines = append(lines, " tls.verify Off")
+ } else {
+ lines = append(lines, " tls.verify On")
+ }
+ if strings.TrimSpace(desired.ClickHouse.TLSServerName) != "" {
+ lines = append(lines, " tls.vhost "+strings.TrimSpace(desired.ClickHouse.TLSServerName))
+ }
+ }
+ lines = append(lines, "")
+ }
+
return strings.Join(lines, "\n"), nil
}
diff --git a/EdgeAPI/internal/installers/queue_httpdns_node.go b/EdgeAPI/internal/installers/queue_httpdns_node.go
index d2d5449..197eb0f 100644
--- a/EdgeAPI/internal/installers/queue_httpdns_node.go
+++ b/EdgeAPI/internal/installers/queue_httpdns_node.go
@@ -13,10 +13,10 @@ import (
"github.com/TeaOSLab/EdgeAPI/internal/goman"
"github.com/TeaOSLab/EdgeAPI/internal/utils"
"github.com/TeaOSLab/EdgeAPI/internal/utils/numberutils"
+ "github.com/TeaOSLab/EdgeCommon/pkg/nodeconfigs"
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/sslconfigs"
"github.com/iwind/TeaGo/logs"
- "github.com/iwind/TeaGo/maps"
)
var sharedHTTPDNSNodeQueue = NewHTTPDNSNodeQueue()
@@ -98,9 +98,8 @@ func (q *HTTPDNSNodeQueue) InstallNode(nodeId int64, installStatus *models.NodeI
return errors.New("can not find cluster")
}
- sshHost, sshPort, grantId, err := q.parseSSHInfo(node)
+ sshHost, sshPort, grantId, err := q.parseSSHInfo(node, installStatus)
if err != nil {
- installStatus.ErrorCode = "EMPTY_SSH"
return err
}
@@ -287,35 +286,37 @@ func (q *HTTPDNSNodeQueue) resolveClusterTLSListenAddr(cluster *models.HTTPDNSCl
return defaultListenAddr, nil
}
-func (q *HTTPDNSNodeQueue) parseSSHInfo(node *models.HTTPDNSNode) (string, int, int64, error) {
+func (q *HTTPDNSNodeQueue) parseSSHInfo(node *models.HTTPDNSNode, installStatus *models.NodeInstallStatus) (string, int, int64, error) {
if node == nil {
return "", 0, 0, errors.New("node should not be nil")
}
- if len(node.InstallStatus) == 0 {
- return "", 0, 0, errors.New("ssh config should not be empty")
- }
- statusMap := maps.Map{}
- err := json.Unmarshal(node.InstallStatus, &statusMap)
+ login, err := models.SharedNodeLoginDAO.FindEnabledNodeLoginWithNodeId(nil, nodeconfigs.NodeRoleHTTPDNS, int64(node.Id))
if err != nil {
- return "", 0, 0, errors.New("invalid install status data")
+ return "", 0, 0, err
}
- sshMap := statusMap.GetMap("ssh")
- if sshMap == nil {
- return "", 0, 0, errors.New("ssh config should not be empty")
+ if login == nil {
+ installStatus.ErrorCode = "EMPTY_SSH"
+ return "", 0, 0, errors.New("ssh login not found for node '" + numberutils.FormatInt64(int64(node.Id)) + "'")
}
- host := sshMap.GetString("host")
- port := sshMap.GetInt("port")
- grantId := sshMap.GetInt64("grantId")
- if len(host) == 0 {
+ sshParams, err := login.DecodeSSHParams()
+ if err != nil {
+ installStatus.ErrorCode = "EMPTY_SSH"
+ return "", 0, 0, err
+ }
+
+ if len(sshParams.Host) == 0 {
+ installStatus.ErrorCode = "EMPTY_SSH_HOST"
return "", 0, 0, errors.New("ssh host should not be empty")
}
- if port <= 0 {
- port = 22
+ if sshParams.Port <= 0 {
+ sshParams.Port = 22
}
- if grantId <= 0 {
+ if sshParams.GrantId <= 0 {
+ installStatus.ErrorCode = "EMPTY_GRANT"
return "", 0, 0, errors.New("grant id should not be empty")
}
- return host, port, grantId, nil
+
+ return sshParams.Host, sshParams.Port, sshParams.GrantId, nil
}
diff --git a/EdgeAPI/internal/rpc/services/httpdns/converters.go b/EdgeAPI/internal/rpc/services/httpdns/converters.go
index cd57a78..98d2b4d 100644
--- a/EdgeAPI/internal/rpc/services/httpdns/converters.go
+++ b/EdgeAPI/internal/rpc/services/httpdns/converters.go
@@ -1,6 +1,8 @@
package httpdns
import (
+ "encoding/json"
+
"github.com/TeaOSLab/EdgeAPI/internal/db/models"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
)
@@ -58,20 +60,23 @@ func toPBApp(app *models.HTTPDNSApp, secret *models.HTTPDNSAppSecret) *pb.HTTPDN
signSecret = secret.SignSecret
signUpdatedAt = int64(secret.SignUpdatedAt)
}
+ // 构建 clusterIdsJSON
+ clusterIds := models.SharedHTTPDNSAppDAO.ReadAppClusterIds(app)
+ clusterIdsJSON, _ := json.Marshal(clusterIds)
+
return &pb.HTTPDNSApp{
- Id: int64(app.Id),
- Name: app.Name,
- AppId: app.AppId,
- IsOn: app.IsOn,
- PrimaryClusterId: int64(app.PrimaryClusterId),
- BackupClusterId: int64(app.BackupClusterId),
- SniMode: app.SNIMode,
- SignEnabled: signEnabled,
- SignSecret: signSecret,
- SignUpdatedAt: signUpdatedAt,
- CreatedAt: int64(app.CreatedAt),
- UpdatedAt: int64(app.UpdatedAt),
- UserId: int64(app.UserId),
+ Id: int64(app.Id),
+ Name: app.Name,
+ AppId: app.AppId,
+ IsOn: app.IsOn,
+ SniMode: app.SNIMode,
+ SignEnabled: signEnabled,
+ SignSecret: signSecret,
+ SignUpdatedAt: signUpdatedAt,
+ CreatedAt: int64(app.CreatedAt),
+ UpdatedAt: int64(app.UpdatedAt),
+ UserId: int64(app.UserId),
+ ClusterIdsJSON: clusterIdsJSON,
}
}
diff --git a/EdgeAPI/internal/rpc/services/httpdns/service_httpdns_app.go b/EdgeAPI/internal/rpc/services/httpdns/service_httpdns_app.go
index a159435..79a9b70 100644
--- a/EdgeAPI/internal/rpc/services/httpdns/service_httpdns_app.go
+++ b/EdgeAPI/internal/rpc/services/httpdns/service_httpdns_app.go
@@ -2,12 +2,13 @@ package httpdns
import (
"context"
+ "encoding/json"
"errors"
"github.com/TeaOSLab/EdgeAPI/internal/rpc/services"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/TeaOSLab/EdgeCommon/pkg/systemconfigs"
+ "github.com/TeaOSLab/EdgeCommon/pkg/userconfigs"
"github.com/iwind/TeaGo/dbs"
- "github.com/iwind/TeaGo/types"
"strings"
"time"
@@ -66,25 +67,35 @@ func (this *HTTPDNSAppService) CreateHTTPDNSApp(ctx context.Context, req *pb.Cre
return errors.New("appId already exists")
}
- primaryClusterId := req.PrimaryClusterId
- backupClusterId := req.BackupClusterId
- if primaryClusterId <= 0 || backupClusterId <= 0 {
- defaultPrimaryClusterId, defaultBackupClusterId, err := readHTTPDNSDefaultClusterIds(tx)
- if err != nil {
- return err
+ // 使用 clusterIdsJSON;若为空则优先从用户关联集群获取,再 fallback 到全局默认
+ clusterIdsJSON := req.ClusterIdsJSON
+ if len(clusterIdsJSON) == 0 || string(clusterIdsJSON) == "[]" || string(clusterIdsJSON) == "null" {
+ // 优先读取用户关联的 HTTPDNS 集群
+ if req.UserId > 0 {
+ user, userErr := models.SharedUserDAO.FindEnabledUser(tx, req.UserId, nil)
+ if userErr != nil {
+ return userErr
+ }
+ if user != nil && len(user.HttpdnsClusterIds) > 0 {
+ var userClusterIds []int64
+ if json.Unmarshal([]byte(user.HttpdnsClusterIds), &userClusterIds) == nil && len(userClusterIds) > 0 {
+ clusterIdsJSON, _ = json.Marshal(userClusterIds)
+ }
+ }
}
- if primaryClusterId <= 0 {
- primaryClusterId = defaultPrimaryClusterId
+ // fallback 到全局默认
+ if len(clusterIdsJSON) == 0 || string(clusterIdsJSON) == "[]" || string(clusterIdsJSON) == "null" {
+ defaultClusterIds, defaultErr := readHTTPDNSDefaultClusterIdList(tx)
+ if defaultErr != nil {
+ return defaultErr
+ }
+ if len(defaultClusterIds) > 0 {
+ clusterIdsJSON, _ = json.Marshal(defaultClusterIds)
+ }
}
- if backupClusterId <= 0 {
- backupClusterId = defaultBackupClusterId
- }
- }
- if primaryClusterId > 0 && backupClusterId == primaryClusterId {
- backupClusterId = 0
}
- appDbId, err = models.SharedHTTPDNSAppDAO.CreateApp(tx, appName, appId, primaryClusterId, backupClusterId, req.IsOn, req.UserId)
+ appDbId, err = models.SharedHTTPDNSAppDAO.CreateApp(tx, appName, appId, clusterIdsJSON, req.IsOn, req.UserId)
if err != nil {
return err
}
@@ -100,44 +111,47 @@ func (this *HTTPDNSAppService) CreateHTTPDNSApp(ctx context.Context, req *pb.Cre
return &pb.CreateHTTPDNSAppResponse{AppDbId: appDbId}, nil
}
-func readHTTPDNSDefaultClusterIds(tx *dbs.Tx) (primaryClusterId int64, backupClusterId int64, err error) {
- primaryClusterId, err = models.SharedHTTPDNSClusterDAO.FindDefaultPrimaryClusterId(tx)
+// readHTTPDNSDefaultClusterIdList reads default cluster IDs from UserRegisterConfig.
+func readHTTPDNSDefaultClusterIdList(tx *dbs.Tx) ([]int64, error) {
+ // 优先从 UserRegisterConfig 中读取
+ configJSON, err := models.SharedSysSettingDAO.ReadSetting(tx, systemconfigs.SettingCodeUserRegisterConfig)
if err != nil {
- return 0, 0, err
+ return nil, err
}
-
- backupClusterId = 0
- backupValueJSON, err := models.SharedSysSettingDAO.ReadSetting(tx, systemconfigs.SettingCodeHTTPDNSDefaultBackupClusterId)
- if err != nil {
- return 0, 0, err
- }
- if len(backupValueJSON) > 0 {
- backupClusterId = types.Int64(string(backupValueJSON))
- }
- if backupClusterId > 0 {
- backupCluster, err := models.SharedHTTPDNSClusterDAO.FindEnabledCluster(tx, backupClusterId)
- if err != nil {
- return 0, 0, err
- }
- if backupCluster == nil || !backupCluster.IsOn {
- backupClusterId = 0
+ if len(configJSON) > 0 {
+ var config userconfigs.UserRegisterConfig
+ if err := json.Unmarshal(configJSON, &config); err == nil {
+ if len(config.HTTPDNSDefaultClusterIds) > 0 {
+ // 验证集群有效性
+ var validIds []int64
+ for _, id := range config.HTTPDNSDefaultClusterIds {
+ if id <= 0 {
+ continue
+ }
+ cluster, err := models.SharedHTTPDNSClusterDAO.FindEnabledCluster(tx, id)
+ if err != nil {
+ return nil, err
+ }
+ if cluster != nil && cluster.IsOn {
+ validIds = append(validIds, id)
+ }
+ }
+ if len(validIds) > 0 {
+ return validIds, nil
+ }
+ }
}
}
+ // fallback:默认主集群
+ primaryClusterId, err := models.SharedHTTPDNSClusterDAO.FindDefaultPrimaryClusterId(tx)
+ if err != nil {
+ return nil, err
+ }
if primaryClusterId > 0 {
- primaryCluster, err := models.SharedHTTPDNSClusterDAO.FindEnabledCluster(tx, primaryClusterId)
- if err != nil {
- return 0, 0, err
- }
- if primaryCluster == nil || !primaryCluster.IsOn {
- primaryClusterId = 0
- }
+ return []int64{primaryClusterId}, nil
}
-
- if primaryClusterId > 0 && backupClusterId == primaryClusterId {
- backupClusterId = 0
- }
- return primaryClusterId, backupClusterId, nil
+ return nil, nil
}
func (this *HTTPDNSAppService) UpdateHTTPDNSApp(ctx context.Context, req *pb.UpdateHTTPDNSAppRequest) (*pb.RPCSuccess, error) {
@@ -161,13 +175,8 @@ func (this *HTTPDNSAppService) UpdateHTTPDNSApp(ctx context.Context, req *pb.Upd
if userId > 0 {
targetUserId = userId
}
- primaryClusterId := req.PrimaryClusterId
- backupClusterId := req.BackupClusterId
- if primaryClusterId > 0 && backupClusterId == primaryClusterId {
- backupClusterId = 0
- }
- err = models.SharedHTTPDNSAppDAO.UpdateApp(tx, req.AppDbId, req.Name, primaryClusterId, backupClusterId, req.IsOn, targetUserId)
+ err = models.SharedHTTPDNSAppDAO.UpdateApp(tx, req.AppDbId, req.Name, req.ClusterIdsJSON, req.IsOn, targetUserId)
if err != nil {
return err
}
diff --git a/EdgeAPI/internal/rpc/services/httpdns/service_httpdns_node.go b/EdgeAPI/internal/rpc/services/httpdns/service_httpdns_node.go
index 463159b..5c7eb06 100644
--- a/EdgeAPI/internal/rpc/services/httpdns/service_httpdns_node.go
+++ b/EdgeAPI/internal/rpc/services/httpdns/service_httpdns_node.go
@@ -8,6 +8,7 @@ import (
"github.com/TeaOSLab/EdgeAPI/internal/goman"
"github.com/TeaOSLab/EdgeAPI/internal/installers"
"github.com/TeaOSLab/EdgeAPI/internal/rpc/services"
+ "github.com/TeaOSLab/EdgeCommon/pkg/nodeconfigs"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/iwind/TeaGo/dbs"
"github.com/iwind/TeaGo/logs"
@@ -114,7 +115,26 @@ func (this *HTTPDNSNodeService) FindHTTPDNSNode(ctx context.Context, req *pb.Fin
if err != nil {
return nil, err
}
- return &pb.FindHTTPDNSNodeResponse{Node: toPBNode(node)}, nil
+
+ pbNode := toPBNode(node)
+
+ // 认证信息
+ if pbNode != nil {
+ login, loginErr := models.SharedNodeLoginDAO.FindEnabledNodeLoginWithNodeId(this.NullTx(), nodeconfigs.NodeRoleHTTPDNS, nodeId)
+ if loginErr != nil {
+ return nil, loginErr
+ }
+ if login != nil {
+ pbNode.NodeLogin = &pb.NodeLogin{
+ Id: int64(login.Id),
+ Name: login.Name,
+ Type: login.Type,
+ Params: login.Params,
+ }
+ }
+ }
+
+ return &pb.FindHTTPDNSNodeResponse{Node: pbNode}, nil
}
func (this *HTTPDNSNodeService) ListHTTPDNSNodes(ctx context.Context, req *pb.ListHTTPDNSNodesRequest) (*pb.ListHTTPDNSNodesResponse, error) {
@@ -171,6 +191,31 @@ func (this *HTTPDNSNodeService) UpdateHTTPDNSNodeStatus(ctx context.Context, req
return this.Success()
}
+// UpdateHTTPDNSNodeLogin 修改HTTPDNS节点登录信息
+func (this *HTTPDNSNodeService) UpdateHTTPDNSNodeLogin(ctx context.Context, req *pb.UpdateHTTPDNSNodeLoginRequest) (*pb.RPCSuccess, error) {
+ _, err := this.ValidateAdmin(ctx)
+ if err != nil {
+ return nil, err
+ }
+
+ var tx = this.NullTx()
+
+ if req.NodeLogin.Id <= 0 {
+ loginId, createErr := models.SharedNodeLoginDAO.CreateNodeLogin(tx, nodeconfigs.NodeRoleHTTPDNS, req.NodeId, req.NodeLogin.Name, req.NodeLogin.Type, req.NodeLogin.Params)
+ if createErr != nil {
+ return nil, createErr
+ }
+ req.NodeLogin.Id = loginId
+ }
+
+ err = models.SharedNodeLoginDAO.UpdateNodeLogin(tx, req.NodeLogin.Id, req.NodeLogin.Name, req.NodeLogin.Type, req.NodeLogin.Params)
+ if err != nil {
+ return nil, err
+ }
+
+ return this.Success()
+}
+
func shouldTriggerHTTPDNSInstall(installStatusJSON []byte) bool {
if len(installStatusJSON) == 0 {
return false
diff --git a/EdgeAPI/internal/rpc/services/httpdns/service_httpdns_sandbox.go b/EdgeAPI/internal/rpc/services/httpdns/service_httpdns_sandbox.go
index 3892a9d..d0b4a86 100644
--- a/EdgeAPI/internal/rpc/services/httpdns/service_httpdns_sandbox.go
+++ b/EdgeAPI/internal/rpc/services/httpdns/service_httpdns_sandbox.go
@@ -83,12 +83,23 @@ func (this *HTTPDNSSandboxService) TestHTTPDNSResolve(ctx context.Context, req *
RequestId: "rid-" + rands.HexString(12),
}, nil
}
- if req.ClusterId > 0 && req.ClusterId != int64(app.PrimaryClusterId) && req.ClusterId != int64(app.BackupClusterId) {
- return &pb.TestHTTPDNSResolveResponse{
- Code: "APP_CLUSTER_MISMATCH",
- Message: "当前应用未绑定到该集群 (主集群: " + strconv.FormatInt(int64(app.PrimaryClusterId), 10) + ", 备用集群: " + strconv.FormatInt(int64(app.BackupClusterId), 10) + ")",
- RequestId: "rid-" + rands.HexString(12),
- }, nil
+ // 检查集群是否绑定
+ appClusterIds := models.SharedHTTPDNSAppDAO.ReadAppClusterIds(app)
+ if req.ClusterId > 0 {
+ var found bool
+ for _, cid := range appClusterIds {
+ if cid == req.ClusterId {
+ found = true
+ break
+ }
+ }
+ if !found {
+ return &pb.TestHTTPDNSResolveResponse{
+ Code: "APP_CLUSTER_MISMATCH",
+ Message: "当前应用未绑定到该集群",
+ RequestId: "rid-" + rands.HexString(12),
+ }, nil
+ }
}
qtype := strings.ToUpper(strings.TrimSpace(req.Qtype))
@@ -98,8 +109,8 @@ func (this *HTTPDNSSandboxService) TestHTTPDNSResolve(ctx context.Context, req *
// 获取集群服务域名
clusterId := req.ClusterId
- if clusterId <= 0 {
- clusterId = int64(app.PrimaryClusterId)
+ if clusterId <= 0 && len(appClusterIds) > 0 {
+ clusterId = appClusterIds[0]
}
cluster, err := models.SharedHTTPDNSClusterDAO.FindEnabledCluster(this.NullTx(), clusterId)
if err != nil {
@@ -128,6 +139,25 @@ func (this *HTTPDNSSandboxService) TestHTTPDNSResolve(ctx context.Context, req *
return nil, err
}
+ port := "443"
+ if len(cluster.TLSPolicy) > 0 {
+ var tlsConfig map[string]interface{}
+ if err := json.Unmarshal(cluster.TLSPolicy, &tlsConfig); err == nil {
+ if listenRaw, ok := tlsConfig["listen"]; ok && listenRaw != nil {
+ if data, err := json.Marshal(listenRaw); err == nil {
+ var listenAddresses []map[string]interface{}
+ if err := json.Unmarshal(data, &listenAddresses); err == nil {
+ if len(listenAddresses) > 0 {
+ if portRange, ok := listenAddresses[0]["portRange"].(string); ok && len(portRange) > 0 {
+ port = portRange
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
query := url.Values{}
query.Set("appId", req.AppId)
query.Set("dn", req.Domain)
@@ -167,7 +197,7 @@ func (this *HTTPDNSSandboxService) TestHTTPDNSResolve(ctx context.Context, req *
query.Set("sign", sign)
}
- resolveURL := "https://" + serviceDomain + "/resolve?" + query.Encode()
+ resolveURL := "https://" + serviceDomain + ":" + port + "/resolve?" + query.Encode()
httpClient := &http.Client{
Timeout: 5 * time.Second,
diff --git a/EdgeAPI/internal/rpc/services/httpdns/task_notify.go b/EdgeAPI/internal/rpc/services/httpdns/task_notify.go
index a6a1088..b87301b 100644
--- a/EdgeAPI/internal/rpc/services/httpdns/task_notify.go
+++ b/EdgeAPI/internal/rpc/services/httpdns/task_notify.go
@@ -18,16 +18,14 @@ func notifyHTTPDNSAppTasksByApp(tx *dbs.Tx, app *models.HTTPDNSApp, taskType mod
return nil
}
- primaryClusterId := int64(app.PrimaryClusterId)
- backupClusterId := int64(app.BackupClusterId)
-
- err := notifyHTTPDNSClusterTask(tx, primaryClusterId, taskType)
- if err != nil {
- return err
- }
-
- if backupClusterId > 0 && backupClusterId != primaryClusterId {
- err = notifyHTTPDNSClusterTask(tx, backupClusterId, taskType)
+ clusterIds := models.SharedHTTPDNSAppDAO.ReadAppClusterIds(app)
+ notified := map[int64]bool{}
+ for _, clusterId := range clusterIds {
+ if clusterId <= 0 || notified[clusterId] {
+ continue
+ }
+ notified[clusterId] = true
+ err := notifyHTTPDNSClusterTask(tx, clusterId, taskType)
if err != nil {
return err
}
diff --git a/EdgeAPI/internal/rpc/services/users/service_user.go b/EdgeAPI/internal/rpc/services/users/service_user.go
index afe7ee3..55c4931 100644
--- a/EdgeAPI/internal/rpc/services/users/service_user.go
+++ b/EdgeAPI/internal/rpc/services/users/service_user.go
@@ -71,7 +71,7 @@ func (this *UserService) UpdateUser(ctx context.Context, req *pb.UpdateUserReque
return nil, err
}
- err = models.SharedUserDAO.UpdateUser(tx, req.UserId, req.Username, req.Password, req.Fullname, req.Mobile, req.Tel, req.Email, req.Remark, req.IsOn, req.NodeClusterId, req.BandwidthAlgo)
+ err = models.SharedUserDAO.UpdateUser(tx, req.UserId, req.Username, req.Password, req.Fullname, req.Mobile, req.Tel, req.Email, req.Remark, req.IsOn, req.NodeClusterId, req.BandwidthAlgo, req.HttpdnsClusterIdsJSON)
if err != nil {
return nil, err
}
@@ -242,6 +242,20 @@ func (this *UserService) FindEnabledUser(ctx context.Context, req *pb.FindEnable
}
}
+ // 用户功能列表
+ var pbFeatures []*pb.UserFeature
+ userFeatures, err := models.SharedUserDAO.FindUserFeatures(tx, req.UserId)
+ if err != nil {
+ return nil, err
+ }
+ for _, f := range userFeatures {
+ pbFeatures = append(pbFeatures, &pb.UserFeature{
+ Name: f.Name,
+ Code: f.Code,
+ Description: f.Description,
+ })
+ }
+
return &pb.FindEnabledUserResponse{
User: &pb.User{
Id: int64(user.Id),
@@ -265,6 +279,8 @@ func (this *UserService) FindEnabledUser(ctx context.Context, req *pb.FindEnable
BandwidthAlgo: user.BandwidthAlgo,
OtpLogin: pbOtpAuth,
Lang: user.Lang,
+ Features: pbFeatures,
+ HttpdnsClusterIdsJSON: user.HttpdnsClusterIds,
},
}, nil
}
diff --git a/EdgeAPI/internal/rpc/services/users/service_user_ext_plus.go b/EdgeAPI/internal/rpc/services/users/service_user_ext_plus.go
index c106a0c..41f91de 100644
--- a/EdgeAPI/internal/rpc/services/users/service_user_ext_plus.go
+++ b/EdgeAPI/internal/rpc/services/users/service_user_ext_plus.go
@@ -5,11 +5,13 @@ package users
import (
"context"
+ "encoding/json"
"errors"
"github.com/TeaOSLab/EdgeAPI/internal/db/models"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/TeaOSLab/EdgeCommon/pkg/userconfigs"
"github.com/iwind/TeaGo/dbs"
+ "github.com/iwind/TeaGo/lists"
)
// FindUserPriceInfo 读取用户计费信息
@@ -142,13 +144,27 @@ func (this *UserService) RegisterUser(ctx context.Context, req *pb.RegisterUserR
return errors.New("the username exists already")
}
+ features := registerConfig.Features
+ if registerConfig.HTTPDNSIsOn && !lists.ContainsString(features, userconfigs.UserFeatureCodeHTTPDNS) {
+ features = append(features, userconfigs.UserFeatureCodeHTTPDNS)
+ }
+
// 创建用户
- userId, err := models.SharedUserDAO.CreateUser(tx, req.Username, req.Password, req.Fullname, req.Mobile, "", req.Email, "", req.Source, registerConfig.ClusterId, registerConfig.Features, req.Ip, !registerConfig.RequireVerification)
+ userId, err := models.SharedUserDAO.CreateUser(tx, req.Username, req.Password, req.Fullname, req.Mobile, "", req.Email, "", req.Source, registerConfig.ClusterId, features, req.Ip, !registerConfig.RequireVerification)
if err != nil {
return err
}
createdUserId = userId
+ // 自动关联默认 HTTPDNS 集群
+ if registerConfig.HTTPDNSIsOn && len(registerConfig.HTTPDNSDefaultClusterIds) > 0 {
+ httpdnsJSON, _ := json.Marshal(registerConfig.HTTPDNSDefaultClusterIds)
+ err = models.SharedUserDAO.UpdateUserHttpdnsClusterIds(tx, userId, httpdnsJSON)
+ if err != nil {
+ return err
+ }
+ }
+
// 发送激活邮件
if len(req.Email) > 0 && registerConfig.EmailVerification.IsOn {
_, err := models.SharedUserEmailVerificationDAO.CreateVerification(tx, userId, req.Email)
diff --git a/EdgeAPI/internal/setup/sql_upgrade.go b/EdgeAPI/internal/setup/sql_upgrade.go
index 205f16b..2b986b9 100644
--- a/EdgeAPI/internal/setup/sql_upgrade.go
+++ b/EdgeAPI/internal/setup/sql_upgrade.go
@@ -1258,14 +1258,27 @@ func upgradeV1_4_4(db *dbs.DB) error {
// 1.4.8
func upgradeV1_4_8(db *dbs.DB) error {
- return createHTTPDNSTables(db)
+ err := createHTTPDNSTables(db)
+ if err != nil {
+ return err
+ }
+
+ // edgeUsers: 增加 httpdnsClusterIds 字段
+ _, alterErr := db.Exec("ALTER TABLE `edgeUsers` ADD COLUMN `httpdnsClusterIds` text DEFAULT NULL")
+ if alterErr != nil {
+ if strings.Contains(alterErr.Error(), "Duplicate column") {
+ return nil
+ }
+ return alterErr
+ }
+ return nil
}
func createHTTPDNSTables(db *dbs.DB) error {
sqls := []string{
"CREATE TABLE IF NOT EXISTS `edgeHTTPDNSClusters` (`id` bigint unsigned NOT NULL AUTO_INCREMENT,`name` varchar(255) DEFAULT NULL,`isOn` tinyint unsigned DEFAULT '1',`isDefault` tinyint unsigned DEFAULT '0',`serviceDomain` varchar(255) DEFAULT NULL,`defaultTTL` int unsigned DEFAULT '30',`fallbackTimeoutMs` int unsigned DEFAULT '300',`installDir` varchar(255) DEFAULT '/opt/edge-httpdns',`tlsPolicy` json DEFAULT NULL,`createdAt` bigint unsigned DEFAULT '0',`updatedAt` bigint unsigned DEFAULT '0',`state` tinyint unsigned DEFAULT '1',PRIMARY KEY (`id`),KEY `name` (`name`),KEY `isDefault` (`isDefault`),KEY `state` (`state`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='HTTPDNS集群配置表(默认TTL、回退超时、服务域名等)'",
"CREATE TABLE IF NOT EXISTS `edgeHTTPDNSNodes` (`id` bigint unsigned NOT NULL AUTO_INCREMENT,`clusterId` bigint unsigned DEFAULT '0',`name` varchar(255) DEFAULT NULL,`isOn` tinyint unsigned DEFAULT '1',`isUp` tinyint unsigned DEFAULT '0',`isInstalled` tinyint unsigned DEFAULT '0',`isActive` tinyint unsigned DEFAULT '0',`uniqueId` varchar(64) DEFAULT NULL,`secret` varchar(64) DEFAULT NULL,`installDir` varchar(255) DEFAULT '/opt/edge-httpdns',`status` json DEFAULT NULL,`installStatus` json DEFAULT NULL,`createdAt` bigint unsigned DEFAULT '0',`updatedAt` bigint unsigned DEFAULT '0',`state` tinyint unsigned DEFAULT '1',PRIMARY KEY (`id`),UNIQUE KEY `uniqueId` (`uniqueId`),KEY `clusterId` (`clusterId`),KEY `state` (`state`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='HTTPDNS节点表(节点基础信息与运行状态)'",
- "CREATE TABLE IF NOT EXISTS `edgeHTTPDNSApps` (`id` bigint unsigned NOT NULL AUTO_INCREMENT,`name` varchar(255) DEFAULT NULL,`appId` varchar(64) DEFAULT NULL,`isOn` tinyint unsigned DEFAULT '1',`primaryClusterId` bigint unsigned DEFAULT '0',`backupClusterId` bigint unsigned DEFAULT '0',`sniMode` varchar(64) DEFAULT 'fixed_hide',`userId` bigint unsigned DEFAULT '0',`createdAt` bigint unsigned DEFAULT '0',`updatedAt` bigint unsigned DEFAULT '0',`state` tinyint unsigned DEFAULT '1',PRIMARY KEY (`id`),UNIQUE KEY `appId` (`appId`),KEY `name` (`name`),KEY `state` (`state`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='HTTPDNS应用表(应用与主备集群绑定关系)'",
+ "CREATE TABLE IF NOT EXISTS `edgeHTTPDNSApps` (`id` bigint unsigned NOT NULL AUTO_INCREMENT,`name` varchar(255) DEFAULT NULL,`appId` varchar(64) DEFAULT NULL,`isOn` tinyint unsigned DEFAULT '1',`clusterIdsJSON` text DEFAULT NULL,`sniMode` varchar(64) DEFAULT 'fixed_hide',`userId` bigint unsigned DEFAULT '0',`createdAt` bigint unsigned DEFAULT '0',`updatedAt` bigint unsigned DEFAULT '0',`state` tinyint unsigned DEFAULT '1',PRIMARY KEY (`id`),UNIQUE KEY `appId` (`appId`),KEY `name` (`name`),KEY `userId` (`userId`),KEY `state` (`state`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='HTTPDNS应用表(应用与集群绑定关系)'",
"CREATE TABLE IF NOT EXISTS `edgeHTTPDNSAppSecrets` (`id` bigint unsigned NOT NULL AUTO_INCREMENT,`appId` bigint unsigned DEFAULT '0',`signEnabled` tinyint unsigned DEFAULT '0',`signSecret` varchar(255) DEFAULT NULL,`signUpdatedAt` bigint unsigned DEFAULT '0',`updatedAt` bigint unsigned DEFAULT '0',`state` tinyint unsigned DEFAULT '1',PRIMARY KEY (`id`),UNIQUE KEY `appId` (`appId`),KEY `state` (`state`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='HTTPDNS应用密钥表(请求验签开关与加签Secret)'",
"CREATE TABLE IF NOT EXISTS `edgeHTTPDNSDomains` (`id` bigint unsigned NOT NULL AUTO_INCREMENT,`appId` bigint unsigned DEFAULT '0',`domain` varchar(255) DEFAULT NULL,`isOn` tinyint unsigned DEFAULT '1',`createdAt` bigint unsigned DEFAULT '0',`updatedAt` bigint unsigned DEFAULT '0',`state` tinyint unsigned DEFAULT '1',PRIMARY KEY (`id`),UNIQUE KEY `appId_domain` (`appId`,`domain`),KEY `domain` (`domain`),KEY `state` (`state`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='HTTPDNS应用域名表(应用绑定的业务域名)'",
"CREATE TABLE IF NOT EXISTS `edgeHTTPDNSCustomRules` (`id` bigint unsigned NOT NULL AUTO_INCREMENT,`appId` bigint unsigned DEFAULT '0',`domainId` bigint unsigned DEFAULT '0',`ruleName` varchar(255) DEFAULT NULL,`lineScope` varchar(64) DEFAULT NULL,`lineCarrier` varchar(64) DEFAULT NULL,`lineRegion` varchar(64) DEFAULT NULL,`lineProvince` varchar(64) DEFAULT NULL,`lineContinent` varchar(64) DEFAULT NULL,`lineCountry` varchar(128) DEFAULT NULL,`ttl` int unsigned DEFAULT '30',`isOn` tinyint unsigned DEFAULT '1',`priority` int unsigned DEFAULT '0',`updatedAt` bigint unsigned DEFAULT '0',`state` tinyint unsigned DEFAULT '1',PRIMARY KEY (`id`),KEY `domainId_isOn_priority` (`domainId`,`isOn`,`priority`),KEY `state` (`state`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='HTTPDNS自定义解析规则表(按线路/地域匹配)'",
diff --git a/EdgeAdmin/edge-admin b/EdgeAdmin/edge-admin
new file mode 100644
index 0000000..e8e6c24
Binary files /dev/null and b/EdgeAdmin/edge-admin differ
diff --git a/EdgeAdmin/internal/web/actions/default/httpdns/apps/appSettings.go b/EdgeAdmin/internal/web/actions/default/httpdns/apps/appSettings.go
index d97444c..e28aea8 100644
--- a/EdgeAdmin/internal/web/actions/default/httpdns/apps/appSettings.go
+++ b/EdgeAdmin/internal/web/actions/default/httpdns/apps/appSettings.go
@@ -1,15 +1,14 @@
package apps
import (
+ "encoding/json"
"strconv"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/httpdns/httpdnsutils"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
- "github.com/TeaOSLab/EdgeCommon/pkg/systemconfigs"
"github.com/iwind/TeaGo/actions"
"github.com/iwind/TeaGo/maps"
- "github.com/iwind/TeaGo/types"
)
type AppSettingsAction struct {
@@ -60,55 +59,70 @@ func (this *AppSettingsAction) RunGet(params struct {
return
}
clusters := make([]maps.Map, 0, len(clusterResp.GetClusters()))
- clusterDomainMap := map[int64]string{}
+ clusterApiAddressMap := map[int64]string{}
clusterNameMap := map[int64]string{}
- defaultPrimaryClusterId := int64(0)
for _, cluster := range clusterResp.GetClusters() {
clusterId := cluster.GetId()
clusterName := cluster.GetName()
+
+ port := "443"
+ if rawTLS := cluster.GetTlsPolicyJSON(); len(rawTLS) > 0 {
+ var tlsConfig map[string]interface{}
+ if err := json.Unmarshal(rawTLS, &tlsConfig); err == nil {
+ if listenRaw, ok := tlsConfig["listen"]; ok && listenRaw != nil {
+ if data, err := json.Marshal(listenRaw); err == nil {
+ var listenAddresses []map[string]interface{}
+ if err := json.Unmarshal(data, &listenAddresses); err == nil {
+ if len(listenAddresses) > 0 {
+ if portRange, ok := listenAddresses[0]["portRange"].(string); ok && len(portRange) > 0 {
+ port = portRange
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ apiAddress := "https://" + cluster.GetServiceDomain() + ":" + port
+
clusters = append(clusters, maps.Map{
- "id": clusterId,
- "name": clusterName,
- "serviceDomain": cluster.GetServiceDomain(),
- "isDefault": cluster.GetIsDefault(),
+ "id": clusterId,
+ "name": clusterName,
})
- clusterDomainMap[clusterId] = cluster.GetServiceDomain()
+ clusterApiAddressMap[clusterId] = apiAddress
clusterNameMap[clusterId] = clusterName
- if defaultPrimaryClusterId <= 0 && cluster.GetIsDefault() {
- defaultPrimaryClusterId = clusterId
+ }
+
+ // 读取应用绑定的集群列表,取第一个作为当前选中。
+ var selectedClusterId int64
+ if raw := app.Get("clusterIds"); raw != nil {
+ if ids, ok := raw.([]int64); ok && len(ids) > 0 {
+ selectedClusterId = ids[0]
}
}
- defaultBackupClusterId := int64(0)
- defaultBackupResp, err := this.RPC().SysSettingRPC().ReadSysSetting(this.AdminContext(), &pb.ReadSysSettingRequest{
- Code: string(systemconfigs.SettingCodeHTTPDNSDefaultBackupClusterId),
- })
- if err != nil {
- this.ErrorPage(err)
- return
+ // 构建服务地址列表。
+ serviceAddresses := make([]maps.Map, 0)
+ if selectedClusterId > 0 {
+ addr := clusterApiAddressMap[selectedClusterId]
+ name := clusterNameMap[selectedClusterId]
+ if len(addr) > 0 {
+ serviceAddresses = append(serviceAddresses, maps.Map{
+ "address": addr,
+ "clusterName": name,
+ })
+ }
}
- if defaultBackupResp != nil && len(defaultBackupResp.GetValueJSON()) > 0 {
- defaultBackupClusterId = types.Int64(string(defaultBackupResp.GetValueJSON()))
- }
-
- primaryClusterId := app.GetInt64("primaryClusterId")
- backupClusterId := app.GetInt64("backupClusterId")
settings := maps.Map{
- "appId": app.GetString("appId"),
- "appStatus": app.GetBool("isOn"),
- "primaryClusterId": primaryClusterId,
- "backupClusterId": backupClusterId,
- "defaultPrimaryClusterId": defaultPrimaryClusterId,
- "defaultPrimaryClusterName": clusterNameMap[defaultPrimaryClusterId],
- "defaultBackupClusterId": defaultBackupClusterId,
- "defaultBackupClusterName": clusterNameMap[defaultBackupClusterId],
- "primaryServiceDomain": clusterDomainMap[primaryClusterId],
- "backupServiceDomain": clusterDomainMap[backupClusterId],
- "signEnabled": app.GetBool("signEnabled"),
- "signSecretPlain": app.GetString("signSecretPlain"),
- "signSecretMasked": app.GetString("signSecretMasked"),
- "signSecretUpdatedAt": app.GetString("signSecretUpdated"),
+ "appId": app.GetString("appId"),
+ "appStatus": app.GetBool("isOn"),
+ "selectedClusterId": selectedClusterId,
+ "serviceAddresses": serviceAddresses,
+ "signEnabled": app.GetBool("signEnabled"),
+ "signSecretPlain": app.GetString("signSecretPlain"),
+ "signSecretMasked": app.GetString("signSecretMasked"),
+ "signSecretUpdatedAt": app.GetString("signSecretUpdated"),
}
this.Data["app"] = app
this.Data["settings"] = settings
@@ -119,18 +133,13 @@ func (this *AppSettingsAction) RunGet(params struct {
func (this *AppSettingsAction) RunPost(params struct {
AppId int64
- AppStatus bool
- PrimaryClusterId int64
- BackupClusterId int64
+ AppStatus bool
+ ClusterId int64
Must *actions.Must
CSRF *actionutils.CSRF
}) {
params.Must.Field("appId", params.AppId).Gt(0, "请选择应用")
- if params.PrimaryClusterId > 0 && params.BackupClusterId > 0 && params.PrimaryClusterId == params.BackupClusterId {
- this.FailField("backupClusterId", "备用集群不能与主集群相同")
- return
- }
appResp, err := this.RPC().HTTPDNSAppRPC().FindHTTPDNSApp(this.AdminContext(), &pb.FindHTTPDNSAppRequest{
AppDbId: params.AppId,
@@ -144,13 +153,18 @@ func (this *AppSettingsAction) RunPost(params struct {
return
}
+ var clusterIds []int64
+ if params.ClusterId > 0 {
+ clusterIds = []int64{params.ClusterId}
+ }
+ clusterIdsJSON, _ := json.Marshal(clusterIds)
+
_, err = this.RPC().HTTPDNSAppRPC().UpdateHTTPDNSApp(this.AdminContext(), &pb.UpdateHTTPDNSAppRequest{
- AppDbId: params.AppId,
- Name: appResp.GetApp().GetName(),
- PrimaryClusterId: params.PrimaryClusterId,
- BackupClusterId: params.BackupClusterId,
- IsOn: params.AppStatus,
- UserId: appResp.GetApp().GetUserId(),
+ AppDbId: params.AppId,
+ Name: appResp.GetApp().GetName(),
+ ClusterIdsJSON: clusterIdsJSON,
+ IsOn: params.AppStatus,
+ UserId: appResp.GetApp().GetUserId(),
})
if err != nil {
this.ErrorPage(err)
diff --git a/EdgeAdmin/internal/web/actions/default/httpdns/apps/create.go b/EdgeAdmin/internal/web/actions/default/httpdns/apps/create.go
index 46c31b1..0f57cc1 100644
--- a/EdgeAdmin/internal/web/actions/default/httpdns/apps/create.go
+++ b/EdgeAdmin/internal/web/actions/default/httpdns/apps/create.go
@@ -1,6 +1,7 @@
package apps
import (
+ "encoding/json"
"strconv"
"time"
@@ -33,28 +34,6 @@ func (this *CreateAction) RunGet(params struct{}) {
}
this.Data["clusters"] = clusters
- defaultPrimaryClusterId := int64(0)
- for _, cluster := range clusterResp.GetClusters() {
- if cluster.GetIsDefault() {
- defaultPrimaryClusterId = cluster.GetId()
- break
- }
- }
- if defaultPrimaryClusterId <= 0 && len(clusters) > 0 {
- defaultPrimaryClusterId = clusters[0].GetInt64("id")
- }
- this.Data["defaultPrimaryClusterId"] = defaultPrimaryClusterId
-
- defaultBackupClusterId := int64(0)
- for _, cluster := range clusters {
- clusterId := cluster.GetInt64("id")
- if clusterId > 0 && clusterId != defaultPrimaryClusterId {
- defaultBackupClusterId = clusterId
- break
- }
- }
- this.Data["defaultBackupClusterId"] = defaultBackupClusterId
-
usersResp, err := this.RPC().UserRPC().ListEnabledUsers(this.AdminContext(), &pb.ListEnabledUsersRequest{
Offset: 0,
Size: 10_000,
@@ -77,28 +56,28 @@ func (this *CreateAction) RunGet(params struct{}) {
}
func (this *CreateAction) RunPost(params struct {
- Name string
- PrimaryClusterId int64
- BackupClusterId int64
- UserId int64
+ Name string
+ ClusterId int64
+ UserId int64
Must *actions.Must
CSRF *actionutils.CSRF
}) {
params.Must.Field("name", params.Name).Require("请输入应用名称")
- params.Must.Field("primaryClusterId", params.PrimaryClusterId).Gt(0, "请输入主服务集群")
- if params.BackupClusterId > 0 && params.BackupClusterId == params.PrimaryClusterId {
- this.FailField("backupClusterId", "备用服务集群必须和主服务集群不一致")
+ if params.ClusterId <= 0 {
+ this.FailField("clusterId", "请选择集群")
+ return
}
+ clusterIdsJSON, _ := json.Marshal([]int64{params.ClusterId})
+
createResp, err := this.RPC().HTTPDNSAppRPC().CreateHTTPDNSApp(this.AdminContext(), &pb.CreateHTTPDNSAppRequest{
- Name: params.Name,
- AppId: "app" + strconv.FormatInt(time.Now().UnixNano()%1_000_000_000_000, 36),
- PrimaryClusterId: params.PrimaryClusterId,
- BackupClusterId: params.BackupClusterId,
- IsOn: true,
- SignEnabled: true,
- UserId: params.UserId,
+ Name: params.Name,
+ AppId: "app" + strconv.FormatInt(time.Now().UnixNano()%1_000_000_000_000, 36),
+ ClusterIdsJSON: clusterIdsJSON,
+ IsOn: true,
+ SignEnabled: true,
+ UserId: params.UserId,
})
if err != nil {
this.ErrorPage(err)
diff --git a/EdgeAdmin/internal/web/actions/default/httpdns/apps/index.go b/EdgeAdmin/internal/web/actions/default/httpdns/apps/index.go
index 232d390..2a2f742 100644
--- a/EdgeAdmin/internal/web/actions/default/httpdns/apps/index.go
+++ b/EdgeAdmin/internal/web/actions/default/httpdns/apps/index.go
@@ -24,5 +24,6 @@ func (this *IndexAction) RunGet(params struct {
return
}
this.Data["apps"] = apps
+ this.Data["page"] = ""
this.Show()
}
diff --git a/EdgeAdmin/internal/web/actions/default/httpdns/apps/rpc_helpers.go b/EdgeAdmin/internal/web/actions/default/httpdns/apps/rpc_helpers.go
index b528091..d8832af 100644
--- a/EdgeAdmin/internal/web/actions/default/httpdns/apps/rpc_helpers.go
+++ b/EdgeAdmin/internal/web/actions/default/httpdns/apps/rpc_helpers.go
@@ -1,6 +1,7 @@
package apps
import (
+ "encoding/json"
"strconv"
"strings"
"time"
@@ -87,15 +88,14 @@ func findAppMap(parent *actionutils.ParentAction, appDbId int64) (maps.Map, erro
return apps[0], nil
}
-func createApp(parent *actionutils.ParentAction, name string, primaryClusterId int64, backupClusterId int64) (int64, error) {
+func createApp(parent *actionutils.ParentAction, name string, clusterIdsJSON []byte) (int64, error) {
newAppId := "app" + strconv.FormatInt(time.Now().UnixNano()%1_000_000_000_000, 36)
resp, err := parent.RPC().HTTPDNSAppRPC().CreateHTTPDNSApp(parent.AdminContext(), &pb.CreateHTTPDNSAppRequest{
- Name: strings.TrimSpace(name),
- AppId: newAppId,
- PrimaryClusterId: primaryClusterId,
- BackupClusterId: backupClusterId,
- IsOn: true,
- SignEnabled: true,
+ Name: strings.TrimSpace(name),
+ AppId: newAppId,
+ ClusterIdsJSON: clusterIdsJSON,
+ IsOn: true,
+ SignEnabled: true,
})
if err != nil {
return 0, err
@@ -110,14 +110,13 @@ func deleteAppByID(parent *actionutils.ParentAction, appDbId int64) error {
return err
}
-func updateAppSettings(parent *actionutils.ParentAction, appDbId int64, name string, primaryClusterId int64, backupClusterId int64, isOn bool, userId int64) error {
+func updateAppSettings(parent *actionutils.ParentAction, appDbId int64, name string, clusterIdsJSON []byte, isOn bool, userId int64) error {
_, err := parent.RPC().HTTPDNSAppRPC().UpdateHTTPDNSApp(parent.AdminContext(), &pb.UpdateHTTPDNSAppRequest{
- AppDbId: appDbId,
- Name: strings.TrimSpace(name),
- PrimaryClusterId: primaryClusterId,
- BackupClusterId: backupClusterId,
- IsOn: isOn,
- UserId: userId,
+ AppDbId: appDbId,
+ Name: strings.TrimSpace(name),
+ ClusterIdsJSON: clusterIdsJSON,
+ IsOn: isOn,
+ UserId: userId,
})
return err
}
@@ -277,13 +276,24 @@ func toggleCustomRule(parent *actionutils.ParentAction, ruleId int64, isOn bool)
return err
}
-func appPBToMap(app *pb.HTTPDNSApp, domainCount int64, clusterNameMap map[int64]string, userMapByID map[int64]maps.Map) maps.Map {
+func appPBToMap(app *pb.HTTPDNSApp, domainCount int64, clusterMapByID map[int64]maps.Map, userMapByID map[int64]maps.Map) maps.Map {
signSecret := app.GetSignSecret()
- primaryClusterID := app.GetPrimaryClusterId()
- backupClusterID := app.GetBackupClusterId()
- primaryClusterMap := maps.Map{"id": primaryClusterID, "name": clusterNameMap[primaryClusterID]}
- backupClusterMap := maps.Map{"id": backupClusterID, "name": clusterNameMap[backupClusterID]}
+ // 读取集群 ID 列表
+ var clusterIds []int64
+ if len(app.GetClusterIdsJSON()) > 0 {
+ _ = json.Unmarshal(app.GetClusterIdsJSON(), &clusterIds)
+ }
+
+ // 构建集群映射列表
+ var clusterMaps []maps.Map
+ for _, cid := range clusterIds {
+ cm := clusterMapByID[cid]
+ if cm == nil {
+ cm = maps.Map{"id": cid, "name": "", "apiAddress": ""}
+ }
+ clusterMaps = append(clusterMaps, cm)
+ }
var userMap maps.Map
if app.GetUserId() > 0 {
@@ -301,11 +311,8 @@ func appPBToMap(app *pb.HTTPDNSApp, domainCount int64, clusterNameMap map[int64]
"id": app.GetId(),
"name": app.GetName(),
"appId": app.GetAppId(),
- "clusterId": primaryClusterID,
- "primaryClusterId": primaryClusterID,
- "backupClusterId": backupClusterID,
- "primaryCluster": primaryClusterMap,
- "backupCluster": backupClusterMap,
+ "clusterIds": clusterIds,
+ "clusters": clusterMaps,
"userId": app.GetUserId(),
"user": userMap,
"isOn": app.GetIsOn(),
@@ -318,15 +325,37 @@ func appPBToMap(app *pb.HTTPDNSApp, domainCount int64, clusterNameMap map[int64]
}
}
-func loadHTTPDNSClusterNameMap(parent *actionutils.ParentAction) (map[int64]string, error) {
+func loadHTTPDNSClusterNameMap(parent *actionutils.ParentAction) (map[int64]maps.Map, error) {
resp, err := parent.RPC().HTTPDNSClusterRPC().FindAllHTTPDNSClusters(parent.AdminContext(), &pb.FindAllHTTPDNSClustersRequest{})
if err != nil {
return nil, err
}
- result := map[int64]string{}
+ result := map[int64]maps.Map{}
for _, cluster := range resp.GetClusters() {
- result[cluster.GetId()] = cluster.GetName()
+ port := "443"
+ if rawTLS := cluster.GetTlsPolicyJSON(); len(rawTLS) > 0 {
+ tlsConfig := maps.Map{}
+ if err := json.Unmarshal(rawTLS, &tlsConfig); err == nil {
+ if listenRaw := tlsConfig.Get("listen"); listenRaw != nil {
+ var listenAddresses []maps.Map
+ if data, err := json.Marshal(listenRaw); err == nil {
+ if err := json.Unmarshal(data, &listenAddresses); err == nil {
+ if len(listenAddresses) > 0 && len(listenAddresses[0].GetString("portRange")) > 0 {
+ port = listenAddresses[0].GetString("portRange")
+ }
+ }
+ }
+ }
+ }
+ }
+ apiAddress := "https://" + cluster.GetServiceDomain() + ":" + port
+
+ result[cluster.GetId()] = maps.Map{
+ "id": cluster.GetId(),
+ "name": cluster.GetName(),
+ "apiAddress": apiAddress,
+ }
}
return result, nil
}
diff --git a/EdgeAdmin/internal/web/actions/default/httpdns/clusters/cluster/node/install.go b/EdgeAdmin/internal/web/actions/default/httpdns/clusters/cluster/node/install.go
index c90c86d..8da9713 100644
--- a/EdgeAdmin/internal/web/actions/default/httpdns/clusters/cluster/node/install.go
+++ b/EdgeAdmin/internal/web/actions/default/httpdns/clusters/cluster/node/install.go
@@ -2,11 +2,14 @@ package node
import (
"encoding/json"
+ "fmt"
"strings"
"time"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
+ "github.com/TeaOSLab/EdgeCommon/pkg/configutils"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
+ "github.com/iwind/TeaGo/maps"
)
type InstallAction struct {
@@ -55,7 +58,22 @@ func (this *InstallAction) RunGet(params struct {
apiEndpoints = []string{"http://127.0.0.1:7788"}
}
this.Data["apiEndpoints"] = "\"" + strings.Join(apiEndpoints, "\", \"") + "\""
+ // 从 NodeLogin 中提取 SSH 地址
this.Data["sshAddr"] = ""
+ loginMap, _ := node.Get("login").(maps.Map)
+ if loginMap != nil {
+ paramsMap, _ := loginMap.Get("params").(maps.Map)
+ if paramsMap != nil {
+ host := paramsMap.GetString("host")
+ if len(host) > 0 {
+ port := paramsMap.GetInt("port")
+ if port <= 0 {
+ port = 22
+ }
+ this.Data["sshAddr"] = fmt.Sprintf("%s:%d", configutils.QuoteIP(host), port)
+ }
+ }
+ }
this.Show()
}
diff --git a/EdgeAdmin/internal/web/actions/default/httpdns/clusters/cluster/node/rpc_helpers.go b/EdgeAdmin/internal/web/actions/default/httpdns/clusters/cluster/node/rpc_helpers.go
index d4764e4..2f1d6e5 100644
--- a/EdgeAdmin/internal/web/actions/default/httpdns/clusters/cluster/node/rpc_helpers.go
+++ b/EdgeAdmin/internal/web/actions/default/httpdns/clusters/cluster/node/rpc_helpers.go
@@ -57,7 +57,21 @@ func findHTTPDNSNodeMap(parent *actionutils.ParentAction, nodeID int64) (maps.Ma
if installStatusMap.Has("ipAddresses") {
for _, addr := range installStatusMap.GetSlice("ipAddresses") {
if addrMap, ok := addr.(map[string]interface{}); ok {
- ipAddresses = append(ipAddresses, maps.Map(addrMap))
+ m := maps.Map(addrMap)
+ // 确保必要字段存在,防止前端组件报错
+ if !m.Has("name") {
+ m["name"] = ""
+ }
+ if !m.Has("canAccess") {
+ m["canAccess"] = true
+ }
+ if !m.Has("isOn") {
+ m["isOn"] = true
+ }
+ if !m.Has("isUp") {
+ m["isUp"] = true
+ }
+ ipAddresses = append(ipAddresses, m)
}
}
} else {
@@ -87,11 +101,16 @@ func findHTTPDNSNodeMap(parent *actionutils.ParentAction, nodeID int64) (maps.Ma
return nil, err
}
- // 构造 node.login 用于 index.html 展示 SSH 信息
+ // 构造 node.login 用于 index.html 展示 SSH 信息(从 NodeLogin 读取)
var loginMap maps.Map = nil
- sshInfo := installStatusMap.GetMap("ssh")
- if sshInfo != nil {
- grantId := sshInfo.GetInt64("grantId")
+ if node.GetNodeLogin() != nil {
+ nodeLogin := node.GetNodeLogin()
+ sshLoginParams := maps.Map{}
+ if len(nodeLogin.Params) > 0 {
+ _ = json.Unmarshal(nodeLogin.Params, &sshLoginParams)
+ }
+
+ grantId := sshLoginParams.GetInt64("grantId")
var grantMap maps.Map = nil
if grantId > 0 {
grantResp, grantErr := parent.RPC().NodeGrantRPC().FindEnabledNodeGrant(parent.AdminContext(), &pb.FindEnabledNodeGrantRequest{
@@ -110,8 +129,8 @@ func findHTTPDNSNodeMap(parent *actionutils.ParentAction, nodeID int64) (maps.Ma
loginMap = maps.Map{
"params": maps.Map{
- "host": sshInfo.GetString("host"),
- "port": sshInfo.GetInt("port"),
+ "host": sshLoginParams.GetString("host"),
+ "port": sshLoginParams.GetInt("port"),
},
"grant": grantMap,
}
@@ -169,8 +188,8 @@ func decodeNodeStatus(raw []byte) maps.Map {
func decodeInstallStatus(raw []byte) maps.Map {
result := maps.Map{
"isRunning": false,
- "isFinished": true,
- "isOk": true,
+ "isFinished": false,
+ "isOk": false,
"error": "",
"errorCode": "",
}
diff --git a/EdgeAdmin/internal/web/actions/default/httpdns/clusters/cluster/node/update.go b/EdgeAdmin/internal/web/actions/default/httpdns/clusters/cluster/node/update.go
index 3459d5f..a6a90d5 100644
--- a/EdgeAdmin/internal/web/actions/default/httpdns/clusters/cluster/node/update.go
+++ b/EdgeAdmin/internal/web/actions/default/httpdns/clusters/cluster/node/update.go
@@ -47,39 +47,62 @@ func (this *UpdateAction) RunGet(params struct {
sshPort := 22
ipAddresses := []maps.Map{}
var grantId int64
+ var loginId int64
this.Data["grant"] = nil
resp, err := this.RPC().HTTPDNSNodeRPC().FindHTTPDNSNode(this.AdminContext(), &pb.FindHTTPDNSNodeRequest{
NodeId: params.NodeId,
})
if err == nil && resp.GetNode() != nil {
+ // 从 NodeLogin 读取 SSH 信息
+ if resp.GetNode().GetNodeLogin() != nil {
+ nodeLogin := resp.GetNode().GetNodeLogin()
+ loginId = nodeLogin.Id
+ if len(nodeLogin.Params) > 0 {
+ sshLoginParams := maps.Map{}
+ _ = json.Unmarshal(nodeLogin.Params, &sshLoginParams)
+ if h := strings.TrimSpace(sshLoginParams.GetString("host")); len(h) > 0 {
+ sshHost = h
+ }
+ if p := sshLoginParams.GetInt("port"); p > 0 {
+ sshPort = p
+ }
+ grantId = sshLoginParams.GetInt64("grantId")
+ }
+ }
+
+ // IP 地址仍从 installStatus 读取
if len(resp.GetNode().GetInstallStatusJSON()) > 0 {
installStatus := maps.Map{}
_ = json.Unmarshal(resp.GetNode().GetInstallStatusJSON(), &installStatus)
- sshInfo := installStatus.GetMap("ssh")
- if sshInfo != nil {
- if h := strings.TrimSpace(sshInfo.GetString("host")); len(h) > 0 {
- sshHost = h
- }
- if p := sshInfo.GetInt("port"); p > 0 {
- sshPort = p
- }
- grantId = sshInfo.GetInt64("grantId")
- }
-
+
if installStatus.Has("ipAddresses") {
for _, addr := range installStatus.GetSlice("ipAddresses") {
if addrMap, ok := addr.(map[string]interface{}); ok {
- ipAddresses = append(ipAddresses, maps.Map(addrMap))
+ m := maps.Map(addrMap)
+ // 确保必要字段存在,防止前端组件报错
+ if !m.Has("name") {
+ m["name"] = ""
+ }
+ if !m.Has("canAccess") {
+ m["canAccess"] = true
+ }
+ if !m.Has("isOn") {
+ m["isOn"] = true
+ }
+ if !m.Has("isUp") {
+ m["isUp"] = true
+ }
+ ipAddresses = append(ipAddresses, m)
}
}
} else if ip := strings.TrimSpace(installStatus.GetString("ipAddr")); len(ip) > 0 {
ipAddresses = append(ipAddresses, maps.Map{
- "ip": ip,
- "name": "",
+ "ip": ip,
+ "name": "",
"canAccess": true,
- "isOn": true,
- "isUp": true,
+ "isOn": true,
+ "isUp": true,
})
}
}
@@ -87,6 +110,7 @@ func (this *UpdateAction) RunGet(params struct {
this.Data["sshHost"] = sshHost
this.Data["sshPort"] = sshPort
+ this.Data["loginId"] = loginId
this.Data["ipAddresses"] = ipAddresses
if grantId > 0 {
@@ -107,11 +131,12 @@ func (this *UpdateAction) RunGet(params struct {
}
func (this *UpdateAction) RunPost(params struct {
- NodeId int64
- Name string
- ClusterId int64
- IsOn bool
- SshHost string
+ NodeId int64
+ Name string
+ ClusterId int64
+ IsOn bool
+ LoginId int64
+ SshHost string
SshPort int
GrantId int64
IpAddressesJSON []byte
@@ -155,8 +180,6 @@ func (this *UpdateAction) RunPost(params struct {
}
}
- needUpdateInstallStatus := hasSSHUpdate || len(ipAddresses) > 0
-
resp, err := this.RPC().HTTPDNSNodeRPC().FindHTTPDNSNode(this.AdminContext(), &pb.FindHTTPDNSNodeRequest{
NodeId: params.NodeId,
})
@@ -186,7 +209,31 @@ func (this *UpdateAction) RunPost(params struct {
return
}
- if needUpdateInstallStatus {
+ // SSH 保存到 NodeLogin
+ if hasSSHUpdate {
+ login := &pb.NodeLogin{
+ Id: params.LoginId,
+ Name: "SSH",
+ Type: "ssh",
+ Params: maps.Map{
+ "grantId": params.GrantId,
+ "host": params.SshHost,
+ "port": params.SshPort,
+ }.AsJSON(),
+ }
+
+ _, err = this.RPC().HTTPDNSNodeRPC().UpdateHTTPDNSNodeLogin(this.AdminContext(), &pb.UpdateHTTPDNSNodeLoginRequest{
+ NodeId: params.NodeId,
+ NodeLogin: login,
+ })
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+ }
+
+ // IP 地址仍保存在 installStatus 中
+ if len(ipAddresses) > 0 {
installStatus := maps.Map{
"isRunning": false,
"isFinished": true,
@@ -197,19 +244,10 @@ func (this *UpdateAction) RunPost(params struct {
if len(node.GetInstallStatusJSON()) > 0 {
_ = json.Unmarshal(node.GetInstallStatusJSON(), &installStatus)
}
- if hasSSHUpdate {
- installStatus["ssh"] = maps.Map{
- "host": params.SshHost,
- "port": params.SshPort,
- "grantId": params.GrantId,
- }
- }
- if len(ipAddresses) > 0 {
- installStatus["ipAddresses"] = ipAddresses
- } else {
- delete(installStatus, "ipAddresses")
- delete(installStatus, "ipAddr") // Cleanup legacy
- }
+ installStatus["ipAddresses"] = ipAddresses
+ // 清理旧的 ssh 字段
+ delete(installStatus, "ssh")
+ delete(installStatus, "ipAddr")
installStatusJSON, _ := json.Marshal(installStatus)
_, err = this.RPC().HTTPDNSNodeRPC().UpdateHTTPDNSNodeStatus(this.AdminContext(), &pb.UpdateHTTPDNSNodeStatusRequest{
diff --git a/EdgeAdmin/internal/web/actions/default/httpdns/clusters/cluster/node/updateInstallStatus.go b/EdgeAdmin/internal/web/actions/default/httpdns/clusters/cluster/node/updateInstallStatus.go
index e713a97..73e94f0 100644
--- a/EdgeAdmin/internal/web/actions/default/httpdns/clusters/cluster/node/updateInstallStatus.go
+++ b/EdgeAdmin/internal/web/actions/default/httpdns/clusters/cluster/node/updateInstallStatus.go
@@ -34,7 +34,7 @@ func (this *UpdateInstallStatusAction) RunPost(params struct {
_ = json.Unmarshal(node.GetInstallStatusJSON(), &installStatus)
}
installStatus["isRunning"] = false
- installStatus["isFinished"] = true
+ installStatus["isFinished"] = params.IsInstalled // 标记为未安装时重置为"未开始"状态
installStatus["isOk"] = params.IsInstalled
installStatus["error"] = ""
installStatus["errorCode"] = ""
diff --git a/EdgeAdmin/internal/web/actions/default/httpdns/clusters/clusterSettings.go b/EdgeAdmin/internal/web/actions/default/httpdns/clusters/clusterSettings.go
index 1f6ef3a..71768d1 100644
--- a/EdgeAdmin/internal/web/actions/default/httpdns/clusters/clusterSettings.go
+++ b/EdgeAdmin/internal/web/actions/default/httpdns/clusters/clusterSettings.go
@@ -10,10 +10,8 @@ import (
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/sslconfigs"
- "github.com/TeaOSLab/EdgeCommon/pkg/systemconfigs"
"github.com/iwind/TeaGo/actions"
"github.com/iwind/TeaGo/maps"
- "github.com/iwind/TeaGo/types"
)
type ClusterSettingsAction struct {
@@ -49,11 +47,9 @@ func (this *ClusterSettingsAction) RunGet(params struct {
"fallbackTimeout": cluster.GetInt("fallbackTimeout"),
"installDir": cluster.GetString("installDir"),
"isOn": cluster.GetBool("isOn"),
- "isDefaultCluster": cluster.GetBool("isDefault"),
- "isDefaultBackupCluster": false,
}
if settings.GetInt("cacheTtl") <= 0 {
- settings["cacheTtl"] = 30
+ settings["cacheTtl"] = 60
}
if settings.GetInt("fallbackTimeout") <= 0 {
settings["fallbackTimeout"] = 300
@@ -62,22 +58,9 @@ func (this *ClusterSettingsAction) RunGet(params struct {
settings["installDir"] = "/opt/edge-httpdns"
}
- defaultBackupResp, err := this.RPC().SysSettingRPC().ReadSysSetting(this.AdminContext(), &pb.ReadSysSettingRequest{
- Code: string(systemconfigs.SettingCodeHTTPDNSDefaultBackupClusterId),
- })
- if err != nil {
- this.ErrorPage(err)
- return
- }
- defaultBackupClusterId := int64(0)
- if defaultBackupResp != nil && len(defaultBackupResp.GetValueJSON()) > 0 {
- defaultBackupClusterId = types.Int64(string(defaultBackupResp.GetValueJSON()))
- }
- settings["isDefaultBackupCluster"] = defaultBackupClusterId == params.ClusterId
-
listenAddresses := []*serverconfigs.NetworkAddressConfig{
{
- Protocol: serverconfigs.ProtocolHTTPS,
+ Protocol: serverconfigs.ProtocolTLS,
Host: "",
PortRange: "443",
},
@@ -126,9 +109,7 @@ func (this *ClusterSettingsAction) RunPost(params struct {
CacheTtl int32
FallbackTimeout int32
InstallDir string
- IsOn bool
- IsDefaultCluster bool
- IsDefaultBackupCluster bool
+ IsOn bool
Addresses []byte
SslPolicyJSON []byte
@@ -145,7 +126,7 @@ func (this *ClusterSettingsAction) RunPost(params struct {
params.Must.Field("gatewayDomain", params.GatewayDomain).Require("请输入服务域名")
if params.CacheTtl <= 0 {
- params.CacheTtl = 30
+ params.CacheTtl = 60
}
if params.FallbackTimeout <= 0 {
params.FallbackTimeout = 300
@@ -153,18 +134,6 @@ func (this *ClusterSettingsAction) RunPost(params struct {
if len(params.InstallDir) == 0 {
params.InstallDir = "/opt/edge-httpdns"
}
- if params.IsDefaultCluster && !params.IsOn {
- this.Fail("默认主集群必须保持启用状态")
- return
- }
- if params.IsDefaultBackupCluster && !params.IsOn {
- this.Fail("默认备用集群必须保持启用状态")
- return
- }
- if params.IsDefaultCluster && params.IsDefaultBackupCluster {
- this.Fail("默认主集群和默认备用集群不能是同一个集群")
- return
- }
cluster, err := findClusterMap(this.Parent(), params.ClusterId)
if err != nil {
@@ -213,35 +182,7 @@ func (this *ClusterSettingsAction) RunPost(params struct {
InstallDir: params.InstallDir,
TlsPolicyJSON: tlsPolicyJSON,
IsOn: params.IsOn,
- IsDefault: params.IsDefaultCluster,
- })
- if err != nil {
- this.ErrorPage(err)
- return
- }
-
- backupClusterValue := int64(0)
- if params.IsDefaultBackupCluster {
- backupClusterValue = params.ClusterId
- } else {
- readResp, err := this.RPC().SysSettingRPC().ReadSysSetting(this.AdminContext(), &pb.ReadSysSettingRequest{
- Code: string(systemconfigs.SettingCodeHTTPDNSDefaultBackupClusterId),
- })
- if err != nil {
- this.ErrorPage(err)
- return
- }
- if readResp != nil && len(readResp.GetValueJSON()) > 0 {
- oldBackupClusterId := types.Int64(string(readResp.GetValueJSON()))
- if oldBackupClusterId != params.ClusterId {
- backupClusterValue = oldBackupClusterId
- }
- }
- }
-
- _, err = this.RPC().SysSettingRPC().UpdateSysSetting(this.AdminContext(), &pb.UpdateSysSettingRequest{
- Code: string(systemconfigs.SettingCodeHTTPDNSDefaultBackupClusterId),
- ValueJSON: []byte(strconv.FormatInt(backupClusterValue, 10)),
+ IsDefault: false,
})
if err != nil {
this.ErrorPage(err)
diff --git a/EdgeAdmin/internal/web/actions/default/httpdns/clusters/create.go b/EdgeAdmin/internal/web/actions/default/httpdns/clusters/create.go
index 61b0957..0823114 100644
--- a/EdgeAdmin/internal/web/actions/default/httpdns/clusters/create.go
+++ b/EdgeAdmin/internal/web/actions/default/httpdns/clusters/create.go
@@ -1,13 +1,11 @@
package clusters
import (
- "strconv"
"strings"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/httpdns/httpdnsutils"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
- "github.com/TeaOSLab/EdgeCommon/pkg/systemconfigs"
"github.com/iwind/TeaGo/actions"
)
@@ -25,14 +23,12 @@ func (this *CreateAction) RunGet(params struct{}) {
}
func (this *CreateAction) RunPost(params struct {
- Name string
- GatewayDomain string
- CacheTtl int32
- FallbackTimeout int32
- InstallDir string
- IsOn bool
- IsDefaultPrimary bool
- IsDefaultBackup bool
+ Name string
+ GatewayDomain string
+ CacheTtl int32
+ FallbackTimeout int32
+ InstallDir string
+ IsOn bool
Must *actions.Must
}) {
@@ -43,7 +39,7 @@ func (this *CreateAction) RunPost(params struct {
params.InstallDir = "/opt/edge-httpdns"
}
if params.CacheTtl <= 0 {
- params.CacheTtl = 30
+ params.CacheTtl = 60
}
if params.FallbackTimeout <= 0 {
params.FallbackTimeout = 300
@@ -52,19 +48,6 @@ func (this *CreateAction) RunPost(params struct {
params.Must.Field("name", params.Name).Require("请输入集群名称")
params.Must.Field("gatewayDomain", params.GatewayDomain).Require("请输入服务域名")
- if params.IsDefaultPrimary && !params.IsOn {
- this.Fail("默认主集群必须保持启用状态")
- return
- }
- if params.IsDefaultBackup && !params.IsOn {
- this.Fail("默认备用集群必须保持启用状态")
- return
- }
- if params.IsDefaultPrimary && params.IsDefaultBackup {
- this.Fail("默认主集群和默认备用集群不能是同一个集群")
- return
- }
-
resp, err := this.RPC().HTTPDNSClusterRPC().CreateHTTPDNSCluster(this.AdminContext(), &pb.CreateHTTPDNSClusterRequest{
Name: params.Name,
ServiceDomain: params.GatewayDomain,
@@ -72,24 +55,13 @@ func (this *CreateAction) RunPost(params struct {
FallbackTimeoutMs: params.FallbackTimeout,
InstallDir: params.InstallDir,
IsOn: params.IsOn,
- IsDefault: params.IsDefaultPrimary,
+ IsDefault: false,
})
if err != nil {
this.ErrorPage(err)
return
}
- if params.IsDefaultBackup {
- _, err = this.RPC().SysSettingRPC().UpdateSysSetting(this.AdminContext(), &pb.UpdateSysSettingRequest{
- Code: string(systemconfigs.SettingCodeHTTPDNSDefaultBackupClusterId),
- ValueJSON: []byte(strconv.FormatInt(resp.GetClusterId(), 10)),
- })
- if err != nil {
- this.ErrorPage(err)
- return
- }
- }
-
this.Data["clusterId"] = resp.GetClusterId()
this.Success()
}
diff --git a/EdgeAdmin/internal/web/actions/default/httpdns/clusters/rpc_helpers.go b/EdgeAdmin/internal/web/actions/default/httpdns/clusters/rpc_helpers.go
index 968cb16..36cdbd3 100644
--- a/EdgeAdmin/internal/web/actions/default/httpdns/clusters/rpc_helpers.go
+++ b/EdgeAdmin/internal/web/actions/default/httpdns/clusters/rpc_helpers.go
@@ -37,10 +37,29 @@ func listClusterMaps(parent *actionutils.ParentAction, keyword string) ([]maps.M
}
}
+ port := "443"
+ if rawTLS := cluster.GetTlsPolicyJSON(); len(rawTLS) > 0 {
+ tlsConfig := maps.Map{}
+ if err := json.Unmarshal(rawTLS, &tlsConfig); err == nil {
+ if listenRaw := tlsConfig.Get("listen"); listenRaw != nil {
+ var listenAddresses []maps.Map
+ if data, err := json.Marshal(listenRaw); err == nil {
+ if err := json.Unmarshal(data, &listenAddresses); err == nil {
+ if len(listenAddresses) > 0 && len(listenAddresses[0].GetString("portRange")) > 0 {
+ port = listenAddresses[0].GetString("portRange")
+ }
+ }
+ }
+ }
+ }
+ }
+ apiAddress := "https://" + cluster.GetServiceDomain() + ":" + port
+
result = append(result, maps.Map{
"id": cluster.GetId(),
"name": cluster.GetName(),
"gatewayDomain": cluster.GetServiceDomain(),
+ "apiAddress": apiAddress,
"defaultTTL": cluster.GetDefaultTTL(),
"fallbackTimeout": cluster.GetFallbackTimeoutMs(),
"installDir": cluster.GetInstallDir(),
@@ -86,7 +105,7 @@ func findClusterMap(parent *actionutils.ParentAction, clusterID int64) (maps.Map
"id": int64(0),
"name": "",
"gatewayDomain": "",
- "defaultTTL": 30,
+ "defaultTTL": 60,
"fallbackTimeout": 300,
"installDir": "/opt/edge-httpdns",
}, nil
diff --git a/EdgeAdmin/internal/web/actions/default/httpdns/clusters/updateNodeSSH.go b/EdgeAdmin/internal/web/actions/default/httpdns/clusters/updateNodeSSH.go
index 789bc98..778b573 100644
--- a/EdgeAdmin/internal/web/actions/default/httpdns/clusters/updateNodeSSH.go
+++ b/EdgeAdmin/internal/web/actions/default/httpdns/clusters/updateNodeSSH.go
@@ -7,8 +7,8 @@ import (
"strings"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
- "github.com/iwind/TeaGo/actions"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
+ "github.com/iwind/TeaGo/actions"
"github.com/iwind/TeaGo/maps"
)
@@ -47,25 +47,36 @@ func (this *UpdateNodeSSHAction) RunGet(params struct {
}
this.Data["loginId"] = 0
- if resp.GetNode() != nil && len(resp.GetNode().GetInstallStatusJSON()) > 0 {
- installStatus := maps.Map{}
- _ = json.Unmarshal(resp.GetNode().GetInstallStatusJSON(), &installStatus)
- sshInfo := installStatus.GetMap("ssh")
- if sshInfo != nil {
- if host := strings.TrimSpace(sshInfo.GetString("host")); len(host) > 0 {
- loginParams["host"] = host
- }
- if port := sshInfo.GetInt("port"); port > 0 {
- loginParams["port"] = port
- }
- if grantID := sshInfo.GetInt64("grantId"); grantID > 0 {
- loginParams["grantId"] = grantID
- }
+ // 从 NodeLogin 读取 SSH 信息
+ if resp.GetNode() != nil && resp.GetNode().GetNodeLogin() != nil {
+ nodeLogin := resp.GetNode().GetNodeLogin()
+ this.Data["loginId"] = nodeLogin.Id
+ if len(nodeLogin.Params) > 0 {
+ _ = json.Unmarshal(nodeLogin.Params, &loginParams)
}
}
this.Data["params"] = loginParams
- this.Data["grant"] = nil
+
+ // 认证信息
+ grantId := loginParams.GetInt64("grantId")
+ var grantMap maps.Map = nil
+ if grantId > 0 {
+ grantResp, grantErr := this.RPC().NodeGrantRPC().FindEnabledNodeGrant(this.AdminContext(), &pb.FindEnabledNodeGrantRequest{
+ NodeGrantId: grantId,
+ })
+ if grantErr == nil && grantResp.GetNodeGrant() != nil {
+ g := grantResp.GetNodeGrant()
+ grantMap = maps.Map{
+ "id": g.Id,
+ "name": g.Name,
+ "method": g.Method,
+ "methodName": g.Method,
+ }
+ }
+ }
+ this.Data["grant"] = grantMap
+
this.Show()
}
@@ -93,46 +104,23 @@ func (this *UpdateNodeSSHAction) RunPost(params struct {
this.Fail("SSH 主机地址 IP 格式错误")
}
- resp, err := this.RPC().HTTPDNSNodeRPC().FindHTTPDNSNode(this.AdminContext(), &pb.FindHTTPDNSNodeRequest{
- NodeId: params.NodeId,
- })
- if err != nil {
- this.ErrorPage(err)
- return
- }
- node := resp.GetNode()
- if node == nil {
- this.Fail("节点不存在")
- return
+ login := &pb.NodeLogin{
+ Id: params.LoginId,
+ Name: "SSH",
+ Type: "ssh",
+ Params: maps.Map{
+ "grantId": params.GrantId,
+ "host": params.SshHost,
+ "port": params.SshPort,
+ }.AsJSON(),
}
- installStatus := maps.Map{
- "isRunning": false,
- "isFinished": true,
- "isOk": node.GetIsInstalled(),
- "error": "",
- "errorCode": "",
- }
- if len(node.GetInstallStatusJSON()) > 0 {
- _ = json.Unmarshal(node.GetInstallStatusJSON(), &installStatus)
- }
- installStatus["ssh"] = maps.Map{
- "host": params.SshHost,
- "port": params.SshPort,
- "grantId": params.GrantId,
- }
-
- installStatusJSON, _ := json.Marshal(installStatus)
- _, err = this.RPC().HTTPDNSNodeRPC().UpdateHTTPDNSNodeStatus(this.AdminContext(), &pb.UpdateHTTPDNSNodeStatusRequest{
- NodeId: params.NodeId,
- IsUp: node.GetIsUp(),
- IsInstalled: node.GetIsInstalled(),
- IsActive: node.GetIsActive(),
- StatusJSON: node.GetStatusJSON(),
- InstallStatusJSON: installStatusJSON,
+ _, err := this.RPC().HTTPDNSNodeRPC().UpdateHTTPDNSNodeLogin(this.AdminContext(), &pb.UpdateHTTPDNSNodeLoginRequest{
+ NodeId: params.NodeId,
+ NodeLogin: login,
})
if err != nil {
- this.ErrorPage(err)
+ this.Fail("保存SSH登录信息失败: " + err.Error())
return
}
diff --git a/EdgeAdmin/internal/web/actions/default/httpdns/guide/index.go b/EdgeAdmin/internal/web/actions/default/httpdns/guide/index.go
deleted file mode 100644
index 251ce5e..0000000
--- a/EdgeAdmin/internal/web/actions/default/httpdns/guide/index.go
+++ /dev/null
@@ -1,15 +0,0 @@
-package guide
-
-import "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
-
-type IndexAction struct {
- actionutils.ParentAction
-}
-
-func (this *IndexAction) Init() {
- this.Nav("httpdns", "app", "")
-}
-
-func (this *IndexAction) RunGet(params struct{}) {
- this.RedirectURL("/httpdns/apps")
-}
diff --git a/EdgeAdmin/internal/web/actions/default/httpdns/guide/init.go b/EdgeAdmin/internal/web/actions/default/httpdns/guide/init.go
deleted file mode 100644
index efccb9d..0000000
--- a/EdgeAdmin/internal/web/actions/default/httpdns/guide/init.go
+++ /dev/null
@@ -1,19 +0,0 @@
-package guide
-
-import (
- "github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
- "github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
- "github.com/iwind/TeaGo"
-)
-
-func init() {
- TeaGo.BeforeStart(func(server *TeaGo.Server) {
- server.
- Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeHttpDNS)).
- Data("teaMenu", "httpdns").
- Data("teaSubMenu", "guide").
- Prefix("/httpdns/guide").
- Get("", new(IndexAction)).
- EndAll()
- })
-}
diff --git a/EdgeAdmin/internal/web/actions/default/httpdns/policies/index.go b/EdgeAdmin/internal/web/actions/default/httpdns/policies/index.go
deleted file mode 100644
index 546bcd3..0000000
--- a/EdgeAdmin/internal/web/actions/default/httpdns/policies/index.go
+++ /dev/null
@@ -1,19 +0,0 @@
-package policies
-
-import "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
-
-type IndexAction struct {
- actionutils.ParentAction
-}
-
-func (this *IndexAction) Init() {
- this.Nav("httpdns", "policy", "")
-}
-
-func (this *IndexAction) RunGet(params struct{}) {
- this.RedirectURL("/httpdns/clusters")
-}
-
-func (this *IndexAction) RunPost(params struct{}) {
- this.Success()
-}
diff --git a/EdgeAdmin/internal/web/actions/default/httpdns/policies/init.go b/EdgeAdmin/internal/web/actions/default/httpdns/policies/init.go
deleted file mode 100644
index cef7fcf..0000000
--- a/EdgeAdmin/internal/web/actions/default/httpdns/policies/init.go
+++ /dev/null
@@ -1,19 +0,0 @@
-package policies
-
-import (
- "github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
- "github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
- "github.com/iwind/TeaGo"
-)
-
-func init() {
- TeaGo.BeforeStart(func(server *TeaGo.Server) {
- server.
- Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeHttpDNS)).
- Data("teaMenu", "httpdns").
- Data("teaSubMenu", "policy").
- Prefix("/httpdns/policies").
- GetPost("", new(IndexAction)).
- EndAll()
- })
-}
diff --git a/EdgeAdmin/internal/web/actions/default/httpdns/sandbox/index.go b/EdgeAdmin/internal/web/actions/default/httpdns/sandbox/index.go
index 243c8e5..11f640b 100644
--- a/EdgeAdmin/internal/web/actions/default/httpdns/sandbox/index.go
+++ b/EdgeAdmin/internal/web/actions/default/httpdns/sandbox/index.go
@@ -1,6 +1,9 @@
package sandbox
import (
+ "encoding/json"
+ "strings"
+
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/httpdns/httpdnsutils"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
@@ -25,9 +28,37 @@ func (this *IndexAction) RunGet(params struct{}) {
}
clusters := make([]maps.Map, 0, len(clusterResp.GetClusters()))
for _, cluster := range clusterResp.GetClusters() {
+ serviceDomain := strings.TrimSpace(cluster.GetServiceDomain())
+
+ port := "443"
+ if rawTLS := cluster.GetTlsPolicyJSON(); len(rawTLS) > 0 {
+ var tlsConfig map[string]interface{}
+ if err := json.Unmarshal(rawTLS, &tlsConfig); err == nil {
+ if listenRaw, ok := tlsConfig["listen"]; ok && listenRaw != nil {
+ if data, err := json.Marshal(listenRaw); err == nil {
+ var listenAddresses []map[string]interface{}
+ if err := json.Unmarshal(data, &listenAddresses); err == nil {
+ if len(listenAddresses) > 0 {
+ if portRange, ok := listenAddresses[0]["portRange"].(string); ok && len(portRange) > 0 {
+ port = portRange
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ apiAddress := "https://" + serviceDomain + ":" + port
+
+ displayName := apiAddress
+ if len(serviceDomain) == 0 {
+ displayName = cluster.GetName()
+ }
clusters = append(clusters, maps.Map{
- "id": cluster.GetId(),
- "name": cluster.GetName(),
+ "id": cluster.GetId(),
+ "name": cluster.GetName(),
+ "serviceDomain": serviceDomain,
+ "displayName": displayName,
})
}
this.Data["clusters"] = clusters
@@ -50,14 +81,18 @@ func (this *IndexAction) RunGet(params struct{}) {
for _, domain := range domainResp.GetDomains() {
domains = append(domains, domain.GetDomain())
}
+ // 解析集群ID列表
+ var clusterIds []int64
+ if len(app.GetClusterIdsJSON()) > 0 {
+ _ = json.Unmarshal(app.GetClusterIdsJSON(), &clusterIds)
+ }
+
apps = append(apps, maps.Map{
- "id": app.GetId(),
- "name": app.GetName(),
- "appId": app.GetAppId(),
- "clusterId": app.GetPrimaryClusterId(),
- "primaryClusterId": app.GetPrimaryClusterId(),
- "backupClusterId": app.GetBackupClusterId(),
- "domains": domains,
+ "id": app.GetId(),
+ "name": app.GetName(),
+ "appId": app.GetAppId(),
+ "clusterIds": clusterIds,
+ "domains": domains,
})
}
this.Data["apps"] = apps
diff --git a/EdgeAdmin/internal/web/actions/default/httpdns/sandbox/test.go b/EdgeAdmin/internal/web/actions/default/httpdns/sandbox/test.go
index 7eab116..5a66eae 100644
--- a/EdgeAdmin/internal/web/actions/default/httpdns/sandbox/test.go
+++ b/EdgeAdmin/internal/web/actions/default/httpdns/sandbox/test.go
@@ -4,6 +4,7 @@ import (
"crypto/hmac"
"crypto/sha256"
"encoding/hex"
+ "encoding/json"
"net/url"
"strconv"
"strings"
@@ -52,12 +53,30 @@ func (this *TestAction) RunPost(params struct {
}
clusterDomain := ""
+ port := "443"
if params.ClusterId > 0 {
clusterResp, findErr := this.RPC().HTTPDNSClusterRPC().FindHTTPDNSCluster(this.AdminContext(), &pb.FindHTTPDNSClusterRequest{
ClusterId: params.ClusterId,
})
if findErr == nil && clusterResp.GetCluster() != nil {
clusterDomain = strings.TrimSpace(clusterResp.GetCluster().GetServiceDomain())
+ if rawTLS := clusterResp.GetCluster().GetTlsPolicyJSON(); len(rawTLS) > 0 {
+ var tlsConfig map[string]interface{}
+ if err := json.Unmarshal(rawTLS, &tlsConfig); err == nil {
+ if listenRaw, ok := tlsConfig["listen"]; ok && listenRaw != nil {
+ if data, err := json.Marshal(listenRaw); err == nil {
+ var listenAddresses []map[string]interface{}
+ if err := json.Unmarshal(data, &listenAddresses); err == nil {
+ if len(listenAddresses) > 0 {
+ if portRange, ok := listenAddresses[0]["portRange"].(string); ok && len(portRange) > 0 {
+ port = portRange
+ }
+ }
+ }
+ }
+ }
+ }
+ }
}
}
if len(clusterDomain) == 0 {
@@ -80,7 +99,7 @@ func (this *TestAction) RunPost(params struct {
query.Set("nonce", nonce)
query.Set("sign", sign)
}
- requestURL := "https://" + clusterDomain + "/resolve?" + query.Encode()
+ requestURL := "https://" + clusterDomain + ":" + port + "/resolve?" + query.Encode()
resultCode := 1
if strings.EqualFold(resp.GetCode(), "SUCCESS") {
diff --git a/EdgeAdmin/internal/web/actions/default/users/createPopup.go b/EdgeAdmin/internal/web/actions/default/users/createPopup.go
index 889efe8..8fc14c6 100644
--- a/EdgeAdmin/internal/web/actions/default/users/createPopup.go
+++ b/EdgeAdmin/internal/web/actions/default/users/createPopup.go
@@ -10,6 +10,7 @@ import (
"github.com/TeaOSLab/EdgeCommon/pkg/systemconfigs"
"github.com/TeaOSLab/EdgeCommon/pkg/userconfigs"
"github.com/iwind/TeaGo/actions"
+ "github.com/iwind/TeaGo/lists"
"github.com/iwind/TeaGo/maps"
"github.com/xlzd/gotp"
)
@@ -23,6 +24,38 @@ func (this *CreatePopupAction) Init() {
}
func (this *CreatePopupAction) RunGet(params struct{}) {
+ // 检查是否启用了 HTTPDNS 功能(全局用户注册设置中)
+ var hasHTTPDNSFeature = false
+ var defaultHttpdnsClusterId int64 = 0
+
+ resp, err := this.RPC().SysSettingRPC().ReadSysSetting(this.AdminContext(), &pb.ReadSysSettingRequest{Code: systemconfigs.SettingCodeUserRegisterConfig})
+ if err == nil && len(resp.ValueJSON) > 0 {
+ var config = userconfigs.DefaultUserRegisterConfig()
+ if json.Unmarshal(resp.ValueJSON, config) == nil {
+ hasHTTPDNSFeature = config.HTTPDNSIsOn
+ if len(config.HTTPDNSDefaultClusterIds) > 0 {
+ defaultHttpdnsClusterId = config.HTTPDNSDefaultClusterIds[0]
+ }
+ }
+ }
+ this.Data["hasHTTPDNSFeature"] = hasHTTPDNSFeature
+ this.Data["httpdnsClusterId"] = defaultHttpdnsClusterId
+
+ // 加载所有 HTTPDNS 集群
+ var httpdnsClusters = []maps.Map{}
+ if hasHTTPDNSFeature {
+ httpdnsClusterResp, err := this.RPC().HTTPDNSClusterRPC().FindAllHTTPDNSClusters(this.AdminContext(), &pb.FindAllHTTPDNSClustersRequest{})
+ if err == nil {
+ for _, c := range httpdnsClusterResp.GetClusters() {
+ httpdnsClusters = append(httpdnsClusters, maps.Map{
+ "id": c.GetId(),
+ "name": c.GetName(),
+ })
+ }
+ }
+ }
+ this.Data["httpdnsClusters"] = httpdnsClusters
+
this.Show()
}
@@ -35,8 +68,9 @@ func (this *CreatePopupAction) RunPost(params struct {
Tel string
Email string
Remark string
- ClusterId int64
- FeaturesType string
+ ClusterId int64
+ HttpdnsClusterId int64
+ FeaturesType string
// OTP
OtpOn bool
@@ -111,6 +145,28 @@ func (this *CreatePopupAction) RunPost(params struct {
userId = createResp.UserId
+ // 如果表单选择了 HTTPDNS 关联集群,在这里予以保存
+ if params.HttpdnsClusterId > 0 {
+ httpdnsJSON, _ := json.Marshal([]int64{params.HttpdnsClusterId})
+ _, err = this.RPC().UserRPC().UpdateUser(this.AdminContext(), &pb.UpdateUserRequest{
+ UserId: userId,
+ Username: params.Username,
+ Password: params.Pass1,
+ Fullname: params.Fullname,
+ Mobile: params.Mobile,
+ Tel: params.Tel,
+ Email: params.Email,
+ Remark: params.Remark,
+ IsOn: true,
+ NodeClusterId: params.ClusterId,
+ HttpdnsClusterIdsJSON: httpdnsJSON,
+ })
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+ }
+
// 功能
if teaconst.IsPlus {
if params.FeaturesType == "default" {
@@ -127,14 +183,41 @@ func (this *CreatePopupAction) RunPost(params struct {
this.ErrorPage(err)
return
}
+ var featureCodes = config.Features
+ if config.HTTPDNSIsOn && !lists.ContainsString(featureCodes, userconfigs.UserFeatureCodeHTTPDNS) {
+ featureCodes = append(featureCodes, userconfigs.UserFeatureCodeHTTPDNS)
+ }
+
_, err = this.RPC().UserRPC().UpdateUserFeatures(this.AdminContext(), &pb.UpdateUserFeaturesRequest{
UserId: userId,
- FeatureCodes: config.Features,
+ FeatureCodes: featureCodes,
})
if err != nil {
this.ErrorPage(err)
return
}
+
+ // 自动关联默认 HTTPDNS 集群 (如果没有在表单中选择的话)
+ if config.HTTPDNSIsOn && params.HttpdnsClusterId <= 0 && len(config.HTTPDNSDefaultClusterIds) > 0 {
+ httpdnsJSON, _ := json.Marshal(config.HTTPDNSDefaultClusterIds)
+ _, err = this.RPC().UserRPC().UpdateUser(this.AdminContext(), &pb.UpdateUserRequest{
+ UserId: userId,
+ Username: params.Username,
+ Password: params.Pass1,
+ Fullname: params.Fullname,
+ Mobile: params.Mobile,
+ Tel: params.Tel,
+ Email: params.Email,
+ Remark: params.Remark,
+ IsOn: true,
+ NodeClusterId: params.ClusterId,
+ HttpdnsClusterIdsJSON: httpdnsJSON,
+ })
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+ }
}
} else if params.FeaturesType == "all" {
featuresResp, err := this.RPC().UserRPC().FindAllUserFeatureDefinitions(this.AdminContext(), &pb.FindAllUserFeatureDefinitionsRequest{})
diff --git a/EdgeAdmin/internal/web/actions/default/users/setting/index.go b/EdgeAdmin/internal/web/actions/default/users/setting/index.go
index 1fa06a8..77f120b 100644
--- a/EdgeAdmin/internal/web/actions/default/users/setting/index.go
+++ b/EdgeAdmin/internal/web/actions/default/users/setting/index.go
@@ -66,6 +66,28 @@ func (this *IndexAction) RunGet(params struct{}) {
// 当前默认的智能DNS设置
this.Data["nsIsVisible"] = plus.AllowComponent(plus.ComponentCodeNS)
+ // HTTPDNS 集群列表(用于默认集群多选)
+ httpdnsClusterResp, err := this.RPC().HTTPDNSClusterRPC().FindAllHTTPDNSClusters(this.AdminContext(), &pb.FindAllHTTPDNSClustersRequest{})
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+ httpdnsClusters := make([]maps.Map, 0, len(httpdnsClusterResp.GetClusters()))
+ for _, cluster := range httpdnsClusterResp.GetClusters() {
+ httpdnsClusters = append(httpdnsClusters, maps.Map{
+ "id": cluster.GetId(),
+ "name": cluster.GetName(),
+ })
+ }
+ this.Data["httpdnsClusters"] = httpdnsClusters
+
+ // 当前选中的默认集群(取数组第一个元素)
+ var httpdnsDefaultClusterId int64
+ if len(config.HTTPDNSDefaultClusterIds) > 0 {
+ httpdnsDefaultClusterId = config.HTTPDNSDefaultClusterIds[0]
+ }
+ this.Data["httpdnsDefaultClusterId"] = httpdnsDefaultClusterId
+
this.Show()
}
@@ -102,7 +124,8 @@ func (this *IndexAction) RunPost(params struct {
NsIsOn bool
- HttpdnsIsOn bool
+ HttpdnsIsOn bool
+ HttpdnsDefaultClusterId int64
Must *actions.Must
CSRF *actionutils.CSRF
@@ -154,6 +177,11 @@ func (this *IndexAction) RunPost(params struct {
config.NSIsOn = params.NsIsOn
config.HTTPDNSIsOn = params.HttpdnsIsOn
+ if params.HttpdnsDefaultClusterId > 0 {
+ config.HTTPDNSDefaultClusterIds = []int64{params.HttpdnsDefaultClusterId}
+ } else {
+ config.HTTPDNSDefaultClusterIds = []int64{}
+ }
configJSON, err := json.Marshal(config)
if err != nil {
diff --git a/EdgeAdmin/internal/web/actions/default/users/update.go b/EdgeAdmin/internal/web/actions/default/users/update.go
index 8ab6687..d67631b 100644
--- a/EdgeAdmin/internal/web/actions/default/users/update.go
+++ b/EdgeAdmin/internal/web/actions/default/users/update.go
@@ -1,6 +1,8 @@
package users
import (
+ "encoding/json"
+
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/users/userutils"
"github.com/TeaOSLab/EdgeCommon/pkg/langs/codes"
@@ -85,6 +87,46 @@ func (this *UpdateAction) RunGet(params struct {
this.Data["clusterId"] = user.NodeCluster.Id
}
+ // 检查用户是否开通了 HTTPDNS 功能
+ var hasHTTPDNSFeature = false
+ userFeaturesResp, err := this.RPC().UserRPC().FindUserFeatures(this.AdminContext(), &pb.FindUserFeaturesRequest{UserId: params.UserId})
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+ for _, f := range userFeaturesResp.Features {
+ if f.Code == "httpdns" {
+ hasHTTPDNSFeature = true
+ break
+ }
+ }
+ this.Data["hasHTTPDNSFeature"] = hasHTTPDNSFeature
+
+ // 读取用户已关联的 HTTPDNS 集群(取第一个作为下拉默认值)
+ var httpdnsClusterId int64
+ if len(user.HttpdnsClusterIdsJSON) > 0 {
+ var userHTTPDNSClusterIds []int64
+ if json.Unmarshal(user.HttpdnsClusterIdsJSON, &userHTTPDNSClusterIds) == nil && len(userHTTPDNSClusterIds) > 0 {
+ httpdnsClusterId = userHTTPDNSClusterIds[0]
+ }
+ }
+ this.Data["httpdnsClusterId"] = httpdnsClusterId
+
+ // 加载所有 HTTPDNS 集群
+ httpdnsClusterResp, err := this.RPC().HTTPDNSClusterRPC().FindAllHTTPDNSClusters(this.AdminContext(), &pb.FindAllHTTPDNSClustersRequest{})
+ if err != nil {
+ this.ErrorPage(err)
+ return
+ }
+ httpdnsClusters := make([]maps.Map, 0, len(httpdnsClusterResp.GetClusters()))
+ for _, c := range httpdnsClusterResp.GetClusters() {
+ httpdnsClusters = append(httpdnsClusters, maps.Map{
+ "id": c.GetId(),
+ "name": c.GetName(),
+ })
+ }
+ this.Data["httpdnsClusters"] = httpdnsClusters
+
this.Show()
}
@@ -99,8 +141,9 @@ func (this *UpdateAction) RunPost(params struct {
Email string
Remark string
IsOn bool
- ClusterId int64
- BandwidthAlgo string
+ ClusterId int64
+ HttpdnsClusterId int64
+ BandwidthAlgo string
// OTP
OtpOn bool
@@ -151,18 +194,25 @@ func (this *UpdateAction) RunPost(params struct {
Email("请输入正确的电子邮箱")
}
+ var httpdnsClusterIds []int64
+ if params.HttpdnsClusterId > 0 {
+ httpdnsClusterIds = []int64{params.HttpdnsClusterId}
+ }
+ httpdnsClusterIdsJSON, _ := json.Marshal(httpdnsClusterIds)
+
_, err = this.RPC().UserRPC().UpdateUser(this.AdminContext(), &pb.UpdateUserRequest{
- UserId: params.UserId,
- Username: params.Username,
- Password: params.Pass1,
- Fullname: params.Fullname,
- Mobile: params.Mobile,
- Tel: params.Tel,
- Email: params.Email,
- Remark: params.Remark,
- IsOn: params.IsOn,
- NodeClusterId: params.ClusterId,
- BandwidthAlgo: params.BandwidthAlgo,
+ UserId: params.UserId,
+ Username: params.Username,
+ Password: params.Pass1,
+ Fullname: params.Fullname,
+ Mobile: params.Mobile,
+ Tel: params.Tel,
+ Email: params.Email,
+ Remark: params.Remark,
+ IsOn: params.IsOn,
+ NodeClusterId: params.ClusterId,
+ BandwidthAlgo: params.BandwidthAlgo,
+ HttpdnsClusterIdsJSON: httpdnsClusterIdsJSON,
})
if err != nil {
this.ErrorPage(err)
diff --git a/EdgeAdmin/internal/web/actions/default/users/user.go b/EdgeAdmin/internal/web/actions/default/users/user.go
index f42daa6..72e2377 100644
--- a/EdgeAdmin/internal/web/actions/default/users/user.go
+++ b/EdgeAdmin/internal/web/actions/default/users/user.go
@@ -6,6 +6,8 @@ import (
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/users/userutils"
"github.com/TeaOSLab/EdgeCommon/pkg/iplibrary"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
+ "github.com/TeaOSLab/EdgeCommon/pkg/systemconfigs"
+ "github.com/TeaOSLab/EdgeCommon/pkg/userconfigs"
"github.com/iwind/TeaGo/maps"
)
@@ -89,6 +91,37 @@ func (this *UserAction) RunGet(params struct {
}
}
+ // 检查全局是否启用了 HTTPDNS 功能
+ var hasHTTPDNSFeature = false
+ sysResp, sysErr := this.RPC().SysSettingRPC().ReadSysSetting(this.AdminContext(), &pb.ReadSysSettingRequest{Code: systemconfigs.SettingCodeUserRegisterConfig})
+ if sysErr == nil && len(sysResp.ValueJSON) > 0 {
+ var config = userconfigs.DefaultUserRegisterConfig()
+ if json.Unmarshal(sysResp.ValueJSON, config) == nil {
+ hasHTTPDNSFeature = config.HTTPDNSIsOn
+ }
+ }
+ this.Data["hasHTTPDNSFeature"] = hasHTTPDNSFeature
+
+ // 读取用户关联的 HTTPDNS 集群
+ var httpdnsClusterMap maps.Map = nil
+ if hasHTTPDNSFeature && len(user.HttpdnsClusterIdsJSON) > 0 {
+ var httpdnsClusterIds []int64
+ if json.Unmarshal(user.HttpdnsClusterIdsJSON, &httpdnsClusterIds) == nil && len(httpdnsClusterIds) > 0 {
+ httpdnsClusterResp, httpdnsErr := this.RPC().HTTPDNSClusterRPC().FindAllHTTPDNSClusters(this.AdminContext(), &pb.FindAllHTTPDNSClustersRequest{})
+ if httpdnsErr == nil {
+ for _, c := range httpdnsClusterResp.GetClusters() {
+ if c.GetId() == httpdnsClusterIds[0] {
+ httpdnsClusterMap = maps.Map{
+ "id": c.GetId(),
+ "name": c.GetName(),
+ }
+ break
+ }
+ }
+ }
+ }
+ }
+
this.Data["user"] = maps.Map{
"id": user.Id,
"username": user.Username,
@@ -100,6 +133,7 @@ func (this *UserAction) RunGet(params struct {
"mobile": user.Mobile,
"isOn": user.IsOn,
"cluster": clusterMap,
+ "httpdnsCluster": httpdnsClusterMap,
"countAccessKeys": countAccessKeys,
"isRejected": user.IsRejected,
"rejectReason": user.RejectReason,
diff --git a/EdgeAdmin/web/public/js/components.js b/EdgeAdmin/web/public/js/components.js
index e5f74f0..11d2339 100644
--- a/EdgeAdmin/web/public/js/components.js
+++ b/EdgeAdmin/web/public/js/components.js
@@ -531,6 +531,57 @@ Vue.component("ddos-protection-ports-config-box", {
`
})
+Vue.component("httpdns-clusters-selector", {
+ props: ["vClusters", "vName"],
+ data: function () {
+ let inputClusters = this.vClusters
+ let clusters = []
+
+ if (inputClusters != null && inputClusters.length > 0) {
+ if (inputClusters[0].isChecked !== undefined) {
+ // 带 isChecked 标志的完整集群列表
+ clusters = inputClusters.map(function (c) {
+ return {id: c.id, name: c.name, isChecked: c.isChecked}
+ })
+ } else {
+ // 仅包含已选集群,全部标记为选中
+ clusters = inputClusters.map(function (c) {
+ return {id: c.id, name: c.name, isChecked: true}
+ })
+ }
+ }
+
+ // 无 prop 时从根实例读取所有集群(如创建应用页面)
+ if (clusters.length === 0) {
+ let rootClusters = this.$root.clusters
+ if (rootClusters != null && rootClusters.length > 0) {
+ clusters = rootClusters.map(function (c) {
+ return {id: c.id, name: c.name, isChecked: false}
+ })
+ }
+ }
+
+ return {
+ clusters: clusters,
+ fieldName: this.vName || "clusterIds"
+ }
+ },
+ methods: {
+ changeCluster: function (cluster) {
+ cluster.isChecked = !cluster.isChecked
+ }
+ },
+ template: `
+
+
+ {{cluster.name}}
+
+
+
暂无可用集群
+
`
+})
+
+
Vue.component("node-cluster-combo-box", {
props: ["v-cluster-id"],
data: function () {
diff --git a/EdgeAdmin/web/public/js/components.src.js b/EdgeAdmin/web/public/js/components.src.js
index e5f74f0..11d2339 100644
--- a/EdgeAdmin/web/public/js/components.src.js
+++ b/EdgeAdmin/web/public/js/components.src.js
@@ -531,6 +531,57 @@ Vue.component("ddos-protection-ports-config-box", {
`
})
+Vue.component("httpdns-clusters-selector", {
+ props: ["vClusters", "vName"],
+ data: function () {
+ let inputClusters = this.vClusters
+ let clusters = []
+
+ if (inputClusters != null && inputClusters.length > 0) {
+ if (inputClusters[0].isChecked !== undefined) {
+ // 带 isChecked 标志的完整集群列表
+ clusters = inputClusters.map(function (c) {
+ return {id: c.id, name: c.name, isChecked: c.isChecked}
+ })
+ } else {
+ // 仅包含已选集群,全部标记为选中
+ clusters = inputClusters.map(function (c) {
+ return {id: c.id, name: c.name, isChecked: true}
+ })
+ }
+ }
+
+ // 无 prop 时从根实例读取所有集群(如创建应用页面)
+ if (clusters.length === 0) {
+ let rootClusters = this.$root.clusters
+ if (rootClusters != null && rootClusters.length > 0) {
+ clusters = rootClusters.map(function (c) {
+ return {id: c.id, name: c.name, isChecked: false}
+ })
+ }
+ }
+
+ return {
+ clusters: clusters,
+ fieldName: this.vName || "clusterIds"
+ }
+ },
+ methods: {
+ changeCluster: function (cluster) {
+ cluster.isChecked = !cluster.isChecked
+ }
+ },
+ template: `
+
+
+ {{cluster.name}}
+
+
+
暂无可用集群
+
`
+})
+
+
Vue.component("node-cluster-combo-box", {
props: ["v-cluster-id"],
data: function () {
diff --git a/EdgeAdmin/web/public/js/components/cluster/httpdns-clusters-selector.js b/EdgeAdmin/web/public/js/components/cluster/httpdns-clusters-selector.js
new file mode 100644
index 0000000..fb67aed
--- /dev/null
+++ b/EdgeAdmin/web/public/js/components/cluster/httpdns-clusters-selector.js
@@ -0,0 +1,49 @@
+Vue.component("httpdns-clusters-selector", {
+ props: ["vClusters", "vName"],
+ data: function () {
+ let inputClusters = this.vClusters
+ let clusters = []
+
+ if (inputClusters != null && inputClusters.length > 0) {
+ if (inputClusters[0].isChecked !== undefined) {
+ // 带 isChecked 标志的完整集群列表
+ clusters = inputClusters.map(function (c) {
+ return {id: c.id, name: c.name, isChecked: c.isChecked}
+ })
+ } else {
+ // 仅包含已选集群,全部标记为选中
+ clusters = inputClusters.map(function (c) {
+ return {id: c.id, name: c.name, isChecked: true}
+ })
+ }
+ }
+
+ // 无 prop 时从根实例读取所有集群(如创建应用页面)
+ if (clusters.length === 0) {
+ let rootClusters = this.$root.clusters
+ if (rootClusters != null && rootClusters.length > 0) {
+ clusters = rootClusters.map(function (c) {
+ return {id: c.id, name: c.name, isChecked: false}
+ })
+ }
+ }
+
+ return {
+ clusters: clusters,
+ fieldName: this.vName || "clusterIds"
+ }
+ },
+ methods: {
+ changeCluster: function (cluster) {
+ cluster.isChecked = !cluster.isChecked
+ }
+ },
+ template: `
+
+
+ {{cluster.name}}
+
+
+
暂无可用集群
+
`
+})
diff --git a/EdgeAdmin/web/views/@default/httpdns/apps/appSettings.html b/EdgeAdmin/web/views/@default/httpdns/apps/appSettings.html
index 75a47a6..91d0c0b 100644
--- a/EdgeAdmin/web/views/@default/httpdns/apps/appSettings.html
+++ b/EdgeAdmin/web/views/@default/httpdns/apps/appSettings.html
@@ -1,4 +1,4 @@
-{$layout}
+{$layout}
{$template "menu"}
{$template "/left_menu_with_menu"}
@@ -67,23 +67,13 @@
- 主集群
+ 所属集群
-
- [不设置]
- {{cluster.name}}
-
-
-
-
-
- 备集群
-
-
- [不设置]
- {{cluster.name}}
-
-
+
+
+
@@ -106,30 +96,29 @@
App ID
{{settings.appId}}
-
+
- 主服务域名
+ 服务地址
- {{settings.primaryServiceDomain}}
- 未配置
-
-
-
-
- 备用服务域名
-
- {{settings.backupServiceDomain}}
- 未配置
-
+
+ 未配置集群
请求验签
- {{settings.signEnabled ? "已开启" : "已关闭"}}
- {{settings.signEnabled ? "关闭请求验签" : "开启请求验签"}}
+ {{settings.signEnabled
+ ? "已开启" : "已关闭"}}
+ {{settings.signEnabled ? "关闭请求验签" : "开启请求验签"}}
@@ -138,9 +127,14 @@
{{signSecretVisible ? settings.signSecretPlain : settings.signSecretMasked}}
-
-
-
+
+
+
@@ -151,4 +145,4 @@
-
+
\ No newline at end of file
diff --git a/EdgeAdmin/web/views/@default/httpdns/apps/create.html b/EdgeAdmin/web/views/@default/httpdns/apps/create.html
index 60f814a..4fc405a 100644
--- a/EdgeAdmin/web/views/@default/httpdns/apps/create.html
+++ b/EdgeAdmin/web/views/@default/httpdns/apps/create.html
@@ -1,4 +1,4 @@
-{$layout}
+{$layout}
{$template "menu"}
- 主集群 *
+ 所属集群 *
-
- [请选择集群]
- {{cluster.name}}
-
-
-
-
-
- 备集群
-
-
- [不设置]
- {{cluster.name}}
-
-
+
+
+
所属用户
-
- [不设置]
- {{user.fullname}} ({{user.username}})
-
+
-
+
\ No newline at end of file
diff --git a/EdgeAdmin/web/views/@default/httpdns/apps/customRecordsCreatePopup.js b/EdgeAdmin/web/views/@default/httpdns/apps/customRecordsCreatePopup.js
index edfd5a7..e8bc6a0 100644
--- a/EdgeAdmin/web/views/@default/httpdns/apps/customRecordsCreatePopup.js
+++ b/EdgeAdmin/web/views/@default/httpdns/apps/customRecordsCreatePopup.js
@@ -18,15 +18,18 @@
"西南": ["默认", "重庆", "四川", "贵州", "云南", "西藏"]
};
- vm.continents = ["默认", "非洲", "南极洲", "亚洲", "欧洲", "北美洲", "南美洲", "大洋洲"];
+ vm.continents = ["默认", "亚洲", "欧洲", "北美洲", "南美洲", "非洲", "大洋洲"];
vm.continentCountries = {
"默认": ["默认"],
- "非洲": ["默认", "南非", "埃及", "尼日利亚", "肯尼亚", "摩洛哥"],
- "南极洲": ["默认"],
- "亚洲": ["默认", "中国香港", "中国澳门", "中国台湾", "日本", "韩国", "新加坡", "印度", "泰国", "越南"],
- "欧洲": ["默认", "德国", "英国", "法国", "荷兰", "西班牙", "意大利", "俄罗斯"],
- "北美洲": ["默认", "美国", "加拿大", "墨西哥"],
- "南美洲": ["默认", "巴西", "阿根廷", "智利", "哥伦比亚"],
+ "亚洲": ["默认", "中国香港", "中国澳门", "中国台湾", "日本", "韩国", "新加坡", "印度", "泰国", "越南",
+ "印度尼西亚", "马来西亚", "菲律宾", "柬埔寨", "缅甸", "老挝", "斯里兰卡", "孟加拉国", "巴基斯坦", "尼泊尔",
+ "阿联酋", "沙特阿拉伯", "土耳其", "以色列", "伊朗", "伊拉克", "卡塔尔", "科威特", "蒙古"],
+ "欧洲": ["默认", "德国", "英国", "法国", "荷兰", "西班牙", "意大利", "俄罗斯",
+ "波兰", "瑞典", "瑞士", "挪威", "芬兰", "丹麦", "葡萄牙", "爱尔兰", "比利时", "奥地利",
+ "乌克兰", "捷克", "罗马尼亚", "匈牙利", "希腊"],
+ "北美洲": ["默认", "美国", "加拿大", "墨西哥", "巴拿马", "哥斯达黎加", "古巴"],
+ "南美洲": ["默认", "巴西", "阿根廷", "智利", "哥伦比亚", "秘鲁", "委内瑞拉", "厄瓜多尔"],
+ "非洲": ["默认", "南非", "埃及", "尼日利亚", "肯尼亚", "摩洛哥", "阿尔及利亚", "坦桑尼亚", "埃塞俄比亚", "加纳", "突尼斯"],
"大洋洲": ["默认", "澳大利亚", "新西兰"]
};
diff --git a/EdgeAdmin/web/views/@default/httpdns/apps/domains.js b/EdgeAdmin/web/views/@default/httpdns/apps/domains.js
index a93df1f..290ffbf 100644
--- a/EdgeAdmin/web/views/@default/httpdns/apps/domains.js
+++ b/EdgeAdmin/web/views/@default/httpdns/apps/domains.js
@@ -34,8 +34,8 @@
this.bindDomain = function () {
teaweb.popup("/httpdns/apps/domains/createPopup?appId=" + this.app.id, {
- height: "24em",
- width: "46em",
+ height: "12em",
+ width: "36em",
title: "添加域名",
callback: function () {
teaweb.success("保存成功", function () {
diff --git a/EdgeAdmin/web/views/@default/httpdns/apps/index.html b/EdgeAdmin/web/views/@default/httpdns/apps/index.html
index 30effd9..87e4fe2 100644
--- a/EdgeAdmin/web/views/@default/httpdns/apps/index.html
+++ b/EdgeAdmin/web/views/@default/httpdns/apps/index.html
@@ -28,8 +28,7 @@
-
-
+
@@ -39,8 +38,7 @@
应用名称
AppID
- 主集群
- 备用集群
+ 集群
用户
绑定域名数
状态
@@ -61,16 +59,10 @@
-
- {{app.primaryCluster.name || ('#' + app.primaryCluster.id)}}
-
-
- -
-
-
-
- {{app.backupCluster.name || ('#' + app.backupCluster.id)}}
-
+
+
+ {{cluster.name || ('#' + cluster.id)}} 、
+
-
diff --git a/EdgeAdmin/web/views/@default/httpdns/apps/policies.html b/EdgeAdmin/web/views/@default/httpdns/apps/policies.html
deleted file mode 100644
index 0471258..0000000
--- a/EdgeAdmin/web/views/@default/httpdns/apps/policies.html
+++ /dev/null
@@ -1,78 +0,0 @@
-{$layout}
-{$template "menu"}
-
-
-
-
-
-
-
diff --git a/EdgeAdmin/web/views/@default/httpdns/apps/policies.js b/EdgeAdmin/web/views/@default/httpdns/apps/policies.js
deleted file mode 100644
index dc96d3c..0000000
--- a/EdgeAdmin/web/views/@default/httpdns/apps/policies.js
+++ /dev/null
@@ -1,40 +0,0 @@
-Tea.context(function () {
- this.success = NotifyReloadSuccess("保存成功");
-
- this.$delay(function () {
- this.$watch("policies.defaultSniPolicy", function (level) {
- if (level == "level1" || level == "level2") {
- this.policies.ecsMode = "off";
- this.policies.pinningMode = "off";
- this.policies.sanMode = "off";
- return;
- }
-
- if (level == "level3") {
- if (this.policies.ecsMode == "off") {
- this.policies.ecsMode = "auto";
- }
- if (this.policies.pinningMode == "off") {
- this.policies.pinningMode = "report";
- }
- if (this.policies.sanMode == "off") {
- this.policies.sanMode = "strict";
- }
- }
- });
-
- this.$watch("policies.ecsMode", function (mode) {
- if (this.policies.defaultSniPolicy != "level3") {
- return;
- }
- if (mode == "custom") {
- if (!this.policies.ecsIPv4Prefix || this.policies.ecsIPv4Prefix <= 0) {
- this.policies.ecsIPv4Prefix = 24;
- }
- if (!this.policies.ecsIPv6Prefix || this.policies.ecsIPv6Prefix <= 0) {
- this.policies.ecsIPv6Prefix = 56;
- }
- }
- });
- });
-});
diff --git a/EdgeAdmin/web/views/@default/httpdns/clusters/cluster/node/install.html b/EdgeAdmin/web/views/@default/httpdns/clusters/cluster/node/install.html
index d222f39..6129a00 100644
--- a/EdgeAdmin/web/views/@default/httpdns/clusters/cluster/node/install.html
+++ b/EdgeAdmin/web/views/@default/httpdns/clusters/cluster/node/install.html
@@ -2,16 +2,17 @@
{$template "node_menu"}
{$template "/code_editor"}
+
当前节点为已安装状态。
-
[修改为未安装]
+
[重新安装]
配置文件
配置文件
- configs/api_httpdns.yaml
+ configs/api_httpdns.yaml
[下载]
@@ -19,27 +20,45 @@
配置内容
rpc.endpoints: [ {{apiEndpoints}} ]
- nodeId: "{{node.uniqueId}}"
- secret: "{{node.secret}}"
+ nodeId: "{{node.uniqueId}}"
+ secret: "{{node.secret}}"
+
安装目录
- 使用集群设置({{node.cluster.installDir}})
+ 使用集群设置({{node.cluster.installDir}})
+
{{node.installDir}}
+
-
通过控制台标记安装
-
+
方法1:通过SSH自动安装
+
+
+
+ SSH地址
+
+ {{sshAddr}} [修改]
+ 尚未设置 [设置]
+
+
+
+
+
安装中...
- 安装成功
- 安装失败:{{installStatus.error}}
+ 已安装成功
+ 安装过程中发生错误:{{installStatus.error}}
@@ -49,12 +68,12 @@
开始安装
-
配置文件
+
方法2:手动安装
配置文件
- configs/api_httpdns.yaml
+ configs/api_httpdns.yaml
[下载]
@@ -62,18 +81,21 @@
配置内容
rpc.endpoints: [ {{apiEndpoints}} ]
- nodeId: "{{node.uniqueId}}"
- secret: "{{node.secret}}"
+ nodeId: "{{node.uniqueId}}"
+ secret: "{{node.secret}}"
+
安装目录
- 使用集群设置({{node.cluster.installDir}})
+ 使用集群设置({{node.cluster.installDir}})
+
{{node.installDir}}
-
[修改为已安装]
-
+
[修改为已安装状态]
+
\ No newline at end of file
diff --git a/EdgeAdmin/web/views/@default/httpdns/clusters/cluster/node/install.js b/EdgeAdmin/web/views/@default/httpdns/clusters/cluster/node/install.js
index 5a25314..718182b 100644
--- a/EdgeAdmin/web/views/@default/httpdns/clusters/cluster/node/install.js
+++ b/EdgeAdmin/web/views/@default/httpdns/clusters/cluster/node/install.js
@@ -28,6 +28,7 @@ Tea.context(function () {
})
}
+ // 刷新状态
this.reloadStatus = function (nodeId) {
let that = this
@@ -44,10 +45,50 @@ Tea.context(function () {
}
let installStatus = this.installStatus || {}
- let errorCode = installStatus.errorCode || ""
- if (errorCode.length > 0) {
+ let errMsg = installStatus.error || ""
+
+ if (installStatus.errorCode != null && installStatus.errorCode.length > 0) {
isInstalling = false
- teaweb.warn("安装失败:" + (installStatus.error || "未知错误"))
+ }
+
+ switch (installStatus.errorCode) {
+ case "EMPTY_LOGIN":
+ case "EMPTY_SSH_HOST":
+ case "EMPTY_SSH_PORT":
+ case "EMPTY_GRANT":
+ teaweb.warn("需要填写SSH登录信息", function () {
+ teaweb.popup("/httpdns/clusters/updateNodeSSH?nodeId=" + nodeId, {
+ height: "20em",
+ callback: function () {
+ that.install()
+ }
+ })
+ })
+ return
+ case "SSH_LOGIN_FAILED":
+ teaweb.warn("SSH登录失败,请检查设置", function () {
+ teaweb.popup("/httpdns/clusters/updateNodeSSH?nodeId=" + nodeId, {
+ height: "20em",
+ callback: function () {
+ that.install()
+ }
+ })
+ })
+ return
+ case "CREATE_ROOT_DIRECTORY_FAILED":
+ teaweb.warn("创建根目录失败,请检查目录权限或者手工创建:" + errMsg)
+ return
+ case "INSTALL_HELPER_FAILED":
+ teaweb.warn("安装助手失败:" + errMsg)
+ return
+ case "TEST_FAILED":
+ teaweb.warn("环境测试失败:" + errMsg)
+ return
+ case "RPC_TEST_FAILED":
+ teaweb.confirm("html:要安装的节点到API服务之间的RPC通讯测试失败,具体错误:" + errMsg + ", 现在修改API信息?", function () {
+ window.location = "/settings/api"
+ })
+ return
}
})
.done(function () {
@@ -59,7 +100,7 @@ Tea.context(function () {
this.showSSHPopup = function (nodeId) {
teaweb.popup("/httpdns/clusters/updateNodeSSH?nodeId=" + nodeId, {
- height: "30em",
+ height: "20em",
callback: function () {
teaweb.success("保存成功", function () {
teaweb.reload()
diff --git a/EdgeAdmin/web/views/@default/httpdns/clusters/cluster/node/update.html b/EdgeAdmin/web/views/@default/httpdns/clusters/cluster/node/update.html
index 6fd282c..4f3cc14 100644
--- a/EdgeAdmin/web/views/@default/httpdns/clusters/cluster/node/update.html
+++ b/EdgeAdmin/web/views/@default/httpdns/clusters/cluster/node/update.html
@@ -4,8 +4,8 @@
修改节点
+
\ No newline at end of file
diff --git a/EdgeAdmin/web/views/@default/httpdns/clusters/create.js b/EdgeAdmin/web/views/@default/httpdns/clusters/create.js
index 4b6cb0c..0918023 100644
--- a/EdgeAdmin/web/views/@default/httpdns/clusters/create.js
+++ b/EdgeAdmin/web/views/@default/httpdns/clusters/create.js
@@ -1,14 +1,5 @@
-Tea.context(function () {
+Tea.context(function () {
this.isOn = true
- this.defaultClusterEnabled = false
- this.defaultClusterRole = "primary"
-
- this.syncDefaultClusterEnabled = function () {
- if (!this.isOn) {
- this.defaultClusterEnabled = false
- this.defaultClusterRole = "primary"
- }
- }
this.success = function (resp) {
let clusterId = 0
diff --git a/EdgeAdmin/web/views/@default/httpdns/clusters/index.html b/EdgeAdmin/web/views/@default/httpdns/clusters/index.html
index 0af0f68..88163a3 100644
--- a/EdgeAdmin/web/views/@default/httpdns/clusters/index.html
+++ b/EdgeAdmin/web/views/@default/httpdns/clusters/index.html
@@ -28,7 +28,7 @@
集群名称
- 服务域名
+ API服务地址
节点数
在线节点数
状态
@@ -43,7 +43,7 @@
- {{cluster.gatewayDomain}}
+ {{cluster.apiAddress}}
@@ -67,5 +67,4 @@
-
-
+
\ No newline at end of file
diff --git a/EdgeAdmin/web/views/@default/httpdns/clusters/updateNodeSSH.html b/EdgeAdmin/web/views/@default/httpdns/clusters/updateNodeSSH.html
index 0962887..b95ec99 100644
--- a/EdgeAdmin/web/views/@default/httpdns/clusters/updateNodeSSH.html
+++ b/EdgeAdmin/web/views/@default/httpdns/clusters/updateNodeSSH.html
@@ -3,7 +3,6 @@
修改节点"{{node.name}}"的SSH登录信息
提示用户未绑定
-
+
+
@@ -73,20 +77,25 @@
-
+
+
激活邮件标题
-
-
+
+
激活邮件内容
-
+
@@ -106,20 +115,27 @@
-
+
找回密码邮件标题
-
-
+
+
找回密码邮件内容
-
-
+
+
@@ -133,14 +149,16 @@
启用手机号码绑定功能
-
+
提示用户未绑定
-
+
+
@@ -159,12 +177,14 @@
-
+
激活短信内容
-
+
@@ -200,12 +220,14 @@
暂时还没有开通任何功能。
- {{feature.name}}
+
+ {{feature.name}}
@@ -233,7 +255,8 @@
开通DDoS高防管理
-
+
+
@@ -247,8 +270,9 @@
@@ -261,12 +285,23 @@
开通HTTPDNS服务
-
-
+
+
+
+
+
+
+ 默认分配集群
+
+
+ [未选择]
+ {{cluster.name}}
+
+
-
+
\ No newline at end of file
diff --git a/EdgeAdmin/web/views/@default/users/update.html b/EdgeAdmin/web/views/@default/users/update.html
index 61f4b8a..c28f825 100644
--- a/EdgeAdmin/web/views/@default/users/update.html
+++ b/EdgeAdmin/web/views/@default/users/update.html
@@ -39,12 +39,22 @@
- 关联集群 *
+ CDN关联集群 *
+
+ HTTPDNS关联集群
+
+
+ [未选择]
+ {{cluster.name}}
+
+
+
+
diff --git a/EdgeAdmin/web/views/@default/users/user.html b/EdgeAdmin/web/views/@default/users/user.html
index 51e28b8..03f06cd 100644
--- a/EdgeAdmin/web/views/@default/users/user.html
+++ b/EdgeAdmin/web/views/@default/users/user.html
@@ -9,12 +9,13 @@
信息未审核 [审核]
已拒绝
- [重新审核]
+ [重新审核]
-
+
@@ -30,9 +31,18 @@
- 关联集群
+ CDN关联集群
- {{user.cluster.name}}
+ {{user.cluster.name}}
+ 没有设置。
+
+
+
+ HTTPDNS关联集群
+
+ {{user.httpdnsCluster.name}}
没有设置。
@@ -106,8 +116,9 @@
认证二维码
-
-
+
+
diff --git a/EdgeCommon/pkg/rpc/pb/model_httpdns_app.pb.go b/EdgeCommon/pkg/rpc/pb/model_httpdns_app.pb.go
index 4adbe96..36c43f1 100644
--- a/EdgeCommon/pkg/rpc/pb/model_httpdns_app.pb.go
+++ b/EdgeCommon/pkg/rpc/pb/model_httpdns_app.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.35.1
+// protoc-gen-go v1.36.11
// protoc v3.21.12
// source: models/model_httpdns_app.proto
@@ -11,6 +11,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -21,23 +22,21 @@ const (
)
type HTTPDNSApp struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
- Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
- AppId string `protobuf:"bytes,3,opt,name=appId,proto3" json:"appId,omitempty"`
- IsOn bool `protobuf:"varint,4,opt,name=isOn,proto3" json:"isOn,omitempty"`
- PrimaryClusterId int64 `protobuf:"varint,5,opt,name=primaryClusterId,proto3" json:"primaryClusterId,omitempty"`
- BackupClusterId int64 `protobuf:"varint,6,opt,name=backupClusterId,proto3" json:"backupClusterId,omitempty"`
- SniMode string `protobuf:"bytes,7,opt,name=sniMode,proto3" json:"sniMode,omitempty"`
- SignEnabled bool `protobuf:"varint,8,opt,name=signEnabled,proto3" json:"signEnabled,omitempty"`
- SignSecret string `protobuf:"bytes,9,opt,name=signSecret,proto3" json:"signSecret,omitempty"`
- SignUpdatedAt int64 `protobuf:"varint,10,opt,name=signUpdatedAt,proto3" json:"signUpdatedAt,omitempty"`
- CreatedAt int64 `protobuf:"varint,11,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
- UpdatedAt int64 `protobuf:"varint,12,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
- UserId int64 `protobuf:"varint,13,opt,name=userId,proto3" json:"userId,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ AppId string `protobuf:"bytes,3,opt,name=appId,proto3" json:"appId,omitempty"`
+ IsOn bool `protobuf:"varint,4,opt,name=isOn,proto3" json:"isOn,omitempty"`
+ SniMode string `protobuf:"bytes,7,opt,name=sniMode,proto3" json:"sniMode,omitempty"`
+ SignEnabled bool `protobuf:"varint,8,opt,name=signEnabled,proto3" json:"signEnabled,omitempty"`
+ SignSecret string `protobuf:"bytes,9,opt,name=signSecret,proto3" json:"signSecret,omitempty"`
+ SignUpdatedAt int64 `protobuf:"varint,10,opt,name=signUpdatedAt,proto3" json:"signUpdatedAt,omitempty"`
+ CreatedAt int64 `protobuf:"varint,11,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
+ UpdatedAt int64 `protobuf:"varint,12,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
+ UserId int64 `protobuf:"varint,13,opt,name=userId,proto3" json:"userId,omitempty"`
+ ClusterIdsJSON []byte `protobuf:"bytes,14,opt,name=clusterIdsJSON,proto3" json:"clusterIdsJSON,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *HTTPDNSApp) Reset() {
@@ -98,20 +97,6 @@ func (x *HTTPDNSApp) GetIsOn() bool {
return false
}
-func (x *HTTPDNSApp) GetPrimaryClusterId() int64 {
- if x != nil {
- return x.PrimaryClusterId
- }
- return 0
-}
-
-func (x *HTTPDNSApp) GetBackupClusterId() int64 {
- if x != nil {
- return x.BackupClusterId
- }
- return 0
-}
-
func (x *HTTPDNSApp) GetSniMode() string {
if x != nil {
return x.SniMode
@@ -161,48 +146,44 @@ func (x *HTTPDNSApp) GetUserId() int64 {
return 0
}
+func (x *HTTPDNSApp) GetClusterIdsJSON() []byte {
+ if x != nil {
+ return x.ClusterIdsJSON
+ }
+ return nil
+}
+
var File_models_model_httpdns_app_proto protoreflect.FileDescriptor
-var file_models_model_httpdns_app_proto_rawDesc = []byte{
- 0x0a, 0x1e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x68,
- 0x74, 0x74, 0x70, 0x64, 0x6e, 0x73, 0x5f, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x12, 0x02, 0x70, 0x62, 0x22, 0x86, 0x03, 0x0a, 0x0a, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53,
- 0x41, 0x70, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
- 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x12, 0x0a,
- 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f,
- 0x6e, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x43, 0x6c, 0x75, 0x73,
- 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x70, 0x72, 0x69,
- 0x6d, 0x61, 0x72, 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x28, 0x0a,
- 0x0f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64,
- 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x43, 0x6c,
- 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6e, 0x69, 0x4d, 0x6f,
- 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x6e, 0x69, 0x4d, 0x6f, 0x64,
- 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
- 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x61, 0x62,
- 0x6c, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x53, 0x65, 0x63, 0x72, 0x65,
- 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x53, 0x65, 0x63,
- 0x72, 0x65, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74,
- 0x65, 0x64, 0x41, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x73, 0x69, 0x67, 0x6e,
- 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65,
- 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72,
- 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74,
- 0x65, 0x64, 0x41, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61,
- 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18,
- 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x42, 0x06, 0x5a,
- 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+const file_models_model_httpdns_app_proto_rawDesc = "" +
+ "\n" +
+ "\x1emodels/model_httpdns_app.proto\x12\x02pb\"\xe4\x02\n" +
+ "\n" +
+ "HTTPDNSApp\x12\x0e\n" +
+ "\x02id\x18\x01 \x01(\x03R\x02id\x12\x12\n" +
+ "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" +
+ "\x05appId\x18\x03 \x01(\tR\x05appId\x12\x12\n" +
+ "\x04isOn\x18\x04 \x01(\bR\x04isOn\x12\x18\n" +
+ "\asniMode\x18\a \x01(\tR\asniMode\x12 \n" +
+ "\vsignEnabled\x18\b \x01(\bR\vsignEnabled\x12\x1e\n" +
+ "\n" +
+ "signSecret\x18\t \x01(\tR\n" +
+ "signSecret\x12$\n" +
+ "\rsignUpdatedAt\x18\n" +
+ " \x01(\x03R\rsignUpdatedAt\x12\x1c\n" +
+ "\tcreatedAt\x18\v \x01(\x03R\tcreatedAt\x12\x1c\n" +
+ "\tupdatedAt\x18\f \x01(\x03R\tupdatedAt\x12\x16\n" +
+ "\x06userId\x18\r \x01(\x03R\x06userId\x12&\n" +
+ "\x0eclusterIdsJSON\x18\x0e \x01(\fR\x0eclusterIdsJSONJ\x04\b\x05\x10\x06J\x04\b\x06\x10\aB\x06Z\x04./pbb\x06proto3"
var (
file_models_model_httpdns_app_proto_rawDescOnce sync.Once
- file_models_model_httpdns_app_proto_rawDescData = file_models_model_httpdns_app_proto_rawDesc
+ file_models_model_httpdns_app_proto_rawDescData []byte
)
func file_models_model_httpdns_app_proto_rawDescGZIP() []byte {
file_models_model_httpdns_app_proto_rawDescOnce.Do(func() {
- file_models_model_httpdns_app_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_httpdns_app_proto_rawDescData)
+ file_models_model_httpdns_app_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_models_model_httpdns_app_proto_rawDesc), len(file_models_model_httpdns_app_proto_rawDesc)))
})
return file_models_model_httpdns_app_proto_rawDescData
}
@@ -228,7 +209,7 @@ func file_models_model_httpdns_app_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_models_model_httpdns_app_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_models_model_httpdns_app_proto_rawDesc), len(file_models_model_httpdns_app_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
@@ -239,7 +220,6 @@ func file_models_model_httpdns_app_proto_init() {
MessageInfos: file_models_model_httpdns_app_proto_msgTypes,
}.Build()
File_models_model_httpdns_app_proto = out.File
- file_models_model_httpdns_app_proto_rawDesc = nil
file_models_model_httpdns_app_proto_goTypes = nil
file_models_model_httpdns_app_proto_depIdxs = nil
}
diff --git a/EdgeCommon/pkg/rpc/pb/model_httpdns_node.pb.go b/EdgeCommon/pkg/rpc/pb/model_httpdns_node.pb.go
index b2f84e2..204d8bd 100644
--- a/EdgeCommon/pkg/rpc/pb/model_httpdns_node.pb.go
+++ b/EdgeCommon/pkg/rpc/pb/model_httpdns_node.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.35.1
+// protoc-gen-go v1.36.11
// protoc v3.21.12
// source: models/model_httpdns_node.proto
@@ -11,6 +11,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -21,24 +22,24 @@ const (
)
type HTTPDNSNode struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
- ClusterId int64 `protobuf:"varint,2,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
- Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
- IsOn bool `protobuf:"varint,4,opt,name=isOn,proto3" json:"isOn,omitempty"`
- IsUp bool `protobuf:"varint,5,opt,name=isUp,proto3" json:"isUp,omitempty"`
- IsInstalled bool `protobuf:"varint,6,opt,name=isInstalled,proto3" json:"isInstalled,omitempty"`
- IsActive bool `protobuf:"varint,7,opt,name=isActive,proto3" json:"isActive,omitempty"`
- UniqueId string `protobuf:"bytes,8,opt,name=uniqueId,proto3" json:"uniqueId,omitempty"`
- Secret string `protobuf:"bytes,9,opt,name=secret,proto3" json:"secret,omitempty"`
- InstallDir string `protobuf:"bytes,10,opt,name=installDir,proto3" json:"installDir,omitempty"`
- StatusJSON []byte `protobuf:"bytes,11,opt,name=statusJSON,proto3" json:"statusJSON,omitempty"`
- InstallStatusJSON []byte `protobuf:"bytes,12,opt,name=installStatusJSON,proto3" json:"installStatusJSON,omitempty"`
- CreatedAt int64 `protobuf:"varint,13,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
- UpdatedAt int64 `protobuf:"varint,14,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
+ ClusterId int64 `protobuf:"varint,2,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
+ Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
+ IsOn bool `protobuf:"varint,4,opt,name=isOn,proto3" json:"isOn,omitempty"`
+ IsUp bool `protobuf:"varint,5,opt,name=isUp,proto3" json:"isUp,omitempty"`
+ IsInstalled bool `protobuf:"varint,6,opt,name=isInstalled,proto3" json:"isInstalled,omitempty"`
+ IsActive bool `protobuf:"varint,7,opt,name=isActive,proto3" json:"isActive,omitempty"`
+ UniqueId string `protobuf:"bytes,8,opt,name=uniqueId,proto3" json:"uniqueId,omitempty"`
+ Secret string `protobuf:"bytes,9,opt,name=secret,proto3" json:"secret,omitempty"`
+ InstallDir string `protobuf:"bytes,10,opt,name=installDir,proto3" json:"installDir,omitempty"`
+ StatusJSON []byte `protobuf:"bytes,11,opt,name=statusJSON,proto3" json:"statusJSON,omitempty"`
+ InstallStatusJSON []byte `protobuf:"bytes,12,opt,name=installStatusJSON,proto3" json:"installStatusJSON,omitempty"`
+ CreatedAt int64 `protobuf:"varint,13,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
+ UpdatedAt int64 `protobuf:"varint,14,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
+ NodeLogin *NodeLogin `protobuf:"bytes,15,opt,name=nodeLogin,proto3" json:"nodeLogin,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *HTTPDNSNode) Reset() {
@@ -169,48 +170,48 @@ func (x *HTTPDNSNode) GetUpdatedAt() int64 {
return 0
}
+func (x *HTTPDNSNode) GetNodeLogin() *NodeLogin {
+ if x != nil {
+ return x.NodeLogin
+ }
+ return nil
+}
+
var File_models_model_httpdns_node_proto protoreflect.FileDescriptor
-var file_models_model_httpdns_node_proto_rawDesc = []byte{
- 0x0a, 0x1f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x68,
- 0x74, 0x74, 0x70, 0x64, 0x6e, 0x73, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x93, 0x03, 0x0a, 0x0b, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e,
- 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
- 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65,
- 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18,
- 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x69,
- 0x73, 0x55, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x55, 0x70, 0x12,
- 0x20, 0x0a, 0x0b, 0x69, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x18, 0x06,
- 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65,
- 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x07, 0x20,
- 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x1a, 0x0a,
- 0x08, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x08, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63,
- 0x72, 0x65, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65,
- 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x44, 0x69, 0x72, 0x18,
- 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x44, 0x69,
- 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18,
- 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4a, 0x53, 0x4f,
- 0x4e, 0x12, 0x2c, 0x0a, 0x11, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74,
- 0x75, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x69, 0x6e,
- 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12,
- 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x0d, 0x20, 0x01,
- 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a,
- 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03,
- 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e,
- 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+const file_models_model_httpdns_node_proto_rawDesc = "" +
+ "\n" +
+ "\x1fmodels/model_httpdns_node.proto\x12\x02pb\x1a\x1dmodels/model_node_login.proto\"\xc0\x03\n" +
+ "\vHTTPDNSNode\x12\x0e\n" +
+ "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1c\n" +
+ "\tclusterId\x18\x02 \x01(\x03R\tclusterId\x12\x12\n" +
+ "\x04name\x18\x03 \x01(\tR\x04name\x12\x12\n" +
+ "\x04isOn\x18\x04 \x01(\bR\x04isOn\x12\x12\n" +
+ "\x04isUp\x18\x05 \x01(\bR\x04isUp\x12 \n" +
+ "\visInstalled\x18\x06 \x01(\bR\visInstalled\x12\x1a\n" +
+ "\bisActive\x18\a \x01(\bR\bisActive\x12\x1a\n" +
+ "\buniqueId\x18\b \x01(\tR\buniqueId\x12\x16\n" +
+ "\x06secret\x18\t \x01(\tR\x06secret\x12\x1e\n" +
+ "\n" +
+ "installDir\x18\n" +
+ " \x01(\tR\n" +
+ "installDir\x12\x1e\n" +
+ "\n" +
+ "statusJSON\x18\v \x01(\fR\n" +
+ "statusJSON\x12,\n" +
+ "\x11installStatusJSON\x18\f \x01(\fR\x11installStatusJSON\x12\x1c\n" +
+ "\tcreatedAt\x18\r \x01(\x03R\tcreatedAt\x12\x1c\n" +
+ "\tupdatedAt\x18\x0e \x01(\x03R\tupdatedAt\x12+\n" +
+ "\tnodeLogin\x18\x0f \x01(\v2\r.pb.NodeLoginR\tnodeLoginB\x06Z\x04./pbb\x06proto3"
var (
file_models_model_httpdns_node_proto_rawDescOnce sync.Once
- file_models_model_httpdns_node_proto_rawDescData = file_models_model_httpdns_node_proto_rawDesc
+ file_models_model_httpdns_node_proto_rawDescData []byte
)
func file_models_model_httpdns_node_proto_rawDescGZIP() []byte {
file_models_model_httpdns_node_proto_rawDescOnce.Do(func() {
- file_models_model_httpdns_node_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_httpdns_node_proto_rawDescData)
+ file_models_model_httpdns_node_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_models_model_httpdns_node_proto_rawDesc), len(file_models_model_httpdns_node_proto_rawDesc)))
})
return file_models_model_httpdns_node_proto_rawDescData
}
@@ -218,13 +219,15 @@ func file_models_model_httpdns_node_proto_rawDescGZIP() []byte {
var file_models_model_httpdns_node_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_models_model_httpdns_node_proto_goTypes = []any{
(*HTTPDNSNode)(nil), // 0: pb.HTTPDNSNode
+ (*NodeLogin)(nil), // 1: pb.NodeLogin
}
var file_models_model_httpdns_node_proto_depIdxs = []int32{
- 0, // [0:0] is the sub-list for method output_type
- 0, // [0:0] is the sub-list for method input_type
- 0, // [0:0] is the sub-list for extension type_name
- 0, // [0:0] is the sub-list for extension extendee
- 0, // [0:0] is the sub-list for field type_name
+ 1, // 0: pb.HTTPDNSNode.nodeLogin:type_name -> pb.NodeLogin
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
}
func init() { file_models_model_httpdns_node_proto_init() }
@@ -232,11 +235,12 @@ func file_models_model_httpdns_node_proto_init() {
if File_models_model_httpdns_node_proto != nil {
return
}
+ file_models_model_node_login_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_models_model_httpdns_node_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_models_model_httpdns_node_proto_rawDesc), len(file_models_model_httpdns_node_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
@@ -247,7 +251,6 @@ func file_models_model_httpdns_node_proto_init() {
MessageInfos: file_models_model_httpdns_node_proto_msgTypes,
}.Build()
File_models_model_httpdns_node_proto = out.File
- file_models_model_httpdns_node_proto_rawDesc = nil
file_models_model_httpdns_node_proto_goTypes = nil
file_models_model_httpdns_node_proto_depIdxs = nil
}
diff --git a/EdgeCommon/pkg/rpc/pb/model_user.pb.go b/EdgeCommon/pkg/rpc/pb/model_user.pb.go
index c2f9bb3..8724012 100644
--- a/EdgeCommon/pkg/rpc/pb/model_user.pb.go
+++ b/EdgeCommon/pkg/rpc/pb/model_user.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.36.0
-// protoc v6.33.2
+// protoc-gen-go v1.36.11
+// protoc v3.21.12
// source: models/model_user.proto
package pb
@@ -11,6 +11,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -42,6 +43,7 @@ type User struct {
IsEnterpriseIdentified bool `protobuf:"varint,18,opt,name=isEnterpriseIdentified,proto3" json:"isEnterpriseIdentified,omitempty"` // 是否已通过企业验证
BandwidthAlgo string `protobuf:"bytes,21,opt,name=bandwidthAlgo,proto3" json:"bandwidthAlgo,omitempty"` // 带宽算法
Lang string `protobuf:"bytes,22,opt,name=lang,proto3" json:"lang,omitempty"` // 语言代号
+ HttpdnsClusterIdsJSON []byte `protobuf:"bytes,24,opt,name=httpdnsClusterIdsJSON,proto3" json:"httpdnsClusterIdsJSON,omitempty"` // HTTPDNS关联集群ID列表
OtpLogin *Login `protobuf:"bytes,19,opt,name=otpLogin,proto3" json:"otpLogin,omitempty"` // OTP认证
NodeCluster *NodeCluster `protobuf:"bytes,10,opt,name=nodeCluster,proto3" json:"nodeCluster,omitempty"` // 集群信息
Features []*UserFeature `protobuf:"bytes,11,rep,name=features,proto3" json:"features,omitempty"` // 开通功能
@@ -219,6 +221,13 @@ func (x *User) GetLang() string {
return ""
}
+func (x *User) GetHttpdnsClusterIdsJSON() []byte {
+ if x != nil {
+ return x.HttpdnsClusterIdsJSON
+ }
+ return nil
+}
+
func (x *User) GetOtpLogin() *Login {
if x != nil {
return x.OtpLogin
@@ -242,74 +251,48 @@ func (x *User) GetFeatures() []*UserFeature {
var File_models_model_user_proto protoreflect.FileDescriptor
-var file_models_model_user_proto_rawDesc = []byte{
- 0x0a, 0x17, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75,
- 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x1f, 0x6d,
- 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65,
- 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f,
- 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75, 0x73, 0x65,
- 0x72, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
- 0x18, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6c, 0x6f,
- 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfd, 0x05, 0x0a, 0x04, 0x55, 0x73,
- 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02,
- 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a,
- 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f,
- 0x62, 0x69, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x62, 0x69,
- 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x03, 0x74, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x06, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x24, 0x0a, 0x0d, 0x76, 0x65,
- 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x14, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c,
- 0x12, 0x26, 0x0a, 0x0e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x4d, 0x6f, 0x62, 0x69,
- 0x6c, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69,
- 0x65, 0x64, 0x4d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x61,
- 0x72, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b,
- 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04,
- 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41,
- 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
- 0x41, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64,
- 0x49, 0x50, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
- 0x65, 0x72, 0x65, 0x64, 0x49, 0x50, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x56, 0x65, 0x72, 0x69,
- 0x66, 0x69, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x56, 0x65,
- 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x52, 0x65, 0x6a, 0x65,
- 0x63, 0x74, 0x65, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x52, 0x65,
- 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74,
- 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65,
- 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73,
- 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69,
- 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x16, 0x69, 0x73, 0x49, 0x6e,
- 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69,
- 0x65, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x69, 0x73, 0x49, 0x6e, 0x64, 0x69,
- 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64,
- 0x12, 0x36, 0x0a, 0x16, 0x69, 0x73, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65,
- 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08,
- 0x52, 0x16, 0x69, 0x73, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x49, 0x64,
- 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x61, 0x6e, 0x64,
- 0x77, 0x69, 0x64, 0x74, 0x68, 0x41, 0x6c, 0x67, 0x6f, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x0d, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x41, 0x6c, 0x67, 0x6f, 0x12, 0x12,
- 0x0a, 0x04, 0x6c, 0x61, 0x6e, 0x67, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x61,
- 0x6e, 0x67, 0x12, 0x25, 0x0a, 0x08, 0x6f, 0x74, 0x70, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x13,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52,
- 0x08, 0x6f, 0x74, 0x70, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x31, 0x0a, 0x0b, 0x6e, 0x6f, 0x64,
- 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f,
- 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52,
- 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x08,
- 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f,
- 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52,
- 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70,
- 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+const file_models_model_user_proto_rawDesc = "" +
+ "\n" +
+ "\x17models/model_user.proto\x12\x02pb\x1a\x1fmodels/model_node_cluster.proto\x1a\x1fmodels/model_user_feature.proto\x1a\x18models/model_login.proto\"\xb3\x06\n" +
+ "\x04User\x12\x0e\n" +
+ "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" +
+ "\busername\x18\x02 \x01(\tR\busername\x12\x1a\n" +
+ "\bfullname\x18\x03 \x01(\tR\bfullname\x12\x16\n" +
+ "\x06mobile\x18\x04 \x01(\tR\x06mobile\x12\x10\n" +
+ "\x03tel\x18\x05 \x01(\tR\x03tel\x12\x14\n" +
+ "\x05email\x18\x06 \x01(\tR\x05email\x12$\n" +
+ "\rverifiedEmail\x18\x14 \x01(\tR\rverifiedEmail\x12&\n" +
+ "\x0everifiedMobile\x18\x17 \x01(\tR\x0everifiedMobile\x12\x16\n" +
+ "\x06remark\x18\a \x01(\tR\x06remark\x12\x12\n" +
+ "\x04isOn\x18\b \x01(\bR\x04isOn\x12\x1c\n" +
+ "\tcreatedAt\x18\t \x01(\x03R\tcreatedAt\x12\"\n" +
+ "\fregisteredIP\x18\f \x01(\tR\fregisteredIP\x12\x1e\n" +
+ "\n" +
+ "isVerified\x18\r \x01(\bR\n" +
+ "isVerified\x12\x1e\n" +
+ "\n" +
+ "isRejected\x18\x0e \x01(\bR\n" +
+ "isRejected\x12\"\n" +
+ "\frejectReason\x18\x0f \x01(\tR\frejectReason\x12\x1c\n" +
+ "\tisDeleted\x18\x10 \x01(\bR\tisDeleted\x126\n" +
+ "\x16isIndividualIdentified\x18\x11 \x01(\bR\x16isIndividualIdentified\x126\n" +
+ "\x16isEnterpriseIdentified\x18\x12 \x01(\bR\x16isEnterpriseIdentified\x12$\n" +
+ "\rbandwidthAlgo\x18\x15 \x01(\tR\rbandwidthAlgo\x12\x12\n" +
+ "\x04lang\x18\x16 \x01(\tR\x04lang\x124\n" +
+ "\x15httpdnsClusterIdsJSON\x18\x18 \x01(\fR\x15httpdnsClusterIdsJSON\x12%\n" +
+ "\botpLogin\x18\x13 \x01(\v2\t.pb.LoginR\botpLogin\x121\n" +
+ "\vnodeCluster\x18\n" +
+ " \x01(\v2\x0f.pb.NodeClusterR\vnodeCluster\x12+\n" +
+ "\bfeatures\x18\v \x03(\v2\x0f.pb.UserFeatureR\bfeaturesB\x06Z\x04./pbb\x06proto3"
var (
file_models_model_user_proto_rawDescOnce sync.Once
- file_models_model_user_proto_rawDescData = file_models_model_user_proto_rawDesc
+ file_models_model_user_proto_rawDescData []byte
)
func file_models_model_user_proto_rawDescGZIP() []byte {
file_models_model_user_proto_rawDescOnce.Do(func() {
- file_models_model_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_user_proto_rawDescData)
+ file_models_model_user_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_models_model_user_proto_rawDesc), len(file_models_model_user_proto_rawDesc)))
})
return file_models_model_user_proto_rawDescData
}
@@ -344,7 +327,7 @@ func file_models_model_user_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_models_model_user_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_models_model_user_proto_rawDesc), len(file_models_model_user_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
@@ -355,7 +338,6 @@ func file_models_model_user_proto_init() {
MessageInfos: file_models_model_user_proto_msgTypes,
}.Build()
File_models_model_user_proto = out.File
- file_models_model_user_proto_rawDesc = nil
file_models_model_user_proto_goTypes = nil
file_models_model_user_proto_depIdxs = nil
}
diff --git a/EdgeCommon/pkg/rpc/pb/service_httpdns_app.pb.go b/EdgeCommon/pkg/rpc/pb/service_httpdns_app.pb.go
index f4a34fd..45cfd7d 100644
--- a/EdgeCommon/pkg/rpc/pb/service_httpdns_app.pb.go
+++ b/EdgeCommon/pkg/rpc/pb/service_httpdns_app.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.35.1
+// protoc-gen-go v1.36.11
// protoc v3.21.12
// source: service_httpdns_app.proto
@@ -11,6 +11,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -21,17 +22,15 @@ const (
)
type CreateHTTPDNSAppRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- AppId string `protobuf:"bytes,2,opt,name=appId,proto3" json:"appId,omitempty"`
- PrimaryClusterId int64 `protobuf:"varint,3,opt,name=primaryClusterId,proto3" json:"primaryClusterId,omitempty"`
- BackupClusterId int64 `protobuf:"varint,4,opt,name=backupClusterId,proto3" json:"backupClusterId,omitempty"`
- IsOn bool `protobuf:"varint,5,opt,name=isOn,proto3" json:"isOn,omitempty"`
- SignEnabled bool `protobuf:"varint,6,opt,name=signEnabled,proto3" json:"signEnabled,omitempty"`
- UserId int64 `protobuf:"varint,7,opt,name=userId,proto3" json:"userId,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ AppId string `protobuf:"bytes,2,opt,name=appId,proto3" json:"appId,omitempty"`
+ IsOn bool `protobuf:"varint,5,opt,name=isOn,proto3" json:"isOn,omitempty"`
+ SignEnabled bool `protobuf:"varint,6,opt,name=signEnabled,proto3" json:"signEnabled,omitempty"`
+ UserId int64 `protobuf:"varint,7,opt,name=userId,proto3" json:"userId,omitempty"`
+ ClusterIdsJSON []byte `protobuf:"bytes,8,opt,name=clusterIdsJSON,proto3" json:"clusterIdsJSON,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *CreateHTTPDNSAppRequest) Reset() {
@@ -78,20 +77,6 @@ func (x *CreateHTTPDNSAppRequest) GetAppId() string {
return ""
}
-func (x *CreateHTTPDNSAppRequest) GetPrimaryClusterId() int64 {
- if x != nil {
- return x.PrimaryClusterId
- }
- return 0
-}
-
-func (x *CreateHTTPDNSAppRequest) GetBackupClusterId() int64 {
- if x != nil {
- return x.BackupClusterId
- }
- return 0
-}
-
func (x *CreateHTTPDNSAppRequest) GetIsOn() bool {
if x != nil {
return x.IsOn
@@ -113,12 +98,18 @@ func (x *CreateHTTPDNSAppRequest) GetUserId() int64 {
return 0
}
-type CreateHTTPDNSAppResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *CreateHTTPDNSAppRequest) GetClusterIdsJSON() []byte {
+ if x != nil {
+ return x.ClusterIdsJSON
+ }
+ return nil
+}
- AppDbId int64 `protobuf:"varint,1,opt,name=appDbId,proto3" json:"appDbId,omitempty"`
+type CreateHTTPDNSAppResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ AppDbId int64 `protobuf:"varint,1,opt,name=appDbId,proto3" json:"appDbId,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *CreateHTTPDNSAppResponse) Reset() {
@@ -159,16 +150,14 @@ func (x *CreateHTTPDNSAppResponse) GetAppDbId() int64 {
}
type UpdateHTTPDNSAppRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- AppDbId int64 `protobuf:"varint,1,opt,name=appDbId,proto3" json:"appDbId,omitempty"`
- Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
- PrimaryClusterId int64 `protobuf:"varint,3,opt,name=primaryClusterId,proto3" json:"primaryClusterId,omitempty"`
- BackupClusterId int64 `protobuf:"varint,4,opt,name=backupClusterId,proto3" json:"backupClusterId,omitempty"`
- IsOn bool `protobuf:"varint,5,opt,name=isOn,proto3" json:"isOn,omitempty"`
- UserId int64 `protobuf:"varint,6,opt,name=userId,proto3" json:"userId,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ AppDbId int64 `protobuf:"varint,1,opt,name=appDbId,proto3" json:"appDbId,omitempty"`
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ IsOn bool `protobuf:"varint,5,opt,name=isOn,proto3" json:"isOn,omitempty"`
+ UserId int64 `protobuf:"varint,6,opt,name=userId,proto3" json:"userId,omitempty"`
+ ClusterIdsJSON []byte `protobuf:"bytes,7,opt,name=clusterIdsJSON,proto3" json:"clusterIdsJSON,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *UpdateHTTPDNSAppRequest) Reset() {
@@ -215,20 +204,6 @@ func (x *UpdateHTTPDNSAppRequest) GetName() string {
return ""
}
-func (x *UpdateHTTPDNSAppRequest) GetPrimaryClusterId() int64 {
- if x != nil {
- return x.PrimaryClusterId
- }
- return 0
-}
-
-func (x *UpdateHTTPDNSAppRequest) GetBackupClusterId() int64 {
- if x != nil {
- return x.BackupClusterId
- }
- return 0
-}
-
func (x *UpdateHTTPDNSAppRequest) GetIsOn() bool {
if x != nil {
return x.IsOn
@@ -243,12 +218,18 @@ func (x *UpdateHTTPDNSAppRequest) GetUserId() int64 {
return 0
}
-type DeleteHTTPDNSAppRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *UpdateHTTPDNSAppRequest) GetClusterIdsJSON() []byte {
+ if x != nil {
+ return x.ClusterIdsJSON
+ }
+ return nil
+}
- AppDbId int64 `protobuf:"varint,1,opt,name=appDbId,proto3" json:"appDbId,omitempty"`
+type DeleteHTTPDNSAppRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ AppDbId int64 `protobuf:"varint,1,opt,name=appDbId,proto3" json:"appDbId,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *DeleteHTTPDNSAppRequest) Reset() {
@@ -289,11 +270,10 @@ func (x *DeleteHTTPDNSAppRequest) GetAppDbId() int64 {
}
type FindHTTPDNSAppRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ AppDbId int64 `protobuf:"varint,1,opt,name=appDbId,proto3" json:"appDbId,omitempty"`
unknownFields protoimpl.UnknownFields
-
- AppDbId int64 `protobuf:"varint,1,opt,name=appDbId,proto3" json:"appDbId,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *FindHTTPDNSAppRequest) Reset() {
@@ -334,11 +314,10 @@ func (x *FindHTTPDNSAppRequest) GetAppDbId() int64 {
}
type FindHTTPDNSAppResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ App *HTTPDNSApp `protobuf:"bytes,1,opt,name=app,proto3" json:"app,omitempty"`
unknownFields protoimpl.UnknownFields
-
- App *HTTPDNSApp `protobuf:"bytes,1,opt,name=app,proto3" json:"app,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *FindHTTPDNSAppResponse) Reset() {
@@ -379,13 +358,12 @@ func (x *FindHTTPDNSAppResponse) GetApp() *HTTPDNSApp {
}
type ListHTTPDNSAppsRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
+ Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
+ Keyword string `protobuf:"bytes,3,opt,name=keyword,proto3" json:"keyword,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
- Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
- Keyword string `protobuf:"bytes,3,opt,name=keyword,proto3" json:"keyword,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ListHTTPDNSAppsRequest) Reset() {
@@ -440,11 +418,10 @@ func (x *ListHTTPDNSAppsRequest) GetKeyword() string {
}
type ListHTTPDNSAppsResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Apps []*HTTPDNSApp `protobuf:"bytes,1,rep,name=apps,proto3" json:"apps,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Apps []*HTTPDNSApp `protobuf:"bytes,1,rep,name=apps,proto3" json:"apps,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ListHTTPDNSAppsResponse) Reset() {
@@ -485,9 +462,9 @@ func (x *ListHTTPDNSAppsResponse) GetApps() []*HTTPDNSApp {
}
type FindAllHTTPDNSAppsRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *FindAllHTTPDNSAppsRequest) Reset() {
@@ -521,11 +498,10 @@ func (*FindAllHTTPDNSAppsRequest) Descriptor() ([]byte, []int) {
}
type FindAllHTTPDNSAppsResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Apps []*HTTPDNSApp `protobuf:"bytes,1,rep,name=apps,proto3" json:"apps,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Apps []*HTTPDNSApp `protobuf:"bytes,1,rep,name=apps,proto3" json:"apps,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *FindAllHTTPDNSAppsResponse) Reset() {
@@ -566,12 +542,11 @@ func (x *FindAllHTTPDNSAppsResponse) GetApps() []*HTTPDNSApp {
}
type UpdateHTTPDNSAppSignEnabledRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ AppDbId int64 `protobuf:"varint,1,opt,name=appDbId,proto3" json:"appDbId,omitempty"`
+ SignEnabled bool `protobuf:"varint,2,opt,name=signEnabled,proto3" json:"signEnabled,omitempty"`
unknownFields protoimpl.UnknownFields
-
- AppDbId int64 `protobuf:"varint,1,opt,name=appDbId,proto3" json:"appDbId,omitempty"`
- SignEnabled bool `protobuf:"varint,2,opt,name=signEnabled,proto3" json:"signEnabled,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *UpdateHTTPDNSAppSignEnabledRequest) Reset() {
@@ -619,11 +594,10 @@ func (x *UpdateHTTPDNSAppSignEnabledRequest) GetSignEnabled() bool {
}
type ResetHTTPDNSAppSignSecretRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ AppDbId int64 `protobuf:"varint,1,opt,name=appDbId,proto3" json:"appDbId,omitempty"`
unknownFields protoimpl.UnknownFields
-
- AppDbId int64 `protobuf:"varint,1,opt,name=appDbId,proto3" json:"appDbId,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ResetHTTPDNSAppSignSecretRequest) Reset() {
@@ -664,12 +638,11 @@ func (x *ResetHTTPDNSAppSignSecretRequest) GetAppDbId() int64 {
}
type ResetHTTPDNSAppSignSecretResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ SignSecret string `protobuf:"bytes,1,opt,name=signSecret,proto3" json:"signSecret,omitempty"`
+ UpdatedAt int64 `protobuf:"varint,2,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
unknownFields protoimpl.UnknownFields
-
- SignSecret string `protobuf:"bytes,1,opt,name=signSecret,proto3" json:"signSecret,omitempty"`
- UpdatedAt int64 `protobuf:"varint,2,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ResetHTTPDNSAppSignSecretResponse) Reset() {
@@ -718,139 +691,67 @@ func (x *ResetHTTPDNSAppSignSecretResponse) GetUpdatedAt() int64 {
var File_service_httpdns_app_proto protoreflect.FileDescriptor
-var file_service_httpdns_app_proto_rawDesc = []byte{
- 0x0a, 0x19, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x64, 0x6e,
- 0x73, 0x5f, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a,
- 0x1e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x68, 0x74,
- 0x74, 0x70, 0x64, 0x6e, 0x73, 0x5f, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
- 0x19, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73,
- 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe7, 0x01, 0x0a, 0x17, 0x43,
- 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70,
- 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64,
- 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74,
- 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x70, 0x72, 0x69, 0x6d,
- 0x61, 0x72, 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f,
- 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18,
- 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x43, 0x6c, 0x75,
- 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x05,
- 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x69,
- 0x67, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52,
- 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06,
- 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73,
- 0x65, 0x72, 0x49, 0x64, 0x22, 0x34, 0x0a, 0x18,
- 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x70, 0x70, 0x44,
- 0x62, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x70, 0x70, 0x44, 0x62,
- 0x49, 0x64, 0x22, 0xc9, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54,
- 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18,
- 0x0a, 0x07, 0x61, 0x70, 0x70, 0x44, 0x62, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
- 0x07, 0x61, 0x70, 0x70, 0x44, 0x62, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x10,
- 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x43,
- 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x62, 0x61, 0x63, 0x6b,
- 0x75, 0x70, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28,
- 0x03, 0x52, 0x0f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
- 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08,
- 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
- 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x33,
- 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
- 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x70, 0x70, 0x44, 0x62, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x03, 0x52, 0x07, 0x61, 0x70, 0x70, 0x44, 0x62, 0x49, 0x64, 0x22, 0x31, 0x0a, 0x15, 0x46,
- 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x70, 0x70, 0x44, 0x62, 0x49, 0x64, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x70, 0x70, 0x44, 0x62, 0x49, 0x64, 0x22, 0x3a,
- 0x0a, 0x16, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x03, 0x61, 0x70, 0x70, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x44,
- 0x4e, 0x53, 0x41, 0x70, 0x70, 0x52, 0x03, 0x61, 0x70, 0x70, 0x22, 0x5e, 0x0a, 0x16, 0x4c, 0x69,
- 0x73, 0x74, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70, 0x73, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04,
- 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65,
- 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x3d, 0x0a, 0x17, 0x4c, 0x69,
- 0x73, 0x74, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70, 0x73, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x61, 0x70, 0x70, 0x73, 0x18, 0x01, 0x20,
- 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53,
- 0x41, 0x70, 0x70, 0x52, 0x04, 0x61, 0x70, 0x70, 0x73, 0x22, 0x1b, 0x0a, 0x19, 0x46, 0x69, 0x6e,
- 0x64, 0x41, 0x6c, 0x6c, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70, 0x73, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x40, 0x0a, 0x1a, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c,
- 0x6c, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x61, 0x70, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41,
- 0x70, 0x70, 0x52, 0x04, 0x61, 0x70, 0x70, 0x73, 0x22, 0x60, 0x0a, 0x22, 0x55, 0x70, 0x64, 0x61,
- 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70, 0x53, 0x69, 0x67, 0x6e,
- 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18,
- 0x0a, 0x07, 0x61, 0x70, 0x70, 0x44, 0x62, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
- 0x07, 0x61, 0x70, 0x70, 0x44, 0x62, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x69, 0x67, 0x6e,
- 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73,
- 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x3c, 0x0a, 0x20, 0x52, 0x65,
- 0x73, 0x65, 0x74, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70, 0x53, 0x69, 0x67,
- 0x6e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18,
- 0x0a, 0x07, 0x61, 0x70, 0x70, 0x44, 0x62, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
- 0x07, 0x61, 0x70, 0x70, 0x44, 0x62, 0x49, 0x64, 0x22, 0x61, 0x0a, 0x21, 0x52, 0x65, 0x73, 0x65,
- 0x74, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x53,
- 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a,
- 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1c, 0x0a,
- 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
- 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x32, 0x8f, 0x05, 0x0a, 0x11,
- 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
- 0x65, 0x12, 0x4d, 0x0a, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x44,
- 0x4e, 0x53, 0x41, 0x70, 0x70, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
- 0x65, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54,
- 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x12, 0x3f, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e,
- 0x53, 0x41, 0x70, 0x70, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
- 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73,
- 0x73, 0x12, 0x3f, 0x0a, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x44,
- 0x4e, 0x53, 0x41, 0x70, 0x70, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
- 0x65, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65,
- 0x73, 0x73, 0x12, 0x47, 0x0a, 0x0e, 0x66, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e,
- 0x53, 0x41, 0x70, 0x70, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54,
- 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
- 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53,
- 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x6c,
- 0x69, 0x73, 0x74, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70, 0x73, 0x12, 0x1a,
- 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41,
- 0x70, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e,
- 0x4c, 0x69, 0x73, 0x74, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70, 0x73, 0x52,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x66, 0x69, 0x6e, 0x64, 0x41,
- 0x6c, 0x6c, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70, 0x73, 0x12, 0x1d, 0x2e,
- 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e,
- 0x53, 0x41, 0x70, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70,
- 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53,
- 0x41, 0x70, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x1b,
- 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70,
- 0x53, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x26, 0x2e, 0x70, 0x62,
- 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70,
- 0x70, 0x53, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63,
- 0x65, 0x73, 0x73, 0x12, 0x68, 0x0a, 0x19, 0x72, 0x65, 0x73, 0x65, 0x74, 0x48, 0x54, 0x54, 0x50,
- 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74,
- 0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x48, 0x54, 0x54, 0x50, 0x44,
- 0x4e, 0x53, 0x41, 0x70, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x65,
- 0x74, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x41, 0x70, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x53,
- 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a,
- 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+const file_service_httpdns_app_proto_rawDesc = "" +
+ "\n" +
+ "\x19service_httpdns_app.proto\x12\x02pb\x1a\x1emodels/model_httpdns_app.proto\x1a\x19models/rpc_messages.proto\"\xc5\x01\n" +
+ "\x17CreateHTTPDNSAppRequest\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" +
+ "\x05appId\x18\x02 \x01(\tR\x05appId\x12\x12\n" +
+ "\x04isOn\x18\x05 \x01(\bR\x04isOn\x12 \n" +
+ "\vsignEnabled\x18\x06 \x01(\bR\vsignEnabled\x12\x16\n" +
+ "\x06userId\x18\a \x01(\x03R\x06userId\x12&\n" +
+ "\x0eclusterIdsJSON\x18\b \x01(\fR\x0eclusterIdsJSONJ\x04\b\x03\x10\x04J\x04\b\x04\x10\x05\"4\n" +
+ "\x18CreateHTTPDNSAppResponse\x12\x18\n" +
+ "\aappDbId\x18\x01 \x01(\x03R\aappDbId\"\xa7\x01\n" +
+ "\x17UpdateHTTPDNSAppRequest\x12\x18\n" +
+ "\aappDbId\x18\x01 \x01(\x03R\aappDbId\x12\x12\n" +
+ "\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n" +
+ "\x04isOn\x18\x05 \x01(\bR\x04isOn\x12\x16\n" +
+ "\x06userId\x18\x06 \x01(\x03R\x06userId\x12&\n" +
+ "\x0eclusterIdsJSON\x18\a \x01(\fR\x0eclusterIdsJSONJ\x04\b\x03\x10\x04J\x04\b\x04\x10\x05\"3\n" +
+ "\x17DeleteHTTPDNSAppRequest\x12\x18\n" +
+ "\aappDbId\x18\x01 \x01(\x03R\aappDbId\"1\n" +
+ "\x15FindHTTPDNSAppRequest\x12\x18\n" +
+ "\aappDbId\x18\x01 \x01(\x03R\aappDbId\":\n" +
+ "\x16FindHTTPDNSAppResponse\x12 \n" +
+ "\x03app\x18\x01 \x01(\v2\x0e.pb.HTTPDNSAppR\x03app\"^\n" +
+ "\x16ListHTTPDNSAppsRequest\x12\x16\n" +
+ "\x06offset\x18\x01 \x01(\x03R\x06offset\x12\x12\n" +
+ "\x04size\x18\x02 \x01(\x03R\x04size\x12\x18\n" +
+ "\akeyword\x18\x03 \x01(\tR\akeyword\"=\n" +
+ "\x17ListHTTPDNSAppsResponse\x12\"\n" +
+ "\x04apps\x18\x01 \x03(\v2\x0e.pb.HTTPDNSAppR\x04apps\"\x1b\n" +
+ "\x19FindAllHTTPDNSAppsRequest\"@\n" +
+ "\x1aFindAllHTTPDNSAppsResponse\x12\"\n" +
+ "\x04apps\x18\x01 \x03(\v2\x0e.pb.HTTPDNSAppR\x04apps\"`\n" +
+ "\"UpdateHTTPDNSAppSignEnabledRequest\x12\x18\n" +
+ "\aappDbId\x18\x01 \x01(\x03R\aappDbId\x12 \n" +
+ "\vsignEnabled\x18\x02 \x01(\bR\vsignEnabled\"<\n" +
+ " ResetHTTPDNSAppSignSecretRequest\x12\x18\n" +
+ "\aappDbId\x18\x01 \x01(\x03R\aappDbId\"a\n" +
+ "!ResetHTTPDNSAppSignSecretResponse\x12\x1e\n" +
+ "\n" +
+ "signSecret\x18\x01 \x01(\tR\n" +
+ "signSecret\x12\x1c\n" +
+ "\tupdatedAt\x18\x02 \x01(\x03R\tupdatedAt2\x8f\x05\n" +
+ "\x11HTTPDNSAppService\x12M\n" +
+ "\x10createHTTPDNSApp\x12\x1b.pb.CreateHTTPDNSAppRequest\x1a\x1c.pb.CreateHTTPDNSAppResponse\x12?\n" +
+ "\x10updateHTTPDNSApp\x12\x1b.pb.UpdateHTTPDNSAppRequest\x1a\x0e.pb.RPCSuccess\x12?\n" +
+ "\x10deleteHTTPDNSApp\x12\x1b.pb.DeleteHTTPDNSAppRequest\x1a\x0e.pb.RPCSuccess\x12G\n" +
+ "\x0efindHTTPDNSApp\x12\x19.pb.FindHTTPDNSAppRequest\x1a\x1a.pb.FindHTTPDNSAppResponse\x12J\n" +
+ "\x0flistHTTPDNSApps\x12\x1a.pb.ListHTTPDNSAppsRequest\x1a\x1b.pb.ListHTTPDNSAppsResponse\x12S\n" +
+ "\x12findAllHTTPDNSApps\x12\x1d.pb.FindAllHTTPDNSAppsRequest\x1a\x1e.pb.FindAllHTTPDNSAppsResponse\x12U\n" +
+ "\x1bupdateHTTPDNSAppSignEnabled\x12&.pb.UpdateHTTPDNSAppSignEnabledRequest\x1a\x0e.pb.RPCSuccess\x12h\n" +
+ "\x19resetHTTPDNSAppSignSecret\x12$.pb.ResetHTTPDNSAppSignSecretRequest\x1a%.pb.ResetHTTPDNSAppSignSecretResponseB\x06Z\x04./pbb\x06proto3"
var (
file_service_httpdns_app_proto_rawDescOnce sync.Once
- file_service_httpdns_app_proto_rawDescData = file_service_httpdns_app_proto_rawDesc
+ file_service_httpdns_app_proto_rawDescData []byte
)
func file_service_httpdns_app_proto_rawDescGZIP() []byte {
file_service_httpdns_app_proto_rawDescOnce.Do(func() {
- file_service_httpdns_app_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_httpdns_app_proto_rawDescData)
+ file_service_httpdns_app_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_service_httpdns_app_proto_rawDesc), len(file_service_httpdns_app_proto_rawDesc)))
})
return file_service_httpdns_app_proto_rawDescData
}
@@ -911,7 +812,7 @@ func file_service_httpdns_app_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_service_httpdns_app_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_service_httpdns_app_proto_rawDesc), len(file_service_httpdns_app_proto_rawDesc)),
NumEnums: 0,
NumMessages: 13,
NumExtensions: 0,
@@ -922,7 +823,6 @@ func file_service_httpdns_app_proto_init() {
MessageInfos: file_service_httpdns_app_proto_msgTypes,
}.Build()
File_service_httpdns_app_proto = out.File
- file_service_httpdns_app_proto_rawDesc = nil
file_service_httpdns_app_proto_goTypes = nil
file_service_httpdns_app_proto_depIdxs = nil
}
diff --git a/EdgeCommon/pkg/rpc/pb/service_httpdns_app_grpc.pb.go b/EdgeCommon/pkg/rpc/pb/service_httpdns_app_grpc.pb.go
index b01b80e..6f5242c 100644
--- a/EdgeCommon/pkg/rpc/pb/service_httpdns_app_grpc.pb.go
+++ b/EdgeCommon/pkg/rpc/pb/service_httpdns_app_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.5.1
+// - protoc-gen-go-grpc v1.6.1
// - protoc v3.21.12
// source: service_httpdns_app.proto
@@ -132,7 +132,7 @@ func (c *hTTPDNSAppServiceClient) ResetHTTPDNSAppSignSecret(ctx context.Context,
}
// HTTPDNSAppServiceServer is the server API for HTTPDNSAppService service.
-// All implementations should embed UnimplementedHTTPDNSAppServiceServer
+// All implementations must embed UnimplementedHTTPDNSAppServiceServer
// for forward compatibility.
type HTTPDNSAppServiceServer interface {
CreateHTTPDNSApp(context.Context, *CreateHTTPDNSAppRequest) (*CreateHTTPDNSAppResponse, error)
@@ -143,9 +143,10 @@ type HTTPDNSAppServiceServer interface {
FindAllHTTPDNSApps(context.Context, *FindAllHTTPDNSAppsRequest) (*FindAllHTTPDNSAppsResponse, error)
UpdateHTTPDNSAppSignEnabled(context.Context, *UpdateHTTPDNSAppSignEnabledRequest) (*RPCSuccess, error)
ResetHTTPDNSAppSignSecret(context.Context, *ResetHTTPDNSAppSignSecretRequest) (*ResetHTTPDNSAppSignSecretResponse, error)
+ mustEmbedUnimplementedHTTPDNSAppServiceServer()
}
-// UnimplementedHTTPDNSAppServiceServer should be embedded to have
+// UnimplementedHTTPDNSAppServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
@@ -153,30 +154,31 @@ type HTTPDNSAppServiceServer interface {
type UnimplementedHTTPDNSAppServiceServer struct{}
func (UnimplementedHTTPDNSAppServiceServer) CreateHTTPDNSApp(context.Context, *CreateHTTPDNSAppRequest) (*CreateHTTPDNSAppResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CreateHTTPDNSApp not implemented")
+ return nil, status.Error(codes.Unimplemented, "method CreateHTTPDNSApp not implemented")
}
func (UnimplementedHTTPDNSAppServiceServer) UpdateHTTPDNSApp(context.Context, *UpdateHTTPDNSAppRequest) (*RPCSuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method UpdateHTTPDNSApp not implemented")
+ return nil, status.Error(codes.Unimplemented, "method UpdateHTTPDNSApp not implemented")
}
func (UnimplementedHTTPDNSAppServiceServer) DeleteHTTPDNSApp(context.Context, *DeleteHTTPDNSAppRequest) (*RPCSuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method DeleteHTTPDNSApp not implemented")
+ return nil, status.Error(codes.Unimplemented, "method DeleteHTTPDNSApp not implemented")
}
func (UnimplementedHTTPDNSAppServiceServer) FindHTTPDNSApp(context.Context, *FindHTTPDNSAppRequest) (*FindHTTPDNSAppResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method FindHTTPDNSApp not implemented")
+ return nil, status.Error(codes.Unimplemented, "method FindHTTPDNSApp not implemented")
}
func (UnimplementedHTTPDNSAppServiceServer) ListHTTPDNSApps(context.Context, *ListHTTPDNSAppsRequest) (*ListHTTPDNSAppsResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method ListHTTPDNSApps not implemented")
+ return nil, status.Error(codes.Unimplemented, "method ListHTTPDNSApps not implemented")
}
func (UnimplementedHTTPDNSAppServiceServer) FindAllHTTPDNSApps(context.Context, *FindAllHTTPDNSAppsRequest) (*FindAllHTTPDNSAppsResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method FindAllHTTPDNSApps not implemented")
+ return nil, status.Error(codes.Unimplemented, "method FindAllHTTPDNSApps not implemented")
}
func (UnimplementedHTTPDNSAppServiceServer) UpdateHTTPDNSAppSignEnabled(context.Context, *UpdateHTTPDNSAppSignEnabledRequest) (*RPCSuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method UpdateHTTPDNSAppSignEnabled not implemented")
+ return nil, status.Error(codes.Unimplemented, "method UpdateHTTPDNSAppSignEnabled not implemented")
}
func (UnimplementedHTTPDNSAppServiceServer) ResetHTTPDNSAppSignSecret(context.Context, *ResetHTTPDNSAppSignSecretRequest) (*ResetHTTPDNSAppSignSecretResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method ResetHTTPDNSAppSignSecret not implemented")
+ return nil, status.Error(codes.Unimplemented, "method ResetHTTPDNSAppSignSecret not implemented")
}
-func (UnimplementedHTTPDNSAppServiceServer) testEmbeddedByValue() {}
+func (UnimplementedHTTPDNSAppServiceServer) mustEmbedUnimplementedHTTPDNSAppServiceServer() {}
+func (UnimplementedHTTPDNSAppServiceServer) testEmbeddedByValue() {}
// UnsafeHTTPDNSAppServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to HTTPDNSAppServiceServer will
@@ -186,7 +188,7 @@ type UnsafeHTTPDNSAppServiceServer interface {
}
func RegisterHTTPDNSAppServiceServer(s grpc.ServiceRegistrar, srv HTTPDNSAppServiceServer) {
- // If the following call pancis, it indicates UnimplementedHTTPDNSAppServiceServer was
+ // If the following call panics, it indicates UnimplementedHTTPDNSAppServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
diff --git a/EdgeCommon/pkg/rpc/pb/service_httpdns_node.pb.go b/EdgeCommon/pkg/rpc/pb/service_httpdns_node.pb.go
index 8c0e5b3..a89dbef 100644
--- a/EdgeCommon/pkg/rpc/pb/service_httpdns_node.pb.go
+++ b/EdgeCommon/pkg/rpc/pb/service_httpdns_node.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.35.1
+// protoc-gen-go v1.36.11
// protoc v3.21.12
// source: service_httpdns_node.proto
@@ -11,6 +11,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -21,14 +22,13 @@ const (
)
type CreateHTTPDNSNodeRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ClusterId int64 `protobuf:"varint,1,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ InstallDir string `protobuf:"bytes,3,opt,name=installDir,proto3" json:"installDir,omitempty"`
+ IsOn bool `protobuf:"varint,4,opt,name=isOn,proto3" json:"isOn,omitempty"`
unknownFields protoimpl.UnknownFields
-
- ClusterId int64 `protobuf:"varint,1,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
- Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
- InstallDir string `protobuf:"bytes,3,opt,name=installDir,proto3" json:"installDir,omitempty"`
- IsOn bool `protobuf:"varint,4,opt,name=isOn,proto3" json:"isOn,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *CreateHTTPDNSNodeRequest) Reset() {
@@ -90,11 +90,10 @@ func (x *CreateHTTPDNSNodeRequest) GetIsOn() bool {
}
type CreateHTTPDNSNodeResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ NodeId int64 `protobuf:"varint,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
unknownFields protoimpl.UnknownFields
-
- NodeId int64 `protobuf:"varint,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *CreateHTTPDNSNodeResponse) Reset() {
@@ -135,14 +134,13 @@ func (x *CreateHTTPDNSNodeResponse) GetNodeId() int64 {
}
type UpdateHTTPDNSNodeRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ NodeId int64 `protobuf:"varint,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ InstallDir string `protobuf:"bytes,3,opt,name=installDir,proto3" json:"installDir,omitempty"`
+ IsOn bool `protobuf:"varint,4,opt,name=isOn,proto3" json:"isOn,omitempty"`
unknownFields protoimpl.UnknownFields
-
- NodeId int64 `protobuf:"varint,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
- Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
- InstallDir string `protobuf:"bytes,3,opt,name=installDir,proto3" json:"installDir,omitempty"`
- IsOn bool `protobuf:"varint,4,opt,name=isOn,proto3" json:"isOn,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *UpdateHTTPDNSNodeRequest) Reset() {
@@ -204,11 +202,10 @@ func (x *UpdateHTTPDNSNodeRequest) GetIsOn() bool {
}
type DeleteHTTPDNSNodeRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ NodeId int64 `protobuf:"varint,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
unknownFields protoimpl.UnknownFields
-
- NodeId int64 `protobuf:"varint,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *DeleteHTTPDNSNodeRequest) Reset() {
@@ -249,11 +246,10 @@ func (x *DeleteHTTPDNSNodeRequest) GetNodeId() int64 {
}
type FindHTTPDNSNodeRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ NodeId int64 `protobuf:"varint,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
unknownFields protoimpl.UnknownFields
-
- NodeId int64 `protobuf:"varint,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *FindHTTPDNSNodeRequest) Reset() {
@@ -294,11 +290,10 @@ func (x *FindHTTPDNSNodeRequest) GetNodeId() int64 {
}
type FindHTTPDNSNodeResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Node *HTTPDNSNode `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Node *HTTPDNSNode `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *FindHTTPDNSNodeResponse) Reset() {
@@ -339,11 +334,10 @@ func (x *FindHTTPDNSNodeResponse) GetNode() *HTTPDNSNode {
}
type ListHTTPDNSNodesRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ClusterId int64 `protobuf:"varint,1,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
unknownFields protoimpl.UnknownFields
-
- ClusterId int64 `protobuf:"varint,1,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ListHTTPDNSNodesRequest) Reset() {
@@ -384,11 +378,10 @@ func (x *ListHTTPDNSNodesRequest) GetClusterId() int64 {
}
type ListHTTPDNSNodesResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Nodes []*HTTPDNSNode `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Nodes []*HTTPDNSNode `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ListHTTPDNSNodesResponse) Reset() {
@@ -429,16 +422,15 @@ func (x *ListHTTPDNSNodesResponse) GetNodes() []*HTTPDNSNode {
}
type UpdateHTTPDNSNodeStatusRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- NodeId int64 `protobuf:"varint,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
- IsUp bool `protobuf:"varint,2,opt,name=isUp,proto3" json:"isUp,omitempty"`
- IsInstalled bool `protobuf:"varint,3,opt,name=isInstalled,proto3" json:"isInstalled,omitempty"`
- IsActive bool `protobuf:"varint,4,opt,name=isActive,proto3" json:"isActive,omitempty"`
- StatusJSON []byte `protobuf:"bytes,5,opt,name=statusJSON,proto3" json:"statusJSON,omitempty"`
- InstallStatusJSON []byte `protobuf:"bytes,6,opt,name=installStatusJSON,proto3" json:"installStatusJSON,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ NodeId int64 `protobuf:"varint,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
+ IsUp bool `protobuf:"varint,2,opt,name=isUp,proto3" json:"isUp,omitempty"`
+ IsInstalled bool `protobuf:"varint,3,opt,name=isInstalled,proto3" json:"isInstalled,omitempty"`
+ IsActive bool `protobuf:"varint,4,opt,name=isActive,proto3" json:"isActive,omitempty"`
+ StatusJSON []byte `protobuf:"bytes,5,opt,name=statusJSON,proto3" json:"statusJSON,omitempty"`
+ InstallStatusJSON []byte `protobuf:"bytes,6,opt,name=installStatusJSON,proto3" json:"installStatusJSON,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *UpdateHTTPDNSNodeStatusRequest) Reset() {
@@ -513,112 +505,124 @@ func (x *UpdateHTTPDNSNodeStatusRequest) GetInstallStatusJSON() []byte {
return nil
}
+// 修改HTTPDNS节点登录信息
+type UpdateHTTPDNSNodeLoginRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ NodeId int64 `protobuf:"varint,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
+ NodeLogin *NodeLogin `protobuf:"bytes,2,opt,name=nodeLogin,proto3" json:"nodeLogin,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *UpdateHTTPDNSNodeLoginRequest) Reset() {
+ *x = UpdateHTTPDNSNodeLoginRequest{}
+ mi := &file_service_httpdns_node_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *UpdateHTTPDNSNodeLoginRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateHTTPDNSNodeLoginRequest) ProtoMessage() {}
+
+func (x *UpdateHTTPDNSNodeLoginRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_service_httpdns_node_proto_msgTypes[9]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UpdateHTTPDNSNodeLoginRequest.ProtoReflect.Descriptor instead.
+func (*UpdateHTTPDNSNodeLoginRequest) Descriptor() ([]byte, []int) {
+ return file_service_httpdns_node_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *UpdateHTTPDNSNodeLoginRequest) GetNodeId() int64 {
+ if x != nil {
+ return x.NodeId
+ }
+ return 0
+}
+
+func (x *UpdateHTTPDNSNodeLoginRequest) GetNodeLogin() *NodeLogin {
+ if x != nil {
+ return x.NodeLogin
+ }
+ return nil
+}
+
var File_service_httpdns_node_proto protoreflect.FileDescriptor
-var file_service_httpdns_node_proto_rawDesc = []byte{
- 0x0a, 0x1a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x64, 0x6e,
- 0x73, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62,
- 0x1a, 0x1f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x68,
- 0x74, 0x74, 0x70, 0x64, 0x6e, 0x73, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x1a, 0x19, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65,
- 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x80, 0x01, 0x0a,
- 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x4e, 0x6f,
- 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75,
- 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6c,
- 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69,
- 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x44, 0x69, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x44, 0x69, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x69,
- 0x73, 0x4f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x22,
- 0x33, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53,
- 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06,
- 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f,
- 0x64, 0x65, 0x49, 0x64, 0x22, 0x7a, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54,
- 0x54, 0x50, 0x44, 0x4e, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
- 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a,
- 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x44, 0x69, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x44, 0x69, 0x72, 0x12, 0x12, 0x0a, 0x04,
- 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e,
- 0x22, 0x32, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e,
- 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06,
- 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f,
- 0x64, 0x65, 0x49, 0x64, 0x22, 0x30, 0x0a, 0x16, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50,
- 0x44, 0x4e, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16,
- 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
- 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0x3e, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54,
- 0x54, 0x50, 0x44, 0x4e, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x12, 0x23, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x4e, 0x6f, 0x64, 0x65,
- 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x22, 0x37, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x54,
- 0x54, 0x50, 0x44, 0x4e, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22,
- 0x41, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x4e, 0x6f,
- 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x6e,
- 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e,
- 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64,
- 0x65, 0x73, 0x22, 0xd8, 0x01, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54,
- 0x50, 0x44, 0x4e, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a,
- 0x04, 0x69, 0x73, 0x55, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x55,
- 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c,
- 0x6c, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18,
- 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12,
- 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x05, 0x20,
- 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12,
- 0x2c, 0x0a, 0x11, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
- 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x69, 0x6e, 0x73, 0x74,
- 0x61, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x32, 0xd6, 0x03,
- 0x0a, 0x12, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72,
- 0x76, 0x69, 0x63, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54,
- 0x54, 0x50, 0x44, 0x4e, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x43,
- 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x4e, 0x6f, 0x64, 0x65,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65,
- 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
- 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x62,
- 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x4e, 0x6f,
- 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52,
- 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x41, 0x0a, 0x11, 0x64, 0x65, 0x6c,
- 0x65, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1c,
- 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e,
- 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70,
- 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x4a, 0x0a, 0x0f,
- 0x66, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x12,
- 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53,
- 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62,
- 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x4e, 0x6f, 0x64, 0x65,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x10, 0x6c, 0x69, 0x73, 0x74,
- 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x70,
- 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x4e, 0x6f, 0x64,
- 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x4c,
- 0x69, 0x73, 0x74, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x17, 0x75, 0x70, 0x64, 0x61, 0x74,
- 0x65, 0x48, 0x54, 0x54, 0x50, 0x44, 0x4e, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74,
- 0x75, 0x73, 0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54,
- 0x54, 0x50, 0x44, 0x4e, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53,
- 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+const file_service_httpdns_node_proto_rawDesc = "" +
+ "\n" +
+ "\x1aservice_httpdns_node.proto\x12\x02pb\x1a\x1fmodels/model_httpdns_node.proto\x1a\x1dmodels/model_node_login.proto\x1a\x19models/rpc_messages.proto\"\x80\x01\n" +
+ "\x18CreateHTTPDNSNodeRequest\x12\x1c\n" +
+ "\tclusterId\x18\x01 \x01(\x03R\tclusterId\x12\x12\n" +
+ "\x04name\x18\x02 \x01(\tR\x04name\x12\x1e\n" +
+ "\n" +
+ "installDir\x18\x03 \x01(\tR\n" +
+ "installDir\x12\x12\n" +
+ "\x04isOn\x18\x04 \x01(\bR\x04isOn\"3\n" +
+ "\x19CreateHTTPDNSNodeResponse\x12\x16\n" +
+ "\x06nodeId\x18\x01 \x01(\x03R\x06nodeId\"z\n" +
+ "\x18UpdateHTTPDNSNodeRequest\x12\x16\n" +
+ "\x06nodeId\x18\x01 \x01(\x03R\x06nodeId\x12\x12\n" +
+ "\x04name\x18\x02 \x01(\tR\x04name\x12\x1e\n" +
+ "\n" +
+ "installDir\x18\x03 \x01(\tR\n" +
+ "installDir\x12\x12\n" +
+ "\x04isOn\x18\x04 \x01(\bR\x04isOn\"2\n" +
+ "\x18DeleteHTTPDNSNodeRequest\x12\x16\n" +
+ "\x06nodeId\x18\x01 \x01(\x03R\x06nodeId\"0\n" +
+ "\x16FindHTTPDNSNodeRequest\x12\x16\n" +
+ "\x06nodeId\x18\x01 \x01(\x03R\x06nodeId\">\n" +
+ "\x17FindHTTPDNSNodeResponse\x12#\n" +
+ "\x04node\x18\x01 \x01(\v2\x0f.pb.HTTPDNSNodeR\x04node\"7\n" +
+ "\x17ListHTTPDNSNodesRequest\x12\x1c\n" +
+ "\tclusterId\x18\x01 \x01(\x03R\tclusterId\"A\n" +
+ "\x18ListHTTPDNSNodesResponse\x12%\n" +
+ "\x05nodes\x18\x01 \x03(\v2\x0f.pb.HTTPDNSNodeR\x05nodes\"\xd8\x01\n" +
+ "\x1eUpdateHTTPDNSNodeStatusRequest\x12\x16\n" +
+ "\x06nodeId\x18\x01 \x01(\x03R\x06nodeId\x12\x12\n" +
+ "\x04isUp\x18\x02 \x01(\bR\x04isUp\x12 \n" +
+ "\visInstalled\x18\x03 \x01(\bR\visInstalled\x12\x1a\n" +
+ "\bisActive\x18\x04 \x01(\bR\bisActive\x12\x1e\n" +
+ "\n" +
+ "statusJSON\x18\x05 \x01(\fR\n" +
+ "statusJSON\x12,\n" +
+ "\x11installStatusJSON\x18\x06 \x01(\fR\x11installStatusJSON\"d\n" +
+ "\x1dUpdateHTTPDNSNodeLoginRequest\x12\x16\n" +
+ "\x06nodeId\x18\x01 \x01(\x03R\x06nodeId\x12+\n" +
+ "\tnodeLogin\x18\x02 \x01(\v2\r.pb.NodeLoginR\tnodeLogin2\xa3\x04\n" +
+ "\x12HTTPDNSNodeService\x12P\n" +
+ "\x11createHTTPDNSNode\x12\x1c.pb.CreateHTTPDNSNodeRequest\x1a\x1d.pb.CreateHTTPDNSNodeResponse\x12A\n" +
+ "\x11updateHTTPDNSNode\x12\x1c.pb.UpdateHTTPDNSNodeRequest\x1a\x0e.pb.RPCSuccess\x12A\n" +
+ "\x11deleteHTTPDNSNode\x12\x1c.pb.DeleteHTTPDNSNodeRequest\x1a\x0e.pb.RPCSuccess\x12J\n" +
+ "\x0ffindHTTPDNSNode\x12\x1a.pb.FindHTTPDNSNodeRequest\x1a\x1b.pb.FindHTTPDNSNodeResponse\x12M\n" +
+ "\x10listHTTPDNSNodes\x12\x1b.pb.ListHTTPDNSNodesRequest\x1a\x1c.pb.ListHTTPDNSNodesResponse\x12M\n" +
+ "\x17updateHTTPDNSNodeStatus\x12\".pb.UpdateHTTPDNSNodeStatusRequest\x1a\x0e.pb.RPCSuccess\x12K\n" +
+ "\x16updateHTTPDNSNodeLogin\x12!.pb.UpdateHTTPDNSNodeLoginRequest\x1a\x0e.pb.RPCSuccessB\x06Z\x04./pbb\x06proto3"
var (
file_service_httpdns_node_proto_rawDescOnce sync.Once
- file_service_httpdns_node_proto_rawDescData = file_service_httpdns_node_proto_rawDesc
+ file_service_httpdns_node_proto_rawDescData []byte
)
func file_service_httpdns_node_proto_rawDescGZIP() []byte {
file_service_httpdns_node_proto_rawDescOnce.Do(func() {
- file_service_httpdns_node_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_httpdns_node_proto_rawDescData)
+ file_service_httpdns_node_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_service_httpdns_node_proto_rawDesc), len(file_service_httpdns_node_proto_rawDesc)))
})
return file_service_httpdns_node_proto_rawDescData
}
-var file_service_httpdns_node_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
+var file_service_httpdns_node_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
var file_service_httpdns_node_proto_goTypes = []any{
(*CreateHTTPDNSNodeRequest)(nil), // 0: pb.CreateHTTPDNSNodeRequest
(*CreateHTTPDNSNodeResponse)(nil), // 1: pb.CreateHTTPDNSNodeResponse
@@ -629,29 +633,34 @@ var file_service_httpdns_node_proto_goTypes = []any{
(*ListHTTPDNSNodesRequest)(nil), // 6: pb.ListHTTPDNSNodesRequest
(*ListHTTPDNSNodesResponse)(nil), // 7: pb.ListHTTPDNSNodesResponse
(*UpdateHTTPDNSNodeStatusRequest)(nil), // 8: pb.UpdateHTTPDNSNodeStatusRequest
- (*HTTPDNSNode)(nil), // 9: pb.HTTPDNSNode
- (*RPCSuccess)(nil), // 10: pb.RPCSuccess
+ (*UpdateHTTPDNSNodeLoginRequest)(nil), // 9: pb.UpdateHTTPDNSNodeLoginRequest
+ (*HTTPDNSNode)(nil), // 10: pb.HTTPDNSNode
+ (*NodeLogin)(nil), // 11: pb.NodeLogin
+ (*RPCSuccess)(nil), // 12: pb.RPCSuccess
}
var file_service_httpdns_node_proto_depIdxs = []int32{
- 9, // 0: pb.FindHTTPDNSNodeResponse.node:type_name -> pb.HTTPDNSNode
- 9, // 1: pb.ListHTTPDNSNodesResponse.nodes:type_name -> pb.HTTPDNSNode
- 0, // 2: pb.HTTPDNSNodeService.createHTTPDNSNode:input_type -> pb.CreateHTTPDNSNodeRequest
- 2, // 3: pb.HTTPDNSNodeService.updateHTTPDNSNode:input_type -> pb.UpdateHTTPDNSNodeRequest
- 3, // 4: pb.HTTPDNSNodeService.deleteHTTPDNSNode:input_type -> pb.DeleteHTTPDNSNodeRequest
- 4, // 5: pb.HTTPDNSNodeService.findHTTPDNSNode:input_type -> pb.FindHTTPDNSNodeRequest
- 6, // 6: pb.HTTPDNSNodeService.listHTTPDNSNodes:input_type -> pb.ListHTTPDNSNodesRequest
- 8, // 7: pb.HTTPDNSNodeService.updateHTTPDNSNodeStatus:input_type -> pb.UpdateHTTPDNSNodeStatusRequest
- 1, // 8: pb.HTTPDNSNodeService.createHTTPDNSNode:output_type -> pb.CreateHTTPDNSNodeResponse
- 10, // 9: pb.HTTPDNSNodeService.updateHTTPDNSNode:output_type -> pb.RPCSuccess
- 10, // 10: pb.HTTPDNSNodeService.deleteHTTPDNSNode:output_type -> pb.RPCSuccess
- 5, // 11: pb.HTTPDNSNodeService.findHTTPDNSNode:output_type -> pb.FindHTTPDNSNodeResponse
- 7, // 12: pb.HTTPDNSNodeService.listHTTPDNSNodes:output_type -> pb.ListHTTPDNSNodesResponse
- 10, // 13: pb.HTTPDNSNodeService.updateHTTPDNSNodeStatus:output_type -> pb.RPCSuccess
- 8, // [8:14] is the sub-list for method output_type
- 2, // [2:8] is the sub-list for method input_type
- 2, // [2:2] is the sub-list for extension type_name
- 2, // [2:2] is the sub-list for extension extendee
- 0, // [0:2] is the sub-list for field type_name
+ 10, // 0: pb.FindHTTPDNSNodeResponse.node:type_name -> pb.HTTPDNSNode
+ 10, // 1: pb.ListHTTPDNSNodesResponse.nodes:type_name -> pb.HTTPDNSNode
+ 11, // 2: pb.UpdateHTTPDNSNodeLoginRequest.nodeLogin:type_name -> pb.NodeLogin
+ 0, // 3: pb.HTTPDNSNodeService.createHTTPDNSNode:input_type -> pb.CreateHTTPDNSNodeRequest
+ 2, // 4: pb.HTTPDNSNodeService.updateHTTPDNSNode:input_type -> pb.UpdateHTTPDNSNodeRequest
+ 3, // 5: pb.HTTPDNSNodeService.deleteHTTPDNSNode:input_type -> pb.DeleteHTTPDNSNodeRequest
+ 4, // 6: pb.HTTPDNSNodeService.findHTTPDNSNode:input_type -> pb.FindHTTPDNSNodeRequest
+ 6, // 7: pb.HTTPDNSNodeService.listHTTPDNSNodes:input_type -> pb.ListHTTPDNSNodesRequest
+ 8, // 8: pb.HTTPDNSNodeService.updateHTTPDNSNodeStatus:input_type -> pb.UpdateHTTPDNSNodeStatusRequest
+ 9, // 9: pb.HTTPDNSNodeService.updateHTTPDNSNodeLogin:input_type -> pb.UpdateHTTPDNSNodeLoginRequest
+ 1, // 10: pb.HTTPDNSNodeService.createHTTPDNSNode:output_type -> pb.CreateHTTPDNSNodeResponse
+ 12, // 11: pb.HTTPDNSNodeService.updateHTTPDNSNode:output_type -> pb.RPCSuccess
+ 12, // 12: pb.HTTPDNSNodeService.deleteHTTPDNSNode:output_type -> pb.RPCSuccess
+ 5, // 13: pb.HTTPDNSNodeService.findHTTPDNSNode:output_type -> pb.FindHTTPDNSNodeResponse
+ 7, // 14: pb.HTTPDNSNodeService.listHTTPDNSNodes:output_type -> pb.ListHTTPDNSNodesResponse
+ 12, // 15: pb.HTTPDNSNodeService.updateHTTPDNSNodeStatus:output_type -> pb.RPCSuccess
+ 12, // 16: pb.HTTPDNSNodeService.updateHTTPDNSNodeLogin:output_type -> pb.RPCSuccess
+ 10, // [10:17] is the sub-list for method output_type
+ 3, // [3:10] is the sub-list for method input_type
+ 3, // [3:3] is the sub-list for extension type_name
+ 3, // [3:3] is the sub-list for extension extendee
+ 0, // [0:3] is the sub-list for field type_name
}
func init() { file_service_httpdns_node_proto_init() }
@@ -660,14 +669,15 @@ func file_service_httpdns_node_proto_init() {
return
}
file_models_model_httpdns_node_proto_init()
+ file_models_model_node_login_proto_init()
file_models_rpc_messages_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_service_httpdns_node_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_service_httpdns_node_proto_rawDesc), len(file_service_httpdns_node_proto_rawDesc)),
NumEnums: 0,
- NumMessages: 9,
+ NumMessages: 10,
NumExtensions: 0,
NumServices: 1,
},
@@ -676,7 +686,6 @@ func file_service_httpdns_node_proto_init() {
MessageInfos: file_service_httpdns_node_proto_msgTypes,
}.Build()
File_service_httpdns_node_proto = out.File
- file_service_httpdns_node_proto_rawDesc = nil
file_service_httpdns_node_proto_goTypes = nil
file_service_httpdns_node_proto_depIdxs = nil
}
diff --git a/EdgeCommon/pkg/rpc/pb/service_httpdns_node_grpc.pb.go b/EdgeCommon/pkg/rpc/pb/service_httpdns_node_grpc.pb.go
index 51b3cd5..0d8f9e8 100644
--- a/EdgeCommon/pkg/rpc/pb/service_httpdns_node_grpc.pb.go
+++ b/EdgeCommon/pkg/rpc/pb/service_httpdns_node_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.5.1
+// - protoc-gen-go-grpc v1.6.1
// - protoc v3.21.12
// source: service_httpdns_node.proto
@@ -25,6 +25,7 @@ const (
HTTPDNSNodeService_FindHTTPDNSNode_FullMethodName = "/pb.HTTPDNSNodeService/findHTTPDNSNode"
HTTPDNSNodeService_ListHTTPDNSNodes_FullMethodName = "/pb.HTTPDNSNodeService/listHTTPDNSNodes"
HTTPDNSNodeService_UpdateHTTPDNSNodeStatus_FullMethodName = "/pb.HTTPDNSNodeService/updateHTTPDNSNodeStatus"
+ HTTPDNSNodeService_UpdateHTTPDNSNodeLogin_FullMethodName = "/pb.HTTPDNSNodeService/updateHTTPDNSNodeLogin"
)
// HTTPDNSNodeServiceClient is the client API for HTTPDNSNodeService service.
@@ -37,6 +38,8 @@ type HTTPDNSNodeServiceClient interface {
FindHTTPDNSNode(ctx context.Context, in *FindHTTPDNSNodeRequest, opts ...grpc.CallOption) (*FindHTTPDNSNodeResponse, error)
ListHTTPDNSNodes(ctx context.Context, in *ListHTTPDNSNodesRequest, opts ...grpc.CallOption) (*ListHTTPDNSNodesResponse, error)
UpdateHTTPDNSNodeStatus(ctx context.Context, in *UpdateHTTPDNSNodeStatusRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
+ // 修改HTTPDNS节点登录信息
+ UpdateHTTPDNSNodeLogin(ctx context.Context, in *UpdateHTTPDNSNodeLoginRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
}
type hTTPDNSNodeServiceClient struct {
@@ -107,8 +110,18 @@ func (c *hTTPDNSNodeServiceClient) UpdateHTTPDNSNodeStatus(ctx context.Context,
return out, nil
}
+func (c *hTTPDNSNodeServiceClient) UpdateHTTPDNSNodeLogin(ctx context.Context, in *UpdateHTTPDNSNodeLoginRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(RPCSuccess)
+ err := c.cc.Invoke(ctx, HTTPDNSNodeService_UpdateHTTPDNSNodeLogin_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
// HTTPDNSNodeServiceServer is the server API for HTTPDNSNodeService service.
-// All implementations should embed UnimplementedHTTPDNSNodeServiceServer
+// All implementations must embed UnimplementedHTTPDNSNodeServiceServer
// for forward compatibility.
type HTTPDNSNodeServiceServer interface {
CreateHTTPDNSNode(context.Context, *CreateHTTPDNSNodeRequest) (*CreateHTTPDNSNodeResponse, error)
@@ -117,9 +130,12 @@ type HTTPDNSNodeServiceServer interface {
FindHTTPDNSNode(context.Context, *FindHTTPDNSNodeRequest) (*FindHTTPDNSNodeResponse, error)
ListHTTPDNSNodes(context.Context, *ListHTTPDNSNodesRequest) (*ListHTTPDNSNodesResponse, error)
UpdateHTTPDNSNodeStatus(context.Context, *UpdateHTTPDNSNodeStatusRequest) (*RPCSuccess, error)
+ // 修改HTTPDNS节点登录信息
+ UpdateHTTPDNSNodeLogin(context.Context, *UpdateHTTPDNSNodeLoginRequest) (*RPCSuccess, error)
+ mustEmbedUnimplementedHTTPDNSNodeServiceServer()
}
-// UnimplementedHTTPDNSNodeServiceServer should be embedded to have
+// UnimplementedHTTPDNSNodeServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
@@ -127,24 +143,28 @@ type HTTPDNSNodeServiceServer interface {
type UnimplementedHTTPDNSNodeServiceServer struct{}
func (UnimplementedHTTPDNSNodeServiceServer) CreateHTTPDNSNode(context.Context, *CreateHTTPDNSNodeRequest) (*CreateHTTPDNSNodeResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CreateHTTPDNSNode not implemented")
+ return nil, status.Error(codes.Unimplemented, "method CreateHTTPDNSNode not implemented")
}
func (UnimplementedHTTPDNSNodeServiceServer) UpdateHTTPDNSNode(context.Context, *UpdateHTTPDNSNodeRequest) (*RPCSuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method UpdateHTTPDNSNode not implemented")
+ return nil, status.Error(codes.Unimplemented, "method UpdateHTTPDNSNode not implemented")
}
func (UnimplementedHTTPDNSNodeServiceServer) DeleteHTTPDNSNode(context.Context, *DeleteHTTPDNSNodeRequest) (*RPCSuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method DeleteHTTPDNSNode not implemented")
+ return nil, status.Error(codes.Unimplemented, "method DeleteHTTPDNSNode not implemented")
}
func (UnimplementedHTTPDNSNodeServiceServer) FindHTTPDNSNode(context.Context, *FindHTTPDNSNodeRequest) (*FindHTTPDNSNodeResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method FindHTTPDNSNode not implemented")
+ return nil, status.Error(codes.Unimplemented, "method FindHTTPDNSNode not implemented")
}
func (UnimplementedHTTPDNSNodeServiceServer) ListHTTPDNSNodes(context.Context, *ListHTTPDNSNodesRequest) (*ListHTTPDNSNodesResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method ListHTTPDNSNodes not implemented")
+ return nil, status.Error(codes.Unimplemented, "method ListHTTPDNSNodes not implemented")
}
func (UnimplementedHTTPDNSNodeServiceServer) UpdateHTTPDNSNodeStatus(context.Context, *UpdateHTTPDNSNodeStatusRequest) (*RPCSuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method UpdateHTTPDNSNodeStatus not implemented")
+ return nil, status.Error(codes.Unimplemented, "method UpdateHTTPDNSNodeStatus not implemented")
}
-func (UnimplementedHTTPDNSNodeServiceServer) testEmbeddedByValue() {}
+func (UnimplementedHTTPDNSNodeServiceServer) UpdateHTTPDNSNodeLogin(context.Context, *UpdateHTTPDNSNodeLoginRequest) (*RPCSuccess, error) {
+ return nil, status.Error(codes.Unimplemented, "method UpdateHTTPDNSNodeLogin not implemented")
+}
+func (UnimplementedHTTPDNSNodeServiceServer) mustEmbedUnimplementedHTTPDNSNodeServiceServer() {}
+func (UnimplementedHTTPDNSNodeServiceServer) testEmbeddedByValue() {}
// UnsafeHTTPDNSNodeServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to HTTPDNSNodeServiceServer will
@@ -154,7 +174,7 @@ type UnsafeHTTPDNSNodeServiceServer interface {
}
func RegisterHTTPDNSNodeServiceServer(s grpc.ServiceRegistrar, srv HTTPDNSNodeServiceServer) {
- // If the following call pancis, it indicates UnimplementedHTTPDNSNodeServiceServer was
+ // If the following call panics, it indicates UnimplementedHTTPDNSNodeServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
@@ -272,6 +292,24 @@ func _HTTPDNSNodeService_UpdateHTTPDNSNodeStatus_Handler(srv interface{}, ctx co
return interceptor(ctx, in, info, handler)
}
+func _HTTPDNSNodeService_UpdateHTTPDNSNodeLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(UpdateHTTPDNSNodeLoginRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(HTTPDNSNodeServiceServer).UpdateHTTPDNSNodeLogin(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: HTTPDNSNodeService_UpdateHTTPDNSNodeLogin_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(HTTPDNSNodeServiceServer).UpdateHTTPDNSNodeLogin(ctx, req.(*UpdateHTTPDNSNodeLoginRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
// HTTPDNSNodeService_ServiceDesc is the grpc.ServiceDesc for HTTPDNSNodeService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -303,6 +341,10 @@ var HTTPDNSNodeService_ServiceDesc = grpc.ServiceDesc{
MethodName: "updateHTTPDNSNodeStatus",
Handler: _HTTPDNSNodeService_UpdateHTTPDNSNodeStatus_Handler,
},
+ {
+ MethodName: "updateHTTPDNSNodeLogin",
+ Handler: _HTTPDNSNodeService_UpdateHTTPDNSNodeLogin_Handler,
+ },
},
Streams: []grpc.StreamDesc{},
Metadata: "service_httpdns_node.proto",
diff --git a/EdgeCommon/pkg/rpc/pb/service_user.pb.go b/EdgeCommon/pkg/rpc/pb/service_user.pb.go
index 865cd1c..5940c43 100644
--- a/EdgeCommon/pkg/rpc/pb/service_user.pb.go
+++ b/EdgeCommon/pkg/rpc/pb/service_user.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.36.0
-// protoc v6.33.2
+// protoc-gen-go v1.36.11
+// protoc v3.21.12
// source: service_user.proto
package pb
@@ -11,6 +11,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -381,20 +382,21 @@ func (x *VerifyUserRequest) GetRejectReason() string {
// 修改用户
type UpdateUserRequest struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"`
- Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
- Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
- Fullname string `protobuf:"bytes,4,opt,name=fullname,proto3" json:"fullname,omitempty"`
- Mobile string `protobuf:"bytes,5,opt,name=mobile,proto3" json:"mobile,omitempty"`
- Tel string `protobuf:"bytes,6,opt,name=tel,proto3" json:"tel,omitempty"`
- Email string `protobuf:"bytes,7,opt,name=email,proto3" json:"email,omitempty"`
- Remark string `protobuf:"bytes,8,opt,name=remark,proto3" json:"remark,omitempty"`
- IsOn bool `protobuf:"varint,9,opt,name=isOn,proto3" json:"isOn,omitempty"`
- NodeClusterId int64 `protobuf:"varint,10,opt,name=nodeClusterId,proto3" json:"nodeClusterId,omitempty"`
- BandwidthAlgo string `protobuf:"bytes,11,opt,name=bandwidthAlgo,proto3" json:"bandwidthAlgo,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"`
+ Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
+ Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
+ Fullname string `protobuf:"bytes,4,opt,name=fullname,proto3" json:"fullname,omitempty"`
+ Mobile string `protobuf:"bytes,5,opt,name=mobile,proto3" json:"mobile,omitempty"`
+ Tel string `protobuf:"bytes,6,opt,name=tel,proto3" json:"tel,omitempty"`
+ Email string `protobuf:"bytes,7,opt,name=email,proto3" json:"email,omitempty"`
+ Remark string `protobuf:"bytes,8,opt,name=remark,proto3" json:"remark,omitempty"`
+ IsOn bool `protobuf:"varint,9,opt,name=isOn,proto3" json:"isOn,omitempty"`
+ NodeClusterId int64 `protobuf:"varint,10,opt,name=nodeClusterId,proto3" json:"nodeClusterId,omitempty"`
+ BandwidthAlgo string `protobuf:"bytes,11,opt,name=bandwidthAlgo,proto3" json:"bandwidthAlgo,omitempty"`
+ HttpdnsClusterIdsJSON []byte `protobuf:"bytes,12,opt,name=httpdnsClusterIdsJSON,proto3" json:"httpdnsClusterIdsJSON,omitempty"` // HTTPDNS关联集群ID列表
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *UpdateUserRequest) Reset() {
@@ -504,6 +506,13 @@ func (x *UpdateUserRequest) GetBandwidthAlgo() string {
return ""
}
+func (x *UpdateUserRequest) GetHttpdnsClusterIdsJSON() []byte {
+ if x != nil {
+ return x.HttpdnsClusterIdsJSON
+ }
+ return nil
+}
+
// 删除用户
type DeleteUserRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
@@ -2842,511 +2851,235 @@ func (x *ComposeUserGlobalBoardResponse_TrafficStat) GetBytes() int64 {
var File_service_user_proto protoreflect.FileDescriptor
-var file_service_user_proto_rawDesc = []byte{
- 0x0a, 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x19, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73,
- 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65,
- 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6d, 0x6f,
- 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f,
- 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x6d,
- 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65,
- 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfd, 0x01, 0x0a,
- 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a,
- 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75,
- 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75,
- 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65,
- 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x12, 0x10,
- 0x0a, 0x03, 0x74, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x65, 0x6c,
- 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b,
- 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x16,
- 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c,
- 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6e,
- 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x2c, 0x0a, 0x12,
- 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0xbf, 0x01, 0x0a, 0x13, 0x52,
- 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a,
- 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f,
- 0x62, 0x69, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x62, 0x69,
- 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c,
- 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c,
- 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x02, 0x69, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x07,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x6a, 0x0a, 0x14,
- 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x3a, 0x0a, 0x18,
- 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69,
- 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18,
- 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69,
- 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6f, 0x0a, 0x11, 0x56, 0x65, 0x72, 0x69,
- 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a,
- 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75,
- 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x52, 0x65, 0x6a, 0x65, 0x63,
- 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x52, 0x65, 0x6a,
- 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x52,
- 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x6a,
- 0x65, 0x63, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0xb7, 0x02, 0x0a, 0x11, 0x55, 0x70,
- 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
- 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
- 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e,
- 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e,
- 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12,
- 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d,
- 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x62,
- 0x69, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x03, 0x74, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x07,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x72,
- 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x6d,
- 0x61, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28,
- 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43,
- 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d,
- 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x24, 0x0a,
- 0x0d, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x41, 0x6c, 0x67, 0x6f, 0x18, 0x0b,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x41,
- 0x6c, 0x67, 0x6f, 0x22, 0x2b, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65,
- 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72,
- 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
- 0x22, 0x85, 0x01, 0x0a, 0x1b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61,
- 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x73,
- 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
- 0x0b, 0x69, 0x73, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x69, 0x6e, 0x67, 0x12, 0x2a, 0x0a, 0x10,
- 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x49, 0x73, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x49, 0x73,
- 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x22, 0xad, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73,
- 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x20,
- 0x0a, 0x0b, 0x69, 0x73, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20,
- 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x69, 0x6e, 0x67,
- 0x12, 0x2a, 0x0a, 0x10, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x49, 0x73, 0x56, 0x65, 0x72, 0x69,
- 0x66, 0x69, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x6d, 0x6f, 0x62, 0x69,
- 0x6c, 0x65, 0x49, 0x73, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06,
- 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66,
- 0x66, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01,
- 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x3a, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74,
- 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20,
- 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75,
- 0x73, 0x65, 0x72, 0x73, 0x22, 0x30, 0x0a, 0x16, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62,
- 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16,
- 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
- 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x37, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
- 0x61, 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x12, 0x1c, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22,
- 0x4e, 0x0a, 0x18, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72,
- 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75,
- 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65,
- 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22,
- 0x33, 0x0a, 0x19, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72,
- 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06,
- 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78,
- 0x69, 0x73, 0x74, 0x73, 0x22, 0x4a, 0x0a, 0x10, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x55, 0x73, 0x65,
- 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72,
- 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72,
- 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
- 0x22, 0x59, 0x0a, 0x11, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a,
- 0x04, 0x69, 0x73, 0x4f, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f,
- 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x79, 0x0a, 0x15, 0x55,
- 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08,
- 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
- 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x62, 0x69,
- 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65,
- 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x68, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
- 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
- 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72,
- 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72,
- 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
- 0x22, 0x35, 0x0a, 0x1b, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44,
- 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
- 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
- 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0xa7, 0x07, 0x0a, 0x1c, 0x43, 0x6f, 0x6d, 0x70,
- 0x6f, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x75, 0x6e,
- 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c,
- 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x30, 0x0a, 0x13,
- 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x42, 0x79,
- 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x6d, 0x6f, 0x6e, 0x74, 0x68,
- 0x6c, 0x79, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x3c,
- 0x0a, 0x19, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x50, 0x65, 0x65, 0x6b, 0x42, 0x61, 0x6e,
- 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28,
- 0x03, 0x52, 0x19, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x50, 0x65, 0x65, 0x6b, 0x42, 0x61,
- 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x11,
- 0x64, 0x61, 0x69, 0x6c, 0x79, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x42, 0x79, 0x74, 0x65,
- 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x54, 0x72,
- 0x61, 0x66, 0x66, 0x69, 0x63, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x17, 0x64, 0x61,
- 0x69, 0x6c, 0x79, 0x50, 0x65, 0x65, 0x6b, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68,
- 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x64, 0x61, 0x69,
- 0x6c, 0x79, 0x50, 0x65, 0x65, 0x6b, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x42,
- 0x79, 0x74, 0x65, 0x73, 0x12, 0x5f, 0x0a, 0x11, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x54, 0x72, 0x61,
- 0x66, 0x66, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32,
- 0x31, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72,
- 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x2e, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x53, 0x74,
- 0x61, 0x74, 0x52, 0x11, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63,
- 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x71, 0x0a, 0x17, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x50, 0x65,
- 0x65, 0x6b, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x73,
- 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x70,
- 0x6f, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x50, 0x65,
- 0x65, 0x6b, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x52,
- 0x17, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x50, 0x65, 0x65, 0x6b, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69,
- 0x64, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x13, 0x62, 0x61, 0x6e, 0x64,
- 0x77, 0x69, 0x64, 0x74, 0x68, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x18,
- 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68,
- 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x12, 0x38, 0x0a, 0x17, 0x62, 0x61,
- 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x69, 0x6c,
- 0x65, 0x42, 0x69, 0x74, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x62, 0x61, 0x6e,
- 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x69, 0x6c, 0x65,
- 0x42, 0x69, 0x74, 0x73, 0x1a, 0x88, 0x02, 0x0a, 0x10, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x54, 0x72,
- 0x61, 0x66, 0x66, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x61, 0x79,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x61, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x62,
- 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65,
- 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x61, 0x63, 0x68, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x61, 0x63, 0x68, 0x65, 0x64, 0x42, 0x79,
- 0x74, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x42, 0x79, 0x74,
- 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6b,
- 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x6f,
- 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x13, 0x63,
- 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43,
- 0x61, 0x63, 0x68, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x30, 0x0a,
- 0x13, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x63, 0x6f, 0x75, 0x6e,
- 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x1a,
- 0x40, 0x0a, 0x16, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x50, 0x65, 0x65, 0x6b, 0x42, 0x61, 0x6e, 0x64,
- 0x77, 0x69, 0x64, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x61, 0x79,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x61, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x62,
- 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65,
- 0x73, 0x22, 0x36, 0x0a, 0x1c, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x6f, 0x64,
- 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x45, 0x0a, 0x1d, 0x46, 0x69, 0x6e,
- 0x64, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
- 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x6f,
- 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x03, 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64,
- 0x22, 0x57, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65,
- 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a,
- 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75,
- 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65,
- 0x43, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x65, 0x61,
- 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x61, 0x0a, 0x1d, 0x55, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x73, 0x46, 0x65, 0x61, 0x74, 0x75,
- 0x72, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x65,
- 0x61, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09,
- 0x52, 0x0c, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1c,
- 0x0a, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x08, 0x52, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x22, 0x31, 0x0a, 0x17,
- 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49,
- 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22,
- 0x47, 0x0a, 0x18, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x61, 0x74, 0x75,
- 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x08, 0x66,
- 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e,
- 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x08,
- 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0x26, 0x0a, 0x24, 0x46, 0x69, 0x6e, 0x64,
- 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x44, 0x65,
- 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x22, 0x54, 0x0a, 0x25, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x46,
- 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e,
- 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x08, 0x66, 0x65, 0x61,
- 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62,
- 0x2e, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x08, 0x66, 0x65,
- 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73,
- 0x65, 0x55, 0x73, 0x65, 0x72, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72, 0x64,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xa9, 0x06, 0x0a, 0x1e, 0x43, 0x6f, 0x6d, 0x70,
- 0x6f, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61,
- 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f,
- 0x74, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a,
- 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f,
- 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x64, 0x61, 0x79, 0x55, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x03, 0x52, 0x0f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x64, 0x61, 0x79, 0x55,
- 0x73, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x65, 0x65,
- 0x6b, 0x6c, 0x79, 0x55, 0x73, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10,
- 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x65, 0x65, 0x6b, 0x6c, 0x79, 0x55, 0x73, 0x65, 0x72, 0x73,
- 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x6f, 0x64,
- 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55,
- 0x73, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x15, 0x63, 0x6f, 0x75, 0x6e,
- 0x74, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65,
- 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x66,
- 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x30,
- 0x0a, 0x13, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x69, 0x6e, 0x67,
- 0x55, 0x73, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x63, 0x6f, 0x75,
- 0x6e, 0x74, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x69, 0x6e, 0x67, 0x55, 0x73, 0x65, 0x72, 0x73,
- 0x12, 0x4c, 0x0a, 0x0a, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x18, 0x1e,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73,
- 0x65, 0x55, 0x73, 0x65, 0x72, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72, 0x64,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x53, 0x74,
- 0x61, 0x74, 0x52, 0x0a, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x33,
- 0x0a, 0x0d, 0x63, 0x70, 0x75, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18,
- 0x1f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x56,
- 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x63, 0x70, 0x75, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x61, 0x6c,
- 0x75, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x10, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x4e, 0x6f, 0x64,
- 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x20, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e,
- 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x6d, 0x65,
- 0x6d, 0x6f, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x35,
- 0x0a, 0x0e, 0x6c, 0x6f, 0x61, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73,
- 0x18, 0x21, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65,
- 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x6c, 0x6f, 0x61, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x56,
- 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x0f, 0x74, 0x6f, 0x70, 0x54, 0x72, 0x61, 0x66,
- 0x66, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x73, 0x18, 0x22, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e,
- 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x47,
- 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x52, 0x0f,
- 0x74, 0x6f, 0x70, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x73, 0x1a,
- 0x33, 0x0a, 0x09, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x12, 0x10, 0x0a, 0x03,
- 0x64, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x61, 0x79, 0x12, 0x14,
- 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63,
- 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x7d, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x53,
- 0x74, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75,
- 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75,
- 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x75, 0x6e, 0x74,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d,
- 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x14, 0x0a,
- 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x62, 0x79,
- 0x74, 0x65, 0x73, 0x22, 0x3d, 0x0a, 0x1f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72,
- 0x4f, 0x54, 0x50, 0x57, 0x69, 0x74, 0x68, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61,
- 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61,
- 0x6d, 0x65, 0x22, 0x42, 0x0a, 0x20, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x4f,
- 0x54, 0x50, 0x57, 0x69, 0x74, 0x68, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72,
- 0x65, 0x4f, 0x54, 0x50, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x72, 0x65, 0x71, 0x75,
- 0x69, 0x72, 0x65, 0x4f, 0x54, 0x50, 0x22, 0x32, 0x0a, 0x18, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73,
- 0x65, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x5b, 0x0a, 0x19, 0x46, 0x69,
- 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65,
- 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x69, 0x63,
- 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x63, 0x65, 0x50, 0x65,
- 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x63,
- 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x52, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74,
- 0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a,
- 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x58, 0x0a, 0x1c, 0x55,
- 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x50, 0x65,
- 0x72, 0x69, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75,
- 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65,
- 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x63, 0x65, 0x50, 0x65, 0x72, 0x69,
- 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x63, 0x65, 0x50,
- 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x36, 0x0a, 0x1c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73,
- 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x3d, 0x0a,
- 0x1d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
- 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c,
- 0x0a, 0x09, 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x08, 0x52, 0x09, 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x36, 0x0a, 0x1c,
- 0x52, 0x65, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73,
- 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06,
- 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73,
- 0x65, 0x72, 0x49, 0x64, 0x22, 0x3d, 0x0a, 0x1d, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65,
- 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c,
- 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62,
- 0x6c, 0x65, 0x64, 0x22, 0x2d, 0x0a, 0x15, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72,
- 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05,
- 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61,
- 0x69, 0x6c, 0x22, 0x30, 0x0a, 0x16, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x45,
- 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06,
- 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78,
- 0x69, 0x73, 0x74, 0x73, 0x22, 0x30, 0x0a, 0x16, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65,
- 0x72, 0x4d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16,
- 0x0a, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
- 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x22, 0x31, 0x0a, 0x17, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55,
- 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x46, 0x0a, 0x28, 0x46, 0x69, 0x6e,
- 0x64, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x45, 0x6d, 0x61,
- 0x69, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d,
- 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d,
- 0x65, 0x22, 0x41, 0x0a, 0x29, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65, 0x72,
- 0x69, 0x66, 0x69, 0x65, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x55, 0x73,
- 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14,
- 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65,
- 0x6d, 0x61, 0x69, 0x6c, 0x32, 0xae, 0x11, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72,
- 0x76, 0x69, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73,
- 0x65, 0x72, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73,
- 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x43,
- 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65,
- 0x72, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x55,
- 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e,
- 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x55, 0x73,
- 0x65, 0x72, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x55, 0x73,
- 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52,
- 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x33, 0x0a, 0x0a, 0x75, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e,
- 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x33,
- 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x15, 0x2e, 0x70,
- 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63,
- 0x65, 0x73, 0x73, 0x12, 0x4d, 0x0a, 0x14, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45,
- 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x1f, 0x2e, 0x70, 0x62,
- 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
- 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70,
- 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x10, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
- 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74,
- 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61,
- 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
- 0x55, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
- 0x61, 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
- 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a,
- 0x11, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61,
- 0x6d, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65,
- 0x72, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x55,
- 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
- 0x38, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x12, 0x14, 0x2e, 0x70,
- 0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x55, 0x73, 0x65,
- 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0e, 0x75, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x2e, 0x70, 0x62,
- 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53,
- 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x3d, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
- 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x55,
- 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75,
- 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x59, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65,
- 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x12, 0x1f, 0x2e,
- 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61,
- 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20,
- 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44,
- 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x12, 0x5c, 0x0a, 0x15, 0x66, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65,
- 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x46,
- 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74,
- 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x62,
- 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75,
- 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43,
- 0x0a, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x61, 0x74,
- 0x75, 0x72, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
- 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63,
- 0x65, 0x73, 0x73, 0x12, 0x4b, 0x0a, 0x16, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x6c,
- 0x55, 0x73, 0x65, 0x72, 0x73, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x21, 0x2e,
- 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72,
- 0x73, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73,
- 0x12, 0x4d, 0x0a, 0x10, 0x66, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x61, 0x74,
- 0x75, 0x72, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73,
- 0x65, 0x72, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x46,
- 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
- 0x74, 0x0a, 0x1d, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65,
- 0x61, 0x74, 0x75, 0x72, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x12, 0x28, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65,
- 0x72, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69,
- 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x62, 0x2e,
- 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x61, 0x74, 0x75,
- 0x72, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65,
- 0x55, 0x73, 0x65, 0x72, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x12,
- 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72,
- 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x55,
- 0x73, 0x65, 0x72, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x18, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x55,
- 0x73, 0x65, 0x72, 0x4f, 0x54, 0x50, 0x57, 0x69, 0x74, 0x68, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61,
- 0x6d, 0x65, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65,
- 0x72, 0x4f, 0x54, 0x50, 0x57, 0x69, 0x74, 0x68, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x65,
- 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x54, 0x50, 0x57, 0x69, 0x74, 0x68, 0x55, 0x73, 0x65,
- 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a,
- 0x11, 0x66, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x6e,
- 0x66, 0x6f, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72,
- 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72,
- 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
- 0x45, 0x0a, 0x13, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x69,
- 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61,
- 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53,
- 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x49, 0x0a, 0x15, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
- 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12,
- 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x50,
- 0x72, 0x69, 0x63, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73,
- 0x73, 0x12, 0x5c, 0x0a, 0x15, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65,
- 0x72, 0x76, 0x65, 0x72, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e,
- 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73,
- 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70,
- 0x62, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65,
- 0x72, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
- 0x5c, 0x0a, 0x15, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76,
- 0x65, 0x72, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65,
- 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x53, 0x74,
- 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x62, 0x2e,
- 0x52, 0x65, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73,
- 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a,
- 0x0e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12,
- 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6d,
- 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x62, 0x2e,
- 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x55,
- 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x43,
- 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b,
- 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x21, 0x66, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x56,
- 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x57, 0x69, 0x74, 0x68,
- 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69,
- 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x45, 0x6d,
- 0x61, 0x69, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64,
- 0x55, 0x73, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x45, 0x6d, 0x61, 0x69,
- 0x6c, 0x57, 0x69, 0x74, 0x68, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+const file_service_user_proto_rawDesc = "" +
+ "\n" +
+ "\x12service_user.proto\x12\x02pb\x1a\x19models/rpc_messages.proto\x1a\x17models/model_user.proto\x1a\x1fmodels/model_user_feature.proto\x1a\x1dmodels/model_node_value.proto\"\xfd\x01\n" +
+ "\x11CreateUserRequest\x12\x1a\n" +
+ "\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" +
+ "\bpassword\x18\x02 \x01(\tR\bpassword\x12\x1a\n" +
+ "\bfullname\x18\x03 \x01(\tR\bfullname\x12\x16\n" +
+ "\x06mobile\x18\x04 \x01(\tR\x06mobile\x12\x10\n" +
+ "\x03tel\x18\x05 \x01(\tR\x03tel\x12\x14\n" +
+ "\x05email\x18\x06 \x01(\tR\x05email\x12\x16\n" +
+ "\x06remark\x18\a \x01(\tR\x06remark\x12\x16\n" +
+ "\x06source\x18\b \x01(\tR\x06source\x12$\n" +
+ "\rnodeClusterId\x18\t \x01(\x03R\rnodeClusterId\",\n" +
+ "\x12CreateUserResponse\x12\x16\n" +
+ "\x06userId\x18\x01 \x01(\x03R\x06userId\"\xbf\x01\n" +
+ "\x13RegisterUserRequest\x12\x1a\n" +
+ "\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" +
+ "\bpassword\x18\x02 \x01(\tR\bpassword\x12\x16\n" +
+ "\x06mobile\x18\x03 \x01(\tR\x06mobile\x12\x14\n" +
+ "\x05email\x18\x04 \x01(\tR\x05email\x12\x1a\n" +
+ "\bfullname\x18\x05 \x01(\tR\bfullname\x12\x0e\n" +
+ "\x02ip\x18\x06 \x01(\tR\x02ip\x12\x16\n" +
+ "\x06source\x18\a \x01(\tR\x06source\"j\n" +
+ "\x14RegisterUserResponse\x12\x16\n" +
+ "\x06userId\x18\x01 \x01(\x03R\x06userId\x12:\n" +
+ "\x18requireEmailVerification\x18\x02 \x01(\bR\x18requireEmailVerification\"o\n" +
+ "\x11VerifyUserRequest\x12\x16\n" +
+ "\x06userId\x18\x01 \x01(\x03R\x06userId\x12\x1e\n" +
+ "\n" +
+ "isRejected\x18\x02 \x01(\bR\n" +
+ "isRejected\x12\"\n" +
+ "\frejectReason\x18\x03 \x01(\tR\frejectReason\"\xed\x02\n" +
+ "\x11UpdateUserRequest\x12\x16\n" +
+ "\x06userId\x18\x01 \x01(\x03R\x06userId\x12\x1a\n" +
+ "\busername\x18\x02 \x01(\tR\busername\x12\x1a\n" +
+ "\bpassword\x18\x03 \x01(\tR\bpassword\x12\x1a\n" +
+ "\bfullname\x18\x04 \x01(\tR\bfullname\x12\x16\n" +
+ "\x06mobile\x18\x05 \x01(\tR\x06mobile\x12\x10\n" +
+ "\x03tel\x18\x06 \x01(\tR\x03tel\x12\x14\n" +
+ "\x05email\x18\a \x01(\tR\x05email\x12\x16\n" +
+ "\x06remark\x18\b \x01(\tR\x06remark\x12\x12\n" +
+ "\x04isOn\x18\t \x01(\bR\x04isOn\x12$\n" +
+ "\rnodeClusterId\x18\n" +
+ " \x01(\x03R\rnodeClusterId\x12$\n" +
+ "\rbandwidthAlgo\x18\v \x01(\tR\rbandwidthAlgo\x124\n" +
+ "\x15httpdnsClusterIdsJSON\x18\f \x01(\fR\x15httpdnsClusterIdsJSON\"+\n" +
+ "\x11DeleteUserRequest\x12\x16\n" +
+ "\x06userId\x18\x01 \x01(\x03R\x06userId\"\x85\x01\n" +
+ "\x1bCountAllEnabledUsersRequest\x12\x18\n" +
+ "\akeyword\x18\x01 \x01(\tR\akeyword\x12 \n" +
+ "\visVerifying\x18\x02 \x01(\bR\visVerifying\x12*\n" +
+ "\x10mobileIsVerified\x18\x03 \x01(\x05R\x10mobileIsVerified\"\xad\x01\n" +
+ "\x17ListEnabledUsersRequest\x12\x18\n" +
+ "\akeyword\x18\x01 \x01(\tR\akeyword\x12 \n" +
+ "\visVerifying\x18\x04 \x01(\bR\visVerifying\x12*\n" +
+ "\x10mobileIsVerified\x18\x05 \x01(\x05R\x10mobileIsVerified\x12\x16\n" +
+ "\x06offset\x18\x02 \x01(\x03R\x06offset\x12\x12\n" +
+ "\x04size\x18\x03 \x01(\x03R\x04size\":\n" +
+ "\x18ListEnabledUsersResponse\x12\x1e\n" +
+ "\x05users\x18\x01 \x03(\v2\b.pb.UserR\x05users\"0\n" +
+ "\x16FindEnabledUserRequest\x12\x16\n" +
+ "\x06userId\x18\x01 \x01(\x03R\x06userId\"7\n" +
+ "\x17FindEnabledUserResponse\x12\x1c\n" +
+ "\x04user\x18\x01 \x01(\v2\b.pb.UserR\x04user\"N\n" +
+ "\x18CheckUserUsernameRequest\x12\x16\n" +
+ "\x06userId\x18\x01 \x01(\x03R\x06userId\x12\x1a\n" +
+ "\busername\x18\x02 \x01(\tR\busername\"3\n" +
+ "\x19CheckUserUsernameResponse\x12\x16\n" +
+ "\x06exists\x18\x01 \x01(\bR\x06exists\"J\n" +
+ "\x10LoginUserRequest\x12\x1a\n" +
+ "\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" +
+ "\bpassword\x18\x02 \x01(\tR\bpassword\"Y\n" +
+ "\x11LoginUserResponse\x12\x16\n" +
+ "\x06userId\x18\x01 \x01(\x03R\x06userId\x12\x12\n" +
+ "\x04isOk\x18\x02 \x01(\bR\x04isOk\x12\x18\n" +
+ "\amessage\x18\x03 \x01(\tR\amessage\"y\n" +
+ "\x15UpdateUserInfoRequest\x12\x16\n" +
+ "\x06userId\x18\x01 \x01(\x03R\x06userId\x12\x1a\n" +
+ "\bfullname\x18\x02 \x01(\tR\bfullname\x12\x16\n" +
+ "\x06mobile\x18\x03 \x01(\tR\x06mobile\x12\x14\n" +
+ "\x05email\x18\x04 \x01(\tR\x05email\"h\n" +
+ "\x16UpdateUserLoginRequest\x12\x16\n" +
+ "\x06userId\x18\x01 \x01(\x03R\x06userId\x12\x1a\n" +
+ "\busername\x18\x02 \x01(\tR\busername\x12\x1a\n" +
+ "\bpassword\x18\x03 \x01(\tR\bpassword\"5\n" +
+ "\x1bComposeUserDashboardRequest\x12\x16\n" +
+ "\x06userId\x18\x01 \x01(\x03R\x06userId\"\xa7\a\n" +
+ "\x1cComposeUserDashboardResponse\x12\"\n" +
+ "\fcountServers\x18\x01 \x01(\x03R\fcountServers\x120\n" +
+ "\x13monthlyTrafficBytes\x18\x02 \x01(\x03R\x13monthlyTrafficBytes\x12<\n" +
+ "\x19monthlyPeekBandwidthBytes\x18\x03 \x01(\x03R\x19monthlyPeekBandwidthBytes\x12,\n" +
+ "\x11dailyTrafficBytes\x18\x04 \x01(\x03R\x11dailyTrafficBytes\x128\n" +
+ "\x17dailyPeekBandwidthBytes\x18\x05 \x01(\x03R\x17dailyPeekBandwidthBytes\x12_\n" +
+ "\x11dailyTrafficStats\x18\x06 \x03(\v21.pb.ComposeUserDashboardResponse.DailyTrafficStatR\x11dailyTrafficStats\x12q\n" +
+ "\x17dailyPeekBandwidthStats\x18\a \x03(\v27.pb.ComposeUserDashboardResponse.DailyPeekBandwidthStatR\x17dailyPeekBandwidthStats\x120\n" +
+ "\x13bandwidthPercentile\x18\b \x01(\x05R\x13bandwidthPercentile\x128\n" +
+ "\x17bandwidthPercentileBits\x18\t \x01(\x03R\x17bandwidthPercentileBits\x1a\x88\x02\n" +
+ "\x10DailyTrafficStat\x12\x10\n" +
+ "\x03day\x18\x01 \x01(\tR\x03day\x12\x14\n" +
+ "\x05bytes\x18\x02 \x01(\x03R\x05bytes\x12 \n" +
+ "\vcachedBytes\x18\x03 \x01(\x03R\vcachedBytes\x12 \n" +
+ "\vattackBytes\x18\x04 \x01(\x03R\vattackBytes\x12$\n" +
+ "\rcountRequests\x18\x05 \x01(\x03R\rcountRequests\x120\n" +
+ "\x13countCachedRequests\x18\x06 \x01(\x03R\x13countCachedRequests\x120\n" +
+ "\x13countAttackRequests\x18\a \x01(\x03R\x13countAttackRequests\x1a@\n" +
+ "\x16DailyPeekBandwidthStat\x12\x10\n" +
+ "\x03day\x18\x01 \x01(\tR\x03day\x12\x14\n" +
+ "\x05bytes\x18\x02 \x01(\x03R\x05bytes\"6\n" +
+ "\x1cFindUserNodeClusterIdRequest\x12\x16\n" +
+ "\x06userId\x18\x01 \x01(\x03R\x06userId\"E\n" +
+ "\x1dFindUserNodeClusterIdResponse\x12$\n" +
+ "\rnodeClusterId\x18\x01 \x01(\x03R\rnodeClusterId\"W\n" +
+ "\x19UpdateUserFeaturesRequest\x12\x16\n" +
+ "\x06userId\x18\x01 \x01(\x03R\x06userId\x12\"\n" +
+ "\ffeatureCodes\x18\x02 \x03(\tR\ffeatureCodes\"a\n" +
+ "\x1dUpdateAllUsersFeaturesRequest\x12\"\n" +
+ "\ffeatureCodes\x18\x01 \x03(\tR\ffeatureCodes\x12\x1c\n" +
+ "\toverwrite\x18\x02 \x01(\bR\toverwrite\"1\n" +
+ "\x17FindUserFeaturesRequest\x12\x16\n" +
+ "\x06userId\x18\x01 \x01(\x03R\x06userId\"G\n" +
+ "\x18FindUserFeaturesResponse\x12+\n" +
+ "\bfeatures\x18\x01 \x03(\v2\x0f.pb.UserFeatureR\bfeatures\"&\n" +
+ "$FindAllUserFeatureDefinitionsRequest\"T\n" +
+ "%FindAllUserFeatureDefinitionsResponse\x12+\n" +
+ "\bfeatures\x18\x01 \x03(\v2\x0f.pb.UserFeatureR\bfeatures\"\x1f\n" +
+ "\x1dComposeUserGlobalBoardRequest\"\xa9\x06\n" +
+ "\x1eComposeUserGlobalBoardResponse\x12\x1e\n" +
+ "\n" +
+ "totalUsers\x18\x01 \x01(\x03R\n" +
+ "totalUsers\x12(\n" +
+ "\x0fcountTodayUsers\x18\x02 \x01(\x03R\x0fcountTodayUsers\x12*\n" +
+ "\x10countWeeklyUsers\x18\x03 \x01(\x03R\x10countWeeklyUsers\x12&\n" +
+ "\x0ecountUserNodes\x18\x04 \x01(\x03R\x0ecountUserNodes\x124\n" +
+ "\x15countOfflineUserNodes\x18\x05 \x01(\x03R\x15countOfflineUserNodes\x120\n" +
+ "\x13countVerifyingUsers\x18\x06 \x01(\x03R\x13countVerifyingUsers\x12L\n" +
+ "\n" +
+ "dailyStats\x18\x1e \x03(\v2,.pb.ComposeUserGlobalBoardResponse.DailyStatR\n" +
+ "dailyStats\x123\n" +
+ "\rcpuNodeValues\x18\x1f \x03(\v2\r.pb.NodeValueR\rcpuNodeValues\x129\n" +
+ "\x10memoryNodeValues\x18 \x03(\v2\r.pb.NodeValueR\x10memoryNodeValues\x125\n" +
+ "\x0eloadNodeValues\x18! \x03(\v2\r.pb.NodeValueR\x0eloadNodeValues\x12X\n" +
+ "\x0ftopTrafficStats\x18\" \x03(\v2..pb.ComposeUserGlobalBoardResponse.TrafficStatR\x0ftopTrafficStats\x1a3\n" +
+ "\tDailyStat\x12\x10\n" +
+ "\x03day\x18\x01 \x01(\tR\x03day\x12\x14\n" +
+ "\x05count\x18\x02 \x01(\x03R\x05count\x1a}\n" +
+ "\vTrafficStat\x12\x16\n" +
+ "\x06userId\x18\x01 \x01(\x03R\x06userId\x12\x1a\n" +
+ "\buserName\x18\x02 \x01(\tR\buserName\x12$\n" +
+ "\rcountRequests\x18\x03 \x01(\x03R\rcountRequests\x12\x14\n" +
+ "\x05bytes\x18\x04 \x01(\x03R\x05bytes\"=\n" +
+ "\x1fCheckUserOTPWithUsernameRequest\x12\x1a\n" +
+ "\busername\x18\x01 \x01(\tR\busername\"B\n" +
+ " CheckUserOTPWithUsernameResponse\x12\x1e\n" +
+ "\n" +
+ "requireOTP\x18\x01 \x01(\bR\n" +
+ "requireOTP\"2\n" +
+ "\x18FindUserPriceInfoRequest\x12\x16\n" +
+ "\x06userId\x18\x01 \x01(\x03R\x06userId\"[\n" +
+ "\x19FindUserPriceInfoResponse\x12\x1c\n" +
+ "\tpriceType\x18\x01 \x01(\tR\tpriceType\x12 \n" +
+ "\vpricePeriod\x18\x02 \x01(\tR\vpricePeriod\"R\n" +
+ "\x1aUpdateUserPriceTypeRequest\x12\x16\n" +
+ "\x06userId\x18\x01 \x01(\x03R\x06userId\x12\x1c\n" +
+ "\tpriceType\x18\x02 \x01(\tR\tpriceType\"X\n" +
+ "\x1cUpdateUserPricePeriodRequest\x12\x16\n" +
+ "\x06userId\x18\x01 \x01(\x03R\x06userId\x12 \n" +
+ "\vpricePeriod\x18\x02 \x01(\tR\vpricePeriod\"6\n" +
+ "\x1cCheckUserServersStateRequest\x12\x16\n" +
+ "\x06userId\x18\x01 \x01(\x03R\x06userId\"=\n" +
+ "\x1dCheckUserServersStateResponse\x12\x1c\n" +
+ "\tisEnabled\x18\x01 \x01(\bR\tisEnabled\"6\n" +
+ "\x1cRenewUserServersStateRequest\x12\x16\n" +
+ "\x06userId\x18\x01 \x01(\x03R\x06userId\"=\n" +
+ "\x1dRenewUserServersStateResponse\x12\x1c\n" +
+ "\tisEnabled\x18\x01 \x01(\bR\tisEnabled\"-\n" +
+ "\x15CheckUserEmailRequest\x12\x14\n" +
+ "\x05email\x18\x01 \x01(\tR\x05email\"0\n" +
+ "\x16CheckUserEmailResponse\x12\x16\n" +
+ "\x06exists\x18\x01 \x01(\bR\x06exists\"0\n" +
+ "\x16CheckUserMobileRequest\x12\x16\n" +
+ "\x06mobile\x18\x01 \x01(\tR\x06mobile\"1\n" +
+ "\x17CheckUserMobileResponse\x12\x16\n" +
+ "\x06exists\x18\x01 \x01(\bR\x06exists\"F\n" +
+ "(FindUserVerifiedEmailWithUsernameRequest\x12\x1a\n" +
+ "\busername\x18\x01 \x01(\tR\busername\"A\n" +
+ ")FindUserVerifiedEmailWithUsernameResponse\x12\x14\n" +
+ "\x05email\x18\x01 \x01(\tR\x05email2\xae\x11\n" +
+ "\vUserService\x12;\n" +
+ "\n" +
+ "createUser\x12\x15.pb.CreateUserRequest\x1a\x16.pb.CreateUserResponse\x12A\n" +
+ "\fregisterUser\x12\x17.pb.RegisterUserRequest\x1a\x18.pb.RegisterUserResponse\x123\n" +
+ "\n" +
+ "verifyUser\x12\x15.pb.VerifyUserRequest\x1a\x0e.pb.RPCSuccess\x123\n" +
+ "\n" +
+ "updateUser\x12\x15.pb.UpdateUserRequest\x1a\x0e.pb.RPCSuccess\x123\n" +
+ "\n" +
+ "deleteUser\x12\x15.pb.DeleteUserRequest\x1a\x0e.pb.RPCSuccess\x12M\n" +
+ "\x14countAllEnabledUsers\x12\x1f.pb.CountAllEnabledUsersRequest\x1a\x14.pb.RPCCountResponse\x12M\n" +
+ "\x10listEnabledUsers\x12\x1b.pb.ListEnabledUsersRequest\x1a\x1c.pb.ListEnabledUsersResponse\x12J\n" +
+ "\x0ffindEnabledUser\x12\x1a.pb.FindEnabledUserRequest\x1a\x1b.pb.FindEnabledUserResponse\x12P\n" +
+ "\x11checkUserUsername\x12\x1c.pb.CheckUserUsernameRequest\x1a\x1d.pb.CheckUserUsernameResponse\x128\n" +
+ "\tloginUser\x12\x14.pb.LoginUserRequest\x1a\x15.pb.LoginUserResponse\x12;\n" +
+ "\x0eupdateUserInfo\x12\x19.pb.UpdateUserInfoRequest\x1a\x0e.pb.RPCSuccess\x12=\n" +
+ "\x0fupdateUserLogin\x12\x1a.pb.UpdateUserLoginRequest\x1a\x0e.pb.RPCSuccess\x12Y\n" +
+ "\x14composeUserDashboard\x12\x1f.pb.ComposeUserDashboardRequest\x1a .pb.ComposeUserDashboardResponse\x12\\\n" +
+ "\x15findUserNodeClusterId\x12 .pb.FindUserNodeClusterIdRequest\x1a!.pb.FindUserNodeClusterIdResponse\x12C\n" +
+ "\x12updateUserFeatures\x12\x1d.pb.UpdateUserFeaturesRequest\x1a\x0e.pb.RPCSuccess\x12K\n" +
+ "\x16updateAllUsersFeatures\x12!.pb.UpdateAllUsersFeaturesRequest\x1a\x0e.pb.RPCSuccess\x12M\n" +
+ "\x10findUserFeatures\x12\x1b.pb.FindUserFeaturesRequest\x1a\x1c.pb.FindUserFeaturesResponse\x12t\n" +
+ "\x1dfindAllUserFeatureDefinitions\x12(.pb.FindAllUserFeatureDefinitionsRequest\x1a).pb.FindAllUserFeatureDefinitionsResponse\x12_\n" +
+ "\x16composeUserGlobalBoard\x12!.pb.ComposeUserGlobalBoardRequest\x1a\".pb.ComposeUserGlobalBoardResponse\x12e\n" +
+ "\x18checkUserOTPWithUsername\x12#.pb.CheckUserOTPWithUsernameRequest\x1a$.pb.CheckUserOTPWithUsernameResponse\x12P\n" +
+ "\x11findUserPriceInfo\x12\x1c.pb.FindUserPriceInfoRequest\x1a\x1d.pb.FindUserPriceInfoResponse\x12E\n" +
+ "\x13updateUserPriceType\x12\x1e.pb.UpdateUserPriceTypeRequest\x1a\x0e.pb.RPCSuccess\x12I\n" +
+ "\x15updateUserPricePeriod\x12 .pb.UpdateUserPricePeriodRequest\x1a\x0e.pb.RPCSuccess\x12\\\n" +
+ "\x15checkUserServersState\x12 .pb.CheckUserServersStateRequest\x1a!.pb.CheckUserServersStateResponse\x12\\\n" +
+ "\x15renewUserServersState\x12 .pb.RenewUserServersStateRequest\x1a!.pb.RenewUserServersStateResponse\x12G\n" +
+ "\x0echeckUserEmail\x12\x19.pb.CheckUserEmailRequest\x1a\x1a.pb.CheckUserEmailResponse\x12J\n" +
+ "\x0fcheckUserMobile\x12\x1a.pb.CheckUserMobileRequest\x1a\x1b.pb.CheckUserMobileResponse\x12\x80\x01\n" +
+ "!findUserVerifiedEmailWithUsername\x12,.pb.FindUserVerifiedEmailWithUsernameRequest\x1a-.pb.FindUserVerifiedEmailWithUsernameResponseB\x06Z\x04./pbb\x06proto3"
var (
file_service_user_proto_rawDescOnce sync.Once
- file_service_user_proto_rawDescData = file_service_user_proto_rawDesc
+ file_service_user_proto_rawDescData []byte
)
func file_service_user_proto_rawDescGZIP() []byte {
file_service_user_proto_rawDescOnce.Do(func() {
- file_service_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_user_proto_rawDescData)
+ file_service_user_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_service_user_proto_rawDesc), len(file_service_user_proto_rawDesc)))
})
return file_service_user_proto_rawDescData
}
@@ -3497,7 +3230,7 @@ func file_service_user_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_service_user_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_service_user_proto_rawDesc), len(file_service_user_proto_rawDesc)),
NumEnums: 0,
NumMessages: 50,
NumExtensions: 0,
@@ -3508,7 +3241,6 @@ func file_service_user_proto_init() {
MessageInfos: file_service_user_proto_msgTypes,
}.Build()
File_service_user_proto = out.File
- file_service_user_proto_rawDesc = nil
file_service_user_proto_goTypes = nil
file_service_user_proto_depIdxs = nil
}
diff --git a/EdgeCommon/pkg/rpc/pb/service_user_grpc.pb.go b/EdgeCommon/pkg/rpc/pb/service_user_grpc.pb.go
index 97d95f4..8d24141 100644
--- a/EdgeCommon/pkg/rpc/pb/service_user_grpc.pb.go
+++ b/EdgeCommon/pkg/rpc/pb/service_user_grpc.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.5.1
-// - protoc v6.33.2
+// - protoc-gen-go-grpc v1.6.1
+// - protoc v3.21.12
// source: service_user.proto
package pb
@@ -473,88 +473,88 @@ type UserServiceServer interface {
type UnimplementedUserServiceServer struct{}
func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CreateUser not implemented")
+ return nil, status.Error(codes.Unimplemented, "method CreateUser not implemented")
}
func (UnimplementedUserServiceServer) RegisterUser(context.Context, *RegisterUserRequest) (*RegisterUserResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method RegisterUser not implemented")
+ return nil, status.Error(codes.Unimplemented, "method RegisterUser not implemented")
}
func (UnimplementedUserServiceServer) VerifyUser(context.Context, *VerifyUserRequest) (*RPCSuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method VerifyUser not implemented")
+ return nil, status.Error(codes.Unimplemented, "method VerifyUser not implemented")
}
func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*RPCSuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method UpdateUser not implemented")
+ return nil, status.Error(codes.Unimplemented, "method UpdateUser not implemented")
}
func (UnimplementedUserServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*RPCSuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method DeleteUser not implemented")
+ return nil, status.Error(codes.Unimplemented, "method DeleteUser not implemented")
}
func (UnimplementedUserServiceServer) CountAllEnabledUsers(context.Context, *CountAllEnabledUsersRequest) (*RPCCountResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CountAllEnabledUsers not implemented")
+ return nil, status.Error(codes.Unimplemented, "method CountAllEnabledUsers not implemented")
}
func (UnimplementedUserServiceServer) ListEnabledUsers(context.Context, *ListEnabledUsersRequest) (*ListEnabledUsersResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method ListEnabledUsers not implemented")
+ return nil, status.Error(codes.Unimplemented, "method ListEnabledUsers not implemented")
}
func (UnimplementedUserServiceServer) FindEnabledUser(context.Context, *FindEnabledUserRequest) (*FindEnabledUserResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method FindEnabledUser not implemented")
+ return nil, status.Error(codes.Unimplemented, "method FindEnabledUser not implemented")
}
func (UnimplementedUserServiceServer) CheckUserUsername(context.Context, *CheckUserUsernameRequest) (*CheckUserUsernameResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CheckUserUsername not implemented")
+ return nil, status.Error(codes.Unimplemented, "method CheckUserUsername not implemented")
}
func (UnimplementedUserServiceServer) LoginUser(context.Context, *LoginUserRequest) (*LoginUserResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method LoginUser not implemented")
+ return nil, status.Error(codes.Unimplemented, "method LoginUser not implemented")
}
func (UnimplementedUserServiceServer) UpdateUserInfo(context.Context, *UpdateUserInfoRequest) (*RPCSuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method UpdateUserInfo not implemented")
+ return nil, status.Error(codes.Unimplemented, "method UpdateUserInfo not implemented")
}
func (UnimplementedUserServiceServer) UpdateUserLogin(context.Context, *UpdateUserLoginRequest) (*RPCSuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method UpdateUserLogin not implemented")
+ return nil, status.Error(codes.Unimplemented, "method UpdateUserLogin not implemented")
}
func (UnimplementedUserServiceServer) ComposeUserDashboard(context.Context, *ComposeUserDashboardRequest) (*ComposeUserDashboardResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method ComposeUserDashboard not implemented")
+ return nil, status.Error(codes.Unimplemented, "method ComposeUserDashboard not implemented")
}
func (UnimplementedUserServiceServer) FindUserNodeClusterId(context.Context, *FindUserNodeClusterIdRequest) (*FindUserNodeClusterIdResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method FindUserNodeClusterId not implemented")
+ return nil, status.Error(codes.Unimplemented, "method FindUserNodeClusterId not implemented")
}
func (UnimplementedUserServiceServer) UpdateUserFeatures(context.Context, *UpdateUserFeaturesRequest) (*RPCSuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method UpdateUserFeatures not implemented")
+ return nil, status.Error(codes.Unimplemented, "method UpdateUserFeatures not implemented")
}
func (UnimplementedUserServiceServer) UpdateAllUsersFeatures(context.Context, *UpdateAllUsersFeaturesRequest) (*RPCSuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method UpdateAllUsersFeatures not implemented")
+ return nil, status.Error(codes.Unimplemented, "method UpdateAllUsersFeatures not implemented")
}
func (UnimplementedUserServiceServer) FindUserFeatures(context.Context, *FindUserFeaturesRequest) (*FindUserFeaturesResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method FindUserFeatures not implemented")
+ return nil, status.Error(codes.Unimplemented, "method FindUserFeatures not implemented")
}
func (UnimplementedUserServiceServer) FindAllUserFeatureDefinitions(context.Context, *FindAllUserFeatureDefinitionsRequest) (*FindAllUserFeatureDefinitionsResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method FindAllUserFeatureDefinitions not implemented")
+ return nil, status.Error(codes.Unimplemented, "method FindAllUserFeatureDefinitions not implemented")
}
func (UnimplementedUserServiceServer) ComposeUserGlobalBoard(context.Context, *ComposeUserGlobalBoardRequest) (*ComposeUserGlobalBoardResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method ComposeUserGlobalBoard not implemented")
+ return nil, status.Error(codes.Unimplemented, "method ComposeUserGlobalBoard not implemented")
}
func (UnimplementedUserServiceServer) CheckUserOTPWithUsername(context.Context, *CheckUserOTPWithUsernameRequest) (*CheckUserOTPWithUsernameResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CheckUserOTPWithUsername not implemented")
+ return nil, status.Error(codes.Unimplemented, "method CheckUserOTPWithUsername not implemented")
}
func (UnimplementedUserServiceServer) FindUserPriceInfo(context.Context, *FindUserPriceInfoRequest) (*FindUserPriceInfoResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method FindUserPriceInfo not implemented")
+ return nil, status.Error(codes.Unimplemented, "method FindUserPriceInfo not implemented")
}
func (UnimplementedUserServiceServer) UpdateUserPriceType(context.Context, *UpdateUserPriceTypeRequest) (*RPCSuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method UpdateUserPriceType not implemented")
+ return nil, status.Error(codes.Unimplemented, "method UpdateUserPriceType not implemented")
}
func (UnimplementedUserServiceServer) UpdateUserPricePeriod(context.Context, *UpdateUserPricePeriodRequest) (*RPCSuccess, error) {
- return nil, status.Errorf(codes.Unimplemented, "method UpdateUserPricePeriod not implemented")
+ return nil, status.Error(codes.Unimplemented, "method UpdateUserPricePeriod not implemented")
}
func (UnimplementedUserServiceServer) CheckUserServersState(context.Context, *CheckUserServersStateRequest) (*CheckUserServersStateResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CheckUserServersState not implemented")
+ return nil, status.Error(codes.Unimplemented, "method CheckUserServersState not implemented")
}
func (UnimplementedUserServiceServer) RenewUserServersState(context.Context, *RenewUserServersStateRequest) (*RenewUserServersStateResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method RenewUserServersState not implemented")
+ return nil, status.Error(codes.Unimplemented, "method RenewUserServersState not implemented")
}
func (UnimplementedUserServiceServer) CheckUserEmail(context.Context, *CheckUserEmailRequest) (*CheckUserEmailResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CheckUserEmail not implemented")
+ return nil, status.Error(codes.Unimplemented, "method CheckUserEmail not implemented")
}
func (UnimplementedUserServiceServer) CheckUserMobile(context.Context, *CheckUserMobileRequest) (*CheckUserMobileResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CheckUserMobile not implemented")
+ return nil, status.Error(codes.Unimplemented, "method CheckUserMobile not implemented")
}
func (UnimplementedUserServiceServer) FindUserVerifiedEmailWithUsername(context.Context, *FindUserVerifiedEmailWithUsernameRequest) (*FindUserVerifiedEmailWithUsernameResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method FindUserVerifiedEmailWithUsername not implemented")
+ return nil, status.Error(codes.Unimplemented, "method FindUserVerifiedEmailWithUsername not implemented")
}
func (UnimplementedUserServiceServer) testEmbeddedByValue() {}
@@ -566,7 +566,7 @@ type UnsafeUserServiceServer interface {
}
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) {
- // If the following call pancis, it indicates UnimplementedUserServiceServer was
+ // If the following call panics, it indicates UnimplementedUserServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
diff --git a/EdgeCommon/pkg/rpc/protos/models/model_httpdns_app.proto b/EdgeCommon/pkg/rpc/protos/models/model_httpdns_app.proto
index 3c37338..553ca89 100644
--- a/EdgeCommon/pkg/rpc/protos/models/model_httpdns_app.proto
+++ b/EdgeCommon/pkg/rpc/protos/models/model_httpdns_app.proto
@@ -8,8 +8,7 @@ message HTTPDNSApp {
string name = 2;
string appId = 3;
bool isOn = 4;
- int64 primaryClusterId = 5;
- int64 backupClusterId = 6;
+ reserved 5, 6; // removed: primaryClusterId, backupClusterId
string sniMode = 7;
bool signEnabled = 8;
string signSecret = 9;
@@ -17,4 +16,5 @@ message HTTPDNSApp {
int64 createdAt = 11;
int64 updatedAt = 12;
int64 userId = 13;
+ bytes clusterIdsJSON = 14;
}
diff --git a/EdgeCommon/pkg/rpc/protos/models/model_httpdns_node.proto b/EdgeCommon/pkg/rpc/protos/models/model_httpdns_node.proto
index 1cafade..ecfbe5f 100644
--- a/EdgeCommon/pkg/rpc/protos/models/model_httpdns_node.proto
+++ b/EdgeCommon/pkg/rpc/protos/models/model_httpdns_node.proto
@@ -3,6 +3,8 @@ option go_package = "./pb";
package pb;
+import "models/model_node_login.proto";
+
message HTTPDNSNode {
int64 id = 1;
int64 clusterId = 2;
@@ -18,4 +20,5 @@ message HTTPDNSNode {
bytes installStatusJSON = 12;
int64 createdAt = 13;
int64 updatedAt = 14;
+ NodeLogin nodeLogin = 15;
}
diff --git a/EdgeCommon/pkg/rpc/protos/models/model_user.proto b/EdgeCommon/pkg/rpc/protos/models/model_user.proto
index 16d729d..ac09565 100644
--- a/EdgeCommon/pkg/rpc/protos/models/model_user.proto
+++ b/EdgeCommon/pkg/rpc/protos/models/model_user.proto
@@ -28,6 +28,7 @@ message User {
bool isEnterpriseIdentified = 18; // 是否已通过企业验证
string bandwidthAlgo = 21; // 带宽算法
string lang = 22; // 语言代号
+ bytes httpdnsClusterIdsJSON = 24; // HTTPDNS关联集群ID列表
Login otpLogin = 19; // OTP认证
diff --git a/EdgeCommon/pkg/rpc/protos/service_httpdns_app.proto b/EdgeCommon/pkg/rpc/protos/service_httpdns_app.proto
index 155bccd..da8b9f9 100644
--- a/EdgeCommon/pkg/rpc/protos/service_httpdns_app.proto
+++ b/EdgeCommon/pkg/rpc/protos/service_httpdns_app.proto
@@ -20,11 +20,11 @@ service HTTPDNSAppService {
message CreateHTTPDNSAppRequest {
string name = 1;
string appId = 2;
- int64 primaryClusterId = 3;
- int64 backupClusterId = 4;
+ reserved 3, 4; // removed: primaryClusterId, backupClusterId
bool isOn = 5;
bool signEnabled = 6;
int64 userId = 7;
+ bytes clusterIdsJSON = 8;
}
message CreateHTTPDNSAppResponse {
@@ -34,10 +34,10 @@ message CreateHTTPDNSAppResponse {
message UpdateHTTPDNSAppRequest {
int64 appDbId = 1;
string name = 2;
- int64 primaryClusterId = 3;
- int64 backupClusterId = 4;
+ reserved 3, 4; // removed: primaryClusterId, backupClusterId
bool isOn = 5;
int64 userId = 6;
+ bytes clusterIdsJSON = 7;
}
message DeleteHTTPDNSAppRequest {
diff --git a/EdgeCommon/pkg/rpc/protos/service_httpdns_node.proto b/EdgeCommon/pkg/rpc/protos/service_httpdns_node.proto
index 5cfd3e4..97227df 100644
--- a/EdgeCommon/pkg/rpc/protos/service_httpdns_node.proto
+++ b/EdgeCommon/pkg/rpc/protos/service_httpdns_node.proto
@@ -4,6 +4,7 @@ option go_package = "./pb";
package pb;
import "models/model_httpdns_node.proto";
+import "models/model_node_login.proto";
import "models/rpc_messages.proto";
service HTTPDNSNodeService {
@@ -13,6 +14,8 @@ service HTTPDNSNodeService {
rpc findHTTPDNSNode (FindHTTPDNSNodeRequest) returns (FindHTTPDNSNodeResponse);
rpc listHTTPDNSNodes (ListHTTPDNSNodesRequest) returns (ListHTTPDNSNodesResponse);
rpc updateHTTPDNSNodeStatus (UpdateHTTPDNSNodeStatusRequest) returns (RPCSuccess);
+ // 修改HTTPDNS节点登录信息
+ rpc updateHTTPDNSNodeLogin (UpdateHTTPDNSNodeLoginRequest) returns (RPCSuccess);
}
message CreateHTTPDNSNodeRequest {
@@ -61,3 +64,9 @@ message UpdateHTTPDNSNodeStatusRequest {
bytes statusJSON = 5;
bytes installStatusJSON = 6;
}
+
+// 修改HTTPDNS节点登录信息
+message UpdateHTTPDNSNodeLoginRequest {
+ int64 nodeId = 1;
+ NodeLogin nodeLogin = 2;
+}
diff --git a/EdgeCommon/pkg/rpc/protos/service_user.proto b/EdgeCommon/pkg/rpc/protos/service_user.proto
index 940acac..a490de1 100644
--- a/EdgeCommon/pkg/rpc/protos/service_user.proto
+++ b/EdgeCommon/pkg/rpc/protos/service_user.proto
@@ -148,6 +148,7 @@ message UpdateUserRequest {
bool isOn = 9;
int64 nodeClusterId = 10;
string bandwidthAlgo = 11;
+ bytes httpdnsClusterIdsJSON = 12; // HTTPDNS关联集群ID列表
}
// 删除用户
diff --git a/EdgeCommon/pkg/userconfigs/user_register_config.go b/EdgeCommon/pkg/userconfigs/user_register_config.go
index 052b56d..862c732 100644
--- a/EdgeCommon/pkg/userconfigs/user_register_config.go
+++ b/EdgeCommon/pkg/userconfigs/user_register_config.go
@@ -53,7 +53,8 @@ type UserRegisterConfig struct {
// 开通DNS服务
NSIsOn bool `json:"nsIsOn"` // 是否开启智能DNS服务
// 开通HTTPDNS服务
- HTTPDNSIsOn bool `json:"httpdnsIsOn"` // 是否开启用户端HTTPDNS服务
+ HTTPDNSIsOn bool `json:"httpdnsIsOn"` // 是否开启用户端HTTPDNS服务
+ HTTPDNSDefaultClusterIds []int64 `json:"httpdnsDefaultClusterIds"` // HTTPDNS默认集群ID列表
// 开通高防服务
ADIsOn bool `json:"adIsOn"` // 是否开启高防服务
diff --git a/EdgeDNS/internal/firewalls/ddos_protection.go b/EdgeDNS/internal/firewalls/ddos_protection.go
index c852a08..45b38fa 100644
--- a/EdgeDNS/internal/firewalls/ddos_protection.go
+++ b/EdgeDNS/internal/firewalls/ddos_protection.go
@@ -173,6 +173,10 @@ func (this *DDoSProtectionManager) addTCPRules(tcpConfig *ddosconfigs.TCPConfig)
var ports = []int32{}
for _, portConfig := range tcpConfig.Ports {
+ // 校验端口范围
+ if portConfig.Port <= 0 || portConfig.Port > 65535 {
+ continue
+ }
if !lists.ContainsInt32(ports, portConfig.Port) {
ports = append(ports, portConfig.Port)
}
@@ -367,7 +371,19 @@ func (this *DDoSProtectionManager) encodeUserData(attrs []string) string {
return ""
}
- return "ZZ" + strings.Join(attrs, "_") + "ZZ"
+ // 清洗每个属性值,只保留字母、数字和横杠
+ var safeAttrs = make([]string, len(attrs))
+ for i, attr := range attrs {
+ var safe strings.Builder
+ for _, c := range attr {
+ if (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '-' {
+ safe.WriteRune(c)
+ }
+ }
+ safeAttrs[i] = safe.String()
+ }
+
+ return "ZZ" + strings.Join(safeAttrs, "_") + "ZZ"
}
// 解码user data
diff --git a/EdgeDNS/internal/nodes/dns_node.go b/EdgeDNS/internal/nodes/dns_node.go
index 5c5d15c..a2c7d11 100644
--- a/EdgeDNS/internal/nodes/dns_node.go
+++ b/EdgeDNS/internal/nodes/dns_node.go
@@ -31,6 +31,7 @@ import (
"os"
"os/exec"
"os/signal"
+ "regexp"
"runtime"
"runtime/debug"
"syscall"
@@ -328,6 +329,13 @@ func (this *DNSNode) start() {
apiConfig.NumberId = config.Id
}
+ // 验证 NodeId 防止路径遍历
+ var nodeIdRegexp = regexp.MustCompile(`^[a-zA-Z0-9_\-]+$`)
+ if !nodeIdRegexp.MatchString(config.NodeId) {
+ remotelogs.Error("NODE", "invalid NodeId: contains illegal characters")
+ return
+ }
+
var db = dbs.NewDB(Tea.Root + "/data/data-" + types.String(config.Id) + "-" + config.NodeId + "-v0.1.0.db")
err = db.Init()
if err != nil {
diff --git a/EdgeDNS/internal/nodes/server.go b/EdgeDNS/internal/nodes/server.go
index 2ebab02..e4f3630 100644
--- a/EdgeDNS/internal/nodes/server.go
+++ b/EdgeDNS/internal/nodes/server.go
@@ -247,6 +247,15 @@ func (this *Server) parseAction(questionName string, remoteAddr *string) (string
return "", errors.New("decode question option failed: " + err.Error())
} else {
var ip = m.GetString("ip")
+ // 验证 IP 地址合法性,防止 IP 欺骗
+ parsedIP := net.ParseIP(ip)
+ if parsedIP == nil {
+ return "", errors.New("invalid IP address in setRemoteAddr: " + ip)
+ }
+ // 拒绝回环地址和未指定地址
+ if parsedIP.IsLoopback() || parsedIP.IsUnspecified() {
+ return "", errors.New("disallowed IP address in setRemoteAddr: " + ip)
+ }
*remoteAddr = ip
}
}
diff --git a/EdgeHttpDNS/bin/edge-httpdns.exe b/EdgeHttpDNS/bin/edge-httpdns.exe
index 7e779b7..d41c3e3 100644
Binary files a/EdgeHttpDNS/bin/edge-httpdns.exe and b/EdgeHttpDNS/bin/edge-httpdns.exe differ
diff --git a/EdgeHttpDNS/edge-httpdns.exe b/EdgeHttpDNS/edge-httpdns.exe
index b74e982..0311351 100644
Binary files a/EdgeHttpDNS/edge-httpdns.exe and b/EdgeHttpDNS/edge-httpdns.exe differ
diff --git a/EdgeHttpDNS/go.mod b/EdgeHttpDNS/go.mod
index 5798a01..fec8371 100644
--- a/EdgeHttpDNS/go.mod
+++ b/EdgeHttpDNS/go.mod
@@ -24,4 +24,5 @@ require (
golang.org/x/tools v0.40.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20251029180050-ab9386a59fda // indirect
google.golang.org/protobuf v1.36.10 // indirect
+ gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
)
diff --git a/EdgeHttpDNS/go.sum b/EdgeHttpDNS/go.sum
index 6ee1098..fe5cf68 100644
--- a/EdgeHttpDNS/go.sum
+++ b/EdgeHttpDNS/go.sum
@@ -63,5 +63,7 @@ google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc=
+gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/EdgeHttpDNS/internal/accesslogs/httpdns_file_writer.go b/EdgeHttpDNS/internal/accesslogs/httpdns_file_writer.go
new file mode 100644
index 0000000..a6c66dd
--- /dev/null
+++ b/EdgeHttpDNS/internal/accesslogs/httpdns_file_writer.go
@@ -0,0 +1,172 @@
+package accesslogs
+
+import (
+ "encoding/json"
+ "fmt"
+ "log"
+ "os"
+ "path/filepath"
+ "strings"
+ "sync"
+
+ "github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
+ "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
+ "gopkg.in/natefinch/lumberjack.v2"
+)
+
+const (
+ defaultHTTPDNSLogDir = "/var/log/edge/edge-httpdns"
+ envHTTPDNSLogDir = "EDGE_HTTPDNS_LOG_DIR"
+)
+
+var (
+ sharedHTTPDNSFileWriter *HTTPDNSFileWriter
+ sharedHTTPDNSFileWriterOnce sync.Once
+)
+
+// SharedHTTPDNSFileWriter 返回 HTTPDNS 本地日志写入器(单例).
+func SharedHTTPDNSFileWriter() *HTTPDNSFileWriter {
+ sharedHTTPDNSFileWriterOnce.Do(func() {
+ sharedHTTPDNSFileWriter = NewHTTPDNSFileWriter()
+ })
+ return sharedHTTPDNSFileWriter
+}
+
+// HTTPDNSFileWriter 将 HTTPDNS 访问日志以 JSON Lines 写入本地文件,供 Fluent Bit 采集。
+type HTTPDNSFileWriter struct {
+ dir string
+ mu sync.Mutex
+ file *lumberjack.Logger
+ rotateConfig *serverconfigs.AccessLogRotateConfig
+ inited bool
+}
+
+// NewHTTPDNSFileWriter 创建 HTTPDNS 本地日志写入器.
+func NewHTTPDNSFileWriter() *HTTPDNSFileWriter {
+ logDir := resolveDefaultHTTPDNSLogDir()
+ return &HTTPDNSFileWriter{
+ dir: logDir,
+ rotateConfig: serverconfigs.NewDefaultAccessLogRotateConfig(),
+ }
+}
+
+func resolveDefaultHTTPDNSLogDir() string {
+ logDir := strings.TrimSpace(os.Getenv(envHTTPDNSLogDir))
+ if logDir == "" {
+ return defaultHTTPDNSLogDir
+ }
+ return logDir
+}
+
+// SetDir 更新日志目录并重置文件句柄。
+func (w *HTTPDNSFileWriter) SetDir(dir string) {
+ if strings.TrimSpace(dir) == "" {
+ dir = resolveDefaultHTTPDNSLogDir()
+ }
+
+ w.mu.Lock()
+ defer w.mu.Unlock()
+
+ if dir == w.dir {
+ return
+ }
+
+ if w.file != nil {
+ _ = w.file.Close()
+ w.file = nil
+ }
+ w.inited = false
+ w.dir = dir
+}
+
+// Dir 返回当前日志目录.
+func (w *HTTPDNSFileWriter) Dir() string {
+ return w.dir
+}
+
+// EnsureInit 在启动时预创建目录与 access.log.
+func (w *HTTPDNSFileWriter) EnsureInit() error {
+ if w.dir == "" {
+ return nil
+ }
+ return w.init()
+}
+
+func (w *HTTPDNSFileWriter) init() error {
+ w.mu.Lock()
+ defer w.mu.Unlock()
+
+ if w.inited && w.file != nil {
+ return nil
+ }
+
+ if w.dir == "" {
+ return nil
+ }
+
+ if err := os.MkdirAll(w.dir, 0755); err != nil {
+ log.Println("[HTTPDNS_ACCESS_LOG]mkdir log dir failed:", err.Error())
+ return err
+ }
+
+ rotateConfig := w.rotateConfig.Normalize()
+ w.file = &lumberjack.Logger{
+ Filename: filepath.Join(w.dir, "access.log"),
+ MaxSize: rotateConfig.MaxSizeMB,
+ MaxBackups: rotateConfig.MaxBackups,
+ MaxAge: rotateConfig.MaxAgeDays,
+ Compress: *rotateConfig.Compress,
+ LocalTime: *rotateConfig.LocalTime,
+ }
+
+ w.inited = true
+ return nil
+}
+
+// WriteBatch 批量写入 HTTPDNS 访问日志.
+func (w *HTTPDNSFileWriter) WriteBatch(logs []*pb.HTTPDNSAccessLog) {
+ if len(logs) == 0 || w.dir == "" {
+ return
+ }
+ if err := w.init(); err != nil {
+ return
+ }
+
+ w.mu.Lock()
+ file := w.file
+ w.mu.Unlock()
+ if file == nil {
+ return
+ }
+
+ for _, logItem := range logs {
+ ingestLog := FromPBAccessLog(logItem)
+ if ingestLog == nil {
+ continue
+ }
+ line, err := json.Marshal(ingestLog)
+ if err != nil {
+ continue
+ }
+ _, _ = file.Write(append(line, '\n'))
+ }
+}
+
+// Close 关闭日志文件.
+func (w *HTTPDNSFileWriter) Close() error {
+ w.mu.Lock()
+ defer w.mu.Unlock()
+
+ if w.file == nil {
+ return nil
+ }
+
+ err := w.file.Close()
+ w.file = nil
+ w.inited = false
+ if err != nil {
+ log.Println(fmt.Sprintf("[HTTPDNS_ACCESS_LOG]close access.log failed: %v", err))
+ return err
+ }
+ return nil
+}
diff --git a/EdgeHttpDNS/internal/accesslogs/httpdns_ingest_log.go b/EdgeHttpDNS/internal/accesslogs/httpdns_ingest_log.go
new file mode 100644
index 0000000..60ad141
--- /dev/null
+++ b/EdgeHttpDNS/internal/accesslogs/httpdns_ingest_log.go
@@ -0,0 +1,57 @@
+package accesslogs
+
+import "github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
+
+// HTTPDNSIngestLog HTTPDNS 访问日志单行结构(JSONEachRow),字段与
+// ClickHouse httpdns_access_logs_ingest 表一一对应。
+type HTTPDNSIngestLog struct {
+ Timestamp int64 `json:"timestamp"`
+ RequestId string `json:"request_id"`
+ ClusterId int64 `json:"cluster_id"`
+ NodeId int64 `json:"node_id"`
+ AppId string `json:"app_id"`
+ AppName string `json:"app_name"`
+ Domain string `json:"domain"`
+ QType string `json:"qtype"`
+ ClientIP string `json:"client_ip"`
+ ClientRegion string `json:"client_region"`
+ Carrier string `json:"carrier"`
+ SDKVersion string `json:"sdk_version"`
+ OS string `json:"os"`
+ ResultIPs string `json:"result_ips"`
+ Status string `json:"status"`
+ ErrorCode string `json:"error_code"`
+ CostMs int32 `json:"cost_ms"`
+ CreatedAt int64 `json:"created_at"`
+ Day string `json:"day"`
+ Summary string `json:"summary"`
+}
+
+// FromPBAccessLog 将 pb.HTTPDNSAccessLog 转为本地 ingest 结构。
+func FromPBAccessLog(log *pb.HTTPDNSAccessLog) *HTTPDNSIngestLog {
+ if log == nil {
+ return nil
+ }
+ return &HTTPDNSIngestLog{
+ Timestamp: log.GetCreatedAt(),
+ RequestId: log.GetRequestId(),
+ ClusterId: log.GetClusterId(),
+ NodeId: log.GetNodeId(),
+ AppId: log.GetAppId(),
+ AppName: log.GetAppName(),
+ Domain: log.GetDomain(),
+ QType: log.GetQtype(),
+ ClientIP: log.GetClientIP(),
+ ClientRegion: log.GetClientRegion(),
+ Carrier: log.GetCarrier(),
+ SDKVersion: log.GetSdkVersion(),
+ OS: log.GetOs(),
+ ResultIPs: log.GetResultIPs(),
+ Status: log.GetStatus(),
+ ErrorCode: log.GetErrorCode(),
+ CostMs: log.GetCostMs(),
+ CreatedAt: log.GetCreatedAt(),
+ Day: log.GetDay(),
+ Summary: log.GetSummary(),
+ }
+}
diff --git a/EdgeHttpDNS/internal/nodes/resolve_server.go b/EdgeHttpDNS/internal/nodes/resolve_server.go
index 31bdc89..0b7f30d 100644
--- a/EdgeHttpDNS/internal/nodes/resolve_server.go
+++ b/EdgeHttpDNS/internal/nodes/resolve_server.go
@@ -13,14 +13,18 @@ import (
"net"
"net/http"
"net/url"
+ "sort"
"strconv"
"strings"
+ "sync"
"time"
"github.com/TeaOSLab/EdgeCommon/pkg/iplibrary"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
+ "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
+ "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/sslconfigs"
+ "github.com/TeaOSLab/EdgeHttpDNS/internal/accesslogs"
"github.com/TeaOSLab/EdgeHttpDNS/internal/configs"
- "github.com/TeaOSLab/EdgeHttpDNS/internal/rpc"
"github.com/iwind/TeaGo/rands"
"github.com/miekg/dns"
)
@@ -83,61 +87,79 @@ type clientRouteProfile struct {
RegionText string
}
-type ResolveServer struct {
- quitCh <-chan struct{}
+type tlsListener struct {
+ addr string // e.g. ":443"
+ listener net.Listener
+ server *http.Server
+}
+type ResolveServer struct {
+ quitCh <-chan struct{}
snapshotManager *SnapshotManager
- listenAddr string
- certFile string
- keyFile string
- server *http.Server
+ // Local config fallback
+ fallbackAddr string
+ certFile string
+ keyFile string
- logQueue chan *pb.HTTPDNSAccessLog
+ handler http.Handler // shared mux
+ tlsConfig *tls.Config // shared TLS config (with GetCertificate)
+
+ logWriter *accesslogs.HTTPDNSFileWriter
+ logQueue chan *pb.HTTPDNSAccessLog
+
+ // TLS certificate hot-reload
+ certMu sync.RWMutex
+ currentCert *tls.Certificate
+ certSnapshotAt int64
+
+ // Listener hot-reload
+ listenerMu sync.Mutex
+ listeners map[string]*tlsListener // key: addr (e.g. ":443")
}
func NewResolveServer(quitCh <-chan struct{}, snapshotManager *SnapshotManager) *ResolveServer {
- listenAddr := ":443"
+ fallbackAddr := ":443"
certFile := ""
keyFile := ""
if apiConfig, err := configs.SharedAPIConfig(); err == nil && apiConfig != nil {
if len(apiConfig.HTTPSListenAddr) > 0 {
- listenAddr = apiConfig.HTTPSListenAddr
+ fallbackAddr = apiConfig.HTTPSListenAddr
}
certFile = apiConfig.HTTPSCert
keyFile = apiConfig.HTTPSKey
}
+ logWriter := accesslogs.SharedHTTPDNSFileWriter()
+ if apiConfig, err := configs.SharedAPIConfig(); err == nil && apiConfig != nil {
+ if len(strings.TrimSpace(apiConfig.LogDir)) > 0 {
+ logWriter.SetDir(strings.TrimSpace(apiConfig.LogDir))
+ }
+ }
+ if err := logWriter.EnsureInit(); err != nil {
+ log.Println("[HTTPDNS_NODE][resolve]init access log file writer failed:", err.Error())
+ }
+
instance := &ResolveServer{
quitCh: quitCh,
snapshotManager: snapshotManager,
- listenAddr: listenAddr,
+ fallbackAddr: fallbackAddr,
certFile: certFile,
keyFile: keyFile,
+ logWriter: logWriter,
logQueue: make(chan *pb.HTTPDNSAccessLog, 8192),
+ listeners: make(map[string]*tlsListener),
}
mux := http.NewServeMux()
mux.HandleFunc("/resolve", instance.handleResolve)
mux.HandleFunc("/healthz", instance.handleHealth)
+ instance.handler = mux
- instance.server = &http.Server{
- Addr: instance.listenAddr,
- Handler: mux,
- ReadTimeout: 5 * time.Second,
- ReadHeaderTimeout: 3 * time.Second,
- WriteTimeout: 5 * time.Second,
- IdleTimeout: 75 * time.Second,
- MaxHeaderBytes: 8 * 1024,
- TLSConfig: &tls.Config{
- MinVersion: tls.VersionTLS11,
- // /resolve is a small JSON API; pin to HTTP/1.1 to avoid ALPN/h2 handshake variance
- // across some clients and middleboxes.
- NextProtos: []string{"http/1.1"},
- },
- // Disable automatic HTTP/2 upgrade on TLS listeners. This keeps handshake behavior
- // deterministic for SDK resolve calls.
- TLSNextProto: map[string]func(*http.Server, *tls.Conn, http.Handler){},
+ instance.tlsConfig = &tls.Config{
+ MinVersion: tls.VersionTLS11,
+ NextProtos: []string{"http/1.1"},
+ GetCertificate: instance.getCertificate,
}
return instance
@@ -145,19 +167,240 @@ func NewResolveServer(quitCh <-chan struct{}, snapshotManager *SnapshotManager)
func (s *ResolveServer) Start() {
go s.startAccessLogFlusher()
- go s.waitForShutdown()
- log.Println("[HTTPDNS_NODE][resolve]listening HTTPS on", s.listenAddr)
- if err := s.server.ListenAndServeTLS(s.certFile, s.keyFile); err != nil && !errors.Is(err, http.ErrServerClosed) {
- log.Println("[HTTPDNS_NODE][resolve]listen failed:", err.Error())
+ // 1. Load initial certificate from file (fallback)
+ if len(s.certFile) > 0 && len(s.keyFile) > 0 {
+ cert, err := tls.LoadX509KeyPair(s.certFile, s.keyFile)
+ if err != nil {
+ log.Println("[HTTPDNS_NODE][resolve]load cert file failed:", err.Error())
+ } else {
+ s.currentCert = &cert
+ log.Println("[HTTPDNS_NODE][resolve]loaded initial TLS cert from file")
+ }
+ }
+
+ // 2. Try loading certificate from cluster snapshot (takes priority over file)
+ if snapshot := s.snapshotManager.Current(); snapshot != nil {
+ s.reloadCertFromSnapshot(snapshot)
+ }
+
+ if s.currentCert == nil {
+ log.Println("[HTTPDNS_NODE][resolve]WARNING: no TLS certificate available, HTTPS will fail")
+ }
+
+ // 3. Parse initial listen addresses and start listeners
+ if snapshot := s.snapshotManager.Current(); snapshot != nil {
+ addrs := s.desiredAddrs(snapshot)
+ s.syncListeners(addrs)
+ } else {
+ s.syncListeners([]string{s.fallbackAddr})
+ }
+
+ // 4. Watch for changes (blocks until quit)
+ s.watchLoop()
+}
+
+func (s *ResolveServer) getCertificate(_ *tls.ClientHelloInfo) (*tls.Certificate, error) {
+ s.certMu.RLock()
+ cert := s.currentCert
+ s.certMu.RUnlock()
+ if cert != nil {
+ return cert, nil
+ }
+ return nil, errors.New("no TLS certificate available")
+}
+
+type snapshotTLSConfig struct {
+ Listen []*serverconfigs.NetworkAddressConfig `json:"listen"`
+ SSLPolicy *sslconfigs.SSLPolicy `json:"sslPolicy"`
+}
+
+func (s *ResolveServer) parseTLSConfig(snapshot *LoadedSnapshot) *snapshotTLSConfig {
+ if snapshot.ClusterID <= 0 {
+ return nil
+ }
+ cluster := snapshot.Clusters[snapshot.ClusterID]
+ if cluster == nil {
+ return nil
+ }
+ raw := cluster.GetTlsPolicyJSON()
+ if len(raw) == 0 {
+ return nil
+ }
+
+ var cfg snapshotTLSConfig
+ if err := json.Unmarshal(raw, &cfg); err != nil {
+ log.Println("[HTTPDNS_NODE][resolve]parse tlsPolicyJSON failed:", err.Error())
+ return nil
+ }
+ return &cfg
+}
+
+func (s *ResolveServer) desiredAddrs(snapshot *LoadedSnapshot) []string {
+ cfg := s.parseTLSConfig(snapshot)
+ if cfg == nil || len(cfg.Listen) == 0 {
+ return []string{s.fallbackAddr}
+ }
+
+ seen := make(map[string]struct{})
+ var addrs []string
+ for _, listenCfg := range cfg.Listen {
+ if listenCfg == nil {
+ continue
+ }
+ if err := listenCfg.Init(); err != nil {
+ log.Println("[HTTPDNS_NODE][resolve]init listen config failed:", err.Error())
+ continue
+ }
+ for _, addr := range listenCfg.Addresses() {
+ if _, ok := seen[addr]; !ok {
+ seen[addr] = struct{}{}
+ addrs = append(addrs, addr)
+ }
+ }
+ }
+
+ if len(addrs) == 0 {
+ return []string{s.fallbackAddr}
+ }
+ sort.Strings(addrs)
+ return addrs
+}
+
+func (s *ResolveServer) reloadCertFromSnapshot(snapshot *LoadedSnapshot) {
+ cfg := s.parseTLSConfig(snapshot)
+ if cfg == nil || cfg.SSLPolicy == nil || len(cfg.SSLPolicy.Certs) == 0 {
+ s.certMu.Lock()
+ s.certSnapshotAt = snapshot.LoadedAt
+ s.certMu.Unlock()
+ return
+ }
+ if err := cfg.SSLPolicy.Init(context.Background()); err != nil {
+ log.Println("[HTTPDNS_NODE][resolve]init SSLPolicy failed:", err.Error())
+ s.certMu.Lock()
+ s.certSnapshotAt = snapshot.LoadedAt
+ s.certMu.Unlock()
+ return
+ }
+ cert := cfg.SSLPolicy.FirstCert()
+ if cert == nil {
+ s.certMu.Lock()
+ s.certSnapshotAt = snapshot.LoadedAt
+ s.certMu.Unlock()
+ return
+ }
+
+ s.certMu.Lock()
+ s.currentCert = cert
+ s.certSnapshotAt = snapshot.LoadedAt
+ s.certMu.Unlock()
+ log.Println("[HTTPDNS_NODE][resolve]TLS certificate reloaded from snapshot")
+}
+
+func (s *ResolveServer) startListener(addr string) error {
+ ln, err := net.Listen("tcp", addr)
+ if err != nil {
+ return fmt.Errorf("listen on %s: %w", addr, err)
+ }
+ tlsLn := tls.NewListener(ln, s.tlsConfig)
+
+ srv := &http.Server{
+ Handler: s.handler,
+ ReadTimeout: 5 * time.Second,
+ ReadHeaderTimeout: 3 * time.Second,
+ WriteTimeout: 5 * time.Second,
+ IdleTimeout: 75 * time.Second,
+ MaxHeaderBytes: 8 * 1024,
+ TLSNextProto: map[string]func(*http.Server, *tls.Conn, http.Handler){},
+ }
+
+ s.listeners[addr] = &tlsListener{
+ addr: addr,
+ listener: tlsLn,
+ server: srv,
+ }
+
+ go func() {
+ if err := srv.Serve(tlsLn); err != nil && !errors.Is(err, http.ErrServerClosed) {
+ log.Println("[HTTPDNS_NODE][resolve]serve failed on", addr, ":", err.Error())
+ }
+ }()
+
+ log.Println("[HTTPDNS_NODE][resolve]listening HTTPS on", addr)
+ return nil
+}
+
+func (s *ResolveServer) stopListener(addr string) {
+ tl, ok := s.listeners[addr]
+ if !ok {
+ return
+ }
+ ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
+ defer cancel()
+ _ = tl.server.Shutdown(ctx)
+ delete(s.listeners, addr)
+ log.Println("[HTTPDNS_NODE][resolve]stopped listener on", addr)
+}
+
+func (s *ResolveServer) syncListeners(desired []string) {
+ s.listenerMu.Lock()
+ defer s.listenerMu.Unlock()
+
+ desiredSet := make(map[string]struct{}, len(desired))
+ for _, addr := range desired {
+ desiredSet[addr] = struct{}{}
+ }
+
+ // Stop listeners that are no longer desired
+ for addr := range s.listeners {
+ if _, ok := desiredSet[addr]; !ok {
+ s.stopListener(addr)
+ }
+ }
+
+ // Start new listeners
+ for _, addr := range desired {
+ if _, ok := s.listeners[addr]; !ok {
+ if err := s.startListener(addr); err != nil {
+ log.Println("[HTTPDNS_NODE][resolve]start listener failed:", err.Error())
+ }
+ }
}
}
-func (s *ResolveServer) waitForShutdown() {
- <-s.quitCh
- ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
- defer cancel()
- _ = s.server.Shutdown(ctx)
+func (s *ResolveServer) watchLoop() {
+ ticker := time.NewTicker(5 * time.Second)
+ defer ticker.Stop()
+ for {
+ select {
+ case <-ticker.C:
+ snapshot := s.snapshotManager.Current()
+ if snapshot == nil {
+ continue
+ }
+ s.certMu.RLock()
+ lastAt := s.certSnapshotAt
+ s.certMu.RUnlock()
+ if snapshot.LoadedAt == lastAt {
+ continue
+ }
+ // Snapshot changed — sync listeners and reload cert
+ addrs := s.desiredAddrs(snapshot)
+ s.syncListeners(addrs)
+ s.reloadCertFromSnapshot(snapshot)
+ case <-s.quitCh:
+ s.shutdownAll()
+ return
+ }
+ }
+}
+
+func (s *ResolveServer) shutdownAll() {
+ s.listenerMu.Lock()
+ defer s.listenerMu.Unlock()
+ for addr := range s.listeners {
+ s.stopListener(addr)
+ }
}
func (s *ResolveServer) handleHealth(writer http.ResponseWriter, _ *http.Request) {
@@ -219,11 +462,22 @@ func (s *ResolveServer) handleResolve(writer http.ResponseWriter, request *http.
return
}
- if snapshot.ClusterID > 0 &&
- loadedApp.App.GetPrimaryClusterId() != snapshot.ClusterID &&
- loadedApp.App.GetBackupClusterId() != snapshot.ClusterID {
- s.writeFailedResolve(writer, requestID, snapshot, loadedApp.App, domain, qtype, httpdnsCodeAppInvalid, "当前应用未绑定到该解析集群", startAt, request, query)
- return
+ if snapshot.ClusterID > 0 {
+ var appClusterIds []int64
+ if len(loadedApp.App.GetClusterIdsJSON()) > 0 {
+ _ = json.Unmarshal(loadedApp.App.GetClusterIdsJSON(), &appClusterIds)
+ }
+ var clusterBound bool
+ for _, cid := range appClusterIds {
+ if cid == snapshot.ClusterID {
+ clusterBound = true
+ break
+ }
+ }
+ if !clusterBound {
+ s.writeFailedResolve(writer, requestID, snapshot, loadedApp.App, domain, qtype, httpdnsCodeAppInvalid, "当前应用未绑定到该解析集群", startAt, request, query)
+ return
+ }
}
loadedDomain := loadedApp.Domains[domain]
@@ -341,11 +595,14 @@ func pickDefaultTTL(snapshot *LoadedSnapshot, app *pb.HTTPDNSApp) int32 {
}
}
if app != nil {
- if cluster := snapshot.Clusters[app.GetPrimaryClusterId()]; cluster != nil && cluster.GetDefaultTTL() > 0 {
- return cluster.GetDefaultTTL()
+ var appClusterIds []int64
+ if len(app.GetClusterIdsJSON()) > 0 {
+ _ = json.Unmarshal(app.GetClusterIdsJSON(), &appClusterIds)
}
- if cluster := snapshot.Clusters[app.GetBackupClusterId()]; cluster != nil && cluster.GetDefaultTTL() > 0 {
- return cluster.GetDefaultTTL()
+ for _, cid := range appClusterIds {
+ if cluster := snapshot.Clusters[cid]; cluster != nil && cluster.GetDefaultTTL() > 0 {
+ return cluster.GetDefaultTTL()
+ }
}
}
return 30
@@ -591,15 +848,19 @@ func normalizeChinaRegion(province string) string {
func normalizeContinent(country string) string {
switch normalizeCountryName(country) {
- case "中国", "中国香港", "中国澳门", "中国台湾", "日本", "韩国", "新加坡", "印度", "泰国", "越南":
+ case "中国", "中国香港", "中国澳门", "中国台湾", "日本", "韩国", "新加坡", "印度", "泰国", "越南",
+ "印度尼西亚", "马来西亚", "菲律宾", "柬埔寨", "缅甸", "老挝", "斯里兰卡", "孟加拉国", "巴基斯坦", "尼泊尔",
+ "阿联酋", "沙特阿拉伯", "土耳其", "以色列", "伊朗", "伊拉克", "卡塔尔", "科威特", "蒙古":
return "亚洲"
- case "美国", "加拿大", "墨西哥":
+ case "美国", "加拿大", "墨西哥", "巴拿马", "哥斯达黎加", "古巴":
return "北美洲"
- case "巴西", "阿根廷", "智利", "哥伦比亚":
+ case "巴西", "阿根廷", "智利", "哥伦比亚", "秘鲁", "委内瑞拉", "厄瓜多尔":
return "南美洲"
- case "德国", "英国", "法国", "荷兰", "西班牙", "意大利", "俄罗斯":
+ case "德国", "英国", "法国", "荷兰", "西班牙", "意大利", "俄罗斯",
+ "波兰", "瑞典", "瑞士", "挪威", "芬兰", "丹麦", "葡萄牙", "爱尔兰", "比利时", "奥地利",
+ "乌克兰", "捷克", "罗马尼亚", "匈牙利", "希腊":
return "欧洲"
- case "南非", "埃及", "尼日利亚", "肯尼亚", "摩洛哥":
+ case "南非", "埃及", "尼日利亚", "肯尼亚", "摩洛哥", "阿尔及利亚", "坦桑尼亚", "埃塞俄比亚", "加纳", "突尼斯":
return "非洲"
case "澳大利亚", "新西兰":
return "大洋洲"
@@ -639,8 +900,8 @@ func pickRuleRecords(rules []*pb.HTTPDNSCustomRule, qtype string, profile *clien
Type: qtype,
IP: value,
Weight: item.GetWeight(),
- Line: ruleLineSummary(rule),
- Region: ruleRegionSummary(rule),
+ Line: lookupIPLineLabel(value),
+ Region: lookupIPRegionSummary(value),
})
}
if len(records) == 0 {
@@ -969,6 +1230,91 @@ func normalizeCountryName(country string) string {
return "智利"
case "哥伦比亚", "colombia":
return "哥伦比亚"
+ // --- 亚洲(新增)---
+ case "印度尼西亚", "indonesia":
+ return "印度尼西亚"
+ case "马来西亚", "malaysia":
+ return "马来西亚"
+ case "菲律宾", "philippines":
+ return "菲律宾"
+ case "柬埔寨", "cambodia":
+ return "柬埔寨"
+ case "缅甸", "myanmar", "burma":
+ return "缅甸"
+ case "老挝", "laos":
+ return "老挝"
+ case "斯里兰卡", "srilanka":
+ return "斯里兰卡"
+ case "孟加拉国", "孟加拉", "bangladesh":
+ return "孟加拉国"
+ case "巴基斯坦", "pakistan":
+ return "巴基斯坦"
+ case "尼泊尔", "nepal":
+ return "尼泊尔"
+ case "阿联酋", "阿拉伯联合酋长国", "uae", "unitedarabemirates":
+ return "阿联酋"
+ case "沙特阿拉伯", "沙特", "saudiarabia", "saudi":
+ return "沙特阿拉伯"
+ case "土耳其", "turkey", "türkiye", "turkiye":
+ return "土耳其"
+ case "以色列", "israel":
+ return "以色列"
+ case "伊朗", "iran":
+ return "伊朗"
+ case "伊拉克", "iraq":
+ return "伊拉克"
+ case "卡塔尔", "qatar":
+ return "卡塔尔"
+ case "科威特", "kuwait":
+ return "科威特"
+ case "蒙古", "mongolia":
+ return "蒙古"
+ // --- 欧洲(新增)---
+ case "波兰", "poland":
+ return "波兰"
+ case "瑞典", "sweden":
+ return "瑞典"
+ case "瑞士", "switzerland":
+ return "瑞士"
+ case "挪威", "norway":
+ return "挪威"
+ case "芬兰", "finland":
+ return "芬兰"
+ case "丹麦", "denmark":
+ return "丹麦"
+ case "葡萄牙", "portugal":
+ return "葡萄牙"
+ case "爱尔兰", "ireland":
+ return "爱尔兰"
+ case "比利时", "belgium":
+ return "比利时"
+ case "奥地利", "austria":
+ return "奥地利"
+ case "乌克兰", "ukraine":
+ return "乌克兰"
+ case "捷克", "czech", "czechrepublic", "czechia":
+ return "捷克"
+ case "罗马尼亚", "romania":
+ return "罗马尼亚"
+ case "匈牙利", "hungary":
+ return "匈牙利"
+ case "希腊", "greece":
+ return "希腊"
+ // --- 北美洲(新增)---
+ case "巴拿马", "panama":
+ return "巴拿马"
+ case "哥斯达黎加", "costarica":
+ return "哥斯达黎加"
+ case "古巴", "cuba":
+ return "古巴"
+ // --- 南美洲(新增)---
+ case "秘鲁", "peru":
+ return "秘鲁"
+ case "委内瑞拉", "venezuela":
+ return "委内瑞拉"
+ case "厄瓜多尔", "ecuador":
+ return "厄瓜多尔"
+ // --- 非洲 ---
case "南非", "southafrica":
return "南非"
case "埃及", "egypt":
@@ -979,6 +1325,17 @@ func normalizeCountryName(country string) string {
return "肯尼亚"
case "摩洛哥", "morocco":
return "摩洛哥"
+ case "阿尔及利亚", "algeria":
+ return "阿尔及利亚"
+ case "坦桑尼亚", "tanzania":
+ return "坦桑尼亚"
+ case "埃塞俄比亚", "ethiopia":
+ return "埃塞俄比亚"
+ case "加纳", "ghana":
+ return "加纳"
+ case "突尼斯", "tunisia":
+ return "突尼斯"
+ // --- 大洋洲 ---
case "澳大利亚", "australia":
return "澳大利亚"
case "新西兰", "newzealand":
@@ -1087,18 +1444,7 @@ func (s *ResolveServer) startAccessLogFlusher() {
if len(batch) == 0 {
return
}
- rpcClient, err := rpc.SharedRPC()
- if err != nil {
- log.Println("[HTTPDNS_NODE][resolve]access-log rpc unavailable:", err.Error())
- return
- }
- _, err = rpcClient.HTTPDNSAccessLogRPC.CreateHTTPDNSAccessLogs(rpcClient.Context(), &pb.CreateHTTPDNSAccessLogsRequest{
- Logs: batch,
- })
- if err != nil {
- log.Println("[HTTPDNS_NODE][resolve]flush access logs failed:", err.Error())
- return
- }
+ s.logWriter.WriteBatch(batch)
batch = batch[:0]
}
@@ -1119,6 +1465,7 @@ func (s *ResolveServer) startAccessLogFlusher() {
flush()
case <-s.quitCh:
flush()
+ _ = s.logWriter.Close()
return
}
}
diff --git a/EdgeHttpDNS/internal/utils/exec/cmd.go b/EdgeHttpDNS/internal/utils/exec/cmd.go
new file mode 100644
index 0000000..f1a4178
--- /dev/null
+++ b/EdgeHttpDNS/internal/utils/exec/cmd.go
@@ -0,0 +1,160 @@
+package executils
+
+import (
+ "bytes"
+ "context"
+ "os"
+ "os/exec"
+ "strings"
+ "time"
+)
+
+type Cmd struct {
+ name string
+ args []string
+ env []string
+ dir string
+
+ ctx context.Context
+ timeout time.Duration
+ cancelFunc func()
+
+ captureStdout bool
+ captureStderr bool
+
+ stdout *bytes.Buffer
+ stderr *bytes.Buffer
+
+ rawCmd *exec.Cmd
+}
+
+func NewCmd(name string, args ...string) *Cmd {
+ return &Cmd{
+ name: name,
+ args: args,
+ }
+}
+
+func NewTimeoutCmd(timeout time.Duration, name string, args ...string) *Cmd {
+ return (&Cmd{
+ name: name,
+ args: args,
+ }).WithTimeout(timeout)
+}
+
+func (this *Cmd) WithTimeout(timeout time.Duration) *Cmd {
+ this.timeout = timeout
+
+ ctx, cancelFunc := context.WithTimeout(context.Background(), timeout)
+ this.ctx = ctx
+ this.cancelFunc = cancelFunc
+
+ return this
+}
+
+func (this *Cmd) WithStdout() *Cmd {
+ this.captureStdout = true
+ return this
+}
+
+func (this *Cmd) WithStderr() *Cmd {
+ this.captureStderr = true
+ return this
+}
+
+func (this *Cmd) WithEnv(env []string) *Cmd {
+ this.env = env
+ return this
+}
+
+func (this *Cmd) WithDir(dir string) *Cmd {
+ this.dir = dir
+ return this
+}
+
+func (this *Cmd) Start() error {
+ var cmd = this.compose()
+ return cmd.Start()
+}
+
+func (this *Cmd) Wait() error {
+ var cmd = this.compose()
+ return cmd.Wait()
+}
+
+func (this *Cmd) Run() error {
+ if this.cancelFunc != nil {
+ defer this.cancelFunc()
+ }
+
+ var cmd = this.compose()
+ return cmd.Run()
+}
+
+func (this *Cmd) RawStdout() string {
+ if this.stdout != nil {
+ return this.stdout.String()
+ }
+ return ""
+}
+
+func (this *Cmd) Stdout() string {
+ return strings.TrimSpace(this.RawStdout())
+}
+
+func (this *Cmd) RawStderr() string {
+ if this.stderr != nil {
+ return this.stderr.String()
+ }
+ return ""
+}
+
+func (this *Cmd) Stderr() string {
+ return strings.TrimSpace(this.RawStderr())
+}
+
+func (this *Cmd) String() string {
+ if this.rawCmd != nil {
+ return this.rawCmd.String()
+ }
+ var newCmd = exec.Command(this.name, this.args...)
+ return newCmd.String()
+}
+
+func (this *Cmd) Process() *os.Process {
+ if this.rawCmd != nil {
+ return this.rawCmd.Process
+ }
+ return nil
+}
+
+func (this *Cmd) compose() *exec.Cmd {
+ if this.rawCmd != nil {
+ return this.rawCmd
+ }
+
+ if this.ctx != nil {
+ this.rawCmd = exec.CommandContext(this.ctx, this.name, this.args...)
+ } else {
+ this.rawCmd = exec.Command(this.name, this.args...)
+ }
+
+ if this.env != nil {
+ this.rawCmd.Env = this.env
+ }
+
+ if len(this.dir) > 0 {
+ this.rawCmd.Dir = this.dir
+ }
+
+ if this.captureStdout {
+ this.stdout = &bytes.Buffer{}
+ this.rawCmd.Stdout = this.stdout
+ }
+ if this.captureStderr {
+ this.stderr = &bytes.Buffer{}
+ this.rawCmd.Stderr = this.stderr
+ }
+
+ return this.rawCmd
+}
diff --git a/EdgeHttpDNS/internal/utils/exec/look_linux.go b/EdgeHttpDNS/internal/utils/exec/look_linux.go
new file mode 100644
index 0000000..e65cb42
--- /dev/null
+++ b/EdgeHttpDNS/internal/utils/exec/look_linux.go
@@ -0,0 +1,57 @@
+//go:build linux
+
+package executils
+
+import (
+ "golang.org/x/sys/unix"
+ "io/fs"
+ "os"
+ "os/exec"
+ "syscall"
+)
+
+// LookPath customize our LookPath() function, to work in broken $PATH environment variable
+func LookPath(file string) (string, error) {
+ result, err := exec.LookPath(file)
+ if err == nil && len(result) > 0 {
+ return result, nil
+ }
+
+ // add common dirs contains executable files these may be excluded in $PATH environment variable
+ var binPaths = []string{
+ "/usr/sbin",
+ "/usr/bin",
+ "/usr/local/sbin",
+ "/usr/local/bin",
+ }
+
+ for _, binPath := range binPaths {
+ var fullPath = binPath + string(os.PathSeparator) + file
+
+ stat, err := os.Stat(fullPath)
+ if err != nil {
+ continue
+ }
+ if stat.IsDir() {
+ return "", syscall.EISDIR
+ }
+
+ var mode = stat.Mode()
+ if mode.IsDir() {
+ return "", syscall.EISDIR
+ }
+ err = syscall.Faccessat(unix.AT_FDCWD, fullPath, unix.X_OK, unix.AT_EACCESS)
+ if err == nil || (err != syscall.ENOSYS && err != syscall.EPERM) {
+ return fullPath, err
+ }
+ if mode&0111 != 0 {
+ return fullPath, nil
+ }
+ return "", fs.ErrPermission
+ }
+
+ return "", &exec.Error{
+ Name: file,
+ Err: exec.ErrNotFound,
+ }
+}
diff --git a/EdgeHttpDNS/internal/utils/exec/look_others.go b/EdgeHttpDNS/internal/utils/exec/look_others.go
new file mode 100644
index 0000000..17132a0
--- /dev/null
+++ b/EdgeHttpDNS/internal/utils/exec/look_others.go
@@ -0,0 +1,9 @@
+//go:build !linux
+
+package executils
+
+import "os/exec"
+
+func LookPath(file string) (string, error) {
+ return exec.LookPath(file)
+}
diff --git a/EdgeHttpDNS/internal/utils/service_linux.go b/EdgeHttpDNS/internal/utils/service_linux.go
index 3b08e92..3a392a4 100644
--- a/EdgeHttpDNS/internal/utils/service_linux.go
+++ b/EdgeHttpDNS/internal/utils/service_linux.go
@@ -6,25 +6,107 @@ package utils
import (
"errors"
"os"
- "os/exec"
+ "time"
teaconst "github.com/TeaOSLab/EdgeHttpDNS/internal/const"
+ executils "github.com/TeaOSLab/EdgeHttpDNS/internal/utils/exec"
+ "github.com/iwind/TeaGo/Tea"
)
var systemdServiceFile = "/etc/systemd/system/" + teaconst.SystemdServiceName + ".service"
+var initServiceFile = "/etc/init.d/" + teaconst.SystemdServiceName
+// Install 安装系统服务
func (m *ServiceManager) Install(exePath string, args []string) error {
if os.Getgid() != 0 {
return errors.New("only root users can install the service")
}
- systemd, err := exec.LookPath("systemctl")
+ systemd, err := executils.LookPath("systemctl")
if err != nil {
- return err
+ // systemd 不可用,降级到 init.d
+ return m.installInitService(exePath, args)
}
- desc := `[Unit]
-Description=GoEdge HTTPDNS Node Service
+ return m.installSystemdService(systemd, exePath, args)
+}
+
+// Start 启动服务
+func (m *ServiceManager) Start() error {
+ if os.Getgid() != 0 {
+ return errors.New("only root users can start the service")
+ }
+
+ // 优先检查 systemd
+ if fileExists(systemdServiceFile) {
+ systemd, err := executils.LookPath("systemctl")
+ if err != nil {
+ return err
+ }
+ return executils.NewTimeoutCmd(10*time.Second, systemd, "start", teaconst.SystemdServiceName+".service").Start()
+ }
+
+ // 降级到 init.d
+ if fileExists(initServiceFile) {
+ return executils.NewTimeoutCmd(10*time.Second, "service", teaconst.ProcessName, "start").Start()
+ }
+
+ return errors.New("no service file found, please install the service first")
+}
+
+// Uninstall 删除服务
+func (m *ServiceManager) Uninstall() error {
+ if os.Getgid() != 0 {
+ return errors.New("only root users can uninstall the service")
+ }
+
+ // systemd
+ if fileExists(systemdServiceFile) {
+ systemd, err := executils.LookPath("systemctl")
+ if err == nil {
+ _ = executils.NewTimeoutCmd(10*time.Second, systemd, "stop", teaconst.SystemdServiceName+".service").Run()
+ _ = executils.NewTimeoutCmd(10*time.Second, systemd, "disable", teaconst.SystemdServiceName+".service").Run()
+ _ = executils.NewTimeoutCmd(10*time.Second, systemd, "daemon-reload").Run()
+ }
+ return os.Remove(systemdServiceFile)
+ }
+
+ // init.d
+ if fileExists(initServiceFile) {
+ _ = executils.NewTimeoutCmd(10*time.Second, "service", teaconst.ProcessName, "stop").Run()
+ chkCmd, err := executils.LookPath("chkconfig")
+ if err == nil {
+ _ = executils.NewTimeoutCmd(10*time.Second, chkCmd, "--del", teaconst.ProcessName).Run()
+ }
+ return os.Remove(initServiceFile)
+ }
+
+ return nil
+}
+
+// installSystemdService 安装 systemd 服务
+func (m *ServiceManager) installSystemdService(systemd, exePath string, args []string) error {
+ shortName := teaconst.SystemdServiceName
+ longName := "GoEdge HTTPDNS"
+
+ // 用 bash 包装启动命令,兼容路径含空格的场景
+ var startCmd = exePath + " daemon"
+ bashPath, _ := executils.LookPath("bash")
+ if len(bashPath) > 0 {
+ startCmd = bashPath + " -c \"" + startCmd + "\""
+ }
+
+ desc := `### BEGIN INIT INFO
+# Provides: ` + shortName + `
+# Required-Start: $all
+# Required-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop:
+# Short-Description: ` + longName + ` Service
+### END INIT INFO
+
+[Unit]
+Description=` + longName + ` Node Service
Before=shutdown.target
After=network-online.target
@@ -32,34 +114,102 @@ After=network-online.target
Type=simple
Restart=always
RestartSec=1s
-ExecStart=` + exePath + ` daemon
+ExecStart=` + startCmd + `
ExecStop=` + exePath + ` stop
ExecReload=` + exePath + ` restart
[Install]
WantedBy=multi-user.target`
- err = os.WriteFile(systemdServiceFile, []byte(desc), 0777)
+ // 权限 0644,systemd 单元文件不需要执行权限
+ err := os.WriteFile(systemdServiceFile, []byte(desc), 0644)
if err != nil {
return err
}
- _ = exec.Command(systemd, "stop", teaconst.SystemdServiceName+".service").Run()
- _ = exec.Command(systemd, "daemon-reload").Run()
- return exec.Command(systemd, "enable", teaconst.SystemdServiceName+".service").Run()
+ // 停止已有服务
+ _ = executils.NewTimeoutCmd(10*time.Second, systemd, "stop", shortName+".service").Run()
+
+ // 重新加载
+ _ = executils.NewTimeoutCmd(10*time.Second, systemd, "daemon-reload").Run()
+
+ // 启用开机自启
+ return executils.NewTimeoutCmd(10*time.Second, systemd, "enable", shortName+".service").Run()
}
-func (m *ServiceManager) Uninstall() error {
- if os.Getgid() != 0 {
- return errors.New("only root users can uninstall the service")
- }
+// installInitService 安装 init.d 服务(降级方案,适用于无 systemd 的旧系统)
+func (m *ServiceManager) installInitService(exePath string, args []string) error {
+ shortName := teaconst.SystemdServiceName
+ longName := "GoEdge HTTPDNS"
- systemd, err := exec.LookPath("systemctl")
+ // 生成 init.d 脚本
+ script := `#!/bin/bash
+### BEGIN INIT INFO
+# Provides: ` + shortName + `
+# Required-Start: $all
+# Required-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: ` + longName + ` Service
+### END INIT INFO
+
+INSTALL_DIR=` + Tea.Root + `
+
+case "$1" in
+start)
+ cd "${INSTALL_DIR}"
+ ` + exePath + ` daemon &
+ echo "` + longName + ` started"
+ ;;
+stop)
+ cd "${INSTALL_DIR}"
+ ` + exePath + ` stop
+ echo "` + longName + ` stopped"
+ ;;
+restart)
+ cd "${INSTALL_DIR}"
+ ` + exePath + ` stop
+ sleep 1
+ ` + exePath + ` daemon &
+ echo "` + longName + ` restarted"
+ ;;
+status)
+ cd "${INSTALL_DIR}"
+ ` + exePath + ` status
+ ;;
+*)
+ echo "Usage: $0 {start|stop|restart|status}"
+ exit 1
+ ;;
+esac
+exit 0
+`
+
+ // init.d 脚本需要执行权限
+ err := os.WriteFile(initServiceFile, []byte(script), 0755)
if err != nil {
return err
}
- _ = exec.Command(systemd, "disable", teaconst.SystemdServiceName+".service").Run()
- _ = exec.Command(systemd, "daemon-reload").Run()
- return os.Remove(systemdServiceFile)
+ // 尝试用 chkconfig 注册(CentOS/RHEL)
+ chkCmd, err := executils.LookPath("chkconfig")
+ if err == nil {
+ _ = executils.NewTimeoutCmd(10*time.Second, chkCmd, "--add", teaconst.ProcessName).Run()
+ return nil
+ }
+
+ // 尝试用 update-rc.d 注册(Debian/Ubuntu)
+ updateRcCmd, err := executils.LookPath("update-rc.d")
+ if err == nil {
+ _ = executils.NewTimeoutCmd(10*time.Second, updateRcCmd, teaconst.ProcessName, "defaults").Run()
+ return nil
+ }
+
+ return nil
+}
+
+// fileExists 检查文件是否存在
+func fileExists(path string) bool {
+ _, err := os.Stat(path)
+ return err == nil
}
diff --git a/EdgeHttpDNS/sdk/android/app/build.gradle b/EdgeHttpDNS/sdk/android/app/build.gradle
index a50f3cb..4994cf4 100644
--- a/EdgeHttpDNS/sdk/android/app/build.gradle
+++ b/EdgeHttpDNS/sdk/android/app/build.gradle
@@ -3,11 +3,11 @@ plugins {
}
android {
- namespace 'com.aliyun.ams.httpdns.demo'
+ namespace 'com.newsdk.ams.httpdns.demo'
compileSdkVersion 34
buildToolsVersion "30.0.2"
defaultConfig {
- applicationId "com.aliyun.ams.httpdns.demo2"
+ applicationId "com.newsdk.ams.httpdns.demo2"
minSdkVersion 19
targetSdkVersion 34
versionCode 1
diff --git a/EdgeHttpDNS/sdk/android/app/proguard-rules.pro b/EdgeHttpDNS/sdk/android/app/proguard-rules.pro
index cd5518a..b79bbd9 100644
--- a/EdgeHttpDNS/sdk/android/app/proguard-rules.pro
+++ b/EdgeHttpDNS/sdk/android/app/proguard-rules.pro
@@ -25,6 +25,6 @@
#-renamesourcefileattribute SourceFile
-dontwarn okhttp3.**
-dontwarn okio.**
--dontwarn com.alibaba.sdk.android.httpdns.test.**
--dontwarn com.alibaba.sdk.android.httpdns.net.HttpDnsNetworkDetector
+-dontwarn com.newsdk.sdk.android.httpdns.test.**
+-dontwarn com.newsdk.sdk.android.httpdns.net.HttpDnsNetworkDetector
-keep class com.aliyun.ams.ipdetector.Inet64Util{*;}
diff --git a/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/HttpDnsActivity.java b/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/HttpDnsActivity.java
deleted file mode 100644
index 9afe155..0000000
--- a/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/HttpDnsActivity.java
+++ /dev/null
@@ -1,357 +0,0 @@
-package com.aliyun.ams.httpdns.demo;
-
-import android.content.Intent;
-import android.os.Bundle;
-import android.view.View;
-import android.widget.ArrayAdapter;
-import android.widget.AutoCompleteTextView;
-import android.widget.Button;
-import android.widget.EditText;
-
-import com.alibaba.sdk.android.httpdns.DegradationFilter;
-import com.alibaba.sdk.android.httpdns.NetType;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.net.HttpDnsNetworkDetector;
-import com.alibaba.sdk.android.httpdns.ranking.IPRankingBean;
-import com.aliyun.ams.httpdns.demo.base.BaseActivity;
-import com.aliyun.ams.httpdns.demo.http.HttpUrlConnectionRequest;
-import com.aliyun.ams.httpdns.demo.okhttp.OkHttpRequest;
-import com.aliyun.ams.httpdns.demo.utils.ThreadUtil;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-/**
- * @author zonglin.nzl
- * @date 8/30/22
- */
-public class HttpDnsActivity extends BaseActivity {
-
- public static final String SCHEMA_HTTPS = "https://";
- public static final String SCHEMA_HTTP = "http://";
-
- public static final String TAOBAO_URL = "www.taobao.com";
- public static final String Aliyun_URL = "www.Aliyun.com";
-
- public static final String[] hosts = new String[]{
- TAOBAO_URL, Aliyun_URL
- };
-
- public static String getUrl(String schema, String host) {
- return schema + host;
- }
-
- /**
- * 瑕佽姹傜殑schema
- */
- private String schema = SCHEMA_HTTPS;
- /**
- * 瑕佽姹傜殑鍩熷悕
- */
- private String host = Aliyun_URL;
- /**
- * 瑕佽В鏋愮殑ip绫诲瀷
- */
- private RequestIpType requestIpType = RequestIpType.v4;
-
- private HttpUrlConnectionRequest httpUrlConnectionRequest;
- private OkHttpRequest okHttpRequest;
- private NetworkRequest networkRequest = httpUrlConnectionRequest;
-
- private ExecutorService worker = Executors.newSingleThreadExecutor();
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- httpUrlConnectionRequest = new HttpUrlConnectionRequest(this);
- okHttpRequest = new OkHttpRequest(this);
- networkRequest = httpUrlConnectionRequest;
-
- addFourButton("鍒囨崲瀹炰緥", v -> {
- MyApp.getInstance().changeHolder();
- sendLog("httpdns瀹炰緥宸插垏鎹?);
- }, "鑾峰彇閰嶇疆", v -> {
- sendLog(MyApp.getInstance().getCurrentHolder().getCurrentConfig());
- sendLog("瑕佽В鏋愮殑鍩熷悕鏄? + host);
- sendLog("瑕佽В鏋愮殑ip绫诲瀷鏄? + requestIpType.name());
- sendLog("瑕佹ā鎷熻姹傜殑url鏄? + getUrl(schema, host));
- sendLog("妯℃嫙璇锋眰鐨勭綉缁滄鏋舵槸" + (networkRequest == httpUrlConnectionRequest ? " HttpUrlConnection" : "OkHttp"));
- }, "娓呴櫎閰嶇疆缂撳瓨", v -> {
- MyApp.getInstance().getCurrentHolder().cleanSp();
- sendLog(MyApp.getInstance().getCurrentHolder().getAccountId() + "閰嶇疆缂撳瓨娓呴櫎, 閲嶅惎鐢熸晥");
- }, "娓呴櫎鏃ュ織", v -> cleanLog());
-
- addTwoButton("寮€鍚痟ttps", v -> {
- MyApp.getInstance().getCurrentHolder().setEnableHttps(true);
- sendLog(MyApp.getInstance().getCurrentHolder().getAccountId() + "寮€鍚痟ttps");
- }, "鍏抽棴https", v -> {
- MyApp.getInstance().getCurrentHolder().setEnableHttps(false);
- sendLog(MyApp.getInstance().getCurrentHolder().getAccountId() + "鍏抽棴https");
- });
-
- addTwoButton("鍏佽杩囨湡IP", v -> {
- MyApp.getInstance().getCurrentHolder().setEnableExpiredIp(true);
- sendLog(MyApp.getInstance().getCurrentHolder().getAccountId() + "鍏佽杩囨湡IP");
- }, "涓嶅厑璁歌繃鏈烮P", v -> {
- MyApp.getInstance().getCurrentHolder().setEnableExpiredIp(false);
- sendLog(MyApp.getInstance().getCurrentHolder().getAccountId() + "涓嶅厑璁歌繃鏈烮P");
- });
-
-
- addTwoButton("鍏佽鎸佷箙鍖栫紦瀛?, v -> {
- MyApp.getInstance().getCurrentHolder().setEnableCacheIp(true);
- sendLog(MyApp.getInstance().getCurrentHolder().getAccountId() + "鍏佽鎸佷箙鍖栫紦瀛?);
- }, "涓嶅厑璁告寔涔呭寲缂撳瓨", v -> {
- MyApp.getInstance().getCurrentHolder().setEnableCacheIp(false);
- sendLog(MyApp.getInstance().getCurrentHolder().getAccountId() + "涓嶅厑璁告寔涔呭寲缂撳瓨");
- });
-
- addThreeButton("璁剧疆涓浗澶ч檰", v -> {
- MyApp.getInstance().getCurrentHolder().setRegion(null);
- sendLog(MyApp.getInstance().getCurrentHolder().getAccountId() + "鍒囨崲鍒颁腑鍥藉ぇ闄?);
- }, "璁剧疆涓浗棣欐腐", v -> {
- MyApp.getInstance().getCurrentHolder().setRegion("hk");
- sendLog(MyApp.getInstance().getCurrentHolder().getAccountId() + "鍒囨崲鍒颁腑鍥介娓?);
- }, "璁剧疆鏂板姞鍧?, v -> {
- MyApp.getInstance().getCurrentHolder().setRegion("sg");
- sendLog(MyApp.getInstance().getCurrentHolder().getAccountId() + "鍒囨崲鍒版柊鍔犲潯");
- });
-
- addEditTextButton("瓒呮椂鏃堕暱 ms", "璁剧疆瓒呮椂ms", view -> {
- EditText et = (EditText) view;
- int timeout = Integer.parseInt(et.getEditableText().toString());
- MyApp.getInstance().getCurrentHolder().setTimeout(timeout);
- sendLog(MyApp.getInstance().getCurrentHolder().getAccountId() + "璁剧疆瓒呮椂 " + timeout);
- });
-
- addTwoButton("寮€鍚檷绾?, v -> {
- // 娉ㄦ剰锛氶檷绾ц繃婊ゅ櫒鐜板湪闇€瑕侀€氳繃InitConfig璁剧疆锛岄噸鍚簲鐢ㄧ敓鏁?
- sendLog(MyApp.getInstance().getCurrentHolder().getAccountId() + "闄嶇骇鍔熻兘闇€瑕侀€氳繃InitConfig閰嶇疆");
- }, "鍏抽棴闄嶇骇", v -> {
- // 娉ㄦ剰锛氶檷绾ц繃婊ゅ櫒鐜板湪闇€瑕侀€氳繃InitConfig璁剧疆锛岄噸鍚簲鐢ㄧ敓鏁?
- sendLog(MyApp.getInstance().getCurrentHolder().getAccountId() + "闄嶇骇鍔熻兘闇€瑕侀€氳繃InitConfig閰嶇疆");
- });
-
- addTwoButton("寮€鍚綉缁滃彉鍖栧悗棰勮В鏋?, v -> {
- // 娉ㄦ剰锛氭鍔熻兘鐜板湪闇€瑕侀€氳繃InitConfig璁剧疆锛岄噸鍚簲鐢ㄧ敓鏁?
- sendLog(MyApp.getInstance().getCurrentHolder().getAccountId() + "缃戠粶鍙樺寲鍚庨瑙f瀽闇€瑕侀€氳繃InitConfig閰嶇疆");
- }, "鍏抽棴缃戠粶鍙樺寲鍚庨瑙f瀽", v -> {
- // 娉ㄦ剰锛氭鍔熻兘鐜板湪闇€瑕侀€氳繃InitConfig璁剧疆锛岄噸鍚簲鐢ㄧ敓鏁?
- sendLog(MyApp.getInstance().getCurrentHolder().getAccountId() + "缃戠粶鍙樺寲鍚庨瑙f瀽闇€瑕侀€氳繃InitConfig閰嶇疆");
- });
-
- addView(R.layout.item_autocomplete_edittext_button, view -> {
- final AutoCompleteTextView actvOne = view.findViewById(R.id.actvOne);
- final EditText etOne = view.findViewById(R.id.etOne);
- Button btnOne = view.findViewById(R.id.btnOne);
-
- actvOne.setHint("璇疯緭鍏ュ煙鍚?);
- ArrayAdapter adapter = new ArrayAdapter(getApplicationContext(),
- android.R.layout.simple_dropdown_item_1line, hosts);
- actvOne.setAdapter(adapter);
-
- etOne.setHint("璇疯緭鍏ヨ嚜瀹氫箟ttl");
-
- btnOne.setText("鎸囧畾鍩熷悕ttl s");
- btnOne.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- String host = actvOne.getEditableText().toString();
- int ttl = Integer.parseInt(etOne.getEditableText().toString());
- MyApp.getInstance().getCurrentHolder().setHostTtl(host, ttl);
- sendLog("鎸囧畾鍩熷悕" + host + "鐨則tl涓? + ttl + "绉?);
- }
- });
- });
-
- addView(R.layout.item_autocomplete_edittext_button, view -> {
- final AutoCompleteTextView actvOne = view.findViewById(R.id.actvOne);
- final EditText etOne = view.findViewById(R.id.etOne);
- Button btnOne = view.findViewById(R.id.btnOne);
-
- actvOne.setHint("鍩熷悕");
- ArrayAdapter adapter = new ArrayAdapter<>(getApplicationContext(),
- android.R.layout.simple_dropdown_item_1line, hosts);
- actvOne.setAdapter(adapter);
-
- etOne.setHint("璇疯緭鍏ョ鍙?);
-
- btnOne.setText("娣诲姞ipRanking閰嶇疆");
- btnOne.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- String host = actvOne.getEditableText().toString();
- int port = Integer.parseInt(etOne.getEditableText().toString());
- MyApp.getInstance().getCurrentHolder().addIpProbeItem(new IPRankingBean(host, port));
- sendLog("娣诲姞鍩熷悕" + host + " 鎺㈡祴");
- }
- });
- });
-
- addAutoCompleteTextViewButton(hosts, "涓荤珯鍩熷悕", "娣诲姞涓荤珯鍩熷悕", view -> {
- AutoCompleteTextView actvOne = (AutoCompleteTextView) view;
- String host = actvOne.getEditableText().toString();
- MyApp.getInstance().getCurrentHolder().addHostWithFixedIp(host);
- sendLog("娣诲姞涓荤珯鍩熷悕" + host);
- });
-
- addAutoCompleteTextViewButton(hosts, "鍩熷悕", "鍒犻櫎鎸囧畾鍩熷悕鐨勭紦瀛?, view -> {
- AutoCompleteTextView actvOne = (AutoCompleteTextView) view;
- String host = actvOne.getEditableText().toString();
- ArrayList list = new ArrayList<>();
- list.add(host);
- MyApp.getInstance().getService().cleanHostCache(list);
- sendLog("娓呴櫎鎸囧畾host鐨勭紦瀛? + host);
- });
-
- addOneButton("娓呴櫎鎵€鏈夌紦瀛?, v -> {
- MyApp.getInstance().getService().cleanHostCache(null);
- sendLog("娓呴櫎鎵€鏈夌紦瀛?);
- });
-
- addFourButton("鑾峰彇褰撳墠缃戠粶鐘舵€?, v -> {
- NetType type = HttpDnsNetworkDetector.getInstance().getNetType(getApplicationContext());
- sendLog("鑾峰彇缃戠粶鐘舵€?" + type.name());
- }, "绂佺敤缃戠粶鐘舵€佺紦瀛?, v -> {
- HttpDnsNetworkDetector.getInstance().disableCache(true);
- sendLog("缃戠粶鐘舵€?绂佺敤缂撳瓨 ");
- }, "寮€鍚綉缁滅姸鎬佺紦瀛?, v -> {
- HttpDnsNetworkDetector.getInstance().disableCache(false);
- sendLog("缃戠粶鐘舵€?寮€鍚紦瀛?");
- }, "娓呴櫎缃戠粶鐘舵€佺紦瀛?, v -> {
- HttpDnsNetworkDetector.getInstance().cleanCache(false);
- sendLog("缃戠粶鐘舵€佹竻闄ょ紦瀛?");
- });
-
- addTwoButton("绂佹璇诲彇IP", v -> {
- HttpDnsNetworkDetector.getInstance().setCheckInterface(false);
- sendLog("鏌ヨ缃戠粶鐘舵€佹椂 绂佹璇诲彇IP");
- }, "鍏佽璇诲彇IP", v -> {
- HttpDnsNetworkDetector.getInstance().setCheckInterface(true);
- sendLog("鏌ヨ缃戠粶鐘舵€佹椂 鍏佽璇诲彇IP");
- });
-
- addAutoCompleteTextViewButton(hosts, "鍩熷悕", "璁剧疆妫€娴嬬綉缁滀娇鐢ㄧ殑鍩熷悕", view -> {
- AutoCompleteTextView actvOne = (AutoCompleteTextView) view;
- String host = actvOne.getEditableText().toString();
- HttpDnsNetworkDetector.getInstance().setHostToCheckNetType(host);
- sendLog("璁剧疆妫€娴嬬綉缁滅姸鎬佷娇鐢ㄧ殑鍩熷悕涓? + host);
- });
-
- addTwoButton("妯℃嫙璇锋眰浣跨敤https璇锋眰", v -> {
- schema = SCHEMA_HTTPS;
- sendLog("娴嬭瘯url浣跨敤https");
- }, "妯℃嫙璇锋眰浣跨敤http璇锋眰", v -> {
- schema = SCHEMA_HTTP;
- sendLog("娴嬭瘯url浣跨敤http");
- });
-
- addTwoButton("HttpUrlConnection", v -> {
- networkRequest = httpUrlConnectionRequest;
- sendLog("鎸囧畾缃戠粶瀹炵幇鏂瑰紡涓篐ttpUrlConnection");
- }, "Okhttp", v -> {
- networkRequest = okHttpRequest;
- sendLog("鎸囧畾缃戠粶瀹炵幇鏂瑰紡涓簅khttp");
- });
-
-
- addFourButton("鎸囧畾v4", v -> {
- requestIpType = RequestIpType.v4;
- sendLog("瑕佽В鏋愮殑IP绫诲瀷鎸囧畾涓篿pv4");
- }, "鎸囧畾v6", v -> {
- requestIpType = RequestIpType.v6;
- sendLog("瑕佽В鏋愮殑IP绫诲瀷鎸囧畾涓篿pv6");
- }, "閮借В鏋?, v -> {
- requestIpType = RequestIpType.both;
- sendLog("瑕佽В鏋愮殑IP绫诲瀷鎸囧畾涓篿pv4鍜宨pv6");
- }, "鑷姩鍒ゆ柇", v -> {
- requestIpType = RequestIpType.auto;
- sendLog("瑕佽В鏋愮殑IP绫诲瀷鏍规嵁缃戠粶鎯呭喌鑷姩鍒ゆ柇");
- });
-
- addAutoCompleteTextViewButton(hosts, "鍩熷悕", "鎸囧畾瑕佽В鏋愮殑鍩熷悕", new OnButtonClick() {
- @Override
- public void onBtnClick(View view) {
- AutoCompleteTextView actvOne = (AutoCompleteTextView) view;
- host = actvOne.getEditableText().toString();
- sendLog("瑕佽В鏋愮殑鍩熷悕" + host);
- }
- });
-
- addTwoButton("寮傛瑙f瀽", v -> worker.execute(new Runnable() {
- @Override
- public void run() {
- sendLog("寮€濮嬪彂璧风綉缁滆姹?);
- sendLog("缃戠粶瀹炵幇鏂瑰紡涓? + (networkRequest == httpUrlConnectionRequest ? "HttpUrlConnection" : "okhttp"));
- String url = getUrl(schema, host);
- sendLog("url is " + url);
- sendLog("httpdns 浣跨敤 寮傛瑙f瀽api");
- sendLog("鎸囧畾瑙f瀽ip绫诲瀷涓? + requestIpType.name());
- networkRequest.updateHttpDnsConfig(true, requestIpType);
- try {
- String response = networkRequest.httpGet(url);
- if (response != null && response.length() > 30) {
- response = response.trim();
- if (response.length() > 30) {
- response = response.substring(0, 30) + "...";
- }
- }
- sendLog("璇锋眰缁撴潫 response is " + response + " 瀹屾暣璁板綍璇风湅logcat鏃ュ織");
- } catch (Exception e) {
- e.printStackTrace();
- sendLog("璇锋眰缁撴潫 鍙戠敓寮傚父 " + e.getClass().getName() + e.getMessage() + " 瀹屾暣璁板綍璇风湅logcat鏃ュ織");
- }
-
- }
- }), "鍚屾瑙f瀽", v -> worker.execute(() -> {
- sendLog("寮€濮嬪彂璧风綉缁滆姹?);
- sendLog("缃戠粶瀹炵幇鏂瑰紡涓? + (networkRequest == httpUrlConnectionRequest ? "HttpUrlConnection" : "okhttp"));
- String url = getUrl(schema, host);
- sendLog("url is " + url);
- sendLog("httpdns 浣跨敤 鍚屾瑙f瀽api");
- sendLog("鎸囧畾瑙f瀽ip绫诲瀷涓? + requestIpType.name());
- networkRequest.updateHttpDnsConfig(false, requestIpType);
- try {
- String response = networkRequest.httpGet(url);
- if (response != null && response.length() > 30) {
- response = response.substring(0, 30) + "...";
- }
- sendLog("璇锋眰缁撴潫 response is " + response + " 瀹屾暣璁板綍璇风湅logcat鏃ュ織");
- } catch (Exception e) {
- e.printStackTrace();
- sendLog("璇锋眰缁撴潫 鍙戠敓寮傚父 " + e.getClass().getName() + e.getMessage() + " 瀹屾暣璁板綍璇风湅logcat鏃ュ織");
- }
- }));
-
- addThreeButton("鍙戣捣棰勮В鏋?, v -> worker.execute(() -> {
- ArrayList tmp = new ArrayList<>();
- Collections.addAll(tmp, hosts);
- MyApp.getInstance().getService().setPreResolveHosts(tmp, requestIpType);
- sendLog("宸插彂璧烽瑙f瀽璇锋眰");
- }), "璺宠浆SDNS娴嬭瘯鐣岄潰",
- v -> startActivity(new Intent(HttpDnsActivity.this, SDNSActivity.class)), "璺宠浆Webview娴嬭瘯鐣岄潰", new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- startActivity(new Intent(HttpDnsActivity.this, WebViewActivity.class));
- }
- });
-
-
- final String[] validHosts = new String[]{
- "www.Aliyun.com",
- "www.taobao.com"
- };
-
- addTwoButton("骞跺彂寮傛璇锋眰", v -> {
- ThreadUtil.multiThreadTest(validHosts, 100, 20, 10 * 60 * 1000, true, requestIpType);
- sendLog("寮傛api骞跺彂娴嬭瘯寮€濮嬶紝澶х害鑰楁椂10鍒嗛挓锛岃鏈€鍚庢煡鐪媗ogcat鏃ュ織锛岀‘璁ょ粨鏋滐紝寤鸿鍏抽棴httpdns鏃ュ織锛岄伩鍏嶆棩蹇楅噺杩囧ぇ");
- }, "骞跺彂鍚屾璇锋眰", v -> {
- ThreadUtil.multiThreadTest(validHosts, 100, 20, 10 * 60 * 1000, false, requestIpType);
- sendLog("鍚屾api骞跺彂娴嬭瘯寮€濮嬶紝澶х害鑰楁椂10鍒嗛挓锛岃鏈€鍚庢煡鐪媗ogcat鏃ュ織锛岀‘璁ょ粨鏋滐紝寤鸿鍏抽棴httpdns鏃ュ織锛岄伩鍏嶆棩蹇楅噺杩囧ぇ");
- });
-
- }
-}
-
diff --git a/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/SDNSActivity.java b/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/SDNSActivity.java
deleted file mode 100644
index 296f7ba..0000000
--- a/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/SDNSActivity.java
+++ /dev/null
@@ -1,133 +0,0 @@
-package com.aliyun.ams.httpdns.demo;
-
-import android.os.Bundle;
-import android.view.View;
-import android.widget.AutoCompleteTextView;
-import android.widget.EditText;
-
-import com.alibaba.sdk.android.httpdns.HTTPDNSResult;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.aliyun.ams.httpdns.demo.base.BaseActivity;
-
-import java.util.HashMap;
-
-import static com.aliyun.ams.httpdns.demo.HttpDnsActivity.Aliyun_URL;
-
-public class SDNSActivity extends BaseActivity {
-
- private final HashMap globalParams = new HashMap<>();
- /**
- * 瑕佽姹傜殑鍩熷悕
- */
- private String host = HttpDnsActivity.Aliyun_URL;
- /**
- * 瑕佽В鏋愮殑ip绫诲瀷
- */
- private RequestIpType requestIpType = RequestIpType.v4;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- addEditTextEditTextButton("key", "value", "娣诲姞鍏ㄥ眬閰嶇疆", new OnButtonClickMoreView() {
- @Override
- public void onBtnClick(View[] views) {
- EditText etOne = (EditText) views[0];
- EditText etTwo = (EditText) views[1];
-
- String key = etOne.getEditableText().toString();
- String value = etTwo.getEditableText().toString();
-
- globalParams.put(key, value);
-
- // 娉ㄦ剰锛歋DNS鍏ㄥ眬鍙傛暟鐜板湪闇€瑕侀€氳繃InitConfig璁剧疆锛岄噸鍚簲鐢ㄧ敓鏁?
- sendLog("娣诲姞鍏ㄥ眬鍙傛暟 " + key + " : " + value);
- }
- });
-
- addOneButton("娓呴櫎鍏ㄥ眬閰嶇疆", new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- globalParams.clear();
- // 娉ㄦ剰锛歋DNS鍏ㄥ眬鍙傛暟鐜板湪闇€瑕侀€氳繃InitConfig璁剧疆锛岄噸鍚簲鐢ㄧ敓鏁?
- sendLog("娓呴櫎鍏ㄥ眬鍙傛暟");
- }
- });
-
- addFourButton("鎸囧畾v4", new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- requestIpType = RequestIpType.v4;
- sendLog("瑕佽В鏋愮殑IP绫诲瀷鎸囧畾涓篿pv4");
- }
- }, "鎸囧畾v6", new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- requestIpType = RequestIpType.v6;
- sendLog("瑕佽В鏋愮殑IP绫诲瀷鎸囧畾涓篿pv6");
- }
- }, "閮借В鏋?, new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- requestIpType = RequestIpType.both;
- sendLog("瑕佽В鏋愮殑IP绫诲瀷鎸囧畾涓篿pv4鍜宨pv6");
- }
- }, "鑷姩鍒ゆ柇", new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- requestIpType = RequestIpType.auto;
- sendLog("瑕佽В鏋愮殑IP绫诲瀷鏍规嵁缃戠粶鎯呭喌鑷姩鍒ゆ柇");
- }
- });
-
- addAutoCompleteTextViewButton(HttpDnsActivity.hosts, "鍩熷悕", "鎸囧畾瑕佽В鏋愮殑鍩熷悕", new OnButtonClick() {
- @Override
- public void onBtnClick(View view) {
- AutoCompleteTextView actvOne = (AutoCompleteTextView) view;
- host = actvOne.getEditableText().toString();
- sendLog("瑕佽В鏋愮殑鍩熷悕" + host);
- }
- });
-
- addEditTextEditTextButton("key", "value", "鍙戣捣璇锋眰", new OnButtonClickMoreView() {
- @Override
- public void onBtnClick(View[] views) {
- EditText etOne = (EditText) views[0];
- EditText etTwo = (EditText) views[1];
-
- String key = etOne.getEditableText().toString();
- String value = etTwo.getEditableText().toString();
-
- HashMap map = new HashMap<>();
-
- map.put(key, value);
-
- sendLog("鍙戣捣SDNS璇锋眰 requestIpType is " + requestIpType.name());
- HTTPDNSResult result = MyApp.getInstance().getService().getIpsByHostAsync(host, requestIpType, map, "娴嬭瘯SDNS");
- sendLog("缁撴灉 " + result);
- }
- });
-
- addTwoButton("scale1鍙傛暟璇锋眰", new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- HashMap map = new HashMap<>();
- map.put("scale", "scale1");
- sendLog("鍙戣捣SDNS璇锋眰 requestIpType is " + requestIpType.name() + " scale : scale1");
- HTTPDNSResult result = MyApp.getInstance().getService().getIpsByHostAsync(host, requestIpType, map, "娴嬭瘯1");
- sendLog("缁撴灉 " + result);
- }
- }, "scale2鍙傛暟璇锋眰", new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- HashMap map = new HashMap<>();
- map.put("scale", "scale2");
- sendLog("鍙戣捣SDNS璇锋眰 requestIpType is " + requestIpType.name() + " scale : scale2");
- HTTPDNSResult result = MyApp.getInstance().getService().getIpsByHostAsync(host, requestIpType, map, "娴嬭瘯2");
- sendLog("缁撴灉 " + result);
- }
- });
-
- }
-}
-
diff --git a/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/utils/ThreadUtil.java b/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/utils/ThreadUtil.java
deleted file mode 100644
index f16c805..0000000
--- a/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/utils/ThreadUtil.java
+++ /dev/null
@@ -1,128 +0,0 @@
-package com.aliyun.ams.httpdns.demo.utils;
-
-import android.util.Log;
-
-import com.alibaba.sdk.android.httpdns.HTTPDNSResult;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.SyncService;
-
-import com.aliyun.ams.httpdns.demo.MyApp;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Random;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-public class ThreadUtil {
-
- public static void multiThreadTest(final String[] validHosts, final int hostCount,
- final int threadCount, final int executeTime,
- final boolean async, final RequestIpType type) {
- int validCount = validHosts.length;
- if (validCount > hostCount) {
- validCount = hostCount;
- }
- final int tmpValidCount = validCount;
- Log.d(MyApp.TAG,
- threadCount + "绾跨▼骞跺彂锛屾墽琛? + executeTime + ", 鎬诲煙鍚? + hostCount + "涓紝鏈夋晥"
- + validCount + "涓?);
- new Thread(new Runnable() {
- @Override
- public void run() {
- final ArrayList hosts = new ArrayList<>(hostCount);
- for (int i = 0; i < hostCount - tmpValidCount; i++) {
- hosts.add("test" + i + ".Aliyun.com");
- }
- hosts.addAll(Arrays.asList(validHosts).subList(0, tmpValidCount));
-
- final CountDownLatch testLatch = new CountDownLatch(threadCount);
- ExecutorService service = Executors.newFixedThreadPool(threadCount);
- final CountDownLatch countDownLatch = new CountDownLatch(threadCount);
- for (int i = 0; i < threadCount; i++) {
- service.execute(new Runnable() {
- @Override
- public void run() {
- countDownLatch.countDown();
- try {
- countDownLatch.await();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- Random random = new Random(Thread.currentThread().getId());
- int allRequestCount = 0;
- int slowRequestCount = 0;
- int emptyResponseCount = 0;
- long maxSlowRequestTime = 0;
- long subSlowRequestTime = 0;
- int taobaoCount = 0;
- int taobaoSuccessCount = 0;
- long firstTaobaoTime = 0;
- long firstTaobaoSuccessTime = 0;
- long begin = System.currentTimeMillis();
- while (System.currentTimeMillis() - begin < executeTime) {
- String host = hosts.get(random.nextInt(hostCount));
- long startRequestTime = System.currentTimeMillis();
- HTTPDNSResult ips = null;
- if (async) {
- ips = MyApp.getInstance().getService().getIpsByHostAsync(host,
- type);
- } else {
- ips =
- ((SyncService)MyApp.getInstance().getService()).getByHost(
- host, type);
- }
- long endRequestTime = System.currentTimeMillis();
- if (host.equals("www.taobao.com")) {
- if (taobaoCount == 0) {
- firstTaobaoTime = System.currentTimeMillis();
- }
- taobaoCount++;
- if (ips.getIps() != null && ips.getIps().length > 0) {
- if (taobaoSuccessCount == 0) {
- firstTaobaoSuccessTime = System.currentTimeMillis();
- }
- taobaoSuccessCount++;
- }
- }
- if (endRequestTime - startRequestTime > 100) {
- slowRequestCount++;
- subSlowRequestTime += endRequestTime - startRequestTime;
- if (maxSlowRequestTime < endRequestTime - startRequestTime) {
- maxSlowRequestTime = endRequestTime - startRequestTime;
- }
- }
- if (ips == null || ips.getIps() == null
- || ips.getIps().length == 0) {
- emptyResponseCount++;
- }
- allRequestCount++;
- }
-
- String msg = Thread.currentThread().getId() + " allRequestCount: "
- + allRequestCount + ", slowRequestCount: " + slowRequestCount
- + ", emptyResponseCount: " + emptyResponseCount
- + ", maxSlowRequestTime : " + maxSlowRequestTime
- + ", avgSlowRequestTime: " + (slowRequestCount == 0 ? 0
- : subSlowRequestTime / slowRequestCount)
- + ", taoRequestCount: " + taobaoCount + ", "
- + "taoSuccessRequestCount: "
- + taobaoSuccessCount + ", firstTaoRequestTime: " + (firstTaobaoTime
- - begin) + ", firstSuccessTaoRequestTime: " + (
- firstTaobaoSuccessTime - begin);
- Log.w(MyApp.TAG, "asyncMulti " + msg);
- testLatch.countDown();
- }
- });
- }
-
- try {
- testLatch.await();
- } catch (InterruptedException e) {
- }
- }
- }).start();
- }
-}
-
diff --git a/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/HttpDnsActivity.java b/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/HttpDnsActivity.java
new file mode 100644
index 0000000..dda4a37
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/HttpDnsActivity.java
@@ -0,0 +1,159 @@
+package com.newsdk.ams.httpdns.demo;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.AutoCompleteTextView;
+
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.ams.httpdns.demo.base.BaseActivity;
+import com.newsdk.ams.httpdns.demo.http.HttpUrlConnectionRequest;
+import com.newsdk.ams.httpdns.demo.okhttp.OkHttpRequest;
+
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+public class HttpDnsActivity extends BaseActivity {
+
+ private static final String SCHEMA_HTTPS = "https://";
+ private static final String SCHEMA_HTTP = "http://";
+
+ private static final String[] HOSTS = new String[] {
+ "www.taobao.com",
+ "www.Aliyun.com"
+ };
+
+ private String schema = SCHEMA_HTTPS;
+ private String host = HOSTS[0];
+ private RequestIpType requestIpType = RequestIpType.v4;
+
+ private HttpUrlConnectionRequest httpUrlConnectionRequest;
+ private OkHttpRequest okHttpRequest;
+ private NetworkRequest networkRequest;
+
+ private final ExecutorService worker = Executors.newSingleThreadExecutor();
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ httpUrlConnectionRequest = new HttpUrlConnectionRequest(this);
+ okHttpRequest = new OkHttpRequest(this);
+ networkRequest = httpUrlConnectionRequest;
+
+ addFourButton(
+ "Switch instance",
+ v -> {
+ MyApp.getInstance().changeHolder();
+ sendLog("Instance switched.");
+ },
+ "Show config",
+ v -> sendLog(MyApp.getInstance().getCurrentHolder().getCurrentConfig()),
+ "Clear holder cache",
+ v -> {
+ MyApp.getInstance().getCurrentHolder().cleanSp();
+ sendLog("Holder cache cleared.");
+ },
+ "Clear log",
+ v -> cleanLog()
+ );
+
+ addAutoCompleteTextViewButton(HOSTS, "Host", "Set host", view -> {
+ AutoCompleteTextView actv = (AutoCompleteTextView) view;
+ host = actv.getEditableText().toString();
+ sendLog("Host set to: " + host);
+ });
+
+ addTwoButton(
+ "Use HTTPS",
+ v -> {
+ schema = SCHEMA_HTTPS;
+ sendLog("Schema set to HTTPS.");
+ },
+ "Use HTTP",
+ v -> {
+ schema = SCHEMA_HTTP;
+ sendLog("Schema set to HTTP.");
+ }
+ );
+
+ addFourButton(
+ "IP type v4",
+ v -> {
+ requestIpType = RequestIpType.v4;
+ sendLog("Request IP type: v4");
+ },
+ "IP type v6",
+ v -> {
+ requestIpType = RequestIpType.v6;
+ sendLog("Request IP type: v6");
+ },
+ "IP type both",
+ v -> {
+ requestIpType = RequestIpType.both;
+ sendLog("Request IP type: both");
+ },
+ "IP type auto",
+ v -> {
+ requestIpType = RequestIpType.auto;
+ sendLog("Request IP type: auto");
+ }
+ );
+
+ addTwoButton(
+ "HttpUrlConnection",
+ v -> {
+ networkRequest = httpUrlConnectionRequest;
+ sendLog("Network stack: HttpUrlConnection");
+ },
+ "OkHttp",
+ v -> {
+ networkRequest = okHttpRequest;
+ sendLog("Network stack: OkHttp");
+ }
+ );
+
+ addTwoButton(
+ "Resolve sync",
+ v -> worker.execute(() -> executeResolve(false)),
+ "Resolve async",
+ v -> worker.execute(() -> executeResolve(true))
+ );
+
+ addTwoButton(
+ "Open SDNS page",
+ v -> startActivity(new Intent(HttpDnsActivity.this, SDNSActivity.class)),
+ "Open WebView page",
+ new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ startActivity(new Intent(HttpDnsActivity.this, WebViewActivity.class));
+ }
+ }
+ );
+ }
+
+ @Override
+ protected void onDestroy() {
+ super.onDestroy();
+ worker.shutdownNow();
+ }
+
+ private void executeResolve(boolean async) {
+ String url = schema + host;
+ sendLog("Request URL: " + url);
+ sendLog("Request IP type: " + requestIpType.name());
+ sendLog("Async mode: " + async);
+ sendLog("Stack: " + (networkRequest == httpUrlConnectionRequest ? "HttpUrlConnection" : "OkHttp"));
+ try {
+ networkRequest.updateHttpDnsConfig(async, requestIpType);
+ String response = networkRequest.httpGet(url);
+ if (response != null && response.length() > 120) {
+ response = response.substring(0, 120) + "...";
+ }
+ sendLog("Response: " + response);
+ } catch (Exception e) {
+ sendLog("Request failed: " + e.getClass().getSimpleName() + " " + e.getMessage());
+ }
+ }
+}
diff --git a/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/HttpDnsHolder.java b/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/HttpDnsHolder.java
similarity index 96%
rename from EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/HttpDnsHolder.java
rename to EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/HttpDnsHolder.java
index 89d50fc..1bb2c63 100644
--- a/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/HttpDnsHolder.java
+++ b/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/HttpDnsHolder.java
@@ -1,15 +1,15 @@
-package com.aliyun.ams.httpdns.demo;
+package com.newsdk.ams.httpdns.demo;
import android.content.Context;
import android.content.SharedPreferences;
-import com.alibaba.sdk.android.httpdns.CacheTtlChanger;
-import com.alibaba.sdk.android.httpdns.HttpDns;
-import com.alibaba.sdk.android.httpdns.HttpDnsService;
-import com.alibaba.sdk.android.httpdns.InitConfig;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.ranking.IPRankingBean;
-import com.aliyun.ams.httpdns.demo.utils.SpUtil;
+import com.newsdk.sdk.android.httpdns.CacheTtlChanger;
+import com.newsdk.sdk.android.httpdns.HttpDns;
+import com.newsdk.sdk.android.httpdns.HttpDnsService;
+import com.newsdk.sdk.android.httpdns.InitConfig;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.ranking.IPRankingBean;
+import com.newsdk.ams.httpdns.demo.utils.SpUtil;
import org.json.JSONArray;
import org.json.JSONException;
diff --git a/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/MyApp.java b/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/MyApp.java
similarity index 92%
rename from EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/MyApp.java
rename to EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/MyApp.java
index 7936ae9..2addff8 100644
--- a/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/MyApp.java
+++ b/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/MyApp.java
@@ -1,13 +1,13 @@
-package com.aliyun.ams.httpdns.demo;
+package com.newsdk.ams.httpdns.demo;
import android.app.Application;
import android.content.SharedPreferences;
import android.util.Log;
-import com.alibaba.sdk.android.httpdns.HttpDnsService;
-import com.alibaba.sdk.android.httpdns.ILogger;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-import com.aliyun.ams.httpdns.demo.utils.SpUtil;
+import com.newsdk.sdk.android.httpdns.HttpDnsService;
+import com.newsdk.sdk.android.httpdns.ILogger;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.ams.httpdns.demo.utils.SpUtil;
public class MyApp extends Application {
diff --git a/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/NetworkRequest.java b/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/NetworkRequest.java
similarity index 76%
rename from EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/NetworkRequest.java
rename to EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/NetworkRequest.java
index fc54dde..b41f0f1 100644
--- a/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/NetworkRequest.java
+++ b/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/NetworkRequest.java
@@ -1,6 +1,6 @@
-package com.aliyun.ams.httpdns.demo;
+package com.newsdk.ams.httpdns.demo;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
public interface NetworkRequest {
diff --git a/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/SDNSActivity.java b/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/SDNSActivity.java
new file mode 100644
index 0000000..201b1f4
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/SDNSActivity.java
@@ -0,0 +1,126 @@
+package com.newsdk.ams.httpdns.demo;
+
+import android.os.Bundle;
+import android.view.View;
+import android.widget.AutoCompleteTextView;
+import android.widget.EditText;
+
+import com.newsdk.sdk.android.httpdns.HTTPDNSResult;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.ams.httpdns.demo.base.BaseActivity;
+
+import java.util.HashMap;
+
+public class SDNSActivity extends BaseActivity {
+
+ private static final String[] HOSTS = new String[] {
+ "www.Aliyun.com",
+ "www.taobao.com"
+ };
+
+ private final HashMap globalParams = new HashMap<>();
+ private String host = HOSTS[0];
+ private RequestIpType requestIpType = RequestIpType.v4;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ addEditTextEditTextButton("key", "value", "Add global param", new OnButtonClickMoreView() {
+ @Override
+ public void onBtnClick(View[] views) {
+ EditText keyView = (EditText) views[0];
+ EditText valueView = (EditText) views[1];
+ String key = keyView.getEditableText().toString();
+ String value = valueView.getEditableText().toString();
+ globalParams.put(key, value);
+ sendLog("Global param added: " + key + "=" + value);
+ }
+ });
+
+ addOneButton("Clear global params", new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ globalParams.clear();
+ sendLog("Global params cleared.");
+ }
+ });
+
+ addFourButton(
+ "IP type v4",
+ new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ requestIpType = RequestIpType.v4;
+ sendLog("Request IP type: v4");
+ }
+ },
+ "IP type v6",
+ new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ requestIpType = RequestIpType.v6;
+ sendLog("Request IP type: v6");
+ }
+ },
+ "IP type both",
+ new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ requestIpType = RequestIpType.both;
+ sendLog("Request IP type: both");
+ }
+ },
+ "IP type auto",
+ new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ requestIpType = RequestIpType.auto;
+ sendLog("Request IP type: auto");
+ }
+ }
+ );
+
+ addAutoCompleteTextViewButton(HOSTS, "Host", "Set host", new OnButtonClick() {
+ @Override
+ public void onBtnClick(View view) {
+ AutoCompleteTextView hostView = (AutoCompleteTextView) view;
+ host = hostView.getEditableText().toString();
+ sendLog("Host set to: " + host);
+ }
+ });
+
+ addEditTextEditTextButton("key", "value", "Resolve with param", new OnButtonClickMoreView() {
+ @Override
+ public void onBtnClick(View[] views) {
+ EditText keyView = (EditText) views[0];
+ EditText valueView = (EditText) views[1];
+ HashMap params = new HashMap<>(globalParams);
+ params.put(keyView.getEditableText().toString(), valueView.getEditableText().toString());
+ HTTPDNSResult result = MyApp.getInstance().getService().getIpsByHostAsync(
+ host, requestIpType, params, "sdns-demo");
+ sendLog("SDNS result: " + result);
+ }
+ });
+
+ addTwoButton("Resolve scale1", new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ HashMap params = new HashMap<>(globalParams);
+ params.put("scale", "scale1");
+ HTTPDNSResult result = MyApp.getInstance().getService().getIpsByHostAsync(
+ host, requestIpType, params, "sdns-demo");
+ sendLog("scale1 result: " + result);
+ }
+ }, "Resolve scale2", new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ HashMap params = new HashMap<>(globalParams);
+ params.put("scale", "scale2");
+ HTTPDNSResult result = MyApp.getInstance().getService().getIpsByHostAsync(
+ host, requestIpType, params, "sdns-demo");
+ sendLog("scale2 result: " + result);
+ }
+ });
+ }
+}
diff --git a/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/WebViewActivity.java b/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/WebViewActivity.java
similarity index 99%
rename from EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/WebViewActivity.java
rename to EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/WebViewActivity.java
index 2341bf4..9381c5a 100644
--- a/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/WebViewActivity.java
+++ b/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/WebViewActivity.java
@@ -1,4 +1,4 @@
-package com.aliyun.ams.httpdns.demo;
+package com.newsdk.ams.httpdns.demo;
import android.annotation.SuppressLint;
import android.app.Activity;
diff --git a/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/base/BaseActivity.java b/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/base/BaseActivity.java
similarity index 98%
rename from EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/base/BaseActivity.java
rename to EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/base/BaseActivity.java
index 330455f..c30381d 100644
--- a/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/base/BaseActivity.java
+++ b/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/base/BaseActivity.java
@@ -1,4 +1,4 @@
-package com.aliyun.ams.httpdns.demo.base;
+package com.newsdk.ams.httpdns.demo.base;
import android.app.Activity;
import android.os.Bundle;
@@ -17,8 +17,8 @@ import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.TextView;
-import com.aliyun.ams.httpdns.demo.MyApp;
-import com.aliyun.ams.httpdns.demo.R;
+import com.newsdk.ams.httpdns.demo.MyApp;
+import com.newsdk.ams.httpdns.demo.R;
public class BaseActivity extends Activity {
diff --git a/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/http/HttpUrlConnectionRequest.java b/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/http/HttpUrlConnectionRequest.java
similarity index 95%
rename from EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/http/HttpUrlConnectionRequest.java
rename to EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/http/HttpUrlConnectionRequest.java
index 4b71ba7..77f3dc3 100644
--- a/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/http/HttpUrlConnectionRequest.java
+++ b/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/http/HttpUrlConnectionRequest.java
@@ -1,4 +1,4 @@
-package com.aliyun.ams.httpdns.demo.http;
+package com.newsdk.ams.httpdns.demo.http;
import android.content.Context;
@@ -6,14 +6,14 @@ import android.net.SSLCertificateSocketFactory;
import android.os.Build;
import android.util.Log;
-import com.alibaba.sdk.android.httpdns.HTTPDNSResult;
-import com.alibaba.sdk.android.httpdns.NetType;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.SyncService;
-import com.alibaba.sdk.android.httpdns.net.HttpDnsNetworkDetector;
-import com.aliyun.ams.httpdns.demo.MyApp;
-import com.aliyun.ams.httpdns.demo.NetworkRequest;
-import com.aliyun.ams.httpdns.demo.utils.Util;
+import com.newsdk.sdk.android.httpdns.HTTPDNSResult;
+import com.newsdk.sdk.android.httpdns.NetType;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.SyncService;
+import com.newsdk.sdk.android.httpdns.net.HttpDnsNetworkDetector;
+import com.newsdk.ams.httpdns.demo.MyApp;
+import com.newsdk.ams.httpdns.demo.NetworkRequest;
+import com.newsdk.ams.httpdns.demo.utils.Util;
import java.io.BufferedReader;
import java.io.IOException;
diff --git a/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/okhttp/OkHttpRequest.java b/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/okhttp/OkHttpRequest.java
similarity index 90%
rename from EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/okhttp/OkHttpRequest.java
rename to EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/okhttp/OkHttpRequest.java
index 75b9b95..f502dc6 100644
--- a/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/okhttp/OkHttpRequest.java
+++ b/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/okhttp/OkHttpRequest.java
@@ -1,16 +1,16 @@
-package com.aliyun.ams.httpdns.demo.okhttp;
+package com.newsdk.ams.httpdns.demo.okhttp;
import android.content.Context;
import android.util.Log;
-import com.alibaba.sdk.android.httpdns.HTTPDNSResult;
-import com.alibaba.sdk.android.httpdns.NetType;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.SyncService;
-import com.alibaba.sdk.android.httpdns.net.HttpDnsNetworkDetector;
-import com.aliyun.ams.httpdns.demo.MyApp;
-import com.aliyun.ams.httpdns.demo.NetworkRequest;
-import com.aliyun.ams.httpdns.demo.utils.Util;
+import com.newsdk.sdk.android.httpdns.HTTPDNSResult;
+import com.newsdk.sdk.android.httpdns.NetType;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.SyncService;
+import com.newsdk.sdk.android.httpdns.net.HttpDnsNetworkDetector;
+import com.newsdk.ams.httpdns.demo.MyApp;
+import com.newsdk.ams.httpdns.demo.NetworkRequest;
+import com.newsdk.ams.httpdns.demo.utils.Util;
import java.net.HttpURLConnection;
import java.net.InetAddress;
diff --git a/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/utils/SpUtil.java b/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/utils/SpUtil.java
similarity index 94%
rename from EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/utils/SpUtil.java
rename to EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/utils/SpUtil.java
index e2843e0..2ab142a 100644
--- a/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/utils/SpUtil.java
+++ b/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/utils/SpUtil.java
@@ -1,4 +1,4 @@
-package com.aliyun.ams.httpdns.demo.utils;
+package com.newsdk.ams.httpdns.demo.utils;
import android.content.Context;
import android.content.SharedPreferences;
diff --git a/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/utils/ThreadUtil.java b/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/utils/ThreadUtil.java
new file mode 100644
index 0000000..1a50385
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/utils/ThreadUtil.java
@@ -0,0 +1,94 @@
+package com.newsdk.ams.httpdns.demo.utils;
+
+import android.util.Log;
+
+import com.newsdk.sdk.android.httpdns.HTTPDNSResult;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.SyncService;
+import com.newsdk.ams.httpdns.demo.MyApp;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Random;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+public class ThreadUtil {
+
+ public static void multiThreadTest(
+ final String[] validHosts,
+ final int hostCount,
+ final int threadCount,
+ final int executeTime,
+ final boolean async,
+ final RequestIpType type
+ ) {
+ new Thread(() -> runMultiThreadTest(validHosts, hostCount, threadCount, executeTime, async, type)).start();
+ }
+
+ private static void runMultiThreadTest(
+ String[] validHosts,
+ int hostCount,
+ int threadCount,
+ int executeTime,
+ boolean async,
+ RequestIpType type
+ ) {
+ int validCount = Math.min(validHosts.length, hostCount);
+ Log.d(MyApp.TAG, "Start multiThreadTest, threads=" + threadCount
+ + ", executeTimeMs=" + executeTime
+ + ", hostCount=" + hostCount
+ + ", validHostCount=" + validCount
+ + ", async=" + async
+ + ", ipType=" + type.name());
+
+ ArrayList hosts = new ArrayList<>(hostCount);
+ for (int i = 0; i < hostCount - validCount; i++) {
+ hosts.add("test" + i + ".Aliyun.com");
+ }
+ hosts.addAll(Arrays.asList(validHosts).subList(0, validCount));
+
+ ExecutorService pool = Executors.newFixedThreadPool(threadCount);
+ CountDownLatch done = new CountDownLatch(threadCount);
+
+ for (int i = 0; i < threadCount; i++) {
+ pool.execute(() -> {
+ Random random = new Random(Thread.currentThread().getId());
+ long begin = System.currentTimeMillis();
+ int requestCount = 0;
+ int successCount = 0;
+
+ while (System.currentTimeMillis() - begin < executeTime) {
+ String host = hosts.get(random.nextInt(hosts.size()));
+ try {
+ HTTPDNSResult result;
+ if (async) {
+ result = MyApp.getInstance().getService().getIpsByHostAsync(host, type);
+ } else {
+ result = ((SyncService) MyApp.getInstance().getService()).getByHost(host, type);
+ }
+ if (result != null && result.getIps() != null && result.getIps().length > 0) {
+ successCount++;
+ }
+ } catch (Throwable t) {
+ Log.w(MyApp.TAG, "multiThreadTest request failed: " + t.getMessage());
+ }
+ requestCount++;
+ }
+
+ Log.w(MyApp.TAG, "multiThreadTest thread=" + Thread.currentThread().getId()
+ + ", requestCount=" + requestCount
+ + ", successCount=" + successCount);
+ done.countDown();
+ });
+ }
+
+ try {
+ done.await();
+ } catch (InterruptedException ignored) {
+ } finally {
+ pool.shutdownNow();
+ }
+ }
+}
diff --git a/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/utils/Util.java b/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/utils/Util.java
similarity index 85%
rename from EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/utils/Util.java
rename to EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/utils/Util.java
index 3dd49f2..65b4281 100644
--- a/EdgeHttpDNS/sdk/android/app/src/main/java/com/aliyun/ams/httpdns/demo/utils/Util.java
+++ b/EdgeHttpDNS/sdk/android/app/src/main/java/com/newsdk/ams/httpdns/demo/utils/Util.java
@@ -1,6 +1,6 @@
-package com.aliyun.ams.httpdns.demo.utils;
+package com.newsdk.ams.httpdns.demo.utils;
-import com.alibaba.sdk.android.httpdns.HTTPDNSResult;
+import com.newsdk.sdk.android.httpdns.HTTPDNSResult;
import java.lang.reflect.Field;
diff --git a/EdgeHttpDNS/sdk/android/app/src/main/res/drawable/aliyun_bg.9.png b/EdgeHttpDNS/sdk/android/app/src/main/res/drawable/new_bg.9.png
similarity index 100%
rename from EdgeHttpDNS/sdk/android/app/src/main/res/drawable/aliyun_bg.9.png
rename to EdgeHttpDNS/sdk/android/app/src/main/res/drawable/new_bg.9.png
diff --git a/EdgeHttpDNS/sdk/android/app/src/main/res/layout/activity_base.xml b/EdgeHttpDNS/sdk/android/app/src/main/res/layout/activity_base.xml
index a37750e..4ec412c 100644
--- a/EdgeHttpDNS/sdk/android/app/src/main/res/layout/activity_base.xml
+++ b/EdgeHttpDNS/sdk/android/app/src/main/res/layout/activity_base.xml
@@ -11,7 +11,7 @@
+ android:background="@drawable/new_bg" />
- 銆愰樋閲屼簯HttpDns銆慏emo绋嬪簭
+
+ 閵嗘劙妯嬮柌灞肩隘HttpDns閵嗘厪emo缁嬪绨
Settings
- 鏅€氳В鏋?/string>
- 瑙f瀽娣樺疂鍩熷悕
- 瑙f瀽apple鍩熷悕
- 瑙f瀽璞嗙摚鍩熷悕
- HTTPS寮€鍏?/string>
- 璁剧疆瓒呮椂
- 鍏佽杩囨湡鍩熷悕
- 寮€鍚寔涔呭寲缂撳瓨
- 闄嶇骇绛栫暐
- 棰勮В鏋?/string>
+ 閺咁噣鈧俺袙閺
+ 鐟欙絾鐎藉ǎ妯虹杺閸╃喎鎮
+ 鐟欙絾鐎絘pple閸╃喎鎮
+ 鐟欙絾鐎界挒鍡欐憵閸╃喎鎮
+ HTTPS瀵偓閸
+ 鐠佸墽鐤嗙搾鍛
+ 閸忎浇顔忔潻鍥ㄦ埂閸╃喎鎮
+ 瀵偓閸氼垱瀵旀稊鍛缂傛挸鐡
+ 闂勫秶楠囩粵鏍殣
+ 妫板嫯袙閺
region
- 鍚屾瑙f瀽
- 鍚屾瑙f瀽骞跺彂
- 骞跺彂瑙f瀽
+ 閸氬本顒炵憴锝嗙€
+ 閸氬本顒炵憴锝嗙€介獮璺哄絺
+ 楠炶泛褰傜憴锝嗙€
- 鍏充簬鎴戜滑
- 甯姪涓績
- 娓呴櫎褰撳墠娑堟伅
+ 閸忓厖绨幋鎴滄粦
+ 鐢喖濮稉顓炵妇
+ 濞撳懘娅庤ぐ鎾冲濞戝牊浼
-
All Rights Reserved.
- 闃块噷浜?杞欢)鏈夐檺鍏徃鐗堟潈鎵€鏈?/string>
- Copyright 漏 2009 - 2016 Aliyun.com
+ 闂冨潡鍣锋禍?鏉烆垯娆?閺堝妾洪崗顒€寰冮悧鍫熸綀閹碘偓閺
+ Copyright 婕?2009 - 2016 Aliyun.com
1.1.3
-
- Q : 浠€涔堟槸鐢ㄦ埛浣撻獙Demo锛焅nA : 鐢ㄦ埛浣撻獙Demo灏辨槸闃块噷浜戝钩鍙颁负鎮ㄨ嚜鍔ㄥ垱寤虹殑銆佺敤鏉ヤ綋楠孒ttpDns鏈嶅姟鍜屽弽棣堝缓璁敤鐨勪竴涓皬Demo锛岃鎮ㄤ綋楠屼究鎹枫€侀珮鏁堢殑HttpDns鏈嶅姟銆俓n\nQ : 濡備綍鑱旂郴鎴戜滑锛焅nA : App Demo鐩稿叧闂锛岃鎼滅储閽夐拤缇ゅ彿锛?1777313
+ Q : 娴犫偓娑斿牊妲搁悽銊﹀煕娴f捇鐛橠emo閿涚剠nA : 閻劍鍩涙担鎾荤崣Demo鐏忚鲸妲搁梼鍧楀櫡娴滄垵閽╅崣棰佽礋閹劏鍤滈崝銊ュ灡瀵よ櫣娈戦妴浣烘暏閺夈儰缍嬫瀛抰tpDns閺堝秴濮熼崪灞藉冀妫e牆缂撶拋顔炬暏閻ㄥ嫪绔存稉顏勭毈Demo閿涘矁顔€閹劋缍嬫灞肩┒閹规灚鈧線鐝弫鍫㈡畱HttpDns閺堝秴濮熼妴淇搉\nQ : 婵″倷缍嶉懕鏃傞兇閹存垳婊戦敍鐒卬A : App Demo閻╃鍙ч梻顕€顣介敍宀冾嚞閹兼粎鍌ㄩ柦澶愭嫟缂囥倕褰块敍?1777313
+
diff --git a/EdgeHttpDNS/sdk/android/app/src/main/res/xml/network_security_config.xml b/EdgeHttpDNS/sdk/android/app/src/main/res/xml/network_security_config.xml
index 178cbdf..f904668 100644
--- a/EdgeHttpDNS/sdk/android/app/src/main/res/xml/network_security_config.xml
+++ b/EdgeHttpDNS/sdk/android/app/src/main/res/xml/network_security_config.xml
@@ -1,8 +1,8 @@
-
+
-
+
diff --git a/EdgeHttpDNS/sdk/android/demo/build.gradle b/EdgeHttpDNS/sdk/android/demo/build.gradle
index 7555499..fe7a3db 100644
--- a/EdgeHttpDNS/sdk/android/demo/build.gradle
+++ b/EdgeHttpDNS/sdk/android/demo/build.gradle
@@ -9,11 +9,11 @@ gradle.ext {
}
android {
- namespace 'com.aliyun.ams.httpdns.demo'
+ namespace 'com.newsdk.ams.httpdns.demo'
compileSdk 34
defaultConfig {
- applicationId "com.aliyun.ams.httpdns.demo"
+ applicationId "com.newsdk.ams.httpdns.demo"
minSdkVersion 26
targetSdkVersion 34
versionCode 1
@@ -111,18 +111,17 @@ dependencies {
implementation("com.squareup.okhttp3:okhttp:4.10.0")
implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0'
-// implementation project(path: ':httpdns-sdk')
- implementation 'com.aliyun.ams:alicloud-android-httpdns:2.6.6'
+ implementation project(path: ':httpdns-sdk')
- implementation('com.alibaba:fastjson:1.1.73.android@jar')
+ implementation('com.newsdk:fastjson:1.1.73.android@jar')
// implementation('com.emas.hybrid:emas-hybrid-android:1.1.0.4-public-SNAPSHOT') {
// exclude group: 'com.android.support', module: 'appcompat-v7'
// exclude group: 'com.taobao.android', module: 'thin_so_release'
// }
- implementation 'com.aliyun.ams:alicloud-android-tool:1.1.0'
+ implementation 'com.newsdk.ams:new-android-tool:1.1.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
-}
\ No newline at end of file
+}
diff --git a/EdgeHttpDNS/sdk/android/demo/proguard-rules.pro b/EdgeHttpDNS/sdk/android/demo/proguard-rules.pro
index 399065f..e482c46 100644
--- a/EdgeHttpDNS/sdk/android/demo/proguard-rules.pro
+++ b/EdgeHttpDNS/sdk/android/demo/proguard-rules.pro
@@ -19,4 +19,4 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
--keep class com.alibaba.sdk.android.httpdns.**{*;}
\ No newline at end of file
+-keep class com.newsdk.sdk.android.httpdns.**{*;}
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/demo/src/androidTest/java/com/alibaba/ams/emas/demo/ExampleInstrumentedTest.kt b/EdgeHttpDNS/sdk/android/demo/src/androidTest/java/com/newsdk/ams/emas/demo/ExampleInstrumentedTest.kt
similarity index 83%
rename from EdgeHttpDNS/sdk/android/demo/src/androidTest/java/com/alibaba/ams/emas/demo/ExampleInstrumentedTest.kt
rename to EdgeHttpDNS/sdk/android/demo/src/androidTest/java/com/newsdk/ams/emas/demo/ExampleInstrumentedTest.kt
index 7c658d9..c9df783 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/androidTest/java/com/alibaba/ams/emas/demo/ExampleInstrumentedTest.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/androidTest/java/com/newsdk/ams/emas/demo/ExampleInstrumentedTest.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo
+package com.newsdk.ams.emas.demo
import android.support.test.InstrumentationRegistry
import android.support.test.runner.AndroidJUnit4
@@ -19,7 +19,7 @@ class ExampleInstrumentedTest {
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
- assertEquals("com.alibaba.ams.emas.demo", appContext.packageName)
+ assertEquals("com.newsdk.ams.emas.demo", appContext.packageName)
}
}
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/AndroidManifest.xml b/EdgeHttpDNS/sdk/android/demo/src/main/AndroidManifest.xml
index 52cfb9a..8a5c7c6 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/AndroidManifest.xml
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/AndroidManifest.xml
@@ -6,7 +6,7 @@
+ android:theme="@style/Theme.NewHttpDnsDemo.NoActionBar">
+ android:theme="@style/Theme.NewHttpDnsDemo.NoActionBar">
@@ -47,9 +47,9 @@
android:name="android.app.lib_name"
android:value="" />
-
+ android:theme="@style/Theme.NewHttpDnsDemo.NoActionBar" >
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/BatchResolveCacheHolder.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/BatchResolveCacheHolder.kt
similarity index 99%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/BatchResolveCacheHolder.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/BatchResolveCacheHolder.kt
index 2828b3c..e4079c9 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/BatchResolveCacheHolder.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/BatchResolveCacheHolder.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo
+package com.newsdk.ams.emas.demo
import org.json.JSONArray
import org.json.JSONException
import org.json.JSONObject
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/HttpDnsApplication.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/HttpDnsApplication.kt
similarity index 84%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/HttpDnsApplication.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/HttpDnsApplication.kt
index b6ecabe..2af75b0 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/HttpDnsApplication.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/HttpDnsApplication.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo
+package com.newsdk.ams.emas.demo
import android.app.Application
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/HttpDnsServiceHolder.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/HttpDnsServiceHolder.kt
similarity index 76%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/HttpDnsServiceHolder.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/HttpDnsServiceHolder.kt
index 0c1d46d..dafec0f 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/HttpDnsServiceHolder.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/HttpDnsServiceHolder.kt
@@ -1,12 +1,12 @@
-package com.alibaba.ams.emas.demo
+package com.newsdk.ams.emas.demo
import android.content.Context
import android.text.TextUtils
-import com.alibaba.ams.emas.demo.constant.KEY_ENABLE_AUTH_MODE
-import com.alibaba.ams.emas.demo.constant.KEY_SECRET_KEY_SET_BY_CONFIG
-import com.alibaba.sdk.android.httpdns.HttpDns
-import com.alibaba.sdk.android.httpdns.HttpDnsService
-import com.aliyun.ams.httpdns.demo.BuildConfig
+import com.newsdk.ams.emas.demo.constant.KEY_ENABLE_AUTH_MODE
+import com.newsdk.ams.emas.demo.constant.KEY_SECRET_KEY_SET_BY_CONFIG
+import com.newsdk.sdk.android.httpdns.HttpDns
+import com.newsdk.sdk.android.httpdns.HttpDnsService
+import com.newsdk.ams.httpdns.demo.BuildConfig
/**
* @author allen.wy
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/MainActivity.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/MainActivity.kt
similarity index 92%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/MainActivity.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/MainActivity.kt
index 80dc162..2ac302b 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/MainActivity.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/MainActivity.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo
+package com.newsdk.ams.emas.demo
import android.os.Bundle
import android.widget.Toast
@@ -6,8 +6,8 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.navigation.findNavController
import androidx.navigation.ui.AppBarConfiguration
import androidx.navigation.ui.setupActionBarWithNavController
-import com.aliyun.ams.httpdns.demo.R
-import com.aliyun.ams.httpdns.demo.databinding.ActivityMainBinding
+import com.newsdk.ams.httpdns.demo.R
+import com.newsdk.ams.httpdns.demo.databinding.ActivityMainBinding
import com.google.android.material.bottomnavigation.BottomNavigationView
class MainActivity : AppCompatActivity() {
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/PreResolveCacheHolder.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/PreResolveCacheHolder.kt
similarity index 98%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/PreResolveCacheHolder.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/PreResolveCacheHolder.kt
index 76e99cb..c194f0f 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/PreResolveCacheHolder.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/PreResolveCacheHolder.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo
+package com.newsdk.ams.emas.demo
import org.json.JSONArray
import org.json.JSONException
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/SingleLiveData.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/SingleLiveData.kt
similarity index 97%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/SingleLiveData.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/SingleLiveData.kt
index db7f81b..5f63f7d 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/SingleLiveData.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/SingleLiveData.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo
+package com.newsdk.ams.emas.demo
import android.util.Log
import androidx.annotation.MainThread
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/TtlCacheHolder.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/TtlCacheHolder.kt
similarity index 92%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/TtlCacheHolder.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/TtlCacheHolder.kt
index 3d11333..89f8965 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/TtlCacheHolder.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/TtlCacheHolder.kt
@@ -1,6 +1,6 @@
-package com.alibaba.ams.emas.demo
+package com.newsdk.ams.emas.demo
-import com.alibaba.sdk.android.httpdns.CacheTtlChanger
+import com.newsdk.sdk.android.httpdns.CacheTtlChanger
import org.json.JSONException
import org.json.JSONObject
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/Util.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/Util.kt
similarity index 94%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/Util.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/Util.kt
index b04129f..8007e2e 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/Util.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/Util.kt
@@ -1,9 +1,9 @@
-package com.alibaba.ams.emas.demo
+package com.newsdk.ams.emas.demo
import android.content.Context
import android.content.SharedPreferences
-import com.alibaba.sdk.android.httpdns.ranking.IPRankingBean
-import com.aliyun.ams.httpdns.demo.BuildConfig
+import com.newsdk.sdk.android.httpdns.ranking.IPRankingBean
+import com.newsdk.ams.httpdns.demo.BuildConfig
import org.json.JSONArray
import org.json.JSONException
import org.json.JSONObject
@@ -113,7 +113,7 @@ fun String?.toBlackList(): MutableList? {
fun getAccountPreference(context: Context): SharedPreferences {
return context.getSharedPreferences(
- "Aliyun_httpdns_${BuildConfig.ACCOUNT_ID}",
+ "New_httpdns_${BuildConfig.ACCOUNT_ID}",
Context.MODE_PRIVATE
)
}
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/constant/Constant.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/constant/Constant.kt
similarity index 96%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/constant/Constant.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/constant/Constant.kt
index bb0b22c..dd1f11b 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/constant/Constant.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/constant/Constant.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo.constant
+package com.newsdk.ams.emas.demo.constant
/**
* @author allen.wy
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/net/HttpURLConnectionRequest.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/net/HttpURLConnectionRequest.kt
similarity index 92%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/net/HttpURLConnectionRequest.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/net/HttpURLConnectionRequest.kt
index e0e8c42..02682b7 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/net/HttpURLConnectionRequest.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/net/HttpURLConnectionRequest.kt
@@ -1,15 +1,15 @@
-package com.alibaba.ams.emas.demo.net
+package com.newsdk.ams.emas.demo.net
import android.content.Context
import android.util.Log
-import com.alibaba.ams.emas.demo.HttpDnsServiceHolder
-import com.alibaba.ams.emas.demo.readStringFrom
-import com.alibaba.ams.emas.demo.ui.resolve.Response
-import com.alibaba.sdk.android.httpdns.HTTPDNSResult
-import com.alibaba.sdk.android.httpdns.HttpDnsCallback
-import com.alibaba.sdk.android.httpdns.NetType
-import com.alibaba.sdk.android.httpdns.RequestIpType
-import com.alibaba.sdk.android.httpdns.net.HttpDnsNetworkDetector
+import com.newsdk.ams.emas.demo.HttpDnsServiceHolder
+import com.newsdk.ams.emas.demo.readStringFrom
+import com.newsdk.ams.emas.demo.ui.resolve.Response
+import com.newsdk.sdk.android.httpdns.HTTPDNSResult
+import com.newsdk.sdk.android.httpdns.HttpDnsCallback
+import com.newsdk.sdk.android.httpdns.NetType
+import com.newsdk.sdk.android.httpdns.RequestIpType
+import com.newsdk.sdk.android.httpdns.net.HttpDnsNetworkDetector
import java.io.BufferedReader
import java.io.InputStream
import java.io.InputStreamReader
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/net/IRequest.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/net/IRequest.kt
similarity index 54%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/net/IRequest.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/net/IRequest.kt
index 1c78dfb..8bfbb3d 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/net/IRequest.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/net/IRequest.kt
@@ -1,6 +1,6 @@
-package com.alibaba.ams.emas.demo.net
+package com.newsdk.ams.emas.demo.net
-import com.alibaba.ams.emas.demo.ui.resolve.Response
+import com.newsdk.ams.emas.demo.ui.resolve.Response
/**
* @author allen.wy
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/net/OkHttpClientSingleton.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/net/OkHttpClientSingleton.kt
similarity index 94%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/net/OkHttpClientSingleton.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/net/OkHttpClientSingleton.kt
index 1ff338e..ad30ce4 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/net/OkHttpClientSingleton.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/net/OkHttpClientSingleton.kt
@@ -1,13 +1,13 @@
-package com.alibaba.ams.emas.demo.net
+package com.newsdk.ams.emas.demo.net
import android.content.Context
import android.util.Log
-import com.alibaba.ams.emas.demo.HttpDnsServiceHolder
-import com.alibaba.sdk.android.httpdns.HTTPDNSResult
-import com.alibaba.sdk.android.httpdns.HttpDnsCallback
-import com.alibaba.sdk.android.httpdns.NetType
-import com.alibaba.sdk.android.httpdns.RequestIpType
-import com.alibaba.sdk.android.httpdns.net.HttpDnsNetworkDetector
+import com.newsdk.ams.emas.demo.HttpDnsServiceHolder
+import com.newsdk.sdk.android.httpdns.HTTPDNSResult
+import com.newsdk.sdk.android.httpdns.HttpDnsCallback
+import com.newsdk.sdk.android.httpdns.NetType
+import com.newsdk.sdk.android.httpdns.RequestIpType
+import com.newsdk.sdk.android.httpdns.net.HttpDnsNetworkDetector
import okhttp3.ConnectionPool
import okhttp3.Dns
import okhttp3.OkHttpClient
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/net/OkHttpLog.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/net/OkHttpLog.kt
similarity index 84%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/net/OkHttpLog.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/net/OkHttpLog.kt
index adb4c2c..7326906 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/net/OkHttpLog.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/net/OkHttpLog.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo.net
+package com.newsdk.ams.emas.demo.net
import android.util.Log
import okhttp3.logging.HttpLoggingInterceptor
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/net/OkHttpRequest.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/net/OkHttpRequest.kt
similarity index 83%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/net/OkHttpRequest.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/net/OkHttpRequest.kt
index 3144bf2..269e5e3 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/net/OkHttpRequest.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/net/OkHttpRequest.kt
@@ -1,8 +1,8 @@
-package com.alibaba.ams.emas.demo.net
+package com.newsdk.ams.emas.demo.net
import android.content.Context
-import com.alibaba.ams.emas.demo.ui.resolve.Response
-import com.alibaba.sdk.android.httpdns.RequestIpType
+import com.newsdk.ams.emas.demo.ui.resolve.Response
+import com.newsdk.sdk.android.httpdns.RequestIpType
/**
* @author allen.wy
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/net/TLSSNISocketFactory.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/net/TLSSNISocketFactory.kt
similarity index 98%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/net/TLSSNISocketFactory.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/net/TLSSNISocketFactory.kt
index 5d74453..2a8e9e9 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/net/TLSSNISocketFactory.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/net/TLSSNISocketFactory.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo.net
+package com.newsdk.ams.emas.demo.net
import android.net.SSLCertificateSocketFactory
import android.os.Build
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/basic/BasicSettingFragment.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/basic/BasicSettingFragment.kt
similarity index 94%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/basic/BasicSettingFragment.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/basic/BasicSettingFragment.kt
index 14732ca..58c9b68 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/basic/BasicSettingFragment.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/basic/BasicSettingFragment.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo.ui.basic
+package com.newsdk.ams.emas.demo.ui.basic
import android.content.Intent
import android.os.Bundle
@@ -11,12 +11,12 @@ import androidx.appcompat.app.AlertDialog
import androidx.appcompat.widget.AppCompatEditText
import androidx.fragment.app.Fragment
import androidx.lifecycle.ViewModelProvider
-import com.alibaba.ams.emas.demo.constant.KEY_REGION
-import com.alibaba.ams.emas.demo.getAccountPreference
-import com.alibaba.ams.emas.demo.ui.info.list.ListActivity
-import com.alibaba.ams.emas.demo.ui.info.list.kListItemTag
-import com.aliyun.ams.httpdns.demo.R
-import com.aliyun.ams.httpdns.demo.databinding.FragmentBasicSettingBinding
+import com.newsdk.ams.emas.demo.constant.KEY_REGION
+import com.newsdk.ams.emas.demo.getAccountPreference
+import com.newsdk.ams.emas.demo.ui.info.list.ListActivity
+import com.newsdk.ams.emas.demo.ui.info.list.kListItemTag
+import com.newsdk.ams.httpdns.demo.R
+import com.newsdk.ams.httpdns.demo.databinding.FragmentBasicSettingBinding
class BasicSettingFragment : Fragment(), IBasicShowDialog {
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/basic/BasicSettingViewModel.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/basic/BasicSettingViewModel.kt
similarity index 96%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/basic/BasicSettingViewModel.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/basic/BasicSettingViewModel.kt
index 438d6fe..7bb2b68 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/basic/BasicSettingViewModel.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/basic/BasicSettingViewModel.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo.ui.basic
+package com.newsdk.ams.emas.demo.ui.basic
import android.app.Application
import android.text.TextUtils
@@ -6,16 +6,16 @@ import android.util.Log
import android.widget.CompoundButton
import android.widget.Toast
import androidx.lifecycle.AndroidViewModel
-import com.alibaba.ams.emas.demo.*
-import com.alibaba.ams.emas.demo.constant.*
-import com.alibaba.sdk.android.httpdns.HttpDns
-import com.alibaba.sdk.android.httpdns.HttpDnsService
-import com.alibaba.sdk.android.httpdns.InitConfig
-import com.alibaba.sdk.android.httpdns.NotUseHttpDnsFilter
-import com.alibaba.sdk.android.httpdns.RequestIpType
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog
-import com.aliyun.ams.httpdns.demo.BuildConfig
-import com.aliyun.ams.httpdns.demo.R
+import com.newsdk.ams.emas.demo.*
+import com.newsdk.ams.emas.demo.constant.*
+import com.newsdk.sdk.android.httpdns.HttpDns
+import com.newsdk.sdk.android.httpdns.HttpDnsService
+import com.newsdk.sdk.android.httpdns.InitConfig
+import com.newsdk.sdk.android.httpdns.NotUseHttpDnsFilter
+import com.newsdk.sdk.android.httpdns.RequestIpType
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog
+import com.newsdk.ams.httpdns.demo.BuildConfig
+import com.newsdk.ams.httpdns.demo.R
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/basic/IBasicShowDialog.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/basic/IBasicShowDialog.kt
similarity index 84%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/basic/IBasicShowDialog.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/basic/IBasicShowDialog.kt
index 47a7af7..ceb234d 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/basic/IBasicShowDialog.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/basic/IBasicShowDialog.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo.ui.basic
+package com.newsdk.ams.emas.demo.ui.basic
/**
* @author allen.wy
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/info/InfoFragment.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/info/InfoFragment.kt
similarity index 93%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/info/InfoFragment.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/info/InfoFragment.kt
index 8918f99..1a91215 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/info/InfoFragment.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/info/InfoFragment.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo.ui.info
+package com.newsdk.ams.emas.demo.ui.info
import android.content.Intent
import android.os.Bundle
@@ -8,9 +8,9 @@ import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.lifecycle.ViewModelProvider
-import com.alibaba.ams.emas.demo.ui.info.list.*
-import com.aliyun.ams.httpdns.demo.BuildConfig
-import com.aliyun.ams.httpdns.demo.databinding.FragmentInfoBinding
+import com.newsdk.ams.emas.demo.ui.info.list.*
+import com.newsdk.ams.httpdns.demo.BuildConfig
+import com.newsdk.ams.httpdns.demo.databinding.FragmentInfoBinding
class InfoFragment : Fragment() {
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/info/InfoViewModel.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/info/InfoViewModel.kt
similarity index 75%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/info/InfoViewModel.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/info/InfoViewModel.kt
index b813ebe..333ba9a 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/info/InfoViewModel.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/info/InfoViewModel.kt
@@ -1,16 +1,16 @@
-package com.alibaba.ams.emas.demo.ui.info
+package com.newsdk.ams.emas.demo.ui.info
import android.app.Application
import android.widget.Toast
import androidx.lifecycle.AndroidViewModel
-import com.alibaba.ams.emas.demo.HttpDnsApplication
-import com.alibaba.ams.emas.demo.HttpDnsServiceHolder
-import com.alibaba.ams.emas.demo.SingleLiveData
-import com.alibaba.ams.emas.demo.getAccountPreference
-import com.alibaba.sdk.android.httpdns.NetType
-import com.alibaba.sdk.android.httpdns.net.HttpDnsNetworkDetector
-import com.aliyun.ams.httpdns.demo.BuildConfig
-import com.aliyun.ams.httpdns.demo.R
+import com.newsdk.ams.emas.demo.HttpDnsApplication
+import com.newsdk.ams.emas.demo.HttpDnsServiceHolder
+import com.newsdk.ams.emas.demo.SingleLiveData
+import com.newsdk.ams.emas.demo.getAccountPreference
+import com.newsdk.sdk.android.httpdns.NetType
+import com.newsdk.sdk.android.httpdns.net.HttpDnsNetworkDetector
+import com.newsdk.ams.httpdns.demo.BuildConfig
+import com.newsdk.ams.httpdns.demo.R
class InfoViewModel(application: Application) : AndroidViewModel(application) {
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/info/SdnsGlobalSettingActivity.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/info/SdnsGlobalSettingActivity.kt
similarity index 85%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/info/SdnsGlobalSettingActivity.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/info/SdnsGlobalSettingActivity.kt
index c52d02a..b7099b4 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/info/SdnsGlobalSettingActivity.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/info/SdnsGlobalSettingActivity.kt
@@ -1,12 +1,12 @@
-package com.alibaba.ams.emas.demo.ui.info
+package com.newsdk.ams.emas.demo.ui.info
import android.os.Bundle
import android.text.TextUtils
import androidx.appcompat.app.AppCompatActivity
-import com.alibaba.ams.emas.demo.constant.KEY_SDNS_GLOBAL_PARAMS
-import com.alibaba.ams.emas.demo.getAccountPreference
-import com.aliyun.ams.httpdns.demo.R
-import com.aliyun.ams.httpdns.demo.databinding.ActivitySdnsGlobalSettingBinding
+import com.newsdk.ams.emas.demo.constant.KEY_SDNS_GLOBAL_PARAMS
+import com.newsdk.ams.emas.demo.getAccountPreference
+import com.newsdk.ams.httpdns.demo.R
+import com.newsdk.ams.httpdns.demo.databinding.ActivitySdnsGlobalSettingBinding
import org.json.JSONException
import org.json.JSONObject
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/info/list/ListActivity.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/info/list/ListActivity.kt
similarity index 99%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/info/list/ListActivity.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/info/list/ListActivity.kt
index 367c8c0..e0cf1ed 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/info/list/ListActivity.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/info/list/ListActivity.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo.ui.info.list
+package com.newsdk.ams.emas.demo.ui.info.list
import android.content.Context
import android.os.Bundle
@@ -16,8 +16,8 @@ import androidx.appcompat.widget.AppCompatEditText
import androidx.lifecycle.ViewModelProvider
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
-import com.aliyun.ams.httpdns.demo.R
-import com.aliyun.ams.httpdns.demo.databinding.ActivityListBinding
+import com.newsdk.ams.httpdns.demo.R
+import com.newsdk.ams.httpdns.demo.databinding.ActivityListBinding
class ListActivity : AppCompatActivity(), ListAdapter.OnDeleteListener {
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/info/list/ListAdapter.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/info/list/ListAdapter.kt
similarity index 97%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/info/list/ListAdapter.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/info/list/ListAdapter.kt
index 46beaf9..d88e383 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/info/list/ListAdapter.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/info/list/ListAdapter.kt
@@ -1,12 +1,12 @@
-package com.alibaba.ams.emas.demo.ui.info.list
+package com.newsdk.ams.emas.demo.ui.info.list
import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
-import com.aliyun.ams.httpdns.demo.R
-import com.aliyun.ams.httpdns.demo.databinding.InfoListItemBinding;
+import com.newsdk.ams.httpdns.demo.R
+import com.newsdk.ams.httpdns.demo.databinding.InfoListItemBinding;
/**
* @author allen.wy
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/info/list/ListItem.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/info/list/ListItem.kt
similarity index 72%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/info/list/ListItem.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/info/list/ListItem.kt
index 03f3f62..3ddb54d 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/info/list/ListItem.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/info/list/ListItem.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo.ui.info.list
+package com.newsdk.ams.emas.demo.ui.info.list
/**
* @author allen.wy
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/info/list/ListItemType.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/info/list/ListItemType.kt
similarity index 87%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/info/list/ListItemType.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/info/list/ListItemType.kt
index 75f518a..e213255 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/info/list/ListItemType.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/info/list/ListItemType.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo.ui.info.list
+package com.newsdk.ams.emas.demo.ui.info.list
/**
* @author allen.wy
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/info/list/ListViewModel.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/info/list/ListViewModel.kt
similarity index 95%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/info/list/ListViewModel.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/info/list/ListViewModel.kt
index 9793530..f9b3fe1 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/info/list/ListViewModel.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/info/list/ListViewModel.kt
@@ -1,21 +1,21 @@
-package com.alibaba.ams.emas.demo.ui.info.list
+package com.newsdk.ams.emas.demo.ui.info.list
import android.app.Application
import android.content.SharedPreferences
import android.widget.Toast
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.viewModelScope
-import com.alibaba.ams.emas.demo.*
-import com.alibaba.ams.emas.demo.TtlCacheHolder.toJsonString
-import com.alibaba.ams.emas.demo.constant.KEY_BATCH_RESOLVE_HOST_LIST
-import com.alibaba.ams.emas.demo.constant.KEY_HOST_BLACK_LIST
-import com.alibaba.ams.emas.demo.constant.KEY_HOST_WITH_FIXED_IP
-import com.alibaba.ams.emas.demo.constant.KEY_IP_RANKING_ITEMS
-import com.alibaba.ams.emas.demo.constant.KEY_PRE_RESOLVE_HOST_LIST
-import com.alibaba.ams.emas.demo.constant.KEY_TAGS
-import com.alibaba.ams.emas.demo.constant.KEY_TTL_CHANGER
-import com.alibaba.sdk.android.httpdns.ranking.IPRankingBean
-import com.aliyun.ams.httpdns.demo.R
+import com.newsdk.ams.emas.demo.*
+import com.newsdk.ams.emas.demo.TtlCacheHolder.toJsonString
+import com.newsdk.ams.emas.demo.constant.KEY_BATCH_RESOLVE_HOST_LIST
+import com.newsdk.ams.emas.demo.constant.KEY_HOST_BLACK_LIST
+import com.newsdk.ams.emas.demo.constant.KEY_HOST_WITH_FIXED_IP
+import com.newsdk.ams.emas.demo.constant.KEY_IP_RANKING_ITEMS
+import com.newsdk.ams.emas.demo.constant.KEY_PRE_RESOLVE_HOST_LIST
+import com.newsdk.ams.emas.demo.constant.KEY_TAGS
+import com.newsdk.ams.emas.demo.constant.KEY_TTL_CHANGER
+import com.newsdk.sdk.android.httpdns.ranking.IPRankingBean
+import com.newsdk.ams.httpdns.demo.R
import kotlinx.coroutines.launch
import org.json.JSONArray
import org.json.JSONException
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/practice/BestPracticeFragment.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/practice/BestPracticeFragment.kt
similarity index 93%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/practice/BestPracticeFragment.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/practice/BestPracticeFragment.kt
index 6d663e4..36a287a 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/practice/BestPracticeFragment.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/practice/BestPracticeFragment.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo.ui.practice
+package com.newsdk.ams.emas.demo.ui.practice
import android.content.Intent
import android.os.Bundle
@@ -8,8 +8,8 @@ import android.view.ViewGroup
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.Fragment
import androidx.lifecycle.ViewModelProvider
-import com.aliyun.ams.httpdns.demo.R
-import com.aliyun.ams.httpdns.demo.databinding.FragmentBestPracticeBinding
+import com.newsdk.ams.httpdns.demo.R
+import com.newsdk.ams.httpdns.demo.databinding.FragmentBestPracticeBinding
/**
* @author allen.wy
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/practice/BestPracticeViewModel.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/practice/BestPracticeViewModel.kt
similarity index 91%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/practice/BestPracticeViewModel.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/practice/BestPracticeViewModel.kt
index 25a926f..d7b25ea 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/practice/BestPracticeViewModel.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/practice/BestPracticeViewModel.kt
@@ -1,16 +1,16 @@
-package com.alibaba.ams.emas.demo.ui.practice
+package com.newsdk.ams.emas.demo.ui.practice
import android.app.Application
import android.util.Log
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.viewModelScope
-import com.alibaba.ams.emas.demo.HttpDnsServiceHolder
-import com.alibaba.ams.emas.demo.net.TLSSNISocketFactory
-import com.alibaba.ams.emas.demo.readStringFrom
-import com.alibaba.sdk.android.httpdns.NetType
-import com.alibaba.sdk.android.httpdns.RequestIpType
-import com.alibaba.sdk.android.httpdns.net.HttpDnsNetworkDetector
-import com.Alibaba.sdk.android.tool.NetworkUtils
+import com.newsdk.ams.emas.demo.HttpDnsServiceHolder
+import com.newsdk.ams.emas.demo.net.TLSSNISocketFactory
+import com.newsdk.ams.emas.demo.readStringFrom
+import com.newsdk.sdk.android.httpdns.NetType
+import com.newsdk.sdk.android.httpdns.RequestIpType
+import com.newsdk.sdk.android.httpdns.net.HttpDnsNetworkDetector
+import com.alibaba.sdk.android.tool.NetworkUtils
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/practice/HttpDnsWebviewGetActivity.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/practice/HttpDnsWebviewGetActivity.kt
similarity index 97%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/practice/HttpDnsWebviewGetActivity.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/practice/HttpDnsWebviewGetActivity.kt
index 2de146f..3136d98 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/practice/HttpDnsWebviewGetActivity.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/practice/HttpDnsWebviewGetActivity.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo.ui.practice
+package com.newsdk.ams.emas.demo.ui.practice
import android.os.Bundle
import android.text.TextUtils
@@ -6,9 +6,9 @@ import android.util.Log
import android.view.MenuItem
import android.webkit.*
import androidx.appcompat.app.AppCompatActivity
-import com.alibaba.ams.emas.demo.HttpDnsServiceHolder
-import com.aliyun.ams.httpdns.demo.R
-import com.aliyun.ams.httpdns.demo.databinding.ActivityHttpDnsWebviewBinding
+import com.newsdk.ams.emas.demo.HttpDnsServiceHolder
+import com.newsdk.ams.httpdns.demo.R
+import com.newsdk.ams.httpdns.demo.databinding.ActivityHttpDnsWebviewBinding
import java.io.IOException
import java.net.*
import javax.net.ssl.*
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/practice/IBestPracticeShowDialog.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/practice/IBestPracticeShowDialog.kt
similarity index 77%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/practice/IBestPracticeShowDialog.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/practice/IBestPracticeShowDialog.kt
index 9cb9bae..e065376 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/practice/IBestPracticeShowDialog.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/practice/IBestPracticeShowDialog.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo.ui.practice
+package com.newsdk.ams.emas.demo.ui.practice
/**
* @author allen.wy
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/practice/SNISocketFactory.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/practice/SNISocketFactory.kt
similarity index 97%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/practice/SNISocketFactory.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/practice/SNISocketFactory.kt
index 78a914e..a83c196 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/practice/SNISocketFactory.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/practice/SNISocketFactory.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo.ui.practice
+package com.newsdk.ams.emas.demo.ui.practice
import android.net.SSLCertificateSocketFactory
import java.net.InetAddress
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/resolve/IResolveShowDialog.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/resolve/IResolveShowDialog.kt
similarity index 86%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/resolve/IResolveShowDialog.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/resolve/IResolveShowDialog.kt
index e1b23b2..d7a314c 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/resolve/IResolveShowDialog.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/resolve/IResolveShowDialog.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo.ui.resolve
+package com.newsdk.ams.emas.demo.ui.resolve
/**
* @author allen.wy
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/resolve/NetRequestType.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/resolve/NetRequestType.kt
similarity index 72%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/resolve/NetRequestType.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/resolve/NetRequestType.kt
index d249eec..8f3bdbb 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/resolve/NetRequestType.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/resolve/NetRequestType.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo.ui.resolve
+package com.newsdk.ams.emas.demo.ui.resolve
/**
* @author allen.wy
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/resolve/ResolveFragment.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/resolve/ResolveFragment.kt
similarity index 95%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/resolve/ResolveFragment.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/resolve/ResolveFragment.kt
index c519506..3f53771 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/resolve/ResolveFragment.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/resolve/ResolveFragment.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo.ui.resolve
+package com.newsdk.ams.emas.demo.ui.resolve
import android.os.Bundle
import android.text.TextUtils
@@ -8,11 +8,11 @@ import android.view.ViewGroup
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.Fragment
import androidx.lifecycle.ViewModelProvider
-import com.alibaba.ams.emas.demo.constant.KEY_RESOLVE_IP_TYPE
-import com.alibaba.ams.emas.demo.constant.KEY_RESOLVE_METHOD
-import com.alibaba.ams.emas.demo.getAccountPreference
-import com.aliyun.ams.httpdns.demo.R
-import com.aliyun.ams.httpdns.demo.databinding.FragmentResolveBinding
+import com.newsdk.ams.emas.demo.constant.KEY_RESOLVE_IP_TYPE
+import com.newsdk.ams.emas.demo.constant.KEY_RESOLVE_METHOD
+import com.newsdk.ams.emas.demo.getAccountPreference
+import com.newsdk.ams.httpdns.demo.R
+import com.newsdk.ams.httpdns.demo.databinding.FragmentResolveBinding
import org.json.JSONException
import org.json.JSONObject
@@ -177,7 +177,7 @@ class ResolveFragment : Fragment(), IResolveShowDialog {
val builder = activity?.let { act -> AlertDialog.Builder(act) }
builder?.apply {
setTitle(R.string.select_resolve_method)
- val items = arrayOf("鍚屾鏂规硶", "寮傛鏂规硶", "鍚屾闈為樆濉炴柟娉?)
+ val items = arrayOf("Sync", "Async", "Sync NonBlocking")
val preferences = activity?.let { getAccountPreference(it) }
var resolvedMethod = preferences?.getString(KEY_RESOLVE_METHOD, "getHttpDnsResultForHostSync(String host, RequestIpType type)").toString()
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/resolve/ResolveViewModel.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/resolve/ResolveViewModel.kt
similarity index 88%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/resolve/ResolveViewModel.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/resolve/ResolveViewModel.kt
index c4b1719..fc19c5e 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/resolve/ResolveViewModel.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/resolve/ResolveViewModel.kt
@@ -1,20 +1,20 @@
-package com.alibaba.ams.emas.demo.ui.resolve
+package com.newsdk.ams.emas.demo.ui.resolve
import android.app.Application
import android.util.Log
import android.widget.RadioGroup
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.viewModelScope
-import com.alibaba.ams.emas.demo.HttpDnsApplication
-import com.alibaba.ams.emas.demo.SingleLiveData
-import com.alibaba.ams.emas.demo.constant.KEY_RESOLVE_IP_TYPE
-import com.alibaba.ams.emas.demo.constant.KEY_RESOLVE_METHOD
-import com.alibaba.ams.emas.demo.constant.KEY_SDNS_RESOLVE
-import com.alibaba.ams.emas.demo.getAccountPreference
-import com.alibaba.ams.emas.demo.net.HttpURLConnectionRequest
-import com.alibaba.ams.emas.demo.net.OkHttpRequest
-import com.alibaba.sdk.android.httpdns.RequestIpType
-import com.aliyun.ams.httpdns.demo.R
+import com.newsdk.ams.emas.demo.HttpDnsApplication
+import com.newsdk.ams.emas.demo.SingleLiveData
+import com.newsdk.ams.emas.demo.constant.KEY_RESOLVE_IP_TYPE
+import com.newsdk.ams.emas.demo.constant.KEY_RESOLVE_METHOD
+import com.newsdk.ams.emas.demo.constant.KEY_SDNS_RESOLVE
+import com.newsdk.ams.emas.demo.getAccountPreference
+import com.newsdk.ams.emas.demo.net.HttpURLConnectionRequest
+import com.newsdk.ams.emas.demo.net.OkHttpRequest
+import com.newsdk.sdk.android.httpdns.RequestIpType
+import com.newsdk.ams.httpdns.demo.R
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/resolve/Response.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/resolve/Response.kt
similarity index 69%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/resolve/Response.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/resolve/Response.kt
index 76d1bd0..b8b3026 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/resolve/Response.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/resolve/Response.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo.ui.resolve
+package com.newsdk.ams.emas.demo.ui.resolve
/**
* @author allen.wy
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/resolve/SchemaType.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/resolve/SchemaType.kt
similarity index 67%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/resolve/SchemaType.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/resolve/SchemaType.kt
index 2043c35..766cfa7 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/ui/resolve/SchemaType.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/ui/resolve/SchemaType.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo.ui.resolve
+package com.newsdk.ams.emas.demo.ui.resolve
/**
* @author allen.wy
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/widget/SwipeLayout.kt b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/widget/SwipeLayout.kt
similarity index 99%
rename from EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/widget/SwipeLayout.kt
rename to EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/widget/SwipeLayout.kt
index cb5c2c9..f0917de 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/java/com/alibaba/ams/emas/demo/widget/SwipeLayout.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/java/com/newsdk/ams/emas/demo/widget/SwipeLayout.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo.widget
+package com.newsdk.ams.emas.demo.widget
import android.content.Context
import android.graphics.PointF
@@ -9,7 +9,7 @@ import android.view.ViewConfiguration
import android.view.ViewGroup
import android.widget.FrameLayout
import android.widget.Scroller
-import com.aliyun.ams.httpdns.demo.R
+import com.newsdk.ams.httpdns.demo.R
import java.lang.ref.WeakReference
import kotlin.math.abs
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/res/layout/activity_http_dns_webview.xml b/EdgeHttpDNS/sdk/android/demo/src/main/res/layout/activity_http_dns_webview.xml
index ecfca0c..880dea8 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/res/layout/activity_http_dns_webview.xml
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/res/layout/activity_http_dns_webview.xml
@@ -9,14 +9,14 @@
+ android:theme="@style/Theme.NewHttpDnsDemo.AppBarOverlay">
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/res/layout/activity_list.xml b/EdgeHttpDNS/sdk/android/demo/src/main/res/layout/activity_list.xml
index 0f0f3ea..d60a58b 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/res/layout/activity_list.xml
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/res/layout/activity_list.xml
@@ -4,19 +4,19 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- tools:context="com.alibaba.ams.emas.demo.ui.info.list.ListActivity">
+ tools:context="com.newsdk.ams.emas.demo.ui.info.list.ListActivity">
+ android:theme="@style/Theme.NewHttpDnsDemo.AppBarOverlay">
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/res/layout/activity_sdns_global_setting.xml b/EdgeHttpDNS/sdk/android/demo/src/main/res/layout/activity_sdns_global_setting.xml
index 9d24b0b..44defbd 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/res/layout/activity_sdns_global_setting.xml
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/res/layout/activity_sdns_global_setting.xml
@@ -9,7 +9,7 @@
android:id="@+id/app_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:theme="@style/Theme.AlicloudHttpDnsDemo.AppBarOverlay"
+ android:theme="@style/Theme.NewHttpDnsDemo.AppBarOverlay"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
@@ -19,7 +19,7 @@
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
- app:popupTheme="@style/Theme.AlicloudHttpDnsDemo.PopupOverlay"
+ app:popupTheme="@style/Theme.NewHttpDnsDemo.PopupOverlay"
app:titleTextColor="@color/white"
app:navigationIcon="@drawable/ic_back"/>
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/res/layout/fragment_basic_setting.xml b/EdgeHttpDNS/sdk/android/demo/src/main/res/layout/fragment_basic_setting.xml
index b7bab2b..f5d47ba 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/res/layout/fragment_basic_setting.xml
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/res/layout/fragment_basic_setting.xml
@@ -5,11 +5,11 @@
-
+
+ type="com.newsdk.ams.emas.demo.ui.basic.BasicSettingViewModel" />
+ type="com.newsdk.ams.emas.demo.ui.practice.BestPracticeViewModel" />
-
+
+ type="com.newsdk.ams.emas.demo.ui.info.InfoViewModel" />
+ tools:text="com.newsdk.ams.httpdns.demo" />
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/res/layout/fragment_resolve.xml b/EdgeHttpDNS/sdk/android/demo/src/main/res/layout/fragment_resolve.xml
index 9afbc49..04950c0 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/res/layout/fragment_resolve.xml
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/res/layout/fragment_resolve.xml
@@ -7,7 +7,7 @@
+ type="com.newsdk.ams.emas.demo.ui.resolve.ResolveViewModel" />
-
-
+
-
-
+
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/res/navigation/mobile_navigation.xml b/EdgeHttpDNS/sdk/android/demo/src/main/res/navigation/mobile_navigation.xml
index 5f47f47..8cdd575 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/res/navigation/mobile_navigation.xml
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/res/navigation/mobile_navigation.xml
@@ -7,25 +7,25 @@
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/demo/src/main/res/values-night/themes.xml b/EdgeHttpDNS/sdk/android/demo/src/main/res/values-night/themes.xml
index 377db03..8e73a51 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/main/res/values-night/themes.xml
+++ b/EdgeHttpDNS/sdk/android/demo/src/main/res/values-night/themes.xml
@@ -1,6 +1,6 @@
-
-
-
+
-
+
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/demo/src/test/java/com/alibaba/ams/emas/demo/ExampleUnitTest.kt b/EdgeHttpDNS/sdk/android/demo/src/test/java/com/newsdk/ams/emas/demo/ExampleUnitTest.kt
similarity index 90%
rename from EdgeHttpDNS/sdk/android/demo/src/test/java/com/alibaba/ams/emas/demo/ExampleUnitTest.kt
rename to EdgeHttpDNS/sdk/android/demo/src/test/java/com/newsdk/ams/emas/demo/ExampleUnitTest.kt
index 93ec87c..d48306b 100644
--- a/EdgeHttpDNS/sdk/android/demo/src/test/java/com/alibaba/ams/emas/demo/ExampleUnitTest.kt
+++ b/EdgeHttpDNS/sdk/android/demo/src/test/java/com/newsdk/ams/emas/demo/ExampleUnitTest.kt
@@ -1,4 +1,4 @@
-package com.alibaba.ams.emas.demo
+package com.newsdk.ams.emas.demo
import org.junit.Test
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/build.gradle b/EdgeHttpDNS/sdk/android/httpdns-sdk/build.gradle
index 2a1397c..a5aad70 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/build.gradle
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/build.gradle
@@ -12,7 +12,7 @@ android {
targetSdkVersion 33
versionCode 1
versionName httpdnsDebugVersion
- setProperty("archivesBaseName", "alicloud-android-httpdns-$versionName")
+ setProperty("archivesBaseName", "new-android-httpdns-$versionName")
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
buildConfigField "String", "VERSION_NAME", "\"${httpdnsDebugVersion}\""
@@ -89,9 +89,9 @@ dependencies {
testEnd2endImplementation 'org.mockito:mockito-core:2.15.0'
testEnd2endImplementation 'com.squareup.okhttp3:mockwebserver:3.9.0'
- implementation "com.aliyun.ams:alicloud-android-logger:${loggerVersion}"
- implementation "com.aliyun.ams:alicloud-android-crashdefend:${crashDefendVersion}"
- implementation "com.aliyun.ams:alicloud-android-ipdetector:${ipdetectorVersion}"
+ implementation "com.newsdk.ams:new-android-logger:${loggerVersion}"
+ implementation "com.newsdk.ams:new-android-crashdefend:${crashDefendVersion}"
+ implementation "com.newsdk.ams:new-android-ipdetector:${ipdetectorVersion}"
}
ext.getIntlVersion = { version ->
@@ -108,7 +108,7 @@ task copyDependencies {
if (config != null) {
config.resolvedConfiguration.resolvedArtifacts.each { artifact ->
def file = artifact.file
- if (file.name.contains("alicloud-android")) {
+ if (file.name.contains("new-android")) {
copy {
from file
into 'build/outputs/dependencies'
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/proguard-rules-for-test.pro b/EdgeHttpDNS/sdk/android/httpdns-sdk/proguard-rules-for-test.pro
index c7aa166..4ccca54 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/proguard-rules-for-test.pro
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/proguard-rules-for-test.pro
@@ -24,27 +24,27 @@
#-allowaccessmodification
-useuniqueclassmembernames
--keeppackagenames com.alibaba.sdk.android.httpdns
--keep class com.alibaba.sdk.android.httpdns.HttpDns{*;}
--keep class com.alibaba.sdk.android.httpdns.HttpDnsService{*;}
--keep class com.alibaba.sdk.android.httpdns.SyncService{*;}
--keep class com.alibaba.sdk.android.httpdns.RequestIpType{*;}
--keep class com.alibaba.sdk.android.httpdns.net64.Net64Service{*;}
--keep class com.alibaba.sdk.android.httpdns.DegradationFilter{*;}
--keep class com.alibaba.sdk.android.httpdns.ranking.IPRankingBean{*;}
--keep class com.alibaba.sdk.android.httpdns.ILogger{*;}
--keepclasseswithmembers class com.alibaba.sdk.android.httpdns.log.HttpDnsLog {
+-keeppackagenames com.newsdk.sdk.android.httpdns
+-keep class com.newsdk.sdk.android.httpdns.HttpDns{*;}
+-keep class com.newsdk.sdk.android.httpdns.HttpDnsService{*;}
+-keep class com.newsdk.sdk.android.httpdns.SyncService{*;}
+-keep class com.newsdk.sdk.android.httpdns.RequestIpType{*;}
+-keep class com.newsdk.sdk.android.httpdns.net64.Net64Service{*;}
+-keep class com.newsdk.sdk.android.httpdns.DegradationFilter{*;}
+-keep class com.newsdk.sdk.android.httpdns.ranking.IPRankingBean{*;}
+-keep class com.newsdk.sdk.android.httpdns.ILogger{*;}
+-keepclasseswithmembers class com.newsdk.sdk.android.httpdns.log.HttpDnsLog {
public static *** setLogger(***);
public static *** removeLogger(***);
public static *** enable(***);
}
--keep class com.alibaba.sdk.android.httpdns.HTTPDNSResult{*;}
--keep class com.alibaba.sdk.android.httpdns.ApiForTest{*;}
--keep class com.alibaba.sdk.android.httpdns.test.** {*;}
--keep class com.alibaba.sdk.android.httpdns.resolve.ResolveHostResponse{*;}
+-keep class com.newsdk.sdk.android.httpdns.HTTPDNSResult{*;}
+-keep class com.newsdk.sdk.android.httpdns.ApiForTest{*;}
+-keep class com.newsdk.sdk.android.httpdns.test.** {*;}
+-keep class com.newsdk.sdk.android.httpdns.resolve.ResolveHostResponse{*;}
--keep class com.alibaba.sdk.android.httpdns.utils.CommonUtil{
+-keep class com.newsdk.sdk.android.httpdns.utils.CommonUtil{
public ;
public ;
}
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/proguard-rules.pro b/EdgeHttpDNS/sdk/android/httpdns-sdk/proguard-rules.pro
index 2eb779c..8466ec6 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/proguard-rules.pro
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/proguard-rules.pro
@@ -24,47 +24,47 @@
#-allowaccessmodification
-useuniqueclassmembernames
--dontwarn com.alibaba.sdk.android.httpdns.net.HttpDnsNetworkDetector
+-dontwarn com.newsdk.sdk.android.httpdns.net.HttpDnsNetworkDetector
--keeppackagenames com.alibaba.sdk.android.httpdns
--flattenpackagehierarchy com.alibaba.sdk.android.httpdns
--keep class com.alibaba.sdk.android.httpdns.HttpDns{*;}
--keep interface com.alibaba.sdk.android.httpdns.HttpDnsService{*;}
--keep class com.alibaba.sdk.android.httpdns.impl.ErrorImpl{*;}
--keep interface com.alibaba.sdk.android.httpdns.SyncService{*;}
--keep class com.alibaba.sdk.android.httpdns.InitConfig{*;}
--keep class com.alibaba.sdk.android.httpdns.InitConfig$Builder{*;}
--keep class com.alibaba.sdk.android.httpdns.RequestIpType{*;}
--keep interface com.alibaba.sdk.android.httpdns.DegradationFilter{*;}
--keep interface com.alibaba.sdk.android.httpdns.NotUseHttpDnsFilter{*;}
--keep interface com.alibaba.sdk.android.httpdns.HttpDnsCallback{*;}
--keep class com.alibaba.sdk.android.httpdns.ranking.IPRankingBean{*;}
--keep interface com.alibaba.sdk.android.httpdns.ILogger{*;}
--keep interface com.alibaba.sdk.android.httpdns.CacheTtlChanger{*;}
--keep class com.alibaba.sdk.android.httpdns.NetType{*;}
--keepclasseswithmembers class com.alibaba.sdk.android.httpdns.log.HttpDnsLog {
+-keeppackagenames com.newsdk.sdk.android.httpdns
+-flattenpackagehierarchy com.newsdk.sdk.android.httpdns
+-keep class com.newsdk.sdk.android.httpdns.HttpDns{*;}
+-keep interface com.newsdk.sdk.android.httpdns.HttpDnsService{*;}
+-keep class com.newsdk.sdk.android.httpdns.impl.ErrorImpl{*;}
+-keep interface com.newsdk.sdk.android.httpdns.SyncService{*;}
+-keep class com.newsdk.sdk.android.httpdns.InitConfig{*;}
+-keep class com.newsdk.sdk.android.httpdns.InitConfig$Builder{*;}
+-keep class com.newsdk.sdk.android.httpdns.RequestIpType{*;}
+-keep interface com.newsdk.sdk.android.httpdns.DegradationFilter{*;}
+-keep interface com.newsdk.sdk.android.httpdns.NotUseHttpDnsFilter{*;}
+-keep interface com.newsdk.sdk.android.httpdns.HttpDnsCallback{*;}
+-keep class com.newsdk.sdk.android.httpdns.ranking.IPRankingBean{*;}
+-keep interface com.newsdk.sdk.android.httpdns.ILogger{*;}
+-keep interface com.newsdk.sdk.android.httpdns.CacheTtlChanger{*;}
+-keep class com.newsdk.sdk.android.httpdns.NetType{*;}
+-keepclasseswithmembers class com.newsdk.sdk.android.httpdns.log.HttpDnsLog {
public static *** setLogger(***);
public static *** removeLogger(***);
public static *** enable(***);
}
--keep class com.alibaba.sdk.android.httpdns.HTTPDNSResult{*;}
--keepclasseswithmembers class com.alibaba.sdk.android.httpdns.HttpDnsSettings {
+-keep class com.newsdk.sdk.android.httpdns.HTTPDNSResult{*;}
+-keepclasseswithmembers class com.newsdk.sdk.android.httpdns.HttpDnsSettings {
public static *** setDailyReport(***);
public static *** setNetworkChecker(***);
}
--keep class com.alibaba.sdk.android.httpdns.net.HttpDnsNetworkDetector {
+-keep class com.newsdk.sdk.android.httpdns.net.HttpDnsNetworkDetector {
public ;
public ;
}
--keep class com.alibaba.sdk.android.httpdns.network.**{*;}
+-keep class com.newsdk.sdk.android.httpdns.network.**{*;}
--keep interface com.alibaba.sdk.android.httpdns.HttpDnsSettings$NetworkChecker{*;}
--keep interface com.alibaba.sdk.android.httpdns.HttpDnsSettings$NetworkDetector{*;}
--keep class com.alibaba.sdk.android.httpdns.utils.CommonUtil{
+-keep interface com.newsdk.sdk.android.httpdns.HttpDnsSettings$NetworkChecker{*;}
+-keep interface com.newsdk.sdk.android.httpdns.HttpDnsSettings$NetworkDetector{*;}
+-keep class com.newsdk.sdk.android.httpdns.utils.CommonUtil{
public ;
public ;
}
--keep enum com.alibaba.sdk.android.httpdns.Region {*;}
--keep class com.alibaba.sdk.android.httpdns.exception.InitException{*;}
+-keep enum com.newsdk.sdk.android.httpdns.Region {*;}
+-keep class com.newsdk.sdk.android.httpdns.exception.InitException{*;}
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/alibaba/sdk/android/httpdns/ApiForTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/newsdk/sdk/android/httpdns/ApiForTest.java
similarity index 94%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/alibaba/sdk/android/httpdns/ApiForTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/newsdk/sdk/android/httpdns/ApiForTest.java
index 1e9e777..9db5a90 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/alibaba/sdk/android/httpdns/ApiForTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/newsdk/sdk/android/httpdns/ApiForTest.java
@@ -1,6 +1,6 @@
-package com.alibaba.sdk.android.httpdns;
+package com.newsdk.sdk.android.httpdns;
-import com.alibaba.sdk.android.httpdns.ranking.IPRankingTask;
+import com.newsdk.sdk.android.httpdns.ranking.IPRankingTask;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.ScheduledExecutorService;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/alibaba/sdk/android/httpdns/BeforeHttpDnsServiceInit.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/newsdk/sdk/android/httpdns/BeforeHttpDnsServiceInit.java
similarity index 81%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/alibaba/sdk/android/httpdns/BeforeHttpDnsServiceInit.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/newsdk/sdk/android/httpdns/BeforeHttpDnsServiceInit.java
index e085b5b..e9a2596 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/alibaba/sdk/android/httpdns/BeforeHttpDnsServiceInit.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/newsdk/sdk/android/httpdns/BeforeHttpDnsServiceInit.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns;
+package com.newsdk.sdk.android.httpdns;
/**
* 娴嬭瘯鐢ㄧ殑鍒濆鍖栨帴鍙?
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/alibaba/sdk/android/httpdns/HttpDns.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/newsdk/sdk/android/httpdns/HttpDns.java
similarity index 87%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/alibaba/sdk/android/httpdns/HttpDns.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/newsdk/sdk/android/httpdns/HttpDns.java
index 191f108..f576edc 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/alibaba/sdk/android/httpdns/HttpDns.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/newsdk/sdk/android/httpdns/HttpDns.java
@@ -1,13 +1,13 @@
-package com.alibaba.sdk.android.httpdns;
+package com.newsdk.sdk.android.httpdns;
import android.content.Context;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsInstanceHolder;
-import com.alibaba.sdk.android.httpdns.impl.InstanceCreator;
-import com.alibaba.sdk.android.httpdns.net.NetworkStateManager;
-import com.alibaba.sdk.android.httpdns.network.HttpDnsAdapterOptions;
-import com.alibaba.sdk.android.httpdns.network.HttpDnsHttpAdapter;
-import com.alibaba.sdk.android.httpdns.utils.CommonUtil;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsInstanceHolder;
+import com.newsdk.sdk.android.httpdns.impl.InstanceCreator;
+import com.newsdk.sdk.android.httpdns.net.NetworkStateManager;
+import com.newsdk.sdk.android.httpdns.network.HttpDnsAdapterOptions;
+import com.newsdk.sdk.android.httpdns.network.HttpDnsHttpAdapter;
+import com.newsdk.sdk.android.httpdns.utils.CommonUtil;
/**
* Httpdns瀹炰緥绠$悊
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/alibaba/sdk/android/httpdns/InitManager.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/newsdk/sdk/android/httpdns/InitManager.java
similarity index 95%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/alibaba/sdk/android/httpdns/InitManager.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/newsdk/sdk/android/httpdns/InitManager.java
index 84f5215..1e80732 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/alibaba/sdk/android/httpdns/InitManager.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/newsdk/sdk/android/httpdns/InitManager.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns;
+package com.newsdk.sdk.android.httpdns;
import java.util.HashMap;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/alibaba/sdk/android/httpdns/impl/HttpDnsServiceTestImpl.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/newsdk/sdk/android/httpdns/impl/HttpDnsServiceTestImpl.java
similarity index 88%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/alibaba/sdk/android/httpdns/impl/HttpDnsServiceTestImpl.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/newsdk/sdk/android/httpdns/impl/HttpDnsServiceTestImpl.java
index 91ced47..0a79d5c 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/alibaba/sdk/android/httpdns/impl/HttpDnsServiceTestImpl.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/newsdk/sdk/android/httpdns/impl/HttpDnsServiceTestImpl.java
@@ -1,12 +1,12 @@
-package com.alibaba.sdk.android.httpdns.impl;
+package com.newsdk.sdk.android.httpdns.impl;
import android.content.Context;
-import com.alibaba.sdk.android.httpdns.ApiForTest;
-import com.alibaba.sdk.android.httpdns.BeforeHttpDnsServiceInit;
-import com.alibaba.sdk.android.httpdns.HttpDnsSettings;
-import com.alibaba.sdk.android.httpdns.InitManager;
-import com.alibaba.sdk.android.httpdns.ranking.IPRankingTask;
+import com.newsdk.sdk.android.httpdns.ApiForTest;
+import com.newsdk.sdk.android.httpdns.BeforeHttpDnsServiceInit;
+import com.newsdk.sdk.android.httpdns.HttpDnsSettings;
+import com.newsdk.sdk.android.httpdns.InitManager;
+import com.newsdk.sdk.android.httpdns.ranking.IPRankingTask;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.ScheduledExecutorService;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/alibaba/sdk/android/httpdns/impl/InstanceCreator.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/newsdk/sdk/android/httpdns/impl/InstanceCreator.java
similarity index 79%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/alibaba/sdk/android/httpdns/impl/InstanceCreator.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/newsdk/sdk/android/httpdns/impl/InstanceCreator.java
index 70e2bc1..40e877b 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/alibaba/sdk/android/httpdns/impl/InstanceCreator.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/end2end/java/com/newsdk/sdk/android/httpdns/impl/InstanceCreator.java
@@ -1,8 +1,8 @@
-package com.alibaba.sdk.android.httpdns.impl;
+package com.newsdk.sdk.android.httpdns.impl;
import android.content.Context;
-import com.alibaba.sdk.android.httpdns.HttpDnsService;
+import com.newsdk.sdk.android.httpdns.HttpDnsService;
/**
* 鏀逛负浣跨敤娴嬭瘯瀹炰緥
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/intl/java/com/alibaba/sdk/android/httpdns/HttpDns.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/intl/java/com/newsdk/sdk/android/httpdns/HttpDns.java
similarity index 91%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/intl/java/com/alibaba/sdk/android/httpdns/HttpDns.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/intl/java/com/newsdk/sdk/android/httpdns/HttpDns.java
index 5b0154f..8e15668 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/intl/java/com/alibaba/sdk/android/httpdns/HttpDns.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/intl/java/com/newsdk/sdk/android/httpdns/HttpDns.java
@@ -1,10 +1,10 @@
-package com.alibaba.sdk.android.httpdns;
+package com.newsdk.sdk.android.httpdns;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsInstanceHolder;
-import com.alibaba.sdk.android.httpdns.impl.InstanceCreator;
-import com.alibaba.sdk.android.httpdns.network.HttpDnsAdapterOptions;
-import com.alibaba.sdk.android.httpdns.network.HttpDnsHttpAdapter;
-import com.alibaba.sdk.android.httpdns.utils.CommonUtil;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsInstanceHolder;
+import com.newsdk.sdk.android.httpdns.impl.InstanceCreator;
+import com.newsdk.sdk.android.httpdns.network.HttpDnsAdapterOptions;
+import com.newsdk.sdk.android.httpdns.network.HttpDnsHttpAdapter;
+import com.newsdk.sdk.android.httpdns.utils.CommonUtil;
import android.content.Context;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/intl/java/com/alibaba/sdk/android/httpdns/impl/InstanceCreator.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/intl/java/com/newsdk/sdk/android/httpdns/impl/InstanceCreator.java
similarity index 71%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/intl/java/com/alibaba/sdk/android/httpdns/impl/InstanceCreator.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/intl/java/com/newsdk/sdk/android/httpdns/impl/InstanceCreator.java
index 5ff235e..cf5fdf2 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/intl/java/com/alibaba/sdk/android/httpdns/impl/InstanceCreator.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/intl/java/com/newsdk/sdk/android/httpdns/impl/InstanceCreator.java
@@ -1,6 +1,6 @@
-package com.alibaba.sdk.android.httpdns.impl;
+package com.newsdk.sdk.android.httpdns.impl;
-import com.alibaba.sdk.android.httpdns.HttpDnsService;
+import com.newsdk.sdk.android.httpdns.HttpDnsService;
import android.content.Context;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/intl/java/com/alibaba/sdk/android/httpdns/impl/IntlImpl.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/intl/java/com/newsdk/sdk/android/httpdns/impl/IntlImpl.java
similarity index 81%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/intl/java/com/alibaba/sdk/android/httpdns/impl/IntlImpl.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/intl/java/com/newsdk/sdk/android/httpdns/impl/IntlImpl.java
index 682773e..9f95b85 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/intl/java/com/alibaba/sdk/android/httpdns/impl/IntlImpl.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/intl/java/com/newsdk/sdk/android/httpdns/impl/IntlImpl.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.impl;
+package com.newsdk.sdk.android.httpdns.impl;
import android.content.Context;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/AndroidManifest.xml b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/AndroidManifest.xml
index c4096c4..a799256 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/AndroidManifest.xml
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/AndroidManifest.xml
@@ -1,5 +1,5 @@
+ package="com.newsdk.sdk.android.httpdns">
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/HttpRequest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/HttpRequest.java
deleted file mode 100644
index 3105043..0000000
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/HttpRequest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package com.alibaba.sdk.android.httpdns.request;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.HttpURLConnection;
-import java.net.URL;
-
-import javax.net.ssl.HttpsURLConnection;
-
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-
-/**
- * HTTP request wrapper for resolve APIs.
- */
-public class HttpRequest {
- private HttpRequestConfig requestConfig;
- private ResponseParser translator;
-
- protected HttpRequest() {
- }
-
- public HttpRequest(HttpRequestConfig requestConfig, ResponseParser translator) {
- this.requestConfig = requestConfig;
- this.translator = translator;
- }
-
- public HttpRequestConfig getRequestConfig() {
- return requestConfig;
- }
-
- public T request() throws Throwable {
- HttpURLConnection conn = null;
- InputStream in = null;
- BufferedReader streamReader = null;
-
- long start = System.currentTimeMillis();
- String serverIp = requestConfig.getIp();
- String url = requestConfig.url();
- if (HttpDnsLog.isPrint()) {
- HttpDnsLog.d("request url " + url);
- }
- try {
- conn = (HttpURLConnection) new URL(url).openConnection();
- conn.setReadTimeout(requestConfig.getTimeout());
- conn.setConnectTimeout(requestConfig.getTimeout());
- conn.setRequestProperty("User-Agent", requestConfig.getUA());
- if (conn instanceof HttpsURLConnection) {
- HttpsURLConnection httpsURLConnection = (HttpsURLConnection) conn;
- httpsURLConnection.setHostnameVerifier(HttpsURLConnection.getDefaultHostnameVerifier());
- }
- if (conn.getResponseCode() != HttpURLConnection.HTTP_OK) {
- in = conn.getErrorStream();
- if (in != null) {
- streamReader = new BufferedReader(new InputStreamReader(in, "UTF-8"));
- String errStr = readStringFrom(streamReader).toString();
- throw HttpException.create(conn.getResponseCode(), errStr);
- } else {
- throw HttpException.create(conn.getResponseCode(), "");
- }
- } else {
- in = conn.getInputStream();
- streamReader = new BufferedReader(new InputStreamReader(in, "UTF-8"));
- String responseStr = readStringFrom(streamReader).toString();
- if (HttpDnsLog.isPrint()) {
- HttpDnsLog.d("request success " + responseStr);
- }
- return translator.parse(serverIp, responseStr);
- }
- } catch (Throwable e) {
- long cost = System.currentTimeMillis() - start;
- HttpDnsLog.w("request " + url + " fail, cost " + cost, e);
- throw e;
- } finally {
- if (conn != null) {
- conn.disconnect();
- }
- try {
- if (in != null) {
- in.close();
- }
- if (streamReader != null) {
- streamReader.close();
- }
- } catch (IOException ignored) {
- }
- }
- }
-
- public static StringBuilder readStringFrom(BufferedReader streamReader) throws IOException {
- StringBuilder sb = new StringBuilder();
- String line;
- while ((line = streamReader.readLine()) != null) {
- sb.append(line);
- }
- return sb;
- }
-}
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/CacheTtlChanger.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/CacheTtlChanger.java
similarity index 92%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/CacheTtlChanger.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/CacheTtlChanger.java
index 80c037e..c410372 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/CacheTtlChanger.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/CacheTtlChanger.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns;
+package com.newsdk.sdk.android.httpdns;
/**
* 淇敼ttl鏃堕暱鐨勬帴鍙?
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/DegradationFilter.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/DegradationFilter.java
similarity index 84%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/DegradationFilter.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/DegradationFilter.java
index 627787d..0717d30 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/DegradationFilter.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/DegradationFilter.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns;
+package com.newsdk.sdk.android.httpdns;
/**
* 闄嶇骇鍒ゆ柇寮€鍏虫帴鍙?
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/HTTPDNSResult.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/HTTPDNSResult.java
similarity index 96%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/HTTPDNSResult.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/HTTPDNSResult.java
index 60d6620..00b6cee 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/HTTPDNSResult.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/HTTPDNSResult.java
@@ -1,9 +1,9 @@
-package com.alibaba.sdk.android.httpdns;
+package com.newsdk.sdk.android.httpdns;
import android.text.TextUtils;
-import com.alibaba.sdk.android.httpdns.cache.HostRecord;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.cache.HostRecord;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
import java.util.Arrays;
import java.util.List;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/HTTPDNSResultWrapper.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/HTTPDNSResultWrapper.java
similarity index 93%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/HTTPDNSResultWrapper.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/HTTPDNSResultWrapper.java
index 853e66f..e8eea38 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/HTTPDNSResultWrapper.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/HTTPDNSResultWrapper.java
@@ -1,8 +1,8 @@
-package com.alibaba.sdk.android.httpdns;
+package com.newsdk.sdk.android.httpdns;
import android.text.TextUtils;
-import com.alibaba.sdk.android.httpdns.cache.HostRecord;
+import com.newsdk.sdk.android.httpdns.cache.HostRecord;
import java.util.List;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/HttpDnsCallback.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/HttpDnsCallback.java
similarity index 68%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/HttpDnsCallback.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/HttpDnsCallback.java
index 33fdefb..e4d99b1 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/HttpDnsCallback.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/HttpDnsCallback.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns;
+package com.newsdk.sdk.android.httpdns;
public interface HttpDnsCallback {
void onHttpDnsCompleted(HTTPDNSResult result);
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/HttpDnsService.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/HttpDnsService.java
similarity index 99%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/HttpDnsService.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/HttpDnsService.java
index 684ac6d..cc095a3 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/HttpDnsService.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/HttpDnsService.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns;
+package com.newsdk.sdk.android.httpdns;
import java.util.ArrayList;
import java.util.List;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/HttpDnsSettings.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/HttpDnsSettings.java
similarity index 95%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/HttpDnsSettings.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/HttpDnsSettings.java
index a8b05fc..675250d 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/HttpDnsSettings.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/HttpDnsSettings.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns;
+package com.newsdk.sdk.android.httpdns;
import android.content.Context;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/HttpDnsV1Client.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/HttpDnsV1Client.java
similarity index 93%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/HttpDnsV1Client.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/HttpDnsV1Client.java
index f63c674..5cf4a83 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/HttpDnsV1Client.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/HttpDnsV1Client.java
@@ -1,10 +1,10 @@
-package com.alibaba.sdk.android.httpdns;
+package com.newsdk.sdk.android.httpdns;
import android.content.Context;
import android.text.TextUtils;
-import com.alibaba.sdk.android.httpdns.network.HttpDnsAdapterOptions;
-import com.alibaba.sdk.android.httpdns.network.HttpDnsHttpAdapter;
+import com.newsdk.sdk.android.httpdns.network.HttpDnsAdapterOptions;
+import com.newsdk.sdk.android.httpdns.network.HttpDnsHttpAdapter;
import java.util.HashMap;
import java.util.Map;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/ILogger.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/ILogger.java
similarity index 74%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/ILogger.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/ILogger.java
index d236129..4dc4dcf 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/ILogger.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/ILogger.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns;
+package com.newsdk.sdk.android.httpdns;
/**
* 鏃ュ織鎺ュ彛
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/InitConfig.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/InitConfig.java
similarity index 98%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/InitConfig.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/InitConfig.java
index 6fa5505..cabf935 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/InitConfig.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/InitConfig.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns;
+package com.newsdk.sdk.android.httpdns;
import android.app.Application;
import android.content.Context;
@@ -11,9 +11,9 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import com.alibaba.sdk.android.httpdns.exception.InitException;
-import com.alibaba.sdk.android.httpdns.ranking.IPRankingBean;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.exception.InitException;
+import com.newsdk.sdk.android.httpdns.ranking.IPRankingBean;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
/**
* 鍒濆鍖栭厤缃?
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/NetType.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/NetType.java
similarity index 65%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/NetType.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/NetType.java
index 1c47a31..45ff534 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/NetType.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/NetType.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns;
+package com.newsdk.sdk.android.httpdns;
/**
* 缃戠粶绫诲瀷
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/NotUseHttpDnsFilter.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/NotUseHttpDnsFilter.java
similarity index 88%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/NotUseHttpDnsFilter.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/NotUseHttpDnsFilter.java
index 79ad80f..50a9a42 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/NotUseHttpDnsFilter.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/NotUseHttpDnsFilter.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns;
+package com.newsdk.sdk.android.httpdns;
/**
* 涓嶄娇鐢℉ttpDns鐨勯厤缃帴鍙?
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/Region.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/Region.java
similarity index 76%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/Region.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/Region.java
index e42092b..be76cb8 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/Region.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/Region.java
@@ -1,6 +1,6 @@
-package com.alibaba.sdk.android.httpdns;
+package com.newsdk.sdk.android.httpdns;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
public enum Region {
DEFAULT(""),
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/RequestIpType.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/RequestIpType.java
similarity index 83%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/RequestIpType.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/RequestIpType.java
index 575b40d..ae600a9 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/RequestIpType.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/RequestIpType.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns;
+package com.newsdk.sdk.android.httpdns;
/**
* 璇锋眰鐨刬p绫诲瀷
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/SyncService.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/SyncService.java
similarity index 90%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/SyncService.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/SyncService.java
index 2b6eaff..30ccff0 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/SyncService.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/SyncService.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns;
+package com.newsdk.sdk.android.httpdns;
public interface SyncService {
/**
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/cache/HostRecord.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/cache/HostRecord.java
similarity index 95%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/cache/HostRecord.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/cache/HostRecord.java
index 21261ed..27658b6 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/cache/HostRecord.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/cache/HostRecord.java
@@ -1,9 +1,9 @@
-package com.alibaba.sdk.android.httpdns.cache;
+package com.newsdk.sdk.android.httpdns.cache;
import java.util.Arrays;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.utils.CommonUtil;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.utils.CommonUtil;
/**
* ip瑙f瀽缁撴灉璁板綍
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/cache/RecordDBHelper.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/cache/RecordDBHelper.java
similarity index 97%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/cache/RecordDBHelper.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/cache/RecordDBHelper.java
index 8186498..70e4948 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/cache/RecordDBHelper.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/cache/RecordDBHelper.java
@@ -1,10 +1,10 @@
-package com.alibaba.sdk.android.httpdns.cache;
+package com.newsdk.sdk.android.httpdns.cache;
import java.util.ArrayList;
import java.util.List;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-import com.alibaba.sdk.android.httpdns.utils.CommonUtil;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.utils.CommonUtil;
import android.content.ContentValues;
import android.content.Context;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/ConfigCacheHelper.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/ConfigCacheHelper.java
similarity index 92%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/ConfigCacheHelper.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/ConfigCacheHelper.java
index 26c70a2..7a4d3f9 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/ConfigCacheHelper.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/ConfigCacheHelper.java
@@ -1,9 +1,9 @@
-package com.alibaba.sdk.android.httpdns.config;
+package com.newsdk.sdk.android.httpdns.config;
import java.util.concurrent.atomic.AtomicBoolean;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsConfig;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsConfig;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
import android.content.Context;
import android.content.SharedPreferences;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/RegionServer.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/RegionServer.java
similarity index 97%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/RegionServer.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/RegionServer.java
index b0d12bd..4080678 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/RegionServer.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/RegionServer.java
@@ -1,6 +1,6 @@
-package com.alibaba.sdk.android.httpdns.config;
+package com.newsdk.sdk.android.httpdns.config;
-import com.alibaba.sdk.android.httpdns.utils.CommonUtil;
+import com.newsdk.sdk.android.httpdns.utils.CommonUtil;
import java.util.Arrays;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/ServerConfig.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/ServerConfig.java
similarity index 98%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/ServerConfig.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/ServerConfig.java
index e4e6e2b..648d8ac 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/ServerConfig.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/ServerConfig.java
@@ -1,11 +1,11 @@
-package com.alibaba.sdk.android.httpdns.config;
+package com.newsdk.sdk.android.httpdns.config;
import java.util.Arrays;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsConfig;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-import com.alibaba.sdk.android.httpdns.utils.CommonUtil;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsConfig;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.utils.CommonUtil;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
import android.content.SharedPreferences;
import android.text.TextUtils;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/SpCacheItem.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/SpCacheItem.java
similarity index 78%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/SpCacheItem.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/SpCacheItem.java
index e6af818..936baa2 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/SpCacheItem.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/SpCacheItem.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.config;
+package com.newsdk.sdk.android.httpdns.config;
import android.content.SharedPreferences;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/region/AmericaRegionServer.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/region/AmericaRegionServer.java
similarity index 77%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/region/AmericaRegionServer.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/region/AmericaRegionServer.java
index 92c9739..e0f3f88 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/region/AmericaRegionServer.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/region/AmericaRegionServer.java
@@ -1,7 +1,7 @@
-package com.alibaba.sdk.android.httpdns.config.region;
+package com.newsdk.sdk.android.httpdns.config.region;
-import com.alibaba.sdk.android.httpdns.config.RegionServer;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.config.RegionServer;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
public class AmericaRegionServer {
private static final String [] SERVER_IPS = new String [] {
@@ -16,10 +16,10 @@ public class AmericaRegionServer {
private static final int[] IPV6_PORTS = null;
private static final String[] UPDATE_SERVER = new String[] {
- "resolvers-us.httpdns.Aliyuncs.com"
+ "resolvers-us.httpdns.Newcs.com"
};
private static final String[] IPV6_UPDATE_SERVER = new String[] {
- "resolvers-us.httpdns.Aliyuncs.com"
+ "resolvers-us.httpdns.Newcs.com"
};
public static RegionServer getInitServer() {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/region/DefaultRegionServer.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/region/DefaultRegionServer.java
similarity index 80%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/region/DefaultRegionServer.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/region/DefaultRegionServer.java
index 6d8f9da..1b918b7 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/region/DefaultRegionServer.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/region/DefaultRegionServer.java
@@ -1,7 +1,7 @@
-package com.alibaba.sdk.android.httpdns.config.region;
+package com.newsdk.sdk.android.httpdns.config.region;
-import com.alibaba.sdk.android.httpdns.config.RegionServer;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.config.RegionServer;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
public final class DefaultRegionServer {
private static final String [] SERVER_IPS = new String [] {
@@ -22,10 +22,10 @@ public final class DefaultRegionServer {
private static final int[] IPV6_PORTS = null;
private static final String[] UPDATE_SERVER = new String[] {
- "resolvers-cn.httpdns.Aliyuncs.com"
+ "resolvers-cn.httpdns.Newcs.com"
};
private static final String[] IPV6_UPDATE_SERVER = new String[] {
- "resolvers-cn.httpdns.Aliyuncs.com"
+ "resolvers-cn.httpdns.Newcs.com"
};
public static RegionServer getInitServer() {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/region/GermanyRegionServer.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/region/GermanyRegionServer.java
similarity index 77%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/region/GermanyRegionServer.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/region/GermanyRegionServer.java
index 0eb87c7..bd0fac3 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/region/GermanyRegionServer.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/region/GermanyRegionServer.java
@@ -1,7 +1,7 @@
-package com.alibaba.sdk.android.httpdns.config.region;
+package com.newsdk.sdk.android.httpdns.config.region;
-import com.alibaba.sdk.android.httpdns.config.RegionServer;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.config.RegionServer;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
public class GermanyRegionServer {
private static final String [] SERVER_IPS = new String [] {
@@ -17,10 +17,10 @@ public class GermanyRegionServer {
private static final int[] IPV6_PORTS = null;
private static final String[] UPDATE_SERVER = new String[] {
- "resolvers-de.httpdns.Aliyuncs.com"
+ "resolvers-de.httpdns.Newcs.com"
};
private static final String[] IPV6_UPDATE_SERVER = new String[] {
- "resolvers-de.httpdns.Aliyuncs.com"
+ "resolvers-de.httpdns.Newcs.com"
};
public static RegionServer getInitServer() {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/region/HongKongRegionServer.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/region/HongKongRegionServer.java
similarity index 77%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/region/HongKongRegionServer.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/region/HongKongRegionServer.java
index 821df39..70146bc 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/region/HongKongRegionServer.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/region/HongKongRegionServer.java
@@ -1,7 +1,7 @@
-package com.alibaba.sdk.android.httpdns.config.region;
+package com.newsdk.sdk.android.httpdns.config.region;
-import com.alibaba.sdk.android.httpdns.config.RegionServer;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.config.RegionServer;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
public class HongKongRegionServer {
private static final String[] SERVER_IPS = new String[] {
@@ -16,10 +16,10 @@ public class HongKongRegionServer {
private static final int[] IPV6_PORTS = null;
private static final String[] UPDATE_SERVER = new String[] {
- "resolvers-hk.httpdns.Aliyuncs.com"
+ "resolvers-hk.httpdns.Newcs.com"
};
private static final String[] IPV6_UPDATE_SERVER = new String[] {
- "resolvers-hk.httpdns.Aliyuncs.com"
+ "resolvers-hk.httpdns.Newcs.com"
};
public static RegionServer getInitServer() {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/region/PreReleaseRegionServer.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/region/PreReleaseRegionServer.java
similarity index 71%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/region/PreReleaseRegionServer.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/region/PreReleaseRegionServer.java
index 427cfd0..ddddcfe 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/region/PreReleaseRegionServer.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/region/PreReleaseRegionServer.java
@@ -1,7 +1,7 @@
-package com.alibaba.sdk.android.httpdns.config.region;
+package com.newsdk.sdk.android.httpdns.config.region;
-import com.alibaba.sdk.android.httpdns.config.RegionServer;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.config.RegionServer;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
public class PreReleaseRegionServer {
private static final String [] SERVER_IPS = new String [] {
@@ -9,15 +9,15 @@ public class PreReleaseRegionServer {
};
private static final int[] PORTS = null;
private static final String[] IPV6_SERVER_IPS = new String [] {
- "resolvers-cn-pre.httpdns.Aliyuncs.com"
+ "resolvers-cn-pre.httpdns.Newcs.com"
};
private static final int[] IPV6_PORTS = null;
private static final String[] UPDATE_SERVER = new String[] {
- "resolvers-cn-pre.httpdns.Aliyuncs.com"
+ "resolvers-cn-pre.httpdns.Newcs.com"
};
private static final String[] IPV6_UPDATE_SERVER = new String[] {
- "resolvers-cn-pre.httpdns.Aliyuncs.com"
+ "resolvers-cn-pre.httpdns.Newcs.com"
};
public static RegionServer getInitServer() {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/region/RegionServerManager.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/region/RegionServerManager.java
similarity index 92%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/region/RegionServerManager.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/region/RegionServerManager.java
index 22b8c60..3943da7 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/region/RegionServerManager.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/region/RegionServerManager.java
@@ -1,8 +1,8 @@
-package com.alibaba.sdk.android.httpdns.config.region;
+package com.newsdk.sdk.android.httpdns.config.region;
-import com.alibaba.sdk.android.httpdns.config.RegionServer;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.config.RegionServer;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
public class RegionServerManager {
public static RegionServer getInitServer(String region) {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/region/SingaporeRegionServer.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/region/SingaporeRegionServer.java
similarity index 77%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/region/SingaporeRegionServer.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/region/SingaporeRegionServer.java
index b6b4fd2..1679600 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/config/region/SingaporeRegionServer.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/config/region/SingaporeRegionServer.java
@@ -1,7 +1,7 @@
-package com.alibaba.sdk.android.httpdns.config.region;
+package com.newsdk.sdk.android.httpdns.config.region;
-import com.alibaba.sdk.android.httpdns.config.RegionServer;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.config.RegionServer;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
public class SingaporeRegionServer {
private static final String[] SERVER_IPS = new String[] {
@@ -16,10 +16,10 @@ public class SingaporeRegionServer {
private static final int[] IPV6_PORTS = null;
private static final String[] UPDATE_SERVER = new String[] {
- "resolvers-sg.httpdns.Aliyuncs.com"
+ "resolvers-sg.httpdns.Newcs.com"
};
private static final String[] IPV6_UPDATE_SERVER = new String[] {
- "resolvers-sg.httpdns.Aliyuncs.com"
+ "resolvers-sg.httpdns.Newcs.com"
};
public static RegionServer getInitServer() {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/exception/HttpDnsUncaughtExceptionHandler.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/exception/HttpDnsUncaughtExceptionHandler.java
similarity index 82%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/exception/HttpDnsUncaughtExceptionHandler.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/exception/HttpDnsUncaughtExceptionHandler.java
index b5f98c8..a782b5b 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/exception/HttpDnsUncaughtExceptionHandler.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/exception/HttpDnsUncaughtExceptionHandler.java
@@ -1,6 +1,6 @@
-package com.alibaba.sdk.android.httpdns.exception;
+package com.newsdk.sdk.android.httpdns.exception;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
public class HttpDnsUncaughtExceptionHandler implements Thread.UncaughtExceptionHandler {
// 澶勭悊鎵€鏈夋湭鎹曡幏寮傚父
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/exception/InitException.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/exception/InitException.java
similarity index 70%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/exception/InitException.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/exception/InitException.java
index 6e61e1a..8edbefc 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/exception/InitException.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/exception/InitException.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.exception;
+package com.newsdk.sdk.android.httpdns.exception;
public class InitException extends RuntimeException {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/AESEncryptService.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/AESEncryptService.java
similarity index 97%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/AESEncryptService.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/AESEncryptService.java
index 23ae185..01ace2d 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/AESEncryptService.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/AESEncryptService.java
@@ -1,9 +1,9 @@
-package com.alibaba.sdk.android.httpdns.impl;
+package com.newsdk.sdk.android.httpdns.impl;
import android.text.TextUtils;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-import com.alibaba.sdk.android.httpdns.utils.CommonUtil;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.utils.CommonUtil;
import javax.crypto.Cipher;
import javax.crypto.SecretKey;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/ErrorImpl.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/ErrorImpl.java
similarity index 89%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/ErrorImpl.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/ErrorImpl.java
index e57357a..b8d8ab7 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/ErrorImpl.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/ErrorImpl.java
@@ -1,13 +1,13 @@
-package com.alibaba.sdk.android.httpdns.impl;
+package com.newsdk.sdk.android.httpdns.impl;
-import com.alibaba.sdk.android.httpdns.HTTPDNSResult;
-import com.alibaba.sdk.android.httpdns.HttpDnsCallback;
-import com.alibaba.sdk.android.httpdns.HttpDnsService;
-import com.alibaba.sdk.android.httpdns.Region;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.SyncService;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.HTTPDNSResult;
+import com.newsdk.sdk.android.httpdns.HttpDnsCallback;
+import com.newsdk.sdk.android.httpdns.HttpDnsService;
+import com.newsdk.sdk.android.httpdns.Region;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.SyncService;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
import java.util.ArrayList;
import java.util.List;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/HostResolveLocker.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/HostResolveLocker.java
similarity index 97%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/HostResolveLocker.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/HostResolveLocker.java
index 25c1e50..4b90e9d 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/HostResolveLocker.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/HostResolveLocker.java
@@ -1,11 +1,11 @@
-package com.alibaba.sdk.android.httpdns.impl;
+package com.newsdk.sdk.android.httpdns.impl;
import java.util.HashMap;
import java.util.HashSet;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
public class HostResolveLocker {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/HostResolveRecorder.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/HostResolveRecorder.java
similarity index 96%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/HostResolveRecorder.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/HostResolveRecorder.java
index 5818a17..b51c814 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/HostResolveRecorder.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/HostResolveRecorder.java
@@ -1,9 +1,9 @@
-package com.alibaba.sdk.android.httpdns.impl;
+package com.newsdk.sdk.android.httpdns.impl;
import java.util.HashMap;
import java.util.HashSet;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
public class HostResolveRecorder {
private static class Recorder {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/HttpDnsConfig.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/HttpDnsConfig.java
similarity index 92%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/HttpDnsConfig.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/HttpDnsConfig.java
index 737938c..bb6963d 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/HttpDnsConfig.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/HttpDnsConfig.java
@@ -1,23 +1,23 @@
-package com.alibaba.sdk.android.httpdns.impl;
+package com.newsdk.sdk.android.httpdns.impl;
import java.util.Arrays;
import java.util.concurrent.ExecutorService;
-import com.alibaba.sdk.android.httpdns.BuildConfig;
-import com.alibaba.sdk.android.httpdns.HttpDnsSettings;
-import com.alibaba.sdk.android.httpdns.InitConfig;
-import com.alibaba.sdk.android.httpdns.config.ConfigCacheHelper;
-import com.alibaba.sdk.android.httpdns.config.RegionServer;
-import com.alibaba.sdk.android.httpdns.config.ServerConfig;
-import com.alibaba.sdk.android.httpdns.config.region.RegionServerManager;
-import com.alibaba.sdk.android.httpdns.config.SpCacheItem;
-import com.alibaba.sdk.android.httpdns.observable.ObservableConfig;
-import com.alibaba.sdk.android.httpdns.observable.ObservableConstants;
-import com.alibaba.sdk.android.httpdns.observable.ObservableManager;
-import com.alibaba.sdk.android.httpdns.request.HttpRequestConfig;
-import com.alibaba.sdk.android.httpdns.utils.CommonUtil;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
-import com.alibaba.sdk.android.httpdns.utils.ThreadUtil;
+import com.newsdk.sdk.android.httpdns.BuildConfig;
+import com.newsdk.sdk.android.httpdns.HttpDnsSettings;
+import com.newsdk.sdk.android.httpdns.InitConfig;
+import com.newsdk.sdk.android.httpdns.config.ConfigCacheHelper;
+import com.newsdk.sdk.android.httpdns.config.RegionServer;
+import com.newsdk.sdk.android.httpdns.config.ServerConfig;
+import com.newsdk.sdk.android.httpdns.config.region.RegionServerManager;
+import com.newsdk.sdk.android.httpdns.config.SpCacheItem;
+import com.newsdk.sdk.android.httpdns.observable.ObservableConfig;
+import com.newsdk.sdk.android.httpdns.observable.ObservableConstants;
+import com.newsdk.sdk.android.httpdns.observable.ObservableManager;
+import com.newsdk.sdk.android.httpdns.request.HttpRequestConfig;
+import com.newsdk.sdk.android.httpdns.utils.CommonUtil;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.utils.ThreadUtil;
import android.content.Context;
import android.content.SharedPreferences;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/HttpDnsCreator.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/HttpDnsCreator.java
similarity index 66%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/HttpDnsCreator.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/HttpDnsCreator.java
index cfff42c..abe7f6a 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/HttpDnsCreator.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/HttpDnsCreator.java
@@ -1,8 +1,8 @@
-package com.alibaba.sdk.android.httpdns.impl;
+package com.newsdk.sdk.android.httpdns.impl;
import android.content.Context;
-import com.alibaba.sdk.android.httpdns.HttpDnsService;
+import com.newsdk.sdk.android.httpdns.HttpDnsService;
/**
* httpdns鏈嶅姟鍒涘缓鎺ュ彛
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/HttpDnsInstanceHolder.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/HttpDnsInstanceHolder.java
similarity index 87%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/HttpDnsInstanceHolder.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/HttpDnsInstanceHolder.java
index 6cff181..5f24bf0 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/HttpDnsInstanceHolder.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/HttpDnsInstanceHolder.java
@@ -1,9 +1,9 @@
-package com.alibaba.sdk.android.httpdns.impl;
+package com.newsdk.sdk.android.httpdns.impl;
import android.content.Context;
-import com.alibaba.sdk.android.httpdns.HttpDnsService;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.HttpDnsService;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
import java.util.HashMap;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/HttpDnsServiceImpl.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/HttpDnsServiceImpl.java
similarity index 93%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/HttpDnsServiceImpl.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/HttpDnsServiceImpl.java
index fc37467..30de84b 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/HttpDnsServiceImpl.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/HttpDnsServiceImpl.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.impl;
+package com.newsdk.sdk.android.httpdns.impl;
import java.util.ArrayList;
import java.util.Arrays;
@@ -8,36 +8,36 @@ import java.util.Map;
import com.alibaba.sdk.android.crashdefend.CrashDefendApi;
import com.alibaba.sdk.android.crashdefend.CrashDefendCallback;
-import com.alibaba.sdk.android.httpdns.BuildConfig;
-import com.alibaba.sdk.android.httpdns.HTTPDNSResult;
-import com.alibaba.sdk.android.httpdns.HttpDnsCallback;
-import com.alibaba.sdk.android.httpdns.HttpDnsService;
-import com.alibaba.sdk.android.httpdns.HttpDnsSettings;
-import com.alibaba.sdk.android.httpdns.InitConfig;
-import com.alibaba.sdk.android.httpdns.Region;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.SyncService;
-import com.alibaba.sdk.android.httpdns.cache.RecordDBHelper;
-import com.alibaba.sdk.android.httpdns.observable.ObservableConstants;
-import com.alibaba.sdk.android.httpdns.observable.event.CleanHostCacheEvent;
-import com.alibaba.sdk.android.httpdns.resolve.HostFilter;
-import com.alibaba.sdk.android.httpdns.resolve.ResolveHostCache;
-import com.alibaba.sdk.android.httpdns.resolve.ResolveHostCacheGroup;
-import com.alibaba.sdk.android.httpdns.resolve.ResolveHostRequestHandler;
-import com.alibaba.sdk.android.httpdns.resolve.ResolveHostResultRepo;
-import com.alibaba.sdk.android.httpdns.resolve.ResolveHostService;
-import com.alibaba.sdk.android.httpdns.resolve.BatchResolveHostService;
-import com.alibaba.sdk.android.httpdns.HTTPDNSResultWrapper;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-import com.alibaba.sdk.android.httpdns.net.HttpDnsNetworkDetector;
-import com.alibaba.sdk.android.httpdns.net.NetworkStateManager;
-import com.alibaba.sdk.android.httpdns.ranking.IPRankingService;
-import com.alibaba.sdk.android.httpdns.serverip.RegionServerScheduleService;
-import com.alibaba.sdk.android.httpdns.serverip.RegionServerScheduleService.OnRegionServerIpUpdate;
-import com.alibaba.sdk.android.httpdns.serverip.ranking.RegionServerRankingService;
-import com.alibaba.sdk.android.httpdns.track.SessionTrackMgr;
-import com.alibaba.sdk.android.httpdns.utils.CommonUtil;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.BuildConfig;
+import com.newsdk.sdk.android.httpdns.HTTPDNSResult;
+import com.newsdk.sdk.android.httpdns.HttpDnsCallback;
+import com.newsdk.sdk.android.httpdns.HttpDnsService;
+import com.newsdk.sdk.android.httpdns.HttpDnsSettings;
+import com.newsdk.sdk.android.httpdns.InitConfig;
+import com.newsdk.sdk.android.httpdns.Region;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.SyncService;
+import com.newsdk.sdk.android.httpdns.cache.RecordDBHelper;
+import com.newsdk.sdk.android.httpdns.observable.ObservableConstants;
+import com.newsdk.sdk.android.httpdns.observable.event.CleanHostCacheEvent;
+import com.newsdk.sdk.android.httpdns.resolve.HostFilter;
+import com.newsdk.sdk.android.httpdns.resolve.ResolveHostCache;
+import com.newsdk.sdk.android.httpdns.resolve.ResolveHostCacheGroup;
+import com.newsdk.sdk.android.httpdns.resolve.ResolveHostRequestHandler;
+import com.newsdk.sdk.android.httpdns.resolve.ResolveHostResultRepo;
+import com.newsdk.sdk.android.httpdns.resolve.ResolveHostService;
+import com.newsdk.sdk.android.httpdns.resolve.BatchResolveHostService;
+import com.newsdk.sdk.android.httpdns.HTTPDNSResultWrapper;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.net.HttpDnsNetworkDetector;
+import com.newsdk.sdk.android.httpdns.net.NetworkStateManager;
+import com.newsdk.sdk.android.httpdns.ranking.IPRankingService;
+import com.newsdk.sdk.android.httpdns.serverip.RegionServerScheduleService;
+import com.newsdk.sdk.android.httpdns.serverip.RegionServerScheduleService.OnRegionServerIpUpdate;
+import com.newsdk.sdk.android.httpdns.serverip.ranking.RegionServerRankingService;
+import com.newsdk.sdk.android.httpdns.track.SessionTrackMgr;
+import com.newsdk.sdk.android.httpdns.utils.CommonUtil;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
import android.content.Context;
import android.content.SharedPreferences;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/SignService.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/SignService.java
similarity index 97%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/SignService.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/SignService.java
index ccce1d0..b063a55 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/impl/SignService.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/impl/SignService.java
@@ -1,8 +1,8 @@
-package com.alibaba.sdk.android.httpdns.impl;
+package com.newsdk.sdk.android.httpdns.impl;
import android.text.TextUtils;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
import java.nio.charset.StandardCharsets;
import java.security.InvalidKeyException;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/log/HttpDnsLog.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/log/HttpDnsLog.java
similarity index 96%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/log/HttpDnsLog.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/log/HttpDnsLog.java
index 07df5ee..8754430 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/log/HttpDnsLog.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/log/HttpDnsLog.java
@@ -1,8 +1,8 @@
-package com.alibaba.sdk.android.httpdns.log;
+package com.newsdk.sdk.android.httpdns.log;
import java.util.HashSet;
-import com.alibaba.sdk.android.httpdns.ILogger;
+import com.newsdk.sdk.android.httpdns.ILogger;
import android.util.Log;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/net/HttpDnsNetworkDetector.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/net/HttpDnsNetworkDetector.java
similarity index 92%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/net/HttpDnsNetworkDetector.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/net/HttpDnsNetworkDetector.java
index 7fe2249..5f68794 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/net/HttpDnsNetworkDetector.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/net/HttpDnsNetworkDetector.java
@@ -1,11 +1,11 @@
-package com.alibaba.sdk.android.httpdns.net;
+package com.newsdk.sdk.android.httpdns.net;
import java.util.concurrent.ExecutorService;
-import com.alibaba.sdk.android.httpdns.HttpDnsSettings;
-import com.alibaba.sdk.android.httpdns.NetType;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-import com.alibaba.sdk.android.httpdns.utils.ThreadUtil;
+import com.newsdk.sdk.android.httpdns.HttpDnsSettings;
+import com.newsdk.sdk.android.httpdns.NetType;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.utils.ThreadUtil;
import android.content.Context;
import com.aliyun.ams.ipdetector.Inet64Util;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/net/NetworkStateManager.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/net/NetworkStateManager.java
similarity index 97%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/net/NetworkStateManager.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/net/NetworkStateManager.java
index 8a76bb1..54b5ee7 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/net/NetworkStateManager.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/net/NetworkStateManager.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.net;
+package com.newsdk.sdk.android.httpdns.net;
import java.util.ArrayList;
import java.util.concurrent.ExecutorService;
@@ -6,8 +6,8 @@ import java.net.InetAddress;
import java.net.Inet4Address;
import java.net.Inet6Address;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-import com.alibaba.sdk.android.httpdns.utils.ThreadUtil;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.utils.ThreadUtil;
import android.Manifest;
import android.content.BroadcastReceiver;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/network/HttpDnsAdapterException.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/network/HttpDnsAdapterException.java
similarity index 91%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/network/HttpDnsAdapterException.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/network/HttpDnsAdapterException.java
index 9f9e1db..ab775d9 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/network/HttpDnsAdapterException.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/network/HttpDnsAdapterException.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.network;
+package com.newsdk.sdk.android.httpdns.network;
import java.io.IOException;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/network/HttpDnsAdapterOptions.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/network/HttpDnsAdapterOptions.java
similarity index 95%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/network/HttpDnsAdapterOptions.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/network/HttpDnsAdapterOptions.java
index 7c9845a..a800876 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/network/HttpDnsAdapterOptions.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/network/HttpDnsAdapterOptions.java
@@ -1,6 +1,6 @@
-package com.alibaba.sdk.android.httpdns.network;
+package com.newsdk.sdk.android.httpdns.network;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
public class HttpDnsAdapterOptions {
private final int connectTimeoutMillis;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/network/HttpDnsAdapterRequest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/network/HttpDnsAdapterRequest.java
similarity index 95%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/network/HttpDnsAdapterRequest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/network/HttpDnsAdapterRequest.java
index a758ac9..9c49241 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/network/HttpDnsAdapterRequest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/network/HttpDnsAdapterRequest.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.network;
+package com.newsdk.sdk.android.httpdns.network;
import java.util.Collections;
import java.util.LinkedHashMap;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/network/HttpDnsAdapterResponse.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/network/HttpDnsAdapterResponse.java
similarity index 93%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/network/HttpDnsAdapterResponse.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/network/HttpDnsAdapterResponse.java
index 7a79cd4..3bf22a2 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/network/HttpDnsAdapterResponse.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/network/HttpDnsAdapterResponse.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.network;
+package com.newsdk.sdk.android.httpdns.network;
import java.util.List;
import java.util.Map;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/network/HttpDnsErrorCode.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/network/HttpDnsErrorCode.java
similarity index 88%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/network/HttpDnsErrorCode.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/network/HttpDnsErrorCode.java
index e80ab3f..356445a 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/network/HttpDnsErrorCode.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/network/HttpDnsErrorCode.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.network;
+package com.newsdk.sdk.android.httpdns.network;
public final class HttpDnsErrorCode {
private HttpDnsErrorCode() {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/network/HttpDnsHttpAdapter.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/network/HttpDnsHttpAdapter.java
similarity index 88%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/network/HttpDnsHttpAdapter.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/network/HttpDnsHttpAdapter.java
index c8d2d45..3fd7743 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/network/HttpDnsHttpAdapter.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/network/HttpDnsHttpAdapter.java
@@ -1,12 +1,13 @@
-package com.alibaba.sdk.android.httpdns.network;
+package com.newsdk.sdk.android.httpdns.network;
-import com.alibaba.sdk.android.httpdns.HTTPDNSResult;
-import com.alibaba.sdk.android.httpdns.HttpDnsService;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.HTTPDNSResult;
+import com.newsdk.sdk.android.httpdns.HttpDnsService;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.net.HttpURLConnection;
import java.net.URL;
import java.security.GeneralSecurityException;
import java.security.SecureRandom;
@@ -57,10 +58,9 @@ public class HttpDnsHttpAdapter {
throw new HttpDnsAdapterException(HttpDnsErrorCode.HOST_ROUTE_REJECTED,
"invalid original host");
}
- if (!"https".equalsIgnoreCase(originalURL.getProtocol())) {
- throw new HttpDnsAdapterException(HttpDnsErrorCode.TLS_EMPTY_SNI_FAILED,
- "only https scheme is supported in empty sni mode");
- }
+ String scheme = originalURL.getProtocol();
+ boolean isHttps = "https".equalsIgnoreCase(scheme);
+ int defaultPort = isHttps ? 443 : 80;
List candidateIps = resolveIps(originalHost);
if (candidateIps.isEmpty()) {
@@ -74,17 +74,22 @@ public class HttpDnsHttpAdapter {
continue;
}
String usedIp = ip.trim();
- HttpsURLConnection connection = null;
+ HttpURLConnection connection = null;
try {
- int port = originalURL.getPort() > 0 ? originalURL.getPort() : 443;
- URL targetURL = new URL("https", usedIp, port, originalURL.getFile());
- connection = (HttpsURLConnection) targetURL.openConnection();
+ int port = originalURL.getPort() > 0 ? originalURL.getPort() : defaultPort;
+ URL targetURL = new URL(scheme, usedIp, port, originalURL.getFile());
+ connection = (HttpURLConnection) targetURL.openConnection();
connection.setConnectTimeout(options.getConnectTimeoutMillis());
connection.setReadTimeout(options.getReadTimeoutMillis());
connection.setInstanceFollowRedirects(false);
connection.setRequestMethod(request.getMethod());
- connection.setSSLSocketFactory(createSocketFactory());
- connection.setHostnameVerifier(createHostnameVerifier(originalHost));
+
+ if (isHttps && connection instanceof HttpsURLConnection) {
+ HttpsURLConnection httpsConn = (HttpsURLConnection) connection;
+ httpsConn.setSSLSocketFactory(createSocketFactory());
+ httpsConn.setHostnameVerifier(createHostnameVerifier(originalHost));
+ }
+
connection.setRequestProperty("Host", originalHost);
for (Map.Entry entry : request.getHeaders().entrySet()) {
if (entry.getKey() == null || entry.getValue() == null) {
@@ -115,12 +120,14 @@ public class HttpDnsHttpAdapter {
}
}
+ String errorCode = isHttps ? HttpDnsErrorCode.TLS_EMPTY_SNI_FAILED
+ : HttpDnsErrorCode.HOST_ROUTE_REJECTED;
if (lastException == null) {
- throw new HttpDnsAdapterException(HttpDnsErrorCode.TLS_EMPTY_SNI_FAILED,
+ throw new HttpDnsAdapterException(errorCode,
"all ip attempts failed with no explicit exception");
}
- throw new HttpDnsAdapterException(HttpDnsErrorCode.TLS_EMPTY_SNI_FAILED,
+ throw new HttpDnsAdapterException(errorCode,
"all ip attempts failed", lastException);
}
@@ -151,7 +158,7 @@ public class HttpDnsHttpAdapter {
return ips;
}
- private byte[] readResponseBytes(HttpsURLConnection connection, int code) throws IOException {
+ private byte[] readResponseBytes(HttpURLConnection connection, int code) throws IOException {
InputStream stream = code >= 400 ? connection.getErrorStream() : connection.getInputStream();
if (stream == null) {
return new byte[0];
@@ -211,7 +218,7 @@ public class HttpDnsHttpAdapter {
try {
SSLSocketFactory baseFactory;
if (options.isAllowInsecureCertificatesForDebugOnly()) {
- baseFactory = AlibabaAllSocketFactory();
+ baseFactory = NewAllSocketFactory();
} else {
baseFactory = (SSLSocketFactory) SSLSocketFactory.getDefault();
}
@@ -221,7 +228,7 @@ public class HttpDnsHttpAdapter {
}
}
- private SSLSocketFactory AlibabaAllSocketFactory() throws GeneralSecurityException {
+ private SSLSocketFactory NewAllSocketFactory() throws GeneralSecurityException {
TrustManager[] managers = new TrustManager[]{new X509TrustManager() {
@Override
public void checkClientTrusted(X509Certificate[] chain, String authType) {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/ObservableConfig.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/ObservableConfig.java
similarity index 96%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/ObservableConfig.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/ObservableConfig.java
index 57864ef..2924fa1 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/ObservableConfig.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/ObservableConfig.java
@@ -1,10 +1,10 @@
-package com.alibaba.sdk.android.httpdns.observable;
+package com.newsdk.sdk.android.httpdns.observable;
import android.content.SharedPreferences;
import android.text.TextUtils;
-import com.alibaba.sdk.android.httpdns.config.SpCacheItem;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.config.SpCacheItem;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
import org.json.JSONException;
import org.json.JSONObject;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/ObservableConstants.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/ObservableConstants.java
similarity index 96%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/ObservableConstants.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/ObservableConstants.java
index 5d7ea73..9dfda70 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/ObservableConstants.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/ObservableConstants.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.observable;
+package com.newsdk.sdk.android.httpdns.observable;
public final class ObservableConstants {
public static final int REQUEST_IP_TYPE_AUTO = 0x00;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/ObservableHttpRequest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/ObservableHttpRequest.java
similarity index 92%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/ObservableHttpRequest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/ObservableHttpRequest.java
index b3ed1f6..653e9f6 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/ObservableHttpRequest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/ObservableHttpRequest.java
@@ -1,10 +1,10 @@
-package com.alibaba.sdk.android.httpdns.observable;
+package com.newsdk.sdk.android.httpdns.observable;
import android.text.TextUtils;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-import com.alibaba.sdk.android.httpdns.request.HttpRequestWrapper;
-import com.alibaba.sdk.android.httpdns.request.ResponseParser;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.request.HttpRequestWrapper;
+import com.newsdk.sdk.android.httpdns.request.ResponseParser;
import java.io.BufferedReader;
import java.io.BufferedWriter;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/ObservableManager.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/ObservableManager.java
similarity index 91%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/ObservableManager.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/ObservableManager.java
index 000d3ca..1b1d9bf 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/ObservableManager.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/ObservableManager.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.observable;
+package com.newsdk.sdk.android.httpdns.observable;
import android.os.Handler;
import android.os.HandlerThread;
@@ -18,20 +18,20 @@ import java.util.Random;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.atomic.AtomicBoolean;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsConfig;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-import com.alibaba.sdk.android.httpdns.observable.event.GroupEvent;
-import com.alibaba.sdk.android.httpdns.observable.event.LocalDnsEvent;
-import com.alibaba.sdk.android.httpdns.observable.event.ObservableEvent;
-import com.alibaba.sdk.android.httpdns.observable.event.ReportingRateExceptionEvent;
-import com.alibaba.sdk.android.httpdns.request.HttpRequest;
-import com.alibaba.sdk.android.httpdns.request.HttpRequestTask;
-import com.alibaba.sdk.android.httpdns.request.RequestCallback;
-import com.alibaba.sdk.android.httpdns.request.ResponseParser;
-import com.alibaba.sdk.android.httpdns.request.RetryHttpRequest;
-import com.alibaba.sdk.android.httpdns.resolve.ResolveHostHelper;
-import com.alibaba.sdk.android.httpdns.track.SessionTrackMgr;
-import com.alibaba.sdk.android.httpdns.utils.ThreadUtil;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsConfig;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.observable.event.GroupEvent;
+import com.newsdk.sdk.android.httpdns.observable.event.LocalDnsEvent;
+import com.newsdk.sdk.android.httpdns.observable.event.ObservableEvent;
+import com.newsdk.sdk.android.httpdns.observable.event.ReportingRateExceptionEvent;
+import com.newsdk.sdk.android.httpdns.request.HttpRequest;
+import com.newsdk.sdk.android.httpdns.request.HttpRequestTask;
+import com.newsdk.sdk.android.httpdns.request.RequestCallback;
+import com.newsdk.sdk.android.httpdns.request.ResponseParser;
+import com.newsdk.sdk.android.httpdns.request.RetryHttpRequest;
+import com.newsdk.sdk.android.httpdns.resolve.ResolveHostHelper;
+import com.newsdk.sdk.android.httpdns.track.SessionTrackMgr;
+import com.newsdk.sdk.android.httpdns.utils.ThreadUtil;
/**
* utils data upload manager
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/BatchQueryHttpDnsApiEvent.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/BatchQueryHttpDnsApiEvent.java
similarity index 88%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/BatchQueryHttpDnsApiEvent.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/BatchQueryHttpDnsApiEvent.java
index e20e2df..de07b03 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/BatchQueryHttpDnsApiEvent.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/BatchQueryHttpDnsApiEvent.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.observable.event;
+package com.newsdk.sdk.android.httpdns.observable.event;
public class BatchQueryHttpDnsApiEvent extends QueryHttpDnsApiEvent {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/CallSdkApiEvent.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/CallSdkApiEvent.java
similarity index 91%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/CallSdkApiEvent.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/CallSdkApiEvent.java
index 19add64..02f9b33 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/CallSdkApiEvent.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/CallSdkApiEvent.java
@@ -1,9 +1,9 @@
-package com.alibaba.sdk.android.httpdns.observable.event;
+package com.newsdk.sdk.android.httpdns.observable.event;
import android.text.TextUtils;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.observable.ObservableConstants;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.observable.ObservableConstants;
public class CallSdkApiEvent extends ObservableEvent implements GroupEvent, LocalDnsEvent {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/CleanHostCacheEvent.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/CleanHostCacheEvent.java
similarity index 93%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/CleanHostCacheEvent.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/CleanHostCacheEvent.java
index d7d9484..7e6ff33 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/CleanHostCacheEvent.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/CleanHostCacheEvent.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.observable.event;
+package com.newsdk.sdk.android.httpdns.observable.event;
public class CleanHostCacheEvent extends ObservableEvent {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/GroupEvent.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/GroupEvent.java
similarity index 74%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/GroupEvent.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/GroupEvent.java
index 3bd84d6..b399e13 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/GroupEvent.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/GroupEvent.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.observable.event;
+package com.newsdk.sdk.android.httpdns.observable.event;
/**
* 闇€瑕佽仛鍚堢殑浜嬩欢
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/LocalDnsEvent.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/LocalDnsEvent.java
similarity index 94%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/LocalDnsEvent.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/LocalDnsEvent.java
index eb7ad83..8cffc69 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/LocalDnsEvent.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/LocalDnsEvent.java
@@ -1,6 +1,6 @@
-package com.alibaba.sdk.android.httpdns.observable.event;
+package com.newsdk.sdk.android.httpdns.observable.event;
-import com.alibaba.sdk.android.httpdns.observable.ObservableConstants;
+import com.newsdk.sdk.android.httpdns.observable.ObservableConstants;
import java.net.Inet4Address;
import java.net.Inet6Address;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/ObservableEvent.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/ObservableEvent.java
similarity index 94%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/ObservableEvent.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/ObservableEvent.java
index 161e3a8..863c5cc 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/ObservableEvent.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/ObservableEvent.java
@@ -1,10 +1,10 @@
-package com.alibaba.sdk.android.httpdns.observable.event;
+package com.newsdk.sdk.android.httpdns.observable.event;
import android.text.TextUtils;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsServiceImpl;
-import com.alibaba.sdk.android.httpdns.observable.ObservableConstants;
-import com.alibaba.sdk.android.httpdns.utils.NetworkUtil;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsServiceImpl;
+import com.newsdk.sdk.android.httpdns.observable.ObservableConstants;
+import com.newsdk.sdk.android.httpdns.utils.NetworkUtil;
public abstract class ObservableEvent {
private static final String DIVIDER = "|";
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/QueryHttpDnsApiEvent.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/QueryHttpDnsApiEvent.java
similarity index 84%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/QueryHttpDnsApiEvent.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/QueryHttpDnsApiEvent.java
index 28c5af8..358ae60 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/QueryHttpDnsApiEvent.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/QueryHttpDnsApiEvent.java
@@ -1,7 +1,7 @@
-package com.alibaba.sdk.android.httpdns.observable.event;
+package com.newsdk.sdk.android.httpdns.observable.event;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.observable.ObservableConstants;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.observable.ObservableConstants;
public class QueryHttpDnsApiEvent extends ObservableEvent implements LocalDnsEvent {
public QueryHttpDnsApiEvent() {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/ReportingRateExceptionEvent.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/ReportingRateExceptionEvent.java
similarity index 93%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/ReportingRateExceptionEvent.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/ReportingRateExceptionEvent.java
index cdade1f..ff11bf4 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/ReportingRateExceptionEvent.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/ReportingRateExceptionEvent.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.observable.event;
+package com.newsdk.sdk.android.httpdns.observable.event;
public class ReportingRateExceptionEvent extends ObservableEvent {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/UpdateRegionServerIpsEvent.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/UpdateRegionServerIpsEvent.java
similarity index 90%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/UpdateRegionServerIpsEvent.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/UpdateRegionServerIpsEvent.java
index 67ecf8e..37300f9 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/observable/event/UpdateRegionServerIpsEvent.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/observable/event/UpdateRegionServerIpsEvent.java
@@ -1,6 +1,6 @@
-package com.alibaba.sdk.android.httpdns.observable.event;
+package com.newsdk.sdk.android.httpdns.observable.event;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
public class UpdateRegionServerIpsEvent extends ObservableEvent {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/ranking/IPRankingBean.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/ranking/IPRankingBean.java
similarity index 94%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/ranking/IPRankingBean.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/ranking/IPRankingBean.java
index 7bf1c1f..d59a7ae 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/ranking/IPRankingBean.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/ranking/IPRankingBean.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.ranking;
+package com.newsdk.sdk.android.httpdns.ranking;
/**
* IP浼橀€夐厤缃」
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/ranking/IPRankingCallback.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/ranking/IPRankingCallback.java
similarity index 73%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/ranking/IPRankingCallback.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/ranking/IPRankingCallback.java
index cc88b06..160173b 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/ranking/IPRankingCallback.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/ranking/IPRankingCallback.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.ranking;
+package com.newsdk.sdk.android.httpdns.ranking;
/**
* IP浼橀€夌殑缁撴灉鍥炶皟
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/ranking/IPRankingService.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/ranking/IPRankingService.java
similarity index 95%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/ranking/IPRankingService.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/ranking/IPRankingService.java
index 22b0d0a..2861dee 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/ranking/IPRankingService.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/ranking/IPRankingService.java
@@ -1,11 +1,11 @@
-package com.alibaba.sdk.android.httpdns.ranking;
+package com.newsdk.sdk.android.httpdns.ranking;
import java.net.Socket;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ConcurrentSkipListSet;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsConfig;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsConfig;
/**
* IP浼橀€夋湇鍔?
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/ranking/IPRankingTask.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/ranking/IPRankingTask.java
similarity index 93%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/ranking/IPRankingTask.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/ranking/IPRankingTask.java
index 481791f..a379cfb 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/ranking/IPRankingTask.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/ranking/IPRankingTask.java
@@ -1,11 +1,11 @@
-package com.alibaba.sdk.android.httpdns.ranking;
+package com.newsdk.sdk.android.httpdns.ranking;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.SocketAddress;
-import com.alibaba.sdk.android.httpdns.utils.CommonUtil;
+import com.newsdk.sdk.android.httpdns.utils.CommonUtil;
/**
* ip浼橀€夊疄鐜?
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/AsyncRequestTask.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/AsyncRequestTask.java
similarity index 94%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/AsyncRequestTask.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/AsyncRequestTask.java
index 8e5992c..11b6b75 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/AsyncRequestTask.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/AsyncRequestTask.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.request;
+package com.newsdk.sdk.android.httpdns.request;
/**
* 鏁版嵁璇锋眰杞紓姝?
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/BatchResolveHttpRequestStatusWatcher.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/BatchResolveHttpRequestStatusWatcher.java
similarity index 89%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/BatchResolveHttpRequestStatusWatcher.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/BatchResolveHttpRequestStatusWatcher.java
index 83a2842..8c68de7 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/BatchResolveHttpRequestStatusWatcher.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/BatchResolveHttpRequestStatusWatcher.java
@@ -1,12 +1,12 @@
-package com.alibaba.sdk.android.httpdns.request;
+package com.newsdk.sdk.android.httpdns.request;
import android.text.TextUtils;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.observable.ObservableConstants;
-import com.alibaba.sdk.android.httpdns.observable.ObservableManager;
-import com.alibaba.sdk.android.httpdns.observable.event.BatchQueryHttpDnsApiEvent;
-import com.alibaba.sdk.android.httpdns.resolve.ResolveHostResponse;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.observable.ObservableConstants;
+import com.newsdk.sdk.android.httpdns.observable.ObservableManager;
+import com.newsdk.sdk.android.httpdns.observable.event.BatchQueryHttpDnsApiEvent;
+import com.newsdk.sdk.android.httpdns.resolve.ResolveHostResponse;
public class BatchResolveHttpRequestStatusWatcher implements HttpRequestWatcher.Watcher {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/HttpException.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/HttpException.java
similarity index 98%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/HttpException.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/HttpException.java
index 0f3b09c..6611043 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/HttpException.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/HttpException.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.request;
+package com.newsdk.sdk.android.httpdns.request;
import java.util.Arrays;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/HttpRequest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/HttpRequest.java
new file mode 100644
index 0000000..18facb8
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/HttpRequest.java
@@ -0,0 +1,212 @@
+package com.newsdk.sdk.android.httpdns.request;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.Collections;
+import java.util.List;
+
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLParameters;
+import javax.net.ssl.SSLSession;
+import javax.net.ssl.SSLSocket;
+import javax.net.ssl.SSLSocketFactory;
+
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.utils.CommonUtil;
+
+/**
+ * HTTP request wrapper for resolve APIs.
+ */
+public class HttpRequest {
+ private HttpRequestConfig requestConfig;
+ private ResponseParser translator;
+
+ protected HttpRequest() {
+ }
+
+ public HttpRequest(HttpRequestConfig requestConfig, ResponseParser translator) {
+ this.requestConfig = requestConfig;
+ this.translator = translator;
+ }
+
+ public HttpRequestConfig getRequestConfig() {
+ return requestConfig;
+ }
+
+ public T request() throws Throwable {
+ HttpURLConnection conn = null;
+ InputStream in = null;
+ BufferedReader streamReader = null;
+
+ long start = System.currentTimeMillis();
+ String serverIp = requestConfig.getIp();
+ String url = requestConfig.url();
+ if (HttpDnsLog.isPrint()) {
+ HttpDnsLog.d("request url " + url);
+ }
+ try {
+ conn = (HttpURLConnection) new URL(url).openConnection();
+ conn.setReadTimeout(requestConfig.getTimeout());
+ conn.setConnectTimeout(requestConfig.getTimeout());
+ conn.setRequestProperty("User-Agent", requestConfig.getUA());
+ if (conn instanceof HttpsURLConnection) {
+ HttpsURLConnection httpsConn = (HttpsURLConnection) conn;
+ String serverHost = requestConfig.getIp();
+ if (serverHost != null && !CommonUtil.isAnIP(serverHost)) {
+ // Server is a domain name — explicitly set SNI so CDN/proxy
+ // can select the correct certificate during TLS handshake.
+ SSLSocketFactory base = (SSLSocketFactory) SSLSocketFactory.getDefault();
+ httpsConn.setSSLSocketFactory(new SniSocketFactory(base, serverHost));
+ final String sniHost = serverHost;
+ final HostnameVerifier defaultVerifier =
+ HttpsURLConnection.getDefaultHostnameVerifier();
+ httpsConn.setHostnameVerifier(new HostnameVerifier() {
+ @Override
+ public boolean verify(String hostname, SSLSession session) {
+ return defaultVerifier.verify(sniHost, session);
+ }
+ });
+ } else {
+ httpsConn.setHostnameVerifier(
+ HttpsURLConnection.getDefaultHostnameVerifier());
+ }
+ }
+ if (conn.getResponseCode() != HttpURLConnection.HTTP_OK) {
+ in = conn.getErrorStream();
+ if (in != null) {
+ streamReader = new BufferedReader(new InputStreamReader(in, "UTF-8"));
+ String errStr = readStringFrom(streamReader).toString();
+ throw HttpException.create(conn.getResponseCode(), errStr);
+ } else {
+ throw HttpException.create(conn.getResponseCode(), "");
+ }
+ } else {
+ in = conn.getInputStream();
+ streamReader = new BufferedReader(new InputStreamReader(in, "UTF-8"));
+ String responseStr = readStringFrom(streamReader).toString();
+ if (HttpDnsLog.isPrint()) {
+ HttpDnsLog.d("request success " + responseStr);
+ }
+ return translator.parse(serverIp, responseStr);
+ }
+ } catch (Throwable e) {
+ long cost = System.currentTimeMillis() - start;
+ HttpDnsLog.w("request " + url + " fail, cost " + cost, e);
+ throw e;
+ } finally {
+ if (conn != null) {
+ conn.disconnect();
+ }
+ try {
+ if (in != null) {
+ in.close();
+ }
+ if (streamReader != null) {
+ streamReader.close();
+ }
+ } catch (IOException ignored) {
+ }
+ }
+ }
+
+ public static StringBuilder readStringFrom(BufferedReader streamReader) throws IOException {
+ StringBuilder sb = new StringBuilder();
+ String line;
+ while ((line = streamReader.readLine()) != null) {
+ sb.append(line);
+ }
+ return sb;
+ }
+
+ /**
+ * SSLSocketFactory that explicitly sets SNI (Server Name Indication)
+ * to the specified hostname. Used for HTTPDNS API calls where the
+ * server is accessed by domain name (e.g. behind a CDN).
+ */
+ private static class SniSocketFactory extends SSLSocketFactory {
+ private final SSLSocketFactory delegate;
+ private final String sniHostname;
+
+ SniSocketFactory(SSLSocketFactory delegate, String sniHostname) {
+ this.delegate = delegate;
+ this.sniHostname = sniHostname;
+ }
+
+ @Override
+ public String[] getDefaultCipherSuites() {
+ return delegate.getDefaultCipherSuites();
+ }
+
+ @Override
+ public String[] getSupportedCipherSuites() {
+ return delegate.getSupportedCipherSuites();
+ }
+
+ @Override
+ public java.net.Socket createSocket(java.net.Socket s, String host, int port,
+ boolean autoClose) throws IOException {
+ // Pass the domain as host so the SSL layer sets SNI correctly
+ return applySni(delegate.createSocket(s, sniHostname, port, autoClose));
+ }
+
+ @Override
+ public java.net.Socket createSocket(String host, int port) throws IOException {
+ return applySni(delegate.createSocket(host, port));
+ }
+
+ @Override
+ public java.net.Socket createSocket(String host, int port,
+ java.net.InetAddress localHost, int localPort)
+ throws IOException {
+ return applySni(delegate.createSocket(host, port, localHost, localPort));
+ }
+
+ @Override
+ public java.net.Socket createSocket(java.net.InetAddress host, int port)
+ throws IOException {
+ return applySni(delegate.createSocket(host, port));
+ }
+
+ @Override
+ public java.net.Socket createSocket(java.net.InetAddress address, int port,
+ java.net.InetAddress localAddress, int localPort)
+ throws IOException {
+ return applySni(delegate.createSocket(address, port, localAddress, localPort));
+ }
+
+ private java.net.Socket applySni(java.net.Socket socket) {
+ if (!(socket instanceof SSLSocket)) {
+ return socket;
+ }
+ SSLSocket sslSocket = (SSLSocket) socket;
+ try {
+ SSLParameters params = sslSocket.getSSLParameters();
+ try {
+ // API 24+: SSLParameters.setServerNames(List)
+ Class> sniClass = Class.forName("javax.net.ssl.SNIHostName");
+ Object sniName = sniClass.getConstructor(String.class)
+ .newInstance(sniHostname);
+ java.lang.reflect.Method setter = SSLParameters.class
+ .getMethod("setServerNames", List.class);
+ setter.invoke(params, Collections.singletonList(sniName));
+ } catch (Throwable ignored) {
+ }
+ sslSocket.setSSLParameters(params);
+ } catch (Throwable ignored) {
+ }
+ // Fallback for older Android: Conscrypt's setHostname()
+ try {
+ java.lang.reflect.Method setHostname = sslSocket.getClass()
+ .getMethod("setHostname", String.class);
+ setHostname.invoke(sslSocket, sniHostname);
+ } catch (Throwable ignored) {
+ }
+ return sslSocket;
+ }
+ }
+}
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/HttpRequestConfig.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/HttpRequestConfig.java
similarity index 94%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/HttpRequestConfig.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/HttpRequestConfig.java
index eeda70f..ca14b6c 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/HttpRequestConfig.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/HttpRequestConfig.java
@@ -1,10 +1,10 @@
-package com.alibaba.sdk.android.httpdns.request;
+package com.newsdk.sdk.android.httpdns.request;
import android.text.TextUtils;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.impl.AESEncryptService;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.impl.AESEncryptService;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
/**
* 缃戠粶璇锋眰鐨勯厤缃?
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/HttpRequestFailWatcher.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/HttpRequestFailWatcher.java
similarity index 76%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/HttpRequestFailWatcher.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/HttpRequestFailWatcher.java
index 098e5e2..e4bef88 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/HttpRequestFailWatcher.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/HttpRequestFailWatcher.java
@@ -1,6 +1,6 @@
-package com.alibaba.sdk.android.httpdns.request;
+package com.newsdk.sdk.android.httpdns.request;
-import com.alibaba.sdk.android.httpdns.observable.ObservableManager;
+import com.newsdk.sdk.android.httpdns.observable.ObservableManager;
public class HttpRequestFailWatcher implements HttpRequestWatcher.Watcher {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/HttpRequestTask.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/HttpRequestTask.java
similarity index 88%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/HttpRequestTask.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/HttpRequestTask.java
index 3a1fe24..874de0f 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/HttpRequestTask.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/HttpRequestTask.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.request;
+package com.newsdk.sdk.android.httpdns.request;
/**
* 缃戠粶璇锋眰鐨勫紓姝ヤ换鍔?
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/HttpRequestWatcher.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/HttpRequestWatcher.java
similarity index 96%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/HttpRequestWatcher.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/HttpRequestWatcher.java
index 9c31499..30927a8 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/HttpRequestWatcher.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/HttpRequestWatcher.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.request;
+package com.newsdk.sdk.android.httpdns.request;
/**
* 鐩戝惉缃戠粶璇锋眰锛岀敤浜庨檮鍔犱笟鍔¢€昏緫
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/HttpRequestWrapper.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/HttpRequestWrapper.java
similarity index 90%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/HttpRequestWrapper.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/HttpRequestWrapper.java
index dd2a3d7..3ee2928 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/HttpRequestWrapper.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/HttpRequestWrapper.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.request;
+package com.newsdk.sdk.android.httpdns.request;
/**
* 缃戠粶璇锋眰鐨勫寘瑁呯被
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/RequestCallback.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/RequestCallback.java
similarity index 75%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/RequestCallback.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/RequestCallback.java
index a1c9ce9..35b7140 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/RequestCallback.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/RequestCallback.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.request;
+package com.newsdk.sdk.android.httpdns.request;
/**
* http璇锋眰缁撴灉鍥炶皟
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/ResponseParser.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/ResponseParser.java
similarity index 73%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/ResponseParser.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/ResponseParser.java
index e7eb6b0..7f4995d 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/ResponseParser.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/ResponseParser.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.request;
+package com.newsdk.sdk.android.httpdns.request;
/**
* http鍝嶅簲瑙f瀽
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/RetryHttpRequest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/RetryHttpRequest.java
similarity index 94%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/RetryHttpRequest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/RetryHttpRequest.java
index 4c2a2e5..d9b1bd5 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/RetryHttpRequest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/RetryHttpRequest.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.request;
+package com.newsdk.sdk.android.httpdns.request;
/**
* 澶辫触鏃?閲嶈瘯璇锋眰
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/SingleResolveHttpRequestStatusWatcher.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/SingleResolveHttpRequestStatusWatcher.java
similarity index 91%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/SingleResolveHttpRequestStatusWatcher.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/SingleResolveHttpRequestStatusWatcher.java
index 82e9961..7457030 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/SingleResolveHttpRequestStatusWatcher.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/SingleResolveHttpRequestStatusWatcher.java
@@ -1,11 +1,11 @@
-package com.alibaba.sdk.android.httpdns.request;
+package com.newsdk.sdk.android.httpdns.request;
import android.text.TextUtils;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.observable.ObservableManager;
-import com.alibaba.sdk.android.httpdns.observable.event.QueryHttpDnsApiEvent;
-import com.alibaba.sdk.android.httpdns.resolve.ResolveHostResponse;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.observable.ObservableManager;
+import com.newsdk.sdk.android.httpdns.observable.event.QueryHttpDnsApiEvent;
+import com.newsdk.sdk.android.httpdns.resolve.ResolveHostResponse;
public class SingleResolveHttpRequestStatusWatcher implements HttpRequestWatcher.Watcher {
private final ObservableManager observableManager;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/UpdateRegionServerHttpRequestStatusWatcher.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/UpdateRegionServerHttpRequestStatusWatcher.java
similarity index 91%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/UpdateRegionServerHttpRequestStatusWatcher.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/UpdateRegionServerHttpRequestStatusWatcher.java
index f96916b..bb215c8 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/request/UpdateRegionServerHttpRequestStatusWatcher.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/request/UpdateRegionServerHttpRequestStatusWatcher.java
@@ -1,9 +1,9 @@
-package com.alibaba.sdk.android.httpdns.request;
+package com.newsdk.sdk.android.httpdns.request;
import android.text.TextUtils;
-import com.alibaba.sdk.android.httpdns.observable.ObservableManager;
-import com.alibaba.sdk.android.httpdns.observable.event.UpdateRegionServerIpsEvent;
+import com.newsdk.sdk.android.httpdns.observable.ObservableManager;
+import com.newsdk.sdk.android.httpdns.observable.event.UpdateRegionServerIpsEvent;
public class UpdateRegionServerHttpRequestStatusWatcher implements HttpRequestWatcher.Watcher {
private final ObservableManager observableManager;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/BatchResolveHostService.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/BatchResolveHostService.java
similarity index 90%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/BatchResolveHostService.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/BatchResolveHostService.java
index 6c91cac..99c8ffc 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/BatchResolveHostService.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/BatchResolveHostService.java
@@ -1,16 +1,16 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
-import com.alibaba.sdk.android.httpdns.HTTPDNSResultWrapper;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.impl.HostResolveLocker;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsConfig;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-import com.alibaba.sdk.android.httpdns.net.NetworkStateManager;
-import com.alibaba.sdk.android.httpdns.ranking.IPRankingCallback;
-import com.alibaba.sdk.android.httpdns.ranking.IPRankingService;
-import com.alibaba.sdk.android.httpdns.request.HttpException;
-import com.alibaba.sdk.android.httpdns.request.RequestCallback;
-import com.alibaba.sdk.android.httpdns.utils.CommonUtil;
+import com.newsdk.sdk.android.httpdns.HTTPDNSResultWrapper;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.impl.HostResolveLocker;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsConfig;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.net.NetworkStateManager;
+import com.newsdk.sdk.android.httpdns.ranking.IPRankingCallback;
+import com.newsdk.sdk.android.httpdns.ranking.IPRankingService;
+import com.newsdk.sdk.android.httpdns.request.HttpException;
+import com.newsdk.sdk.android.httpdns.request.RequestCallback;
+import com.newsdk.sdk.android.httpdns.utils.CommonUtil;
import java.util.ArrayList;
import java.util.List;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/CategoryController.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/CategoryController.java
similarity index 87%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/CategoryController.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/CategoryController.java
index f292d08..bebb821 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/CategoryController.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/CategoryController.java
@@ -1,7 +1,7 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsConfig;
-import com.alibaba.sdk.android.httpdns.serverip.RegionServerScheduleService;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsConfig;
+import com.newsdk.sdk.android.httpdns.serverip.RegionServerScheduleService;
/**
* 鍩熷悕瑙f瀽绛栫暐鎺у埗
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/HostFilter.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/HostFilter.java
similarity index 73%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/HostFilter.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/HostFilter.java
index 4dd32d4..933f4e4 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/HostFilter.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/HostFilter.java
@@ -1,7 +1,7 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
-import com.alibaba.sdk.android.httpdns.DegradationFilter;
-import com.alibaba.sdk.android.httpdns.NotUseHttpDnsFilter;
+import com.newsdk.sdk.android.httpdns.DegradationFilter;
+import com.newsdk.sdk.android.httpdns.NotUseHttpDnsFilter;
public class HostFilter {
DegradationFilter mFilter;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/NormalResolveCategory.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/NormalResolveCategory.java
similarity index 67%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/NormalResolveCategory.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/NormalResolveCategory.java
index 6ff28ab..b42da28 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/NormalResolveCategory.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/NormalResolveCategory.java
@@ -1,14 +1,14 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsConfig;
-import com.alibaba.sdk.android.httpdns.request.HttpRequest;
-import com.alibaba.sdk.android.httpdns.request.HttpRequestConfig;
-import com.alibaba.sdk.android.httpdns.request.HttpRequestTask;
-import com.alibaba.sdk.android.httpdns.request.HttpRequestWatcher;
-import com.alibaba.sdk.android.httpdns.request.RequestCallback;
-import com.alibaba.sdk.android.httpdns.request.RetryHttpRequest;
-import com.alibaba.sdk.android.httpdns.request.SingleResolveHttpRequestStatusWatcher;
-import com.alibaba.sdk.android.httpdns.serverip.RegionServerScheduleService;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsConfig;
+import com.newsdk.sdk.android.httpdns.request.HttpRequest;
+import com.newsdk.sdk.android.httpdns.request.HttpRequestConfig;
+import com.newsdk.sdk.android.httpdns.request.HttpRequestTask;
+import com.newsdk.sdk.android.httpdns.request.HttpRequestWatcher;
+import com.newsdk.sdk.android.httpdns.request.RequestCallback;
+import com.newsdk.sdk.android.httpdns.request.RetryHttpRequest;
+import com.newsdk.sdk.android.httpdns.request.SingleResolveHttpRequestStatusWatcher;
+import com.newsdk.sdk.android.httpdns.serverip.RegionServerScheduleService;
/**
* 鍩熷悕瑙f瀽鐨勪竴鑸瓥鐣?
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostCache.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostCache.java
similarity index 96%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostCache.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostCache.java
index a198da4..2ed4013 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostCache.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostCache.java
@@ -1,13 +1,13 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
-import com.alibaba.sdk.android.httpdns.HTTPDNSResultWrapper;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.cache.HostRecord;
+import com.newsdk.sdk.android.httpdns.HTTPDNSResultWrapper;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.cache.HostRecord;
public class ResolveHostCache {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostCacheGroup.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostCacheGroup.java
similarity index 93%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostCacheGroup.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostCacheGroup.java
index a64eb51..238515e 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostCacheGroup.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostCacheGroup.java
@@ -1,13 +1,13 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.cache.HostRecord;
-import com.alibaba.sdk.android.httpdns.net.NetworkStateManager;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.cache.HostRecord;
+import com.newsdk.sdk.android.httpdns.net.NetworkStateManager;
/**
* 缂撳瓨缁勭鐞嗗櫒锛屾敮鎸佺綉缁滈殧绂荤紦瀛?
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostCategory.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostCategory.java
similarity index 62%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostCategory.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostCategory.java
index 642a423..3f8326c 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostCategory.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostCategory.java
@@ -1,8 +1,8 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsConfig;
-import com.alibaba.sdk.android.httpdns.request.HttpRequestConfig;
-import com.alibaba.sdk.android.httpdns.request.RequestCallback;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsConfig;
+import com.newsdk.sdk.android.httpdns.request.HttpRequestConfig;
+import com.newsdk.sdk.android.httpdns.request.RequestCallback;
/**
* 鍩熷悕瑙f瀽绛栫暐鎺ュ彛
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostHelper.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostHelper.java
similarity index 89%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostHelper.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostHelper.java
index b59685f..09d28e0 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostHelper.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostHelper.java
@@ -1,15 +1,15 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
import android.text.TextUtils;
-import com.alibaba.sdk.android.httpdns.BuildConfig;
-import com.alibaba.sdk.android.httpdns.NetType;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.impl.AESEncryptService;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsConfig;
-import com.alibaba.sdk.android.httpdns.impl.SignService;
-import com.alibaba.sdk.android.httpdns.request.HttpRequestConfig;
-import com.alibaba.sdk.android.httpdns.track.SessionTrackMgr;
+import com.newsdk.sdk.android.httpdns.BuildConfig;
+import com.newsdk.sdk.android.httpdns.NetType;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.impl.AESEncryptService;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsConfig;
+import com.newsdk.sdk.android.httpdns.impl.SignService;
+import com.newsdk.sdk.android.httpdns.request.HttpRequestConfig;
+import com.newsdk.sdk.android.httpdns.track.SessionTrackMgr;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostRequestHandler.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostRequestHandler.java
similarity index 93%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostRequestHandler.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostRequestHandler.java
index ea91f6e..fc78ae3 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostRequestHandler.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostRequestHandler.java
@@ -1,13 +1,13 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.impl.AESEncryptService;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsConfig;
-import com.alibaba.sdk.android.httpdns.impl.SignService;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-import com.alibaba.sdk.android.httpdns.request.HttpRequestConfig;
-import com.alibaba.sdk.android.httpdns.request.RequestCallback;
-import com.alibaba.sdk.android.httpdns.serverip.RegionServerScheduleService;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.impl.AESEncryptService;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsConfig;
+import com.newsdk.sdk.android.httpdns.impl.SignService;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.request.HttpRequestConfig;
+import com.newsdk.sdk.android.httpdns.request.RequestCallback;
+import com.newsdk.sdk.android.httpdns.serverip.RegionServerScheduleService;
import java.util.ArrayList;
import java.util.HashMap;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostResponse.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostResponse.java
similarity index 96%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostResponse.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostResponse.java
index 732e66f..b6bcf4f 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostResponse.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostResponse.java
@@ -1,9 +1,9 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
import android.text.TextUtils;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
import org.json.JSONArray;
import org.json.JSONException;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostResponseParser.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostResponseParser.java
similarity index 81%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostResponseParser.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostResponseParser.java
index 5900b18..4818e48 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostResponseParser.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostResponseParser.java
@@ -1,7 +1,7 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
-import com.alibaba.sdk.android.httpdns.impl.AESEncryptService;
-import com.alibaba.sdk.android.httpdns.request.ResponseParser;
+import com.newsdk.sdk.android.httpdns.impl.AESEncryptService;
+import com.newsdk.sdk.android.httpdns.request.ResponseParser;
import org.json.JSONObject;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostResultRepo.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostResultRepo.java
similarity index 93%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostResultRepo.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostResultRepo.java
index 405e07b..a3b670b 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostResultRepo.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostResultRepo.java
@@ -1,18 +1,18 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
-import com.alibaba.sdk.android.httpdns.CacheTtlChanger;
-import com.alibaba.sdk.android.httpdns.HTTPDNSResultWrapper;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.cache.HostRecord;
-import com.alibaba.sdk.android.httpdns.cache.RecordDBHelper;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsConfig;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-import com.alibaba.sdk.android.httpdns.ranking.IPRankingCallback;
-import com.alibaba.sdk.android.httpdns.ranking.IPRankingService;
+import com.newsdk.sdk.android.httpdns.CacheTtlChanger;
+import com.newsdk.sdk.android.httpdns.HTTPDNSResultWrapper;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.cache.HostRecord;
+import com.newsdk.sdk.android.httpdns.cache.RecordDBHelper;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsConfig;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.ranking.IPRankingCallback;
+import com.newsdk.sdk.android.httpdns.ranking.IPRankingService;
/**
* 鍩熷悕瑙f瀽缁撴灉
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostService.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostService.java
similarity index 95%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostService.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostService.java
index ea29736..30d3157 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostService.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostService.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
import android.text.TextUtils;
@@ -11,21 +11,21 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
-import com.alibaba.sdk.android.httpdns.HTTPDNSResult;
-import com.alibaba.sdk.android.httpdns.HTTPDNSResultWrapper;
-import com.alibaba.sdk.android.httpdns.HttpDnsCallback;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.impl.HostResolveLocker;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsConfig;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-import com.alibaba.sdk.android.httpdns.observable.ObservableConstants;
-import com.alibaba.sdk.android.httpdns.observable.event.CallSdkApiEvent;
-import com.alibaba.sdk.android.httpdns.ranking.IPRankingCallback;
-import com.alibaba.sdk.android.httpdns.ranking.IPRankingService;
-import com.alibaba.sdk.android.httpdns.request.HttpException;
-import com.alibaba.sdk.android.httpdns.request.RequestCallback;
-import com.alibaba.sdk.android.httpdns.utils.CommonUtil;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.HTTPDNSResult;
+import com.newsdk.sdk.android.httpdns.HTTPDNSResultWrapper;
+import com.newsdk.sdk.android.httpdns.HttpDnsCallback;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.impl.HostResolveLocker;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsConfig;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.observable.ObservableConstants;
+import com.newsdk.sdk.android.httpdns.observable.event.CallSdkApiEvent;
+import com.newsdk.sdk.android.httpdns.ranking.IPRankingCallback;
+import com.newsdk.sdk.android.httpdns.ranking.IPRankingService;
+import com.newsdk.sdk.android.httpdns.request.HttpException;
+import com.newsdk.sdk.android.httpdns.request.RequestCallback;
+import com.newsdk.sdk.android.httpdns.utils.CommonUtil;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
/**
* 鍩熷悕瑙f瀽鏈嶅姟
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ShiftServerWatcher.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ShiftServerWatcher.java
similarity index 88%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ShiftServerWatcher.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ShiftServerWatcher.java
index 6694bf2..14c9bc3 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/ShiftServerWatcher.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/ShiftServerWatcher.java
@@ -1,12 +1,12 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsConfig;
-import com.alibaba.sdk.android.httpdns.request.HttpException;
-import com.alibaba.sdk.android.httpdns.request.HttpRequestConfig;
-import com.alibaba.sdk.android.httpdns.request.HttpRequestWatcher;
-import com.alibaba.sdk.android.httpdns.serverip.RegionServerScheduleService;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsConfig;
+import com.newsdk.sdk.android.httpdns.request.HttpException;
+import com.newsdk.sdk.android.httpdns.request.HttpRequestConfig;
+import com.newsdk.sdk.android.httpdns.request.HttpRequestWatcher;
+import com.newsdk.sdk.android.httpdns.serverip.RegionServerScheduleService;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
/**
* 璇锋眰澶辫触鏃讹紝鍒囨崲褰撳墠Region鐨勬湇鍔P锛屾湇鍔P閮藉垏鎹㈣繃锛屾洿鏂版湇鍔P
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/SniffException.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/SniffException.java
similarity index 72%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/SniffException.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/SniffException.java
index ade8a6b..41ec80e 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/SniffException.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/SniffException.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
public class SniffException extends Exception {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/SniffResolveCategory.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/SniffResolveCategory.java
similarity index 72%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/SniffResolveCategory.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/SniffResolveCategory.java
index 618688a..64646af 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/SniffResolveCategory.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/SniffResolveCategory.java
@@ -1,14 +1,14 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsConfig;
-import com.alibaba.sdk.android.httpdns.request.HttpRequest;
-import com.alibaba.sdk.android.httpdns.request.HttpRequestConfig;
-import com.alibaba.sdk.android.httpdns.request.HttpRequestTask;
-import com.alibaba.sdk.android.httpdns.request.HttpRequestWatcher;
-import com.alibaba.sdk.android.httpdns.request.RequestCallback;
-import com.alibaba.sdk.android.httpdns.request.SingleResolveHttpRequestStatusWatcher;
-import com.alibaba.sdk.android.httpdns.serverip.RegionServerScheduleService;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsConfig;
+import com.newsdk.sdk.android.httpdns.request.HttpRequest;
+import com.newsdk.sdk.android.httpdns.request.HttpRequestConfig;
+import com.newsdk.sdk.android.httpdns.request.HttpRequestTask;
+import com.newsdk.sdk.android.httpdns.request.HttpRequestWatcher;
+import com.newsdk.sdk.android.httpdns.request.RequestCallback;
+import com.newsdk.sdk.android.httpdns.request.SingleResolveHttpRequestStatusWatcher;
+import com.newsdk.sdk.android.httpdns.serverip.RegionServerScheduleService;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
/**
* 鍡呮帰妯″紡
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/StatusControl.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/StatusControl.java
similarity index 78%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/StatusControl.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/StatusControl.java
index 2d6c378..c6bdbed 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/resolve/StatusControl.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/resolve/StatusControl.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
/**
* 妯″紡鎺у埗鎺ュ彛
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/RegionServer.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/RegionServer.java
similarity index 75%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/RegionServer.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/RegionServer.java
index 4612609..7928cc2 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/RegionServer.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/RegionServer.java
@@ -1,6 +1,6 @@
-package com.alibaba.sdk.android.httpdns.serverip;
+package com.newsdk.sdk.android.httpdns.serverip;
-import com.alibaba.sdk.android.httpdns.utils.CommonUtil;
+import com.newsdk.sdk.android.httpdns.utils.CommonUtil;
public class RegionServer {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/RegionServerIpData.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/RegionServerIpData.java
similarity index 95%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/RegionServerIpData.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/RegionServerIpData.java
index 60a488a..fefb6b2 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/RegionServerIpData.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/RegionServerIpData.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.serverip;
+package com.newsdk.sdk.android.httpdns.serverip;
/**
* 鏈嶅姟IP瀛樺偍鐨勬暟鎹?
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/RegionServerIpRepo.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/RegionServerIpRepo.java
similarity index 94%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/RegionServerIpRepo.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/RegionServerIpRepo.java
index 80e276d..cbaf947 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/RegionServerIpRepo.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/RegionServerIpRepo.java
@@ -1,8 +1,8 @@
-package com.alibaba.sdk.android.httpdns.serverip;
+package com.newsdk.sdk.android.httpdns.serverip;
import java.util.HashMap;
-import com.alibaba.sdk.android.httpdns.utils.CommonUtil;
+import com.newsdk.sdk.android.httpdns.utils.CommonUtil;
/**
* 鏈嶅姟ip鏁版嵁浠撳簱
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/RegionServerScheduleService.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/RegionServerScheduleService.java
similarity index 92%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/RegionServerScheduleService.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/RegionServerScheduleService.java
index 4b1ff8c..632b87a 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/RegionServerScheduleService.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/RegionServerScheduleService.java
@@ -1,9 +1,9 @@
-package com.alibaba.sdk.android.httpdns.serverip;
+package com.newsdk.sdk.android.httpdns.serverip;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsConfig;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-import com.alibaba.sdk.android.httpdns.request.RequestCallback;
-import com.alibaba.sdk.android.httpdns.utils.CommonUtil;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsConfig;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.request.RequestCallback;
+import com.newsdk.sdk.android.httpdns.utils.CommonUtil;
/**
* 鏈嶅姟IP鐨勮皟搴︽湇鍔?
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/ShiftRegionServerWatcher.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/ShiftRegionServerWatcher.java
similarity index 84%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/ShiftRegionServerWatcher.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/ShiftRegionServerWatcher.java
index db66160..93e0413 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/ShiftRegionServerWatcher.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/ShiftRegionServerWatcher.java
@@ -1,7 +1,7 @@
-package com.alibaba.sdk.android.httpdns.serverip;
+package com.newsdk.sdk.android.httpdns.serverip;
-import com.alibaba.sdk.android.httpdns.request.HttpRequestConfig;
-import com.alibaba.sdk.android.httpdns.request.HttpRequestWatcher;
+import com.newsdk.sdk.android.httpdns.request.HttpRequestConfig;
+import com.newsdk.sdk.android.httpdns.request.HttpRequestWatcher;
/**
* 璇锋眰澶辫触鏃讹紝鍒囨崲鏈嶅姟IP锛屾湇鍔P閮藉垏鎹㈣繃锛屼娇鐢ㄥ垵濮婭P
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/UpdateRegionServerLocker.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/UpdateRegionServerLocker.java
similarity index 94%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/UpdateRegionServerLocker.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/UpdateRegionServerLocker.java
index 5f84442..052e81c 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/UpdateRegionServerLocker.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/UpdateRegionServerLocker.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.serverip;
+package com.newsdk.sdk.android.httpdns.serverip;
import java.util.HashMap;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/UpdateRegionServerResponse.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/UpdateRegionServerResponse.java
similarity index 97%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/UpdateRegionServerResponse.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/UpdateRegionServerResponse.java
index 3c5be9f..af5b124 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/UpdateRegionServerResponse.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/UpdateRegionServerResponse.java
@@ -1,6 +1,6 @@
-package com.alibaba.sdk.android.httpdns.serverip;
+package com.newsdk.sdk.android.httpdns.serverip;
-import com.alibaba.sdk.android.httpdns.observable.ObservableConfig;
+import com.newsdk.sdk.android.httpdns.observable.ObservableConfig;
import java.util.Arrays;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/UpdateRegionServerTask.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/UpdateRegionServerTask.java
similarity index 80%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/UpdateRegionServerTask.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/UpdateRegionServerTask.java
index b0a2722..1157d3a 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/UpdateRegionServerTask.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/UpdateRegionServerTask.java
@@ -1,23 +1,23 @@
-package com.alibaba.sdk.android.httpdns.serverip;
+package com.newsdk.sdk.android.httpdns.serverip;
import java.util.ArrayList;
-import com.alibaba.sdk.android.httpdns.BuildConfig;
-import com.alibaba.sdk.android.httpdns.HttpDnsSettings;
-import com.alibaba.sdk.android.httpdns.NetType;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsConfig;
-import com.alibaba.sdk.android.httpdns.request.HttpRequest;
-import com.alibaba.sdk.android.httpdns.request.HttpRequestConfig;
-import com.alibaba.sdk.android.httpdns.request.HttpRequestTask;
-import com.alibaba.sdk.android.httpdns.request.HttpRequestWatcher;
-import com.alibaba.sdk.android.httpdns.request.RequestCallback;
-import com.alibaba.sdk.android.httpdns.request.ResponseParser;
-import com.alibaba.sdk.android.httpdns.request.RetryHttpRequest;
-import com.alibaba.sdk.android.httpdns.request.UpdateRegionServerHttpRequestStatusWatcher;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.BuildConfig;
+import com.newsdk.sdk.android.httpdns.HttpDnsSettings;
+import com.newsdk.sdk.android.httpdns.NetType;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsConfig;
+import com.newsdk.sdk.android.httpdns.request.HttpRequest;
+import com.newsdk.sdk.android.httpdns.request.HttpRequestConfig;
+import com.newsdk.sdk.android.httpdns.request.HttpRequestTask;
+import com.newsdk.sdk.android.httpdns.request.HttpRequestWatcher;
+import com.newsdk.sdk.android.httpdns.request.RequestCallback;
+import com.newsdk.sdk.android.httpdns.request.ResponseParser;
+import com.newsdk.sdk.android.httpdns.request.RetryHttpRequest;
+import com.newsdk.sdk.android.httpdns.request.UpdateRegionServerHttpRequestStatusWatcher;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
-import static com.alibaba.sdk.android.httpdns.resolve.ResolveHostHelper.getSid;
+import static com.newsdk.sdk.android.httpdns.resolve.ResolveHostHelper.getSid;
public class UpdateRegionServerTask {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/ranking/RegionServerRankingCallback.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/ranking/RegionServerRankingCallback.java
similarity index 63%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/ranking/RegionServerRankingCallback.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/ranking/RegionServerRankingCallback.java
index c2279eb..5e67f66 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/ranking/RegionServerRankingCallback.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/ranking/RegionServerRankingCallback.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.serverip.ranking;
+package com.newsdk.sdk.android.httpdns.serverip.ranking;
public interface RegionServerRankingCallback {
void onResult(String[] sortedIps, int[] ports);
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/ranking/RegionServerRankingService.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/ranking/RegionServerRankingService.java
similarity index 89%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/ranking/RegionServerRankingService.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/ranking/RegionServerRankingService.java
index f2eca93..088ed01 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/ranking/RegionServerRankingService.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/ranking/RegionServerRankingService.java
@@ -1,9 +1,9 @@
-package com.alibaba.sdk.android.httpdns.serverip.ranking;
+package com.newsdk.sdk.android.httpdns.serverip.ranking;
-import com.alibaba.sdk.android.httpdns.NetType;
-import com.alibaba.sdk.android.httpdns.config.RegionServer;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsConfig;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.NetType;
+import com.newsdk.sdk.android.httpdns.config.RegionServer;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsConfig;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
import java.util.Arrays;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/ranking/RegionServerRankingTask.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/ranking/RegionServerRankingTask.java
similarity index 96%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/ranking/RegionServerRankingTask.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/ranking/RegionServerRankingTask.java
index 78cfe54..7c0feb4 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/serverip/ranking/RegionServerRankingTask.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/serverip/ranking/RegionServerRankingTask.java
@@ -1,8 +1,8 @@
-package com.alibaba.sdk.android.httpdns.serverip.ranking;
+package com.newsdk.sdk.android.httpdns.serverip.ranking;
import android.util.Pair;
-import com.alibaba.sdk.android.httpdns.utils.CommonUtil;
+import com.newsdk.sdk.android.httpdns.utils.CommonUtil;
import java.io.IOException;
import java.net.InetSocketAddress;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/track/SessionTrackMgr.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/track/SessionTrackMgr.java
similarity index 94%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/track/SessionTrackMgr.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/track/SessionTrackMgr.java
index 5554149..622008a 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/track/SessionTrackMgr.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/track/SessionTrackMgr.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.track;
+package com.newsdk.sdk.android.httpdns.track;
import java.util.Random;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/utils/CommonUtil.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/utils/CommonUtil.java
similarity index 97%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/utils/CommonUtil.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/utils/CommonUtil.java
index f2be40c..35205c0 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/utils/CommonUtil.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/utils/CommonUtil.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.utils;
+package com.newsdk.sdk.android.httpdns.utils;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
@@ -11,9 +11,9 @@ import java.util.Iterator;
import java.util.Map;
import java.util.regex.Pattern;
-import com.alibaba.sdk.android.httpdns.Region;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-import com.alibaba.sdk.android.httpdns.request.HttpRequestConfig;
+import com.newsdk.sdk.android.httpdns.Region;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.request.HttpRequestConfig;
import android.content.Context;
import android.text.Html;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/utils/Constants.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/utils/Constants.java
similarity index 93%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/utils/Constants.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/utils/Constants.java
index 581ccac..d0596f0 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/utils/Constants.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/utils/Constants.java
@@ -1,10 +1,10 @@
-package com.alibaba.sdk.android.httpdns.utils;
+package com.newsdk.sdk.android.httpdns.utils;
import java.util.HashMap;
-import com.alibaba.sdk.android.httpdns.HTTPDNSResult;
-import com.alibaba.sdk.android.httpdns.resolve.SniffException;
-import com.alibaba.sdk.android.httpdns.request.HttpRequestConfig;
+import com.newsdk.sdk.android.httpdns.HTTPDNSResult;
+import com.newsdk.sdk.android.httpdns.resolve.SniffException;
+import com.newsdk.sdk.android.httpdns.request.HttpRequestConfig;
public class Constants {
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/utils/NetworkUtil.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/utils/NetworkUtil.java
similarity index 99%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/utils/NetworkUtil.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/utils/NetworkUtil.java
index 2ac79a5..b003de6 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/utils/NetworkUtil.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/utils/NetworkUtil.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.utils;
+package com.newsdk.sdk.android.httpdns.utils;
import android.Manifest;
import android.annotation.SuppressLint;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/utils/ThreadUtil.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/utils/ThreadUtil.java
similarity index 97%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/utils/ThreadUtil.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/utils/ThreadUtil.java
index b124973..584782f 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/alibaba/sdk/android/httpdns/utils/ThreadUtil.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/main/java/com/newsdk/sdk/android/httpdns/utils/ThreadUtil.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.utils;
+package com.newsdk.sdk.android.httpdns.utils;
import java.util.Collection;
import java.util.List;
@@ -14,8 +14,8 @@ import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
-import com.alibaba.sdk.android.httpdns.exception.HttpDnsUncaughtExceptionHandler;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.exception.HttpDnsUncaughtExceptionHandler;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
public class ThreadUtil {
private static int index = 0;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/normal/java/com/alibaba/sdk/android/httpdns/HttpDns.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/normal/java/com/newsdk/sdk/android/httpdns/HttpDns.java
similarity index 90%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/normal/java/com/alibaba/sdk/android/httpdns/HttpDns.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/normal/java/com/newsdk/sdk/android/httpdns/HttpDns.java
index b92df4e..3d4f3dc 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/normal/java/com/alibaba/sdk/android/httpdns/HttpDns.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/normal/java/com/newsdk/sdk/android/httpdns/HttpDns.java
@@ -1,12 +1,12 @@
-package com.alibaba.sdk.android.httpdns;
+package com.newsdk.sdk.android.httpdns;
import android.content.Context;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsInstanceHolder;
-import com.alibaba.sdk.android.httpdns.impl.InstanceCreator;
-import com.alibaba.sdk.android.httpdns.network.HttpDnsAdapterOptions;
-import com.alibaba.sdk.android.httpdns.network.HttpDnsHttpAdapter;
-import com.alibaba.sdk.android.httpdns.utils.CommonUtil;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsInstanceHolder;
+import com.newsdk.sdk.android.httpdns.impl.InstanceCreator;
+import com.newsdk.sdk.android.httpdns.network.HttpDnsAdapterOptions;
+import com.newsdk.sdk.android.httpdns.network.HttpDnsHttpAdapter;
+import com.newsdk.sdk.android.httpdns.utils.CommonUtil;
/**
* Httpdns瀹炰緥绠$悊
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/normal/java/com/alibaba/sdk/android/httpdns/impl/InstanceCreator.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/normal/java/com/newsdk/sdk/android/httpdns/impl/InstanceCreator.java
similarity index 71%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/normal/java/com/alibaba/sdk/android/httpdns/impl/InstanceCreator.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/normal/java/com/newsdk/sdk/android/httpdns/impl/InstanceCreator.java
index c931409..325de5c 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/normal/java/com/alibaba/sdk/android/httpdns/impl/InstanceCreator.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/normal/java/com/newsdk/sdk/android/httpdns/impl/InstanceCreator.java
@@ -1,8 +1,8 @@
-package com.alibaba.sdk.android.httpdns.impl;
+package com.newsdk.sdk.android.httpdns.impl;
import android.content.Context;
-import com.alibaba.sdk.android.httpdns.HttpDnsService;
+import com.newsdk.sdk.android.httpdns.HttpDnsService;
public class InstanceCreator implements HttpDnsCreator {
@Override
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/normal/java/com/alibaba/sdk/android/httpdns/impl/NormalImpl.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/normal/java/com/newsdk/sdk/android/httpdns/impl/NormalImpl.java
similarity index 87%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/normal/java/com/alibaba/sdk/android/httpdns/impl/NormalImpl.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/normal/java/com/newsdk/sdk/android/httpdns/impl/NormalImpl.java
index 3fad823..69ee27c 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/normal/java/com/alibaba/sdk/android/httpdns/impl/NormalImpl.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/normal/java/com/newsdk/sdk/android/httpdns/impl/NormalImpl.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.impl;
+package com.newsdk.sdk.android.httpdns.impl;
import android.content.Context;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/HttpDnsE2E.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/HttpDnsE2E.java
similarity index 98%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/HttpDnsE2E.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/HttpDnsE2E.java
index 8323a9c..2e4808f 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/HttpDnsE2E.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/HttpDnsE2E.java
@@ -1,23 +1,23 @@
-package com.alibaba.sdk.android.httpdns;
+package com.newsdk.sdk.android.httpdns;
import android.Manifest;
import android.net.ConnectivityManager;
-import com.alibaba.sdk.android.httpdns.resolve.ResolveHostResponse;
-import com.alibaba.sdk.android.httpdns.resolve.BatchResolveHostResponse;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-import com.alibaba.sdk.android.httpdns.ranking.IPRankingBean;
-import com.alibaba.sdk.android.httpdns.test.app.BusinessApp;
-import com.alibaba.sdk.android.httpdns.test.helper.ServerStatusHelper;
-import com.alibaba.sdk.android.httpdns.test.server.HttpDnsServer;
-import com.alibaba.sdk.android.httpdns.test.server.ResolveHostServer;
-import com.alibaba.sdk.android.httpdns.test.server.MockSpeedTestServer;
-import com.alibaba.sdk.android.httpdns.test.server.BatchResolveHostServer;
-import com.alibaba.sdk.android.httpdns.test.server.ServerIpsServer;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
-import com.alibaba.sdk.android.httpdns.test.utils.ShadowNetworkInfo;
-import com.alibaba.sdk.android.httpdns.test.utils.UnitTestUtil;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.resolve.ResolveHostResponse;
+import com.newsdk.sdk.android.httpdns.resolve.BatchResolveHostResponse;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.ranking.IPRankingBean;
+import com.newsdk.sdk.android.httpdns.test.app.BusinessApp;
+import com.newsdk.sdk.android.httpdns.test.helper.ServerStatusHelper;
+import com.newsdk.sdk.android.httpdns.test.server.HttpDnsServer;
+import com.newsdk.sdk.android.httpdns.test.server.ResolveHostServer;
+import com.newsdk.sdk.android.httpdns.test.server.MockSpeedTestServer;
+import com.newsdk.sdk.android.httpdns.test.server.BatchResolveHostServer;
+import com.newsdk.sdk.android.httpdns.test.server.ServerIpsServer;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.test.utils.ShadowNetworkInfo;
+import com.newsdk.sdk.android.httpdns.test.utils.UnitTestUtil;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/HttpDnsResultTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/HttpDnsResultTest.java
similarity index 93%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/HttpDnsResultTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/HttpDnsResultTest.java
index 478c651..28d83a8 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/HttpDnsResultTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/HttpDnsResultTest.java
@@ -1,8 +1,8 @@
-package com.alibaba.sdk.android.httpdns;
+package com.newsdk.sdk.android.httpdns;
-import com.alibaba.sdk.android.httpdns.cache.HostRecord;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.cache.HostRecord;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/InitConfigTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/InitConfigTest.java
similarity index 93%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/InitConfigTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/InitConfigTest.java
index 8c7f914..882f7f3 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/InitConfigTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/InitConfigTest.java
@@ -1,8 +1,8 @@
-package com.alibaba.sdk.android.httpdns;
+package com.newsdk.sdk.android.httpdns;
-import com.alibaba.sdk.android.httpdns.ranking.IPRankingBean;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.ranking.IPRankingBean;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/cache/RecordDBHelperTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/cache/RecordDBHelperTest.java
similarity index 96%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/cache/RecordDBHelperTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/cache/RecordDBHelperTest.java
index 8545015..870d8a2 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/cache/RecordDBHelperTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/cache/RecordDBHelperTest.java
@@ -1,9 +1,9 @@
-package com.alibaba.sdk.android.httpdns.cache;
+package com.newsdk.sdk.android.httpdns.cache;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.net.NetworkStateManager;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.net.NetworkStateManager;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/impl/AESEncryptServiceTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/impl/AESEncryptServiceTest.java
similarity index 88%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/impl/AESEncryptServiceTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/impl/AESEncryptServiceTest.java
index 940dfc8..4d5a26e 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/impl/AESEncryptServiceTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/impl/AESEncryptServiceTest.java
@@ -1,7 +1,7 @@
-package com.alibaba.sdk.android.httpdns.impl;
+package com.newsdk.sdk.android.httpdns.impl;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
-import com.alibaba.sdk.android.httpdns.utils.CommonUtil;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.utils.CommonUtil;
import org.hamcrest.MatcherAssert;
import org.junit.Test;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/impl/HostResolveRecorderTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/impl/HostResolveRecorderTest.java
similarity index 95%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/impl/HostResolveRecorderTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/impl/HostResolveRecorderTest.java
index c80e3e0..9eb906e 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/impl/HostResolveRecorderTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/impl/HostResolveRecorderTest.java
@@ -1,9 +1,9 @@
-package com.alibaba.sdk.android.httpdns.impl;
+package com.newsdk.sdk.android.httpdns.impl;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
-import com.alibaba.sdk.android.httpdns.test.utils.TestExecutorService;
-import com.alibaba.sdk.android.httpdns.test.utils.UnitTestUtil;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.test.utils.TestExecutorService;
+import com.newsdk.sdk.android.httpdns.test.utils.UnitTestUtil;
import org.hamcrest.MatcherAssert;
import org.junit.Test;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/impl/HttpDnsConfigTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/impl/HttpDnsConfigTest.java
similarity index 97%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/impl/HttpDnsConfigTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/impl/HttpDnsConfigTest.java
index 5992818..d0e7460 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/impl/HttpDnsConfigTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/impl/HttpDnsConfigTest.java
@@ -1,9 +1,9 @@
-package com.alibaba.sdk.android.httpdns.impl;
+package com.newsdk.sdk.android.httpdns.impl;
-import com.alibaba.sdk.android.httpdns.BuildConfig;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
-import com.alibaba.sdk.android.httpdns.test.utils.SyncExecutorService;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.BuildConfig;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.test.utils.SyncExecutorService;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/impl/HttpDnsInstanceHolderTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/impl/HttpDnsInstanceHolderTest.java
similarity index 96%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/impl/HttpDnsInstanceHolderTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/impl/HttpDnsInstanceHolderTest.java
index b3915f3..37324d1 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/impl/HttpDnsInstanceHolderTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/impl/HttpDnsInstanceHolderTest.java
@@ -1,6 +1,6 @@
-package com.alibaba.sdk.android.httpdns.impl;
+package com.newsdk.sdk.android.httpdns.impl;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
import org.hamcrest.MatcherAssert;
import org.junit.Before;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/impl/SignServiceTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/impl/SignServiceTest.java
similarity index 93%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/impl/SignServiceTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/impl/SignServiceTest.java
index cef384b..8ecb3dd 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/impl/SignServiceTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/impl/SignServiceTest.java
@@ -1,7 +1,7 @@
-package com.alibaba.sdk.android.httpdns.impl;
+package com.newsdk.sdk.android.httpdns.impl;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
-import com.alibaba.sdk.android.httpdns.utils.CommonUtil;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.utils.CommonUtil;
import org.hamcrest.MatcherAssert;
import org.junit.Test;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/log/HttpdnsLogTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/log/HttpdnsLogTest.java
similarity index 96%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/log/HttpdnsLogTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/log/HttpdnsLogTest.java
index 12ef7fd..e57eaa3 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/log/HttpdnsLogTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/log/HttpdnsLogTest.java
@@ -1,7 +1,7 @@
-package com.alibaba.sdk.android.httpdns.log;
+package com.newsdk.sdk.android.httpdns.log;
-import com.alibaba.sdk.android.httpdns.ILogger;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.ILogger;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
import org.hamcrest.Matchers;
import org.junit.After;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/probe/IPRankingTaskTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/probe/IPRankingTaskTest.java
similarity index 90%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/probe/IPRankingTaskTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/probe/IPRankingTaskTest.java
index cfb013d..3a7c651 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/probe/IPRankingTaskTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/probe/IPRankingTaskTest.java
@@ -1,6 +1,6 @@
-package com.alibaba.sdk.android.httpdns.ranking;
+package com.newsdk.sdk.android.httpdns.ranking;
-import com.alibaba.sdk.android.httpdns.test.utils.UnitTestUtil;
+import com.newsdk.sdk.android.httpdns.test.utils.UnitTestUtil;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/request/HttpExceptionTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/request/HttpExceptionTest.java
similarity index 94%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/request/HttpExceptionTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/request/HttpExceptionTest.java
index b34aa7b..793848a 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/request/HttpExceptionTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/request/HttpExceptionTest.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.request;
+package com.newsdk.sdk.android.httpdns.request;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/request/HttpRequestTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/request/HttpRequestTest.java
similarity index 95%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/request/HttpRequestTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/request/HttpRequestTest.java
index 1c87a9d..c376429 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/request/HttpRequestTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/request/HttpRequestTest.java
@@ -1,6 +1,6 @@
-package com.alibaba.sdk.android.httpdns.request;
+package com.newsdk.sdk.android.httpdns.request;
-import com.alibaba.sdk.android.httpdns.test.server.HttpDnsServer;
+import com.newsdk.sdk.android.httpdns.test.server.HttpDnsServer;
import org.junit.After;
import org.junit.Before;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/request/HttpRequestWatcherTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/request/HttpRequestWatcherTest.java
similarity index 97%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/request/HttpRequestWatcherTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/request/HttpRequestWatcherTest.java
index 37a60be..a217c7b 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/request/HttpRequestWatcherTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/request/HttpRequestWatcherTest.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.request;
+package com.newsdk.sdk.android.httpdns.request;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/request/HttpRequestWrapperTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/request/HttpRequestWrapperTest.java
similarity index 95%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/request/HttpRequestWrapperTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/request/HttpRequestWrapperTest.java
index 67a2fbf..5d3c8dd 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/request/HttpRequestWrapperTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/request/HttpRequestWrapperTest.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.request;
+package com.newsdk.sdk.android.httpdns.request;
import org.junit.Before;
import org.junit.Test;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/request/RetryHttpRequestTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/request/RetryHttpRequestTest.java
similarity index 95%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/request/RetryHttpRequestTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/request/RetryHttpRequestTest.java
index 44efa85..adc0829 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/request/RetryHttpRequestTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/request/RetryHttpRequestTest.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.request;
+package com.newsdk.sdk.android.httpdns.request;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/BaseCategoryTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/BaseCategoryTest.java
similarity index 91%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/BaseCategoryTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/BaseCategoryTest.java
index 2c920c3..2915d47 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/BaseCategoryTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/BaseCategoryTest.java
@@ -1,15 +1,15 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
-import com.alibaba.sdk.android.httpdns.ILogger;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsConfig;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-import com.alibaba.sdk.android.httpdns.request.HttpException;
-import com.alibaba.sdk.android.httpdns.request.RequestCallback;
-import com.alibaba.sdk.android.httpdns.serverip.RegionServerScheduleService;
-import com.alibaba.sdk.android.httpdns.test.server.HttpDnsServer;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
-import com.alibaba.sdk.android.httpdns.test.utils.TestExecutorService;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.ILogger;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsConfig;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.request.HttpException;
+import com.newsdk.sdk.android.httpdns.request.RequestCallback;
+import com.newsdk.sdk.android.httpdns.serverip.RegionServerScheduleService;
+import com.newsdk.sdk.android.httpdns.test.server.HttpDnsServer;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.test.utils.TestExecutorService;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
import org.hamcrest.MatcherAssert;
import org.junit.After;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/CategoryControllerTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/CategoryControllerTest.java
similarity index 94%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/CategoryControllerTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/CategoryControllerTest.java
index 767431b..7b9bbee 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/CategoryControllerTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/CategoryControllerTest.java
@@ -1,6 +1,6 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
-import com.alibaba.sdk.android.httpdns.serverip.RegionServerScheduleService;
+import com.newsdk.sdk.android.httpdns.serverip.RegionServerScheduleService;
import org.hamcrest.MatcherAssert;
import org.junit.Test;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/HostFilterTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/HostFilterTest.java
similarity index 83%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/HostFilterTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/HostFilterTest.java
index 40fe005..7fddbb0 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/HostFilterTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/HostFilterTest.java
@@ -1,7 +1,7 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
-import com.alibaba.sdk.android.httpdns.DegradationFilter;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.DegradationFilter;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
import org.hamcrest.MatcherAssert;
import org.junit.Test;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/NormalCategoryTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/NormalCategoryTest.java
similarity index 95%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/NormalCategoryTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/NormalCategoryTest.java
index 14c10a5..ef1bf2b 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/NormalCategoryTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/NormalCategoryTest.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
import org.hamcrest.MatcherAssert;
import org.junit.Test;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostResponseTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostResponseTest.java
similarity index 98%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostResponseTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostResponseTest.java
index 1a84dec..32c449b 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostResponseTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostResponseTest.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
import org.hamcrest.Matchers;
import org.json.JSONException;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostResultRepoTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostResultRepoTest.java
similarity index 96%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostResultRepoTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostResultRepoTest.java
index dee112d..bebf054 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostResultRepoTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostResultRepoTest.java
@@ -1,17 +1,17 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
-import com.alibaba.sdk.android.httpdns.CacheTtlChanger;
-import com.alibaba.sdk.android.httpdns.HTTPDNSResult;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.cache.RecordDBHelper;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsConfig;
-import com.alibaba.sdk.android.httpdns.ranking.IPRankingService;
-import com.alibaba.sdk.android.httpdns.test.server.ResolveHostServer;
-import com.alibaba.sdk.android.httpdns.test.server.BatchResolveHostServer;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
-import com.alibaba.sdk.android.httpdns.test.utils.TestExecutorService;
-import com.alibaba.sdk.android.httpdns.test.utils.UnitTestUtil;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.CacheTtlChanger;
+import com.newsdk.sdk.android.httpdns.HTTPDNSResult;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.cache.RecordDBHelper;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsConfig;
+import com.newsdk.sdk.android.httpdns.ranking.IPRankingService;
+import com.newsdk.sdk.android.httpdns.test.server.ResolveHostServer;
+import com.newsdk.sdk.android.httpdns.test.server.BatchResolveHostServer;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.test.utils.TestExecutorService;
+import com.newsdk.sdk.android.httpdns.test.utils.UnitTestUtil;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostResultRepoTest2.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostResultRepoTest2.java
similarity index 88%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostResultRepoTest2.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostResultRepoTest2.java
index 022add1..001da8e 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/ResolveHostResultRepoTest2.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/ResolveHostResultRepoTest2.java
@@ -1,13 +1,13 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
-import com.alibaba.sdk.android.httpdns.HTTPDNSResult;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.cache.RecordDBHelper;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsConfig;
-import com.alibaba.sdk.android.httpdns.ranking.IPRankingService;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
-import com.alibaba.sdk.android.httpdns.test.utils.TestExecutorService;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.HTTPDNSResult;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.cache.RecordDBHelper;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsConfig;
+import com.newsdk.sdk.android.httpdns.ranking.IPRankingService;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.test.utils.TestExecutorService;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/ShiftServerWatcherTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/ShiftServerWatcherTest.java
similarity index 90%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/ShiftServerWatcherTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/ShiftServerWatcherTest.java
index 87bd21e..de4db52 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/ShiftServerWatcherTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/ShiftServerWatcherTest.java
@@ -1,11 +1,11 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
-import com.alibaba.sdk.android.httpdns.config.ServerConfig;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsConfig;
-import com.alibaba.sdk.android.httpdns.request.HttpException;
-import com.alibaba.sdk.android.httpdns.request.HttpRequestConfig;
-import com.alibaba.sdk.android.httpdns.serverip.RegionServerScheduleService;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.config.ServerConfig;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsConfig;
+import com.newsdk.sdk.android.httpdns.request.HttpException;
+import com.newsdk.sdk.android.httpdns.request.HttpRequestConfig;
+import com.newsdk.sdk.android.httpdns.serverip.RegionServerScheduleService;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
import org.junit.Before;
import org.junit.Test;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/SniffCategoryTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/SniffCategoryTest.java
similarity index 97%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/SniffCategoryTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/SniffCategoryTest.java
index b91191e..3141ddd 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/resolve/SniffCategoryTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/resolve/SniffCategoryTest.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.resolve;
+package com.newsdk.sdk.android.httpdns.resolve;
import org.hamcrest.MatcherAssert;
import org.junit.Test;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/serverip/ServerIpRepoTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/serverip/ServerIpRepoTest.java
similarity index 91%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/serverip/ServerIpRepoTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/serverip/ServerIpRepoTest.java
index 7273663..08e9c8a 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/serverip/ServerIpRepoTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/serverip/ServerIpRepoTest.java
@@ -1,8 +1,8 @@
-package com.alibaba.sdk.android.httpdns.serverip;
+package com.newsdk.sdk.android.httpdns.serverip;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
-import com.alibaba.sdk.android.httpdns.test.utils.UnitTestUtil;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.test.utils.UnitTestUtil;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/serverip/UpdateServerLockerTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/serverip/UpdateServerLockerTest.java
similarity index 94%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/serverip/UpdateServerLockerTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/serverip/UpdateServerLockerTest.java
index 30989d3..5797ac6 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/serverip/UpdateServerLockerTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/serverip/UpdateServerLockerTest.java
@@ -1,8 +1,8 @@
-package com.alibaba.sdk.android.httpdns.serverip;
+package com.newsdk.sdk.android.httpdns.serverip;
-import com.alibaba.sdk.android.httpdns.test.utils.MultiThreadTestHelper;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.test.utils.MultiThreadTestHelper;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
import org.hamcrest.MatcherAssert;
import org.junit.Test;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/serverip/UpdateServerResponseTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/serverip/UpdateServerResponseTest.java
similarity index 87%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/serverip/UpdateServerResponseTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/serverip/UpdateServerResponseTest.java
index 7b6d6ed..2525aa3 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/serverip/UpdateServerResponseTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/serverip/UpdateServerResponseTest.java
@@ -1,8 +1,8 @@
-package com.alibaba.sdk.android.httpdns.serverip;
+package com.newsdk.sdk.android.httpdns.serverip;
-import com.alibaba.sdk.android.httpdns.test.server.ServerIpsServer;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
-import com.alibaba.sdk.android.httpdns.test.utils.UnitTestUtil;
+import com.newsdk.sdk.android.httpdns.test.server.ServerIpsServer;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.test.utils.UnitTestUtil;
import org.json.JSONException;
import org.junit.Test;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/serverip/UpdateServerTaskTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/serverip/UpdateServerTaskTest.java
similarity index 84%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/serverip/UpdateServerTaskTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/serverip/UpdateServerTaskTest.java
index dedc99f..8d7f0aa 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/serverip/UpdateServerTaskTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/serverip/UpdateServerTaskTest.java
@@ -1,14 +1,14 @@
-package com.alibaba.sdk.android.httpdns.serverip;
+package com.newsdk.sdk.android.httpdns.serverip;
-import com.alibaba.sdk.android.httpdns.ILogger;
-import com.alibaba.sdk.android.httpdns.impl.HttpDnsConfig;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-import com.alibaba.sdk.android.httpdns.serverip.UpdateRegionServerResponse;
-import com.alibaba.sdk.android.httpdns.request.RequestCallback;
-import com.alibaba.sdk.android.httpdns.test.server.HttpDnsServer;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
-import com.alibaba.sdk.android.httpdns.test.utils.TestExecutorService;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.ILogger;
+import com.newsdk.sdk.android.httpdns.impl.HttpDnsConfig;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.serverip.UpdateRegionServerResponse;
+import com.newsdk.sdk.android.httpdns.request.RequestCallback;
+import com.newsdk.sdk.android.httpdns.test.server.HttpDnsServer;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.test.utils.TestExecutorService;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
import org.junit.After;
import org.junit.Before;
@@ -20,7 +20,7 @@ import org.robolectric.RuntimeEnvironment;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.ThreadFactory;
-import static com.alibaba.sdk.android.httpdns.resolve.NormalCategoryTest.match;
+import static com.newsdk.sdk.android.httpdns.resolve.NormalCategoryTest.match;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.Mockito.mock;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/app/BusinessApp.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/app/BusinessApp.java
similarity index 92%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/app/BusinessApp.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/app/BusinessApp.java
index 7e108d1..8e1b1a5 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/app/BusinessApp.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/app/BusinessApp.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.test.app;
+package com.newsdk.sdk.android.httpdns.test.app;
import android.annotation.SuppressLint;
import android.content.Context;
@@ -7,28 +7,28 @@ import android.content.SharedPreferences;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
-import com.alibaba.sdk.android.httpdns.ApiForTest;
-import com.alibaba.sdk.android.httpdns.BeforeHttpDnsServiceInit;
-import com.alibaba.sdk.android.httpdns.DegradationFilter;
-import com.alibaba.sdk.android.httpdns.HTTPDNSResult;
-import com.alibaba.sdk.android.httpdns.HttpDns;
-import com.alibaba.sdk.android.httpdns.HttpDnsService;
-import com.alibaba.sdk.android.httpdns.HttpDnsSettings;
-import com.alibaba.sdk.android.httpdns.ILogger;
-import com.alibaba.sdk.android.httpdns.InitManager;
-import com.alibaba.sdk.android.httpdns.NetType;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.SyncService;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-import com.alibaba.sdk.android.httpdns.ranking.IPRankingBean;
-import com.alibaba.sdk.android.httpdns.test.helper.ServerStatusHelper;
-import com.alibaba.sdk.android.httpdns.test.server.HttpDnsServer;
-import com.alibaba.sdk.android.httpdns.test.server.MockSpeedTestServer;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
-import com.alibaba.sdk.android.httpdns.test.utils.ShadowNetworkInfo;
-import com.alibaba.sdk.android.httpdns.test.utils.TestExecutorService;
-import com.alibaba.sdk.android.httpdns.test.utils.TestLogger;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.ApiForTest;
+import com.newsdk.sdk.android.httpdns.BeforeHttpDnsServiceInit;
+import com.newsdk.sdk.android.httpdns.DegradationFilter;
+import com.newsdk.sdk.android.httpdns.HTTPDNSResult;
+import com.newsdk.sdk.android.httpdns.HttpDns;
+import com.newsdk.sdk.android.httpdns.HttpDnsService;
+import com.newsdk.sdk.android.httpdns.HttpDnsSettings;
+import com.newsdk.sdk.android.httpdns.ILogger;
+import com.newsdk.sdk.android.httpdns.InitManager;
+import com.newsdk.sdk.android.httpdns.NetType;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.SyncService;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.ranking.IPRankingBean;
+import com.newsdk.sdk.android.httpdns.test.helper.ServerStatusHelper;
+import com.newsdk.sdk.android.httpdns.test.server.HttpDnsServer;
+import com.newsdk.sdk.android.httpdns.test.server.MockSpeedTestServer;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.test.utils.ShadowNetworkInfo;
+import com.newsdk.sdk.android.httpdns.test.utils.TestExecutorService;
+import com.newsdk.sdk.android.httpdns.test.utils.TestLogger;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
import org.mockito.ArgumentCaptor;
import org.robolectric.RuntimeEnvironment;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/helper/ServerStatusHelper.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/helper/ServerStatusHelper.java
similarity index 94%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/helper/ServerStatusHelper.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/helper/ServerStatusHelper.java
index 6c68b3b..d4b5ec8 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/helper/ServerStatusHelper.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/helper/ServerStatusHelper.java
@@ -1,11 +1,11 @@
-package com.alibaba.sdk.android.httpdns.test.helper;
+package com.newsdk.sdk.android.httpdns.test.helper;
-import com.alibaba.sdk.android.httpdns.resolve.ResolveHostResponse;
-import com.alibaba.sdk.android.httpdns.request.HttpException;
-import com.alibaba.sdk.android.httpdns.test.app.BusinessApp;
-import com.alibaba.sdk.android.httpdns.test.server.HttpDnsServer;
-import com.alibaba.sdk.android.httpdns.test.server.ResolveHostServer;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.resolve.ResolveHostResponse;
+import com.newsdk.sdk.android.httpdns.request.HttpException;
+import com.newsdk.sdk.android.httpdns.test.app.BusinessApp;
+import com.newsdk.sdk.android.httpdns.test.server.HttpDnsServer;
+import com.newsdk.sdk.android.httpdns.test.server.ResolveHostServer;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
import java.util.List;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/BatchResolveHostServer.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/BatchResolveHostServer.java
similarity index 95%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/BatchResolveHostServer.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/BatchResolveHostServer.java
index d856332..ebe69a4 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/BatchResolveHostServer.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/BatchResolveHostServer.java
@@ -1,11 +1,11 @@
-package com.alibaba.sdk.android.httpdns.test.server;
+package com.newsdk.sdk.android.httpdns.test.server;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.resolve.BatchResolveHostResponse;
-import com.alibaba.sdk.android.httpdns.test.server.base.BaseDataServer;
-import com.alibaba.sdk.android.httpdns.test.server.base.RequestRecord;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
-import com.alibaba.sdk.android.httpdns.test.utils.TestLogger;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.resolve.BatchResolveHostResponse;
+import com.newsdk.sdk.android.httpdns.test.server.base.BaseDataServer;
+import com.newsdk.sdk.android.httpdns.test.server.base.RequestRecord;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.test.utils.TestLogger;
import org.json.JSONException;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/DebugApiServer.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/DebugApiServer.java
similarity index 88%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/DebugApiServer.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/DebugApiServer.java
index f6449fa..10c4560 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/DebugApiServer.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/DebugApiServer.java
@@ -1,6 +1,6 @@
-package com.alibaba.sdk.android.httpdns.test.server;
+package com.newsdk.sdk.android.httpdns.test.server;
-import com.alibaba.sdk.android.httpdns.test.server.base.BaseDataServer;
+import com.newsdk.sdk.android.httpdns.test.server.base.BaseDataServer;
import java.util.List;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/HttpDnsServer.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/HttpDnsServer.java
similarity index 92%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/HttpDnsServer.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/HttpDnsServer.java
index fba4e3b..002b829 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/HttpDnsServer.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/HttpDnsServer.java
@@ -1,9 +1,9 @@
-package com.alibaba.sdk.android.httpdns.test.server;
+package com.newsdk.sdk.android.httpdns.test.server;
-import com.alibaba.sdk.android.httpdns.test.server.base.BaseDataServer;
-import com.alibaba.sdk.android.httpdns.test.server.base.RequestHandler;
-import com.alibaba.sdk.android.httpdns.test.server.base.RequestListener;
-import com.alibaba.sdk.android.httpdns.test.utils.TestLogger;
+import com.newsdk.sdk.android.httpdns.test.server.base.BaseDataServer;
+import com.newsdk.sdk.android.httpdns.test.server.base.RequestHandler;
+import com.newsdk.sdk.android.httpdns.test.server.base.RequestListener;
+import com.newsdk.sdk.android.httpdns.test.utils.TestLogger;
import java.io.IOException;
import java.net.Inet4Address;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/MockSpeedTestServer.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/MockSpeedTestServer.java
similarity index 83%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/MockSpeedTestServer.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/MockSpeedTestServer.java
index 7327649..59fdc98 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/MockSpeedTestServer.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/MockSpeedTestServer.java
@@ -1,15 +1,15 @@
-package com.alibaba.sdk.android.httpdns.test.server;
+package com.newsdk.sdk.android.httpdns.test.server;
-import com.alibaba.sdk.android.httpdns.ranking.IPRankingTask;
-import com.alibaba.sdk.android.httpdns.test.server.base.BaseDataServer;
-import com.alibaba.sdk.android.httpdns.test.server.base.RequestListener;
-import com.alibaba.sdk.android.httpdns.test.utils.UnitTestUtil;
+import com.newsdk.sdk.android.httpdns.ranking.IPRankingTask;
+import com.newsdk.sdk.android.httpdns.test.server.base.BaseDataServer;
+import com.newsdk.sdk.android.httpdns.test.server.base.RequestListener;
+import com.newsdk.sdk.android.httpdns.test.utils.UnitTestUtil;
import java.net.Socket;
import java.util.ArrayList;
import java.util.HashMap;
-import static com.alibaba.sdk.android.httpdns.test.server.HttpDnsServer.REQUEST_TYPE_INTERPRET_HOST;
+import static com.newsdk.sdk.android.httpdns.test.server.HttpDnsServer.REQUEST_TYPE_INTERPRET_HOST;
import static org.mockito.Mockito.mock;
/**
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/ResolveHostServer.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/ResolveHostServer.java
similarity index 97%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/ResolveHostServer.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/ResolveHostServer.java
index 3473eb1..e68b9a8 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/ResolveHostServer.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/ResolveHostServer.java
@@ -1,9 +1,9 @@
-package com.alibaba.sdk.android.httpdns.test.server;
+package com.newsdk.sdk.android.httpdns.test.server;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.resolve.ResolveHostResponse;
-import com.alibaba.sdk.android.httpdns.test.server.base.BaseDataServer;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.resolve.ResolveHostResponse;
+import com.newsdk.sdk.android.httpdns.test.server.base.BaseDataServer;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
import org.json.JSONException;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/SecretService.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/SecretService.java
similarity index 89%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/SecretService.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/SecretService.java
index 3fbc40a..b8f4037 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/SecretService.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/SecretService.java
@@ -1,8 +1,8 @@
-package com.alibaba.sdk.android.httpdns.test.server;
+package com.newsdk.sdk.android.httpdns.test.server;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
-import com.alibaba.sdk.android.httpdns.test.utils.TestLogger;
-import com.alibaba.sdk.android.httpdns.utils.CommonUtil;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.test.utils.TestLogger;
+import com.newsdk.sdk.android.httpdns.utils.CommonUtil;
import java.security.NoSuchAlgorithmException;
import java.util.HashMap;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/ServerIpsServer.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/ServerIpsServer.java
similarity index 96%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/ServerIpsServer.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/ServerIpsServer.java
index d899059..e32d4b2 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/ServerIpsServer.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/ServerIpsServer.java
@@ -1,7 +1,7 @@
-package com.alibaba.sdk.android.httpdns.test.server;
+package com.newsdk.sdk.android.httpdns.test.server;
-import com.alibaba.sdk.android.httpdns.serverip.UpdateRegionServerResponse;
-import com.alibaba.sdk.android.httpdns.test.server.base.BaseDataServer;
+import com.newsdk.sdk.android.httpdns.serverip.UpdateRegionServerResponse;
+import com.newsdk.sdk.android.httpdns.test.server.base.BaseDataServer;
import org.json.JSONException;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/base/BaseDataServer.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/base/BaseDataServer.java
similarity index 99%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/base/BaseDataServer.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/base/BaseDataServer.java
index 2a2392f..6072b47 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/base/BaseDataServer.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/base/BaseDataServer.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.test.server.base;
+package com.newsdk.sdk.android.httpdns.test.server.base;
import java.nio.charset.Charset;
import java.util.ArrayList;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/base/RequestHandler.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/base/RequestHandler.java
similarity index 93%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/base/RequestHandler.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/base/RequestHandler.java
index f1a0659..384d76f 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/base/RequestHandler.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/base/RequestHandler.java
@@ -1,6 +1,6 @@
-package com.alibaba.sdk.android.httpdns.test.server.base;
+package com.newsdk.sdk.android.httpdns.test.server.base;
-import com.alibaba.sdk.android.httpdns.test.utils.TestLogger;
+import com.newsdk.sdk.android.httpdns.test.utils.TestLogger;
import java.util.HashMap;
import java.util.Map;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/base/RequestListener.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/base/RequestListener.java
similarity index 78%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/base/RequestListener.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/base/RequestListener.java
index 8480528..0a9dd12 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/base/RequestListener.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/base/RequestListener.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.test.server.base;
+package com.newsdk.sdk.android.httpdns.test.server.base;
/**
* 鏈嶅姟鎺ュ彈鍒拌姹傜殑鐩戝惉
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/base/RequestRecord.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/base/RequestRecord.java
similarity index 91%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/base/RequestRecord.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/base/RequestRecord.java
index ef67b5a..5a44756 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/base/RequestRecord.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/base/RequestRecord.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.test.server.base;
+package com.newsdk.sdk.android.httpdns.test.server.base;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.RecordedRequest;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/base/SdkBusinessServer.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/base/SdkBusinessServer.java
similarity index 89%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/base/SdkBusinessServer.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/base/SdkBusinessServer.java
index b8fd641..4e23752 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/base/SdkBusinessServer.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/base/SdkBusinessServer.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.test.server.base;
+package com.newsdk.sdk.android.httpdns.test.server.base;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.RecordedRequest;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/base/ServerApi.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/base/ServerApi.java
similarity index 97%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/base/ServerApi.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/base/ServerApi.java
index 0fb047d..993a0d8 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/server/base/ServerApi.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/server/base/ServerApi.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.test.server.base;
+package com.newsdk.sdk.android.httpdns.test.server.base;
import java.util.List;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/utils/CountUpAndDownLatch.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/utils/CountUpAndDownLatch.java
similarity index 97%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/utils/CountUpAndDownLatch.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/utils/CountUpAndDownLatch.java
index c6d7eb0..774d38b 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/utils/CountUpAndDownLatch.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/utils/CountUpAndDownLatch.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.test.utils;
+package com.newsdk.sdk.android.httpdns.test.utils;
import org.hamcrest.MatcherAssert;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/utils/MultiThreadTestHelper.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/utils/MultiThreadTestHelper.java
similarity index 98%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/utils/MultiThreadTestHelper.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/utils/MultiThreadTestHelper.java
index 18dcbe6..54b6f68 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/utils/MultiThreadTestHelper.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/utils/MultiThreadTestHelper.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.test.utils;
+package com.newsdk.sdk.android.httpdns.test.utils;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/utils/RandomValue.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/utils/RandomValue.java
similarity index 98%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/utils/RandomValue.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/utils/RandomValue.java
index 760a185..889e572 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/utils/RandomValue.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/utils/RandomValue.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.test.utils;
+package com.newsdk.sdk.android.httpdns.test.utils;
import org.json.JSONException;
import org.json.JSONObject;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/utils/ShadowNetworkInfo.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/utils/ShadowNetworkInfo.java
similarity index 98%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/utils/ShadowNetworkInfo.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/utils/ShadowNetworkInfo.java
index 8fd4117..fbd4474 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/utils/ShadowNetworkInfo.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/utils/ShadowNetworkInfo.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.test.utils;
+package com.newsdk.sdk.android.httpdns.test.utils;
import android.net.NetworkInfo;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/utils/SyncExecutorService.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/utils/SyncExecutorService.java
similarity index 97%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/utils/SyncExecutorService.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/utils/SyncExecutorService.java
index 3301ff1..3554215 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/utils/SyncExecutorService.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/utils/SyncExecutorService.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.test.utils;
+package com.newsdk.sdk.android.httpdns.test.utils;
import java.util.Collection;
import java.util.List;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/utils/TestExecutorService.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/utils/TestExecutorService.java
similarity index 99%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/utils/TestExecutorService.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/utils/TestExecutorService.java
index ad348a2..8805a3c 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/utils/TestExecutorService.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/utils/TestExecutorService.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.test.utils;
+package com.newsdk.sdk.android.httpdns.test.utils;
import java.util.ArrayList;
import java.util.Collection;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/utils/TestLogger.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/utils/TestLogger.java
similarity index 88%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/utils/TestLogger.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/utils/TestLogger.java
index 121db31..a930b60 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/utils/TestLogger.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/utils/TestLogger.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.test.utils;
+package com.newsdk.sdk.android.httpdns.test.utils;
import java.text.SimpleDateFormat;
import java.util.Date;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/utils/UnitTestUtil.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/utils/UnitTestUtil.java
similarity index 99%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/utils/UnitTestUtil.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/utils/UnitTestUtil.java
index 3bf35e0..0dbfbff 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/test/utils/UnitTestUtil.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/test/utils/UnitTestUtil.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.test.utils;
+package com.newsdk.sdk.android.httpdns.test.utils;
import org.mockito.ArgumentMatcher;
import org.mockito.invocation.InvocationOnMock;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/utils/CommonUtilTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/utils/CommonUtilTest.java
similarity index 91%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/utils/CommonUtilTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/utils/CommonUtilTest.java
index 9782300..ecc08a4 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/utils/CommonUtilTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/utils/CommonUtilTest.java
@@ -1,7 +1,7 @@
-package com.alibaba.sdk.android.httpdns.utils;
+package com.newsdk.sdk.android.httpdns.utils;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
-import com.alibaba.sdk.android.httpdns.test.utils.UnitTestUtil;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.test.utils.UnitTestUtil;
import org.hamcrest.MatcherAssert;
import org.junit.Test;
@@ -10,7 +10,7 @@ import org.robolectric.RobolectricTestRunner;
import java.util.Map;
-import static com.alibaba.sdk.android.httpdns.test.utils.UnitTestUtil.assertIpsEqual;
+import static com.newsdk.sdk.android.httpdns.test.utils.UnitTestUtil.assertIpsEqual;
/**
* @author zonglin.nzl
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/utils/HexTest.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/utils/HexTest.java
similarity index 95%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/utils/HexTest.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/utils/HexTest.java
index f200eb3..cc9a317 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/utils/HexTest.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/utils/HexTest.java
@@ -1,4 +1,4 @@
-package com.alibaba.sdk.android.httpdns.utils;
+package com.newsdk.sdk.android.httpdns.utils;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/version/V2_3_0.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/version/V2_3_0.java
similarity index 96%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/version/V2_3_0.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/version/V2_3_0.java
index 631e498..08651e3 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/version/V2_3_0.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/version/V2_3_0.java
@@ -1,26 +1,26 @@
-package com.alibaba.sdk.android.httpdns.version;
+package com.newsdk.sdk.android.httpdns.version;
import android.Manifest;
import android.net.ConnectivityManager;
-import com.alibaba.sdk.android.httpdns.CacheTtlChanger;
-import com.alibaba.sdk.android.httpdns.HttpDns;
-import com.alibaba.sdk.android.httpdns.ILogger;
-import com.alibaba.sdk.android.httpdns.InitConfig;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.resolve.ResolveHostResponse;
-import com.alibaba.sdk.android.httpdns.resolve.BatchResolveHostResponse;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-import com.alibaba.sdk.android.httpdns.request.HttpException;
-import com.alibaba.sdk.android.httpdns.test.app.BusinessApp;
-import com.alibaba.sdk.android.httpdns.test.helper.ServerStatusHelper;
-import com.alibaba.sdk.android.httpdns.test.server.HttpDnsServer;
-import com.alibaba.sdk.android.httpdns.test.server.ResolveHostServer;
-import com.alibaba.sdk.android.httpdns.test.server.MockSpeedTestServer;
-import com.alibaba.sdk.android.httpdns.test.server.BatchResolveHostServer;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
-import com.alibaba.sdk.android.httpdns.test.utils.ShadowNetworkInfo;
-import com.alibaba.sdk.android.httpdns.test.utils.UnitTestUtil;
+import com.newsdk.sdk.android.httpdns.CacheTtlChanger;
+import com.newsdk.sdk.android.httpdns.HttpDns;
+import com.newsdk.sdk.android.httpdns.ILogger;
+import com.newsdk.sdk.android.httpdns.InitConfig;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.resolve.ResolveHostResponse;
+import com.newsdk.sdk.android.httpdns.resolve.BatchResolveHostResponse;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.request.HttpException;
+import com.newsdk.sdk.android.httpdns.test.app.BusinessApp;
+import com.newsdk.sdk.android.httpdns.test.helper.ServerStatusHelper;
+import com.newsdk.sdk.android.httpdns.test.server.HttpDnsServer;
+import com.newsdk.sdk.android.httpdns.test.server.ResolveHostServer;
+import com.newsdk.sdk.android.httpdns.test.server.MockSpeedTestServer;
+import com.newsdk.sdk.android.httpdns.test.server.BatchResolveHostServer;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.test.utils.ShadowNetworkInfo;
+import com.newsdk.sdk.android.httpdns.test.utils.UnitTestUtil;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/version/V2_3_0_NetType.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/version/V2_3_0_NetType.java
similarity index 92%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/version/V2_3_0_NetType.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/version/V2_3_0_NetType.java
index f763d3f..596fb2d 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/version/V2_3_0_NetType.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/version/V2_3_0_NetType.java
@@ -1,23 +1,23 @@
-package com.alibaba.sdk.android.httpdns.version;
+package com.newsdk.sdk.android.httpdns.version;
import android.Manifest;
import android.net.ConnectivityManager;
-import com.alibaba.sdk.android.httpdns.HttpDns;
-import com.alibaba.sdk.android.httpdns.ILogger;
-import com.alibaba.sdk.android.httpdns.InitConfig;
-import com.alibaba.sdk.android.httpdns.NetType;
-import com.alibaba.sdk.android.httpdns.RequestIpType;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-import com.alibaba.sdk.android.httpdns.test.app.BusinessApp;
-import com.alibaba.sdk.android.httpdns.test.helper.ServerStatusHelper;
-import com.alibaba.sdk.android.httpdns.test.server.HttpDnsServer;
-import com.alibaba.sdk.android.httpdns.test.server.ResolveHostServer;
-import com.alibaba.sdk.android.httpdns.test.server.MockSpeedTestServer;
-import com.alibaba.sdk.android.httpdns.test.server.ServerIpsServer;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
-import com.alibaba.sdk.android.httpdns.test.utils.ShadowNetworkInfo;
-import com.alibaba.sdk.android.httpdns.utils.Constants;
+import com.newsdk.sdk.android.httpdns.HttpDns;
+import com.newsdk.sdk.android.httpdns.ILogger;
+import com.newsdk.sdk.android.httpdns.InitConfig;
+import com.newsdk.sdk.android.httpdns.NetType;
+import com.newsdk.sdk.android.httpdns.RequestIpType;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.test.app.BusinessApp;
+import com.newsdk.sdk.android.httpdns.test.helper.ServerStatusHelper;
+import com.newsdk.sdk.android.httpdns.test.server.HttpDnsServer;
+import com.newsdk.sdk.android.httpdns.test.server.ResolveHostServer;
+import com.newsdk.sdk.android.httpdns.test.server.MockSpeedTestServer;
+import com.newsdk.sdk.android.httpdns.test.server.ServerIpsServer;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.test.utils.ShadowNetworkInfo;
+import com.newsdk.sdk.android.httpdns.utils.Constants;
import org.junit.After;
import org.junit.Before;
diff --git a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/version/V2_3_0_config.java b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/version/V2_3_0_config.java
similarity index 88%
rename from EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/version/V2_3_0_config.java
rename to EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/version/V2_3_0_config.java
index 950e8df..df70382 100644
--- a/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/alibaba/sdk/android/httpdns/version/V2_3_0_config.java
+++ b/EdgeHttpDNS/sdk/android/httpdns-sdk/src/testEnd2end/java/com/newsdk/sdk/android/httpdns/version/V2_3_0_config.java
@@ -1,15 +1,15 @@
-package com.alibaba.sdk.android.httpdns.version;
+package com.newsdk.sdk.android.httpdns.version;
import android.Manifest;
-import com.alibaba.sdk.android.httpdns.HttpDns;
-import com.alibaba.sdk.android.httpdns.ILogger;
-import com.alibaba.sdk.android.httpdns.InitConfig;
-import com.alibaba.sdk.android.httpdns.log.HttpDnsLog;
-import com.alibaba.sdk.android.httpdns.test.app.BusinessApp;
-import com.alibaba.sdk.android.httpdns.test.server.HttpDnsServer;
-import com.alibaba.sdk.android.httpdns.test.server.MockSpeedTestServer;
-import com.alibaba.sdk.android.httpdns.test.utils.RandomValue;
+import com.newsdk.sdk.android.httpdns.HttpDns;
+import com.newsdk.sdk.android.httpdns.ILogger;
+import com.newsdk.sdk.android.httpdns.InitConfig;
+import com.newsdk.sdk.android.httpdns.log.HttpDnsLog;
+import com.newsdk.sdk.android.httpdns.test.app.BusinessApp;
+import com.newsdk.sdk.android.httpdns.test.server.HttpDnsServer;
+import com.newsdk.sdk.android.httpdns.test.server.MockSpeedTestServer;
+import com.newsdk.sdk.android.httpdns.test.utils.RandomValue;
import org.junit.After;
import org.junit.Before;
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-crashdefend/0.0.6/new-android-crashdefend-0.0.6.jar b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-crashdefend/0.0.6/new-android-crashdefend-0.0.6.jar
new file mode 100644
index 0000000..c2547d6
Binary files /dev/null and b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-crashdefend/0.0.6/new-android-crashdefend-0.0.6.jar differ
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-crashdefend/0.0.6/new-android-crashdefend-0.0.6.jar.md5 b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-crashdefend/0.0.6/new-android-crashdefend-0.0.6.jar.md5
new file mode 100644
index 0000000..8941135
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-crashdefend/0.0.6/new-android-crashdefend-0.0.6.jar.md5
@@ -0,0 +1 @@
+7075d8b26f9b8e2d5bcd1628273e8ba8
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-crashdefend/0.0.6/new-android-crashdefend-0.0.6.jar.sha1 b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-crashdefend/0.0.6/new-android-crashdefend-0.0.6.jar.sha1
new file mode 100644
index 0000000..6d4a6b1
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-crashdefend/0.0.6/new-android-crashdefend-0.0.6.jar.sha1
@@ -0,0 +1 @@
+7dc0248c058c801e06d9b3d321a890bc78d45395
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-crashdefend/0.0.6/new-android-crashdefend-0.0.6.pom b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-crashdefend/0.0.6/new-android-crashdefend-0.0.6.pom
new file mode 100644
index 0000000..0025bb5
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-crashdefend/0.0.6/new-android-crashdefend-0.0.6.pom
@@ -0,0 +1,10 @@
+
+
+ 4.0.0
+ com.newsdk.ams
+ new-android-crashdefend
+ 0.0.6
+ jar
+
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-crashdefend/0.0.6/new-android-crashdefend-0.0.6.pom.md5 b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-crashdefend/0.0.6/new-android-crashdefend-0.0.6.pom.md5
new file mode 100644
index 0000000..21199e9
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-crashdefend/0.0.6/new-android-crashdefend-0.0.6.pom.md5
@@ -0,0 +1 @@
+c8d8a825deddeeb608496b28682ce876
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-crashdefend/0.0.6/new-android-crashdefend-0.0.6.pom.sha1 b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-crashdefend/0.0.6/new-android-crashdefend-0.0.6.pom.sha1
new file mode 100644
index 0000000..31de684
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-crashdefend/0.0.6/new-android-crashdefend-0.0.6.pom.sha1
@@ -0,0 +1 @@
+e0cd9c0a4f47f109fe0f90056c4ec7b2f30193b7
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-httpdns/2.6.6/new-android-httpdns-2.6.6.aar b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-httpdns/2.6.6/new-android-httpdns-2.6.6.aar
new file mode 100644
index 0000000..c88b0e5
Binary files /dev/null and b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-httpdns/2.6.6/new-android-httpdns-2.6.6.aar differ
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-httpdns/2.6.6/new-android-httpdns-2.6.6.aar.md5 b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-httpdns/2.6.6/new-android-httpdns-2.6.6.aar.md5
new file mode 100644
index 0000000..eac7b1c
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-httpdns/2.6.6/new-android-httpdns-2.6.6.aar.md5
@@ -0,0 +1 @@
+a301ad179d7bbf26eedd7928efc633b5
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-httpdns/2.6.6/new-android-httpdns-2.6.6.aar.sha1 b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-httpdns/2.6.6/new-android-httpdns-2.6.6.aar.sha1
new file mode 100644
index 0000000..c4519ab
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-httpdns/2.6.6/new-android-httpdns-2.6.6.aar.sha1
@@ -0,0 +1 @@
+1ca6450f4a819fe3814910b4d39aba2636dfd33d
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-httpdns/2.6.6/new-android-httpdns-2.6.6.pom b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-httpdns/2.6.6/new-android-httpdns-2.6.6.pom
new file mode 100644
index 0000000..7473714
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-httpdns/2.6.6/new-android-httpdns-2.6.6.pom
@@ -0,0 +1,31 @@
+
+
+ 4.0.0
+ com.newsdk.ams
+ new-android-httpdns
+ 2.6.6
+ aar
+
+
+
+ com.newsdk.ams
+ new-android-logger
+ 1.2.0
+ runtime
+
+
+ com.newsdk.ams
+ new-android-crashdefend
+ 0.0.6
+ runtime
+
+
+ com.newsdk.ams
+ new-android-ipdetector
+ 1.2.0
+ runtime
+
+
+
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-httpdns/2.6.6/new-android-httpdns-2.6.6.pom.md5 b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-httpdns/2.6.6/new-android-httpdns-2.6.6.pom.md5
new file mode 100644
index 0000000..0cb7d76
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-httpdns/2.6.6/new-android-httpdns-2.6.6.pom.md5
@@ -0,0 +1 @@
+51534bdf6e73a86b4633c3f244a810b0
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-httpdns/2.6.6/new-android-httpdns-2.6.6.pom.sha1 b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-httpdns/2.6.6/new-android-httpdns-2.6.6.pom.sha1
new file mode 100644
index 0000000..b472c22
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-httpdns/2.6.6/new-android-httpdns-2.6.6.pom.sha1
@@ -0,0 +1 @@
+e6b0d00d27adf444ab711ad8ef491cdc9f9f904c
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-ipdetector/1.2.0/new-android-ipdetector-1.2.0.aar b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-ipdetector/1.2.0/new-android-ipdetector-1.2.0.aar
new file mode 100644
index 0000000..843f9d7
Binary files /dev/null and b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-ipdetector/1.2.0/new-android-ipdetector-1.2.0.aar differ
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-ipdetector/1.2.0/new-android-ipdetector-1.2.0.aar.md5 b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-ipdetector/1.2.0/new-android-ipdetector-1.2.0.aar.md5
new file mode 100644
index 0000000..c702692
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-ipdetector/1.2.0/new-android-ipdetector-1.2.0.aar.md5
@@ -0,0 +1 @@
+43dfc07ca50c7801fd89c9fcfb22f30d
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-ipdetector/1.2.0/new-android-ipdetector-1.2.0.aar.sha1 b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-ipdetector/1.2.0/new-android-ipdetector-1.2.0.aar.sha1
new file mode 100644
index 0000000..1632ac7
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-ipdetector/1.2.0/new-android-ipdetector-1.2.0.aar.sha1
@@ -0,0 +1 @@
+664bfd1fa83b196ec3d9899f35cf2246a11f338c
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-ipdetector/1.2.0/new-android-ipdetector-1.2.0.pom b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-ipdetector/1.2.0/new-android-ipdetector-1.2.0.pom
new file mode 100644
index 0000000..2e33eac
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-ipdetector/1.2.0/new-android-ipdetector-1.2.0.pom
@@ -0,0 +1,10 @@
+
+
+ 4.0.0
+ com.newsdk.ams
+ new-android-ipdetector
+ 1.2.0
+ aar
+
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-ipdetector/1.2.0/new-android-ipdetector-1.2.0.pom.md5 b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-ipdetector/1.2.0/new-android-ipdetector-1.2.0.pom.md5
new file mode 100644
index 0000000..0c66e28
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-ipdetector/1.2.0/new-android-ipdetector-1.2.0.pom.md5
@@ -0,0 +1 @@
+131cf2872ea4f53c89b0308a75fe3052
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-ipdetector/1.2.0/new-android-ipdetector-1.2.0.pom.sha1 b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-ipdetector/1.2.0/new-android-ipdetector-1.2.0.pom.sha1
new file mode 100644
index 0000000..360da68
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-ipdetector/1.2.0/new-android-ipdetector-1.2.0.pom.sha1
@@ -0,0 +1 @@
+21f9551b4cec9963f62553f7a362adebae088244
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-logger/1.2.0/new-android-logger-1.2.0.aar b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-logger/1.2.0/new-android-logger-1.2.0.aar
new file mode 100644
index 0000000..d3bb217
Binary files /dev/null and b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-logger/1.2.0/new-android-logger-1.2.0.aar differ
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-logger/1.2.0/new-android-logger-1.2.0.aar.md5 b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-logger/1.2.0/new-android-logger-1.2.0.aar.md5
new file mode 100644
index 0000000..27f6a92
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-logger/1.2.0/new-android-logger-1.2.0.aar.md5
@@ -0,0 +1 @@
+2d05de8679bf77e4345d5ddd528a891d
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-logger/1.2.0/new-android-logger-1.2.0.aar.sha1 b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-logger/1.2.0/new-android-logger-1.2.0.aar.sha1
new file mode 100644
index 0000000..22ce07a
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-logger/1.2.0/new-android-logger-1.2.0.aar.sha1
@@ -0,0 +1 @@
+26414cbb7afeba800fced49d24a7b78e50d1bcc6
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-logger/1.2.0/new-android-logger-1.2.0.pom b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-logger/1.2.0/new-android-logger-1.2.0.pom
new file mode 100644
index 0000000..051dfd4
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-logger/1.2.0/new-android-logger-1.2.0.pom
@@ -0,0 +1,10 @@
+
+
+ 4.0.0
+ com.newsdk.ams
+ new-android-logger
+ 1.2.0
+ aar
+
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-logger/1.2.0/new-android-logger-1.2.0.pom.md5 b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-logger/1.2.0/new-android-logger-1.2.0.pom.md5
new file mode 100644
index 0000000..70ead43
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-logger/1.2.0/new-android-logger-1.2.0.pom.md5
@@ -0,0 +1 @@
+6a34090adc017d9c10eaf7c31eb0b658
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-logger/1.2.0/new-android-logger-1.2.0.pom.sha1 b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-logger/1.2.0/new-android-logger-1.2.0.pom.sha1
new file mode 100644
index 0000000..7764630
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-logger/1.2.0/new-android-logger-1.2.0.pom.sha1
@@ -0,0 +1 @@
+6d7307701e6ef50dbbaf9a1b6c43022b5d60a41e
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-tool/1.1.0/new-android-tool-1.1.0.aar b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-tool/1.1.0/new-android-tool-1.1.0.aar
new file mode 100644
index 0000000..8d90179
Binary files /dev/null and b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-tool/1.1.0/new-android-tool-1.1.0.aar differ
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-tool/1.1.0/new-android-tool-1.1.0.aar.md5 b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-tool/1.1.0/new-android-tool-1.1.0.aar.md5
new file mode 100644
index 0000000..047e225
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-tool/1.1.0/new-android-tool-1.1.0.aar.md5
@@ -0,0 +1 @@
+109ff120327dfca182f5d8fa87b6a3cb
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-tool/1.1.0/new-android-tool-1.1.0.aar.sha1 b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-tool/1.1.0/new-android-tool-1.1.0.aar.sha1
new file mode 100644
index 0000000..d34e335
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-tool/1.1.0/new-android-tool-1.1.0.aar.sha1
@@ -0,0 +1 @@
+c462a608cd64293b54b4284f2dd678fffd5bcccb
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-tool/1.1.0/new-android-tool-1.1.0.pom b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-tool/1.1.0/new-android-tool-1.1.0.pom
new file mode 100644
index 0000000..c6aae93
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-tool/1.1.0/new-android-tool-1.1.0.pom
@@ -0,0 +1,10 @@
+
+
+ 4.0.0
+ com.newsdk.ams
+ new-android-tool
+ 1.1.0
+ aar
+
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-tool/1.1.0/new-android-tool-1.1.0.pom.md5 b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-tool/1.1.0/new-android-tool-1.1.0.pom.md5
new file mode 100644
index 0000000..a50dd6a
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-tool/1.1.0/new-android-tool-1.1.0.pom.md5
@@ -0,0 +1 @@
+f07f49732a701d19993d9890ddc2c624
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-tool/1.1.0/new-android-tool-1.1.0.pom.sha1 b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-tool/1.1.0/new-android-tool-1.1.0.pom.sha1
new file mode 100644
index 0000000..7825b21
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/ams/new-android-tool/1.1.0/new-android-tool-1.1.0.pom.sha1
@@ -0,0 +1 @@
+f941a7bdaeba49925bc337dc7ecf2cbba497da2c
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/fastjson/1.1.73.android/fastjson-1.1.73.android.jar b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/fastjson/1.1.73.android/fastjson-1.1.73.android.jar
new file mode 100644
index 0000000..df1be2b
Binary files /dev/null and b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/fastjson/1.1.73.android/fastjson-1.1.73.android.jar differ
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/fastjson/1.1.73.android/fastjson-1.1.73.android.jar.md5 b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/fastjson/1.1.73.android/fastjson-1.1.73.android.jar.md5
new file mode 100644
index 0000000..73093b1
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/fastjson/1.1.73.android/fastjson-1.1.73.android.jar.md5
@@ -0,0 +1 @@
+54ae339f2821e5876cb220c1361bc284
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/fastjson/1.1.73.android/fastjson-1.1.73.android.jar.sha1 b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/fastjson/1.1.73.android/fastjson-1.1.73.android.jar.sha1
new file mode 100644
index 0000000..d6e4523
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/fastjson/1.1.73.android/fastjson-1.1.73.android.jar.sha1
@@ -0,0 +1 @@
+4d1fbfbf01845b1cf075006ff55fd9a4c0d27786
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/fastjson/1.1.73.android/fastjson-1.1.73.android.pom b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/fastjson/1.1.73.android/fastjson-1.1.73.android.pom
new file mode 100644
index 0000000..524160d
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/fastjson/1.1.73.android/fastjson-1.1.73.android.pom
@@ -0,0 +1,10 @@
+
+
+ 4.0.0
+ com.newsdk
+ fastjson
+ 1.1.73.android
+ jar
+
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/fastjson/1.1.73.android/fastjson-1.1.73.android.pom.md5 b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/fastjson/1.1.73.android/fastjson-1.1.73.android.pom.md5
new file mode 100644
index 0000000..813fd25
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/fastjson/1.1.73.android/fastjson-1.1.73.android.pom.md5
@@ -0,0 +1 @@
+68742ad000c39adaad350b9c62b148d9
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/fastjson/1.1.73.android/fastjson-1.1.73.android.pom.sha1 b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/fastjson/1.1.73.android/fastjson-1.1.73.android.pom.sha1
new file mode 100644
index 0000000..9ac9310
--- /dev/null
+++ b/EdgeHttpDNS/sdk/android/local-maven/com/newsdk/fastjson/1.1.73.android/fastjson-1.1.73.android.pom.sha1
@@ -0,0 +1 @@
+9efd47470be046396ced7eb32c92a945b80077e0
\ No newline at end of file
diff --git a/EdgeHttpDNS/sdk/android/settings.gradle b/EdgeHttpDNS/sdk/android/settings.gradle
index 3b13a4b..f92cb31 100644
--- a/EdgeHttpDNS/sdk/android/settings.gradle
+++ b/EdgeHttpDNS/sdk/android/settings.gradle
@@ -1,17 +1,10 @@
pluginManagement {
+ def localRepo = new File(rootDir, "local-maven")
repositories {
gradlePluginPortal()
google()
mavenCentral()
- maven {
- url "http://maven.aliyun.com/nexus/content/groups/public/"
- name 'jcenter'
- allowInsecureProtocol = true
- }
- maven {
- url "https://maven.aliyun.com/repository/google"
- name 'google'
- }
+ maven { url uri(localRepo) }
}
}
@@ -19,20 +12,10 @@ dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
+ maven { url uri(new File(rootDir, "local-maven")) }
mavenLocal()
- maven {
- url 'http://maven.aliyun.com/nexus/content/repositories/releases/'
- allowInsecureProtocol = true
- }
- maven {
- url "http://maven.aliyun.com/nexus/content/groups/public/"
- name 'jcenter'
- allowInsecureProtocol = true
- }
- maven {
- url "https://maven.aliyun.com/repository/google"
- name 'google'
- }
+ google()
+ mavenCentral()
}
}
diff --git a/EdgeUser/internal/web/actions/default/httpdns/apps/appSettings.go b/EdgeUser/internal/web/actions/default/httpdns/apps/appSettings.go
index 1243c21..3e30df7 100644
--- a/EdgeUser/internal/web/actions/default/httpdns/apps/appSettings.go
+++ b/EdgeUser/internal/web/actions/default/httpdns/apps/appSettings.go
@@ -1,6 +1,6 @@
package apps
-
import (
+ "encoding/json"
"strconv"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
@@ -57,24 +57,61 @@ func (this *AppSettingsAction) RunGet(params struct {
this.ErrorPage(err)
return
}
- clusterDomainMap := map[int64]string{}
+ clusterApiAddressMap := map[int64]string{}
+ clusterNameMap := map[int64]string{}
for _, cluster := range clusterResp.GetClusters() {
- clusterDomainMap[cluster.GetId()] = cluster.GetServiceDomain()
+ port := "443"
+ if rawTLS := cluster.GetTlsPolicyJSON(); len(rawTLS) > 0 {
+ var tlsConfig map[string]interface{}
+ if err := json.Unmarshal(rawTLS, &tlsConfig); err == nil {
+ if listenRaw, ok := tlsConfig["listen"]; ok && listenRaw != nil {
+ if data, err := json.Marshal(listenRaw); err == nil {
+ var listenAddresses []map[string]interface{}
+ if err := json.Unmarshal(data, &listenAddresses); err == nil {
+ if len(listenAddresses) > 0 {
+ if portRange, ok := listenAddresses[0]["portRange"].(string); ok && len(portRange) > 0 {
+ port = portRange
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ apiAddress := "https://" + cluster.GetServiceDomain() + ":" + port
+ clusterApiAddressMap[cluster.GetId()] = apiAddress
+ clusterNameMap[cluster.GetId()] = cluster.GetName()
+ }
+
+ // 读取应用绑定的集群列表
+ var clusterIds []int64
+ if raw := app.Get("clusterIds"); raw != nil {
+ if ids, ok := raw.([]int64); ok {
+ clusterIds = ids
+ }
+ }
+
+ // 构建服务地址列表
+ serviceAddresses := make([]maps.Map, 0)
+ for _, cid := range clusterIds {
+ addr := clusterApiAddressMap[cid]
+ name := clusterNameMap[cid]
+ if len(addr) > 0 {
+ serviceAddresses = append(serviceAddresses, maps.Map{
+ "address": addr,
+ "clusterName": name,
+ })
+ }
}
- primaryClusterId := app.GetInt64("primaryClusterId")
- backupClusterId := app.GetInt64("backupClusterId")
settings := maps.Map{
- "appId": app.GetString("appId"),
- "appStatus": app.GetBool("isOn"),
- "primaryClusterId": primaryClusterId,
- "backupClusterId": backupClusterId,
- "primaryServiceDomain": clusterDomainMap[primaryClusterId],
- "backupServiceDomain": clusterDomainMap[backupClusterId],
- "signEnabled": app.GetBool("signEnabled"),
- "signSecretPlain": app.GetString("signSecretPlain"),
- "signSecretMasked": app.GetString("signSecretMasked"),
- "signSecretUpdatedAt": app.GetString("signSecretUpdated"),
+ "appId": app.GetString("appId"),
+ "appStatus": app.GetBool("isOn"),
+ "serviceAddresses": serviceAddresses,
+ "signEnabled": app.GetBool("signEnabled"),
+ "signSecretPlain": app.GetString("signSecretPlain"),
+ "signSecretMasked": app.GetString("signSecretMasked"),
+ "signSecretUpdatedAt": app.GetString("signSecretUpdated"),
}
this.Data["app"] = app
this.Data["settings"] = settings
@@ -104,12 +141,11 @@ func (this *AppSettingsAction) RunPost(params struct {
}
_, err = this.RPC().HTTPDNSAppRPC().UpdateHTTPDNSApp(this.UserContext(), &pb.UpdateHTTPDNSAppRequest{
- AppDbId: params.AppId,
- Name: appResp.GetApp().GetName(),
- PrimaryClusterId: appResp.GetApp().GetPrimaryClusterId(),
- BackupClusterId: appResp.GetApp().GetBackupClusterId(),
- IsOn: params.AppStatus,
- UserId: appResp.GetApp().GetUserId(),
+ AppDbId: params.AppId,
+ Name: appResp.GetApp().GetName(),
+ ClusterIdsJSON: appResp.GetApp().GetClusterIdsJSON(),
+ IsOn: params.AppStatus,
+ UserId: appResp.GetApp().GetUserId(),
})
if err != nil {
this.ErrorPage(err)
diff --git a/EdgeUser/internal/web/actions/default/httpdns/apps/appSettingsResetSignSecret.go b/EdgeUser/internal/web/actions/default/httpdns/apps/appSettingsResetSignSecret.go
index 49c5f6f..c8eade0 100644
--- a/EdgeUser/internal/web/actions/default/httpdns/apps/appSettingsResetSignSecret.go
+++ b/EdgeUser/internal/web/actions/default/httpdns/apps/appSettingsResetSignSecret.go
@@ -15,7 +15,7 @@ func (this *AppSettingsResetSignSecretAction) RunPost(params struct {
Must *actions.Must
}) {
- params.Must.Field("appId", params.AppId).Gt(0, "璇烽€夋嫨搴旂敤")
+ params.Must.Field("appId", params.AppId).Gt(0, "请选择应用")
_, err := this.RPC().HTTPDNSAppRPC().ResetHTTPDNSAppSignSecret(this.UserContext(), &pb.ResetHTTPDNSAppSignSecretRequest{
AppDbId: params.AppId,
diff --git a/EdgeUser/internal/web/actions/default/httpdns/apps/appSettingsToggleSignEnabled.go b/EdgeUser/internal/web/actions/default/httpdns/apps/appSettingsToggleSignEnabled.go
index 85b825e..89cdbcb 100644
--- a/EdgeUser/internal/web/actions/default/httpdns/apps/appSettingsToggleSignEnabled.go
+++ b/EdgeUser/internal/web/actions/default/httpdns/apps/appSettingsToggleSignEnabled.go
@@ -16,7 +16,7 @@ func (this *AppSettingsToggleSignEnabledAction) RunPost(params struct {
Must *actions.Must
}) {
- params.Must.Field("appId", params.AppId).Gt(0, "璇烽€夋嫨搴旂敤")
+ params.Must.Field("appId", params.AppId).Gt(0, "请选择应用")
_, err := this.RPC().HTTPDNSAppRPC().UpdateHTTPDNSAppSignEnabled(this.UserContext(), &pb.UpdateHTTPDNSAppSignEnabledRequest{
AppDbId: params.AppId,
diff --git a/EdgeUser/internal/web/actions/default/httpdns/apps/create.go b/EdgeUser/internal/web/actions/default/httpdns/apps/create.go
index d3a6961..5dfee04 100644
--- a/EdgeUser/internal/web/actions/default/httpdns/apps/create.go
+++ b/EdgeUser/internal/web/actions/default/httpdns/apps/create.go
@@ -30,12 +30,10 @@ func (this *CreateAction) RunPost(params struct {
params.Must.Field("name", params.Name).Require("请输入应用名称")
createResp, err := this.RPC().HTTPDNSAppRPC().CreateHTTPDNSApp(this.UserContext(), &pb.CreateHTTPDNSAppRequest{
- Name: params.Name,
- AppId: "app" + strconv.FormatInt(time.Now().UnixNano()%1_000_000_000_000, 36),
- PrimaryClusterId: 0,
- BackupClusterId: 0,
- IsOn: true,
- SignEnabled: true,
+ Name: params.Name,
+ AppId: "app" + strconv.FormatInt(time.Now().UnixNano()%1_000_000_000_000, 36),
+ IsOn: true,
+ SignEnabled: true,
})
if err != nil {
this.ErrorPage(err)
diff --git a/EdgeUser/internal/web/actions/default/httpdns/apps/customRecordsCreatePopup.go b/EdgeUser/internal/web/actions/default/httpdns/apps/customRecordsCreatePopup.go
index 5321f10..07fa372 100644
--- a/EdgeUser/internal/web/actions/default/httpdns/apps/customRecordsCreatePopup.go
+++ b/EdgeUser/internal/web/actions/default/httpdns/apps/customRecordsCreatePopup.go
@@ -41,14 +41,14 @@ func (this *CustomRecordsCreatePopupAction) RunGet(params struct {
"id": int64(0),
"domain": domain.GetString("name"),
"lineScope": "china",
- "lineCarrier": "榛樿",
- "lineRegion": "榛樿",
- "lineProvince": "榛樿",
- "lineContinent": "榛樿",
- "lineCountry": "榛樿",
+ "lineCarrier": "默认",
+ "lineRegion": "默认",
+ "lineProvince": "默认",
+ "lineContinent": "默认",
+ "lineCountry": "默认",
"ruleName": "",
"weightEnabled": false,
- "ttl": 30,
+ "ttl": 60,
"isOn": true,
"recordItemsJson": `[{"type":"A","value":"","weight":100}]`,
}
@@ -110,7 +110,7 @@ func (this *CustomRecordsCreatePopupAction) RunPost(params struct {
Must *actions.Must
CSRF *actionutils.CSRF
}) {
- params.Must.Field("appId", params.AppId).Gt(0, "璇烽€夋嫨搴旂敤")
+ params.Must.Field("appId", params.AppId).Gt(0, "请选择应用")
params.Must.Field("domainId", params.DomainId).Gt(0, "请选择所属域名")
params.LineScope = strings.ToLower(strings.TrimSpace(params.LineScope))
@@ -147,19 +147,19 @@ func (this *CustomRecordsCreatePopupAction) RunPost(params struct {
lineContinent := strings.TrimSpace(params.LineContinent)
lineCountry := strings.TrimSpace(params.LineCountry)
if len(lineCarrier) == 0 {
- lineCarrier = "榛樿"
+ lineCarrier = "默认"
}
if len(lineRegion) == 0 {
- lineRegion = "榛樿"
+ lineRegion = "默认"
}
if len(lineProvince) == 0 {
- lineProvince = "榛樿"
+ lineProvince = "默认"
}
if len(lineContinent) == 0 {
- lineContinent = "榛樿"
+ lineContinent = "默认"
}
if len(lineCountry) == 0 {
- lineCountry = "榛樿"
+ lineCountry = "默认"
}
if params.LineScope == "overseas" {
lineCarrier = ""
@@ -242,7 +242,7 @@ func parseRecordItemsJSON(raw string, weightEnabled bool) ([]maps.Map, error) {
weight = 100
}
if weight < 1 || weight > 100 {
- return nil, fmt.Errorf("鏉冮噸鍊煎繀椤诲湪 1-100 涔嬮棿")
+ return nil, fmt.Errorf("权重值必须在 1-100 之间")
}
result = append(result, maps.Map{
diff --git a/EdgeUser/internal/web/actions/default/httpdns/apps/domains.go b/EdgeUser/internal/web/actions/default/httpdns/apps/domains.go
index 44a2aa0..0894b2e 100644
--- a/EdgeUser/internal/web/actions/default/httpdns/apps/domains.go
+++ b/EdgeUser/internal/web/actions/default/httpdns/apps/domains.go
@@ -23,7 +23,6 @@ func (this *DomainsAction) RunGet(params struct {
return
}
- // 鏋勫缓椤堕儴 tabbar
httpdnsutils.AddAppTabbar(this.Parent(), app.GetString("name"), params.AppId, "domains")
domains, err := listDomainMaps(this.Parent(), app.GetInt64("id"), "")
diff --git a/EdgeUser/internal/web/actions/default/httpdns/apps/domainsCreatePopup.go b/EdgeUser/internal/web/actions/default/httpdns/apps/domainsCreatePopup.go
index b8b7386..189bc87 100644
--- a/EdgeUser/internal/web/actions/default/httpdns/apps/domainsCreatePopup.go
+++ b/EdgeUser/internal/web/actions/default/httpdns/apps/domainsCreatePopup.go
@@ -32,7 +32,7 @@ func (this *DomainsCreatePopupAction) RunPost(params struct {
Must *actions.Must
CSRF *actionutils.CSRF
}) {
- params.Must.Field("appId", params.AppId).Gt(0, "璇烽€夋嫨搴旂敤")
+ params.Must.Field("appId", params.AppId).Gt(0, "请选择应用")
params.Must.Field("domain", params.Domain).Require("请输入域名")
err := createDomain(this.Parent(), params.AppId, params.Domain)
diff --git a/EdgeUser/internal/web/actions/default/httpdns/apps/formatters.go b/EdgeUser/internal/web/actions/default/httpdns/apps/formatters.go
index 6f53142..5c52256 100644
--- a/EdgeUser/internal/web/actions/default/httpdns/apps/formatters.go
+++ b/EdgeUser/internal/web/actions/default/httpdns/apps/formatters.go
@@ -47,13 +47,13 @@ func buildLineText(record maps.Map) string {
finalParts := make([]string, 0, len(parts))
for _, part := range parts {
- if len(part) == 0 || part == "榛樿" {
+ if len(part) == 0 || part == "默认" {
continue
}
finalParts = append(finalParts, part)
}
if len(finalParts) == 0 {
- return "榛樿"
+ return "默认"
}
return strings.Join(finalParts, " / ")
}
diff --git a/EdgeUser/internal/web/actions/default/httpdns/apps/rpc_helpers.go b/EdgeUser/internal/web/actions/default/httpdns/apps/rpc_helpers.go
index 6ecd29d..d356644 100644
--- a/EdgeUser/internal/web/actions/default/httpdns/apps/rpc_helpers.go
+++ b/EdgeUser/internal/web/actions/default/httpdns/apps/rpc_helpers.go
@@ -1,6 +1,7 @@
package apps
import (
+ "encoding/json"
"errors"
"strconv"
"strings"
@@ -72,15 +73,14 @@ func findAppMap(parent *actionutils.ParentAction, appDbId int64) (maps.Map, erro
return apps[0], nil
}
-func createApp(parent *actionutils.ParentAction, name string, primaryClusterId int64, backupClusterId int64) (int64, error) {
+func createApp(parent *actionutils.ParentAction, name string, clusterIdsJSON []byte) (int64, error) {
newAppId := "app" + strconv.FormatInt(time.Now().UnixNano()%1_000_000_000_000, 36)
resp, err := parent.RPC().HTTPDNSAppRPC().CreateHTTPDNSApp(parent.UserContext(), &pb.CreateHTTPDNSAppRequest{
- Name: strings.TrimSpace(name),
- AppId: newAppId,
- PrimaryClusterId: primaryClusterId,
- BackupClusterId: backupClusterId,
- IsOn: true,
- SignEnabled: true,
+ Name: strings.TrimSpace(name),
+ AppId: newAppId,
+ ClusterIdsJSON: clusterIdsJSON,
+ IsOn: true,
+ SignEnabled: true,
})
if err != nil {
return 0, err
@@ -95,14 +95,13 @@ func deleteAppByID(parent *actionutils.ParentAction, appDbId int64) error {
return err
}
-func updateAppSettings(parent *actionutils.ParentAction, appDbId int64, name string, primaryClusterId int64, backupClusterId int64, isOn bool, userId int64) error {
+func updateAppSettings(parent *actionutils.ParentAction, appDbId int64, name string, clusterIdsJSON []byte, isOn bool, userId int64) error {
_, err := parent.RPC().HTTPDNSAppRPC().UpdateHTTPDNSApp(parent.UserContext(), &pb.UpdateHTTPDNSAppRequest{
- AppDbId: appDbId,
- Name: strings.TrimSpace(name),
- PrimaryClusterId: primaryClusterId,
- BackupClusterId: backupClusterId,
- IsOn: isOn,
- UserId: userId,
+ AppDbId: appDbId,
+ Name: strings.TrimSpace(name),
+ ClusterIdsJSON: clusterIdsJSON,
+ IsOn: isOn,
+ UserId: userId,
})
return err
}
@@ -264,17 +263,22 @@ func toggleCustomRule(parent *actionutils.ParentAction, ruleId int64, isOn bool)
func appPBToMap(app *pb.HTTPDNSApp, domainCount int64) maps.Map {
signSecret := app.GetSignSecret()
+
+ // 读取集群 ID 列表
+ var clusterIds []int64
+ if len(app.GetClusterIdsJSON()) > 0 {
+ _ = json.Unmarshal(app.GetClusterIdsJSON(), &clusterIds)
+ }
+
return maps.Map{
"id": app.GetId(),
"name": app.GetName(),
"appId": app.GetAppId(),
- "clusterId": app.GetPrimaryClusterId(),
- "primaryClusterId": app.GetPrimaryClusterId(),
- "backupClusterId": app.GetBackupClusterId(),
+ "clusterIds": clusterIds,
"userId": app.GetUserId(),
"isOn": app.GetIsOn(),
"domainCount": domainCount,
- "sniPolicyText": "闅愬尶 SNI",
+ "sniPolicyText": "隐匿 SNI",
"signEnabled": app.GetSignEnabled(),
"signSecretPlain": signSecret,
"signSecretMasked": maskSecret(signSecret),
@@ -285,7 +289,7 @@ func appPBToMap(app *pb.HTTPDNSApp, domainCount int64) maps.Map {
func defaultLineField(value string) string {
value = strings.TrimSpace(value)
if len(value) == 0 {
- return "榛樿"
+ return "默认"
}
return value
}
diff --git a/EdgeUser/internal/web/actions/default/httpdns/resolveLogs/index.go b/EdgeUser/internal/web/actions/default/httpdns/resolveLogs/index.go
index c63c297..b61403b 100644
--- a/EdgeUser/internal/web/actions/default/httpdns/resolveLogs/index.go
+++ b/EdgeUser/internal/web/actions/default/httpdns/resolveLogs/index.go
@@ -1,6 +1,7 @@
package resolveLogs
import (
+ "encoding/json"
"strings"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
@@ -45,8 +46,29 @@ func (this *IndexAction) RunGet(params struct {
clusterDomainMap := map[int64]string{}
for _, cluster := range clusterResp.GetClusters() {
serviceDomain := strings.TrimSpace(cluster.GetServiceDomain())
- displayName := serviceDomain
- if len(displayName) == 0 {
+
+ port := "443"
+ if rawTLS := cluster.GetTlsPolicyJSON(); len(rawTLS) > 0 {
+ var tlsConfig map[string]interface{}
+ if err := json.Unmarshal(rawTLS, &tlsConfig); err == nil {
+ if listenRaw, ok := tlsConfig["listen"]; ok && listenRaw != nil {
+ if data, err := json.Marshal(listenRaw); err == nil {
+ var listenAddresses []map[string]interface{}
+ if err := json.Unmarshal(data, &listenAddresses); err == nil {
+ if len(listenAddresses) > 0 {
+ if portRange, ok := listenAddresses[0]["portRange"].(string); ok && len(portRange) > 0 {
+ port = portRange
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ apiAddress := "https://" + serviceDomain + ":" + port
+
+ displayName := apiAddress
+ if len(serviceDomain) == 0 {
displayName = cluster.GetName()
}
@@ -56,7 +78,7 @@ func (this *IndexAction) RunGet(params struct {
"serviceDomain": serviceDomain,
"displayName": displayName,
})
- clusterDomainMap[cluster.GetId()] = serviceDomain
+ clusterDomainMap[cluster.GetId()] = apiAddress
}
this.Data["clusters"] = clusters
diff --git a/EdgeUser/internal/web/actions/default/httpdns/sandbox/index.go b/EdgeUser/internal/web/actions/default/httpdns/sandbox/index.go
index 07b4ae1..316b8cd 100644
--- a/EdgeUser/internal/web/actions/default/httpdns/sandbox/index.go
+++ b/EdgeUser/internal/web/actions/default/httpdns/sandbox/index.go
@@ -1,6 +1,7 @@
package sandbox
import (
+ "encoding/json"
"strings"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
@@ -28,8 +29,29 @@ func (this *IndexAction) RunGet(params struct{}) {
clusters := make([]maps.Map, 0, len(clusterResp.GetClusters()))
for _, cluster := range clusterResp.GetClusters() {
serviceDomain := strings.TrimSpace(cluster.GetServiceDomain())
- displayName := serviceDomain
- if len(displayName) == 0 {
+
+ port := "443"
+ if rawTLS := cluster.GetTlsPolicyJSON(); len(rawTLS) > 0 {
+ var tlsConfig map[string]interface{}
+ if err := json.Unmarshal(rawTLS, &tlsConfig); err == nil {
+ if listenRaw, ok := tlsConfig["listen"]; ok && listenRaw != nil {
+ if data, err := json.Marshal(listenRaw); err == nil {
+ var listenAddresses []map[string]interface{}
+ if err := json.Unmarshal(data, &listenAddresses); err == nil {
+ if len(listenAddresses) > 0 {
+ if portRange, ok := listenAddresses[0]["portRange"].(string); ok && len(portRange) > 0 {
+ port = portRange
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ apiAddress := "https://" + serviceDomain + ":" + port
+
+ displayName := apiAddress
+ if len(serviceDomain) == 0 {
displayName = cluster.GetName()
}
clusters = append(clusters, maps.Map{
@@ -59,14 +81,18 @@ func (this *IndexAction) RunGet(params struct{}) {
for _, domain := range domainResp.GetDomains() {
domains = append(domains, domain.GetDomain())
}
+ // 解析集群ID列表
+ var clusterIds []int64
+ if len(app.GetClusterIdsJSON()) > 0 {
+ _ = json.Unmarshal(app.GetClusterIdsJSON(), &clusterIds)
+ }
+
apps = append(apps, maps.Map{
- "id": app.GetId(),
- "name": app.GetName(),
- "appId": app.GetAppId(),
- "clusterId": app.GetPrimaryClusterId(),
- "primaryClusterId": app.GetPrimaryClusterId(),
- "backupClusterId": app.GetBackupClusterId(),
- "domains": domains,
+ "id": app.GetId(),
+ "name": app.GetName(),
+ "appId": app.GetAppId(),
+ "clusterIds": clusterIds,
+ "domains": domains,
})
}
this.Data["apps"] = apps
diff --git a/EdgeUser/internal/web/actions/default/httpdns/sandbox/test.go b/EdgeUser/internal/web/actions/default/httpdns/sandbox/test.go
index 508114f..997ad05 100644
--- a/EdgeUser/internal/web/actions/default/httpdns/sandbox/test.go
+++ b/EdgeUser/internal/web/actions/default/httpdns/sandbox/test.go
@@ -3,6 +3,7 @@ package sandbox
import (
"crypto/hmac"
"crypto/sha256"
+ "encoding/json"
"encoding/hex"
"net/url"
"strconv"
@@ -52,12 +53,30 @@ func (this *TestAction) RunPost(params struct {
}
clusterDomain := ""
+ port := "443"
if params.ClusterId > 0 {
clusterResp, findErr := this.RPC().HTTPDNSClusterRPC().FindAllHTTPDNSClusters(this.UserContext(), &pb.FindAllHTTPDNSClustersRequest{})
if findErr == nil {
for _, cluster := range clusterResp.GetClusters() {
if cluster.GetId() == params.ClusterId {
clusterDomain = strings.TrimSpace(cluster.GetServiceDomain())
+ if rawTLS := cluster.GetTlsPolicyJSON(); len(rawTLS) > 0 {
+ var tlsConfig map[string]interface{}
+ if err := json.Unmarshal(rawTLS, &tlsConfig); err == nil {
+ if listenRaw, ok := tlsConfig["listen"]; ok && listenRaw != nil {
+ if data, err := json.Marshal(listenRaw); err == nil {
+ var listenAddresses []map[string]interface{}
+ if err := json.Unmarshal(data, &listenAddresses); err == nil {
+ if len(listenAddresses) > 0 {
+ if portRange, ok := listenAddresses[0]["portRange"].(string); ok && len(portRange) > 0 {
+ port = portRange
+ }
+ }
+ }
+ }
+ }
+ }
+ }
break
}
}
@@ -83,7 +102,7 @@ func (this *TestAction) RunPost(params struct {
query.Set("nonce", nonce)
query.Set("sign", sign)
}
- requestURL := "https://" + clusterDomain + "/resolve?" + query.Encode()
+ requestURL := "https://" + clusterDomain + ":" + port + "/resolve?" + query.Encode()
resultCode := 1
if strings.EqualFold(resp.GetCode(), "SUCCESS") {
diff --git a/EdgeUser/internal/web/helpers/user_must_auth.go b/EdgeUser/internal/web/helpers/user_must_auth.go
index 0ad9358..7efd70d 100644
--- a/EdgeUser/internal/web/helpers/user_must_auth.go
+++ b/EdgeUser/internal/web/helpers/user_must_auth.go
@@ -430,9 +430,7 @@ func (this *userMustAuth) modules(userId int64, isVerified bool, isIdentified bo
"code": "httpdns",
"name": "HTTPDNS",
"icon": "shield alternate",
- "isOn": registerConfig != nil &&
- registerConfig.HTTPDNSIsOn &&
- lists.ContainsString(featureCodes, userconfigs.UserFeatureCodeHTTPDNS),
+ "isOn": lists.ContainsString(featureCodes, userconfigs.UserFeatureCodeHTTPDNS),
"subItems": []maps.Map{
{
"name": "应用管理",
diff --git a/EdgeUser/web/views/@default/httpdns/apps/appSettings.html b/EdgeUser/web/views/@default/httpdns/apps/appSettings.html
index db09696..dd3e861 100644
--- a/EdgeUser/web/views/@default/httpdns/apps/appSettings.html
+++ b/EdgeUser/web/views/@default/httpdns/apps/appSettings.html
@@ -86,30 +86,31 @@
App ID
{{settings.appId}}
-
+
- 主服务域名
+ 服务地址
- {{settings.primaryServiceDomain}}
- 未配置
-
-
-
-
- 备用服务域名
-
- {{settings.backupServiceDomain}}
- 未配置
-
+
+ 未配置集群
请求验签
- {{settings.signEnabled ? "已开启" : "已关闭"}}
- {{settings.signEnabled ? "关闭请求验签" : "开启请求验签"}}
+ {{settings.signEnabled
+ ? "已开启" : "已关闭"}}
+ {{settings.signEnabled ? "关闭请求验签" : "开启请求验签"}}
@@ -118,9 +119,14 @@
{{signSecretVisible ? settings.signSecretPlain : settings.signSecretMasked}}
-
-
-
+
+
+
@@ -131,4 +137,4 @@
-
+
\ No newline at end of file
diff --git a/EdgeUser/web/views/@default/httpdns/apps/customRecordsCreatePopup.js b/EdgeUser/web/views/@default/httpdns/apps/customRecordsCreatePopup.js
index edfd5a7..e8bc6a0 100644
--- a/EdgeUser/web/views/@default/httpdns/apps/customRecordsCreatePopup.js
+++ b/EdgeUser/web/views/@default/httpdns/apps/customRecordsCreatePopup.js
@@ -18,15 +18,18 @@
"西南": ["默认", "重庆", "四川", "贵州", "云南", "西藏"]
};
- vm.continents = ["默认", "非洲", "南极洲", "亚洲", "欧洲", "北美洲", "南美洲", "大洋洲"];
+ vm.continents = ["默认", "亚洲", "欧洲", "北美洲", "南美洲", "非洲", "大洋洲"];
vm.continentCountries = {
"默认": ["默认"],
- "非洲": ["默认", "南非", "埃及", "尼日利亚", "肯尼亚", "摩洛哥"],
- "南极洲": ["默认"],
- "亚洲": ["默认", "中国香港", "中国澳门", "中国台湾", "日本", "韩国", "新加坡", "印度", "泰国", "越南"],
- "欧洲": ["默认", "德国", "英国", "法国", "荷兰", "西班牙", "意大利", "俄罗斯"],
- "北美洲": ["默认", "美国", "加拿大", "墨西哥"],
- "南美洲": ["默认", "巴西", "阿根廷", "智利", "哥伦比亚"],
+ "亚洲": ["默认", "中国香港", "中国澳门", "中国台湾", "日本", "韩国", "新加坡", "印度", "泰国", "越南",
+ "印度尼西亚", "马来西亚", "菲律宾", "柬埔寨", "缅甸", "老挝", "斯里兰卡", "孟加拉国", "巴基斯坦", "尼泊尔",
+ "阿联酋", "沙特阿拉伯", "土耳其", "以色列", "伊朗", "伊拉克", "卡塔尔", "科威特", "蒙古"],
+ "欧洲": ["默认", "德国", "英国", "法国", "荷兰", "西班牙", "意大利", "俄罗斯",
+ "波兰", "瑞典", "瑞士", "挪威", "芬兰", "丹麦", "葡萄牙", "爱尔兰", "比利时", "奥地利",
+ "乌克兰", "捷克", "罗马尼亚", "匈牙利", "希腊"],
+ "北美洲": ["默认", "美国", "加拿大", "墨西哥", "巴拿马", "哥斯达黎加", "古巴"],
+ "南美洲": ["默认", "巴西", "阿根廷", "智利", "哥伦比亚", "秘鲁", "委内瑞拉", "厄瓜多尔"],
+ "非洲": ["默认", "南非", "埃及", "尼日利亚", "肯尼亚", "摩洛哥", "阿尔及利亚", "坦桑尼亚", "埃塞俄比亚", "加纳", "突尼斯"],
"大洋洲": ["默认", "澳大利亚", "新西兰"]
};
diff --git a/EdgeUser/web/views/@default/httpdns/apps/domains.html b/EdgeUser/web/views/@default/httpdns/apps/domains.html
index dc0d770..7baf7a7 100644
--- a/EdgeUser/web/views/@default/httpdns/apps/domains.html
+++ b/EdgeUser/web/views/@default/httpdns/apps/domains.html
@@ -58,5 +58,5 @@
-当前应用尚未绑定域名。
-没有匹配的域名。
+当前应用尚未绑定域名。
+没有匹配的域名。
diff --git a/EdgeUser/web/views/@default/httpdns/apps/domains.js b/EdgeUser/web/views/@default/httpdns/apps/domains.js
index b73b035..cc5678b 100644
--- a/EdgeUser/web/views/@default/httpdns/apps/domains.js
+++ b/EdgeUser/web/views/@default/httpdns/apps/domains.js
@@ -1,4 +1,6 @@
Tea.context(function () {
+ var that = this;
+
if (typeof this.keywordInput == "undefined" || this.keywordInput == null) {
this.keywordInput = "";
}
@@ -13,30 +15,29 @@
this.keywordInput = String(this.keyword);
this.doSearch = function () {
- this.keyword = String(this.keywordInput || "").trim();
+ that.keyword = String(that.keywordInput || "").trim();
};
this.clearSearch = function () {
- this.keywordInput = "";
- this.keyword = "";
+ that.keywordInput = "";
+ that.keyword = "";
};
this.filteredDomains = function () {
- let domains = Array.isArray(this.domains) ? this.domains : [];
- let keyword = String(this.keyword || "").trim().toLowerCase();
+ let keyword = (that.keyword || "").trim().toLowerCase();
if (keyword.length == 0) {
- return domains;
+ return that.domains || [];
}
- return domains.filter(function (domain) {
+ return (that.domains || []).filter(function (domain) {
let name = (domain.name || "").toLowerCase();
return name.indexOf(keyword) >= 0;
});
};
this.bindDomain = function () {
- teaweb.popup("/httpdns/apps/domains/createPopup?appId=" + this.app.id, {
- height: "24em",
- width: "46em",
+ teaweb.popup("/httpdns/apps/domains/createPopup?appId=" + that.app.id, {
+ height: "12em",
+ width: "36em",
title: "添加域名",
callback: function () {
teaweb.success("保存成功", function () {
diff --git a/EdgeUser/web/views/@default/httpdns/apps/policies.html b/EdgeUser/web/views/@default/httpdns/apps/policies.html
deleted file mode 100644
index 0471258..0000000
--- a/EdgeUser/web/views/@default/httpdns/apps/policies.html
+++ /dev/null
@@ -1,78 +0,0 @@
-{$layout}
-{$template "menu"}
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/EdgeUser/web/views/@default/httpdns/apps/policies.js b/EdgeUser/web/views/@default/httpdns/apps/policies.js
deleted file mode 100644
index dc96d3c..0000000
--- a/EdgeUser/web/views/@default/httpdns/apps/policies.js
+++ /dev/null
@@ -1,40 +0,0 @@
-Tea.context(function () {
- this.success = NotifyReloadSuccess("保存成功");
-
- this.$delay(function () {
- this.$watch("policies.defaultSniPolicy", function (level) {
- if (level == "level1" || level == "level2") {
- this.policies.ecsMode = "off";
- this.policies.pinningMode = "off";
- this.policies.sanMode = "off";
- return;
- }
-
- if (level == "level3") {
- if (this.policies.ecsMode == "off") {
- this.policies.ecsMode = "auto";
- }
- if (this.policies.pinningMode == "off") {
- this.policies.pinningMode = "report";
- }
- if (this.policies.sanMode == "off") {
- this.policies.sanMode = "strict";
- }
- }
- });
-
- this.$watch("policies.ecsMode", function (mode) {
- if (this.policies.defaultSniPolicy != "level3") {
- return;
- }
- if (mode == "custom") {
- if (!this.policies.ecsIPv4Prefix || this.policies.ecsIPv4Prefix <= 0) {
- this.policies.ecsIPv4Prefix = 24;
- }
- if (!this.policies.ecsIPv6Prefix || this.policies.ecsIPv6Prefix <= 0) {
- this.policies.ecsIPv6Prefix = 56;
- }
- }
- });
- });
-});
diff --git a/EdgeUser/web/views/@default/httpdns/resolveLogs/index.html b/EdgeUser/web/views/@default/httpdns/resolveLogs/index.html
index 4332cdd..4bfc158 100644
--- a/EdgeUser/web/views/@default/httpdns/resolveLogs/index.html
+++ b/EdgeUser/web/views/@default/httpdns/resolveLogs/index.html
@@ -20,7 +20,7 @@
- [HTTPDNS服务域名]
+ [API服务地址]
{{cluster.displayName}}
@@ -60,7 +60,7 @@
- HTTPDNS服务域名
+ API服务地址
域名
类型
概要
@@ -91,4 +91,4 @@
-
+
\ No newline at end of file
diff --git a/EdgeUser/web/views/@default/httpdns/sandbox/index.html b/EdgeUser/web/views/@default/httpdns/sandbox/index.html
index b21b89d..ffb8af1 100644
--- a/EdgeUser/web/views/@default/httpdns/sandbox/index.html
+++ b/EdgeUser/web/views/@default/httpdns/sandbox/index.html
@@ -17,10 +17,11 @@
- HTTPDNS服务域名 *
+ API服务地址 *
- [请选择HTTPDNS服务域名]
- {{cluster.displayName || cluster.name}}
+ [请选择API服务地址]
+ {{cluster.displayName
+ || cluster.name}}
@@ -98,7 +99,8 @@
客户端 IP
- {{response.data.client_ip || request.clientIp || '-'}}
+
{{response.data.client_ip || request.clientIp || '-'}}
+
@@ -144,4 +146,4 @@
-
+
\ No newline at end of file
diff --git a/EdgeUser/web/views/@default/httpdns/sandbox/index.js b/EdgeUser/web/views/@default/httpdns/sandbox/index.js
index 5fe7260..0fb9b6f 100644
--- a/EdgeUser/web/views/@default/httpdns/sandbox/index.js
+++ b/EdgeUser/web/views/@default/httpdns/sandbox/index.js
@@ -58,8 +58,7 @@
this.request.domain = ""
}
- let primaryClusterId = (typeof selectedApp.primaryClusterId !== "undefined" && selectedApp.primaryClusterId !== null) ? Number(selectedApp.primaryClusterId) : 0
- let backupClusterId = (typeof selectedApp.backupClusterId !== "undefined" && selectedApp.backupClusterId !== null) ? Number(selectedApp.backupClusterId) : 0
+ let appClusterIds = Array.isArray(selectedApp.clusterIds) ? selectedApp.clusterIds.map(Number) : []
let allowed = []
for (let i = 0; i < this.clusters.length; i++) {
@@ -68,7 +67,7 @@
if (clusterId <= 0) {
continue
}
- if (clusterId === primaryClusterId || clusterId === backupClusterId) {
+ if (appClusterIds.indexOf(clusterId) >= 0) {
allowed.push(cluster)
}
}
@@ -120,7 +119,7 @@
return
}
if (this.request.clusterId.length === 0) {
- teaweb.warn("当前应用未绑定可用的 HTTPDNS 服务域名,请先在应用设置中配置主/备集群")
+ teaweb.warn("当前应用未绑定可用集群,请先在应用设置中配置所属集群")
return
}
if (this.request.domain.length === 0) {
diff --git a/GoEdge HTTPDNS 技术需求文档v2.5(1).docx b/GoEdge HTTPDNS 技术需求文档v2.5(1).docx
deleted file mode 100644
index b9ad124..0000000
Binary files a/GoEdge HTTPDNS 技术需求文档v2.5(1).docx and /dev/null differ
diff --git a/GoEdge HTTPDNS 技术需求文档v2.5(1).md b/GoEdge HTTPDNS 技术需求文档v2.5(1).md
deleted file mode 100644
index 4fe8895..0000000
--- a/GoEdge HTTPDNS 技术需求文档v2.5(1).md
+++ /dev/null
@@ -1,314 +0,0 @@
-# GoEdge HTTPDNS 技术需求文档v2.5
-
-## 1. 文档概览
-
-### 1.1 背景
-
-目前 GoEdge 已经具备了强大的边缘缓存、WAF 和基础 DNS
-功能。但在移动端应用中,传统的 UDP DNS
-容易受到运营商劫持。此外,即便使用了 HTTPDNS,HTTPS 握手阶段明文传输的
-**SNI (Server Name Indication)** 字段仍会导致真实域名被 ISP
-嗅探、封锁或审计。
-
-### 1.2 目标
-
-开发独立的 **edge-httpdns** 模块,并配合边缘节点提供一套对 App
-业务透明、可渐进演进的 **「SNI
-隐藏能力」**,解决域名旁路感知问题,满足金融、出海等隐私敏感业务的合规与安全对抗需求。
-
-## 2. 业务架构设计
-
-{width="6.5in" height="3.513888888888889in"}
-
-### 2.1 角色定义
-
-- **管理端 (edge-admin/edge-user)**:
-
- - **配置中心**:管理 AppID/Secret,下发解析路由策略及 **SNI
- > 隐藏等级策略**。
-
- - **凭证中心**:复用第三方 DNS 运营商的 API 凭证。
-
-- **HTTPDNS 节点 (edge-httpdns)**:独立解析网关,支持
- > IPv4/IPv6、批量解析、ECS 透传,并下发 **TLS 指纹/证书校验策略**。
-
-- **权威 DNS 节点 (edge-dns)**:处理传统 Port 53 的 DNS 请求。
-
-- **边缘节点 (edge-node)**:流量网关,支持 **SNI 与 Host
- > 解耦路由**,执行 WAF 动态验签及 **SNI 隐匿/ECH 解密** 逻辑。
-
-## 3. 功能需求
-
-### 3.1 管理端配置 (Admin/User)
-
-- **SNI 隐藏平台管理**:
-
- - **能力级别选择**:支持 Level 1(固定 SNI)、Level 2(隐匿
- > SNI)、Level 3(ECH)。
-
- - **公共 SNI 域名池**:配置用于伪装的 Public SNI 域名及证书。
-
- - **证书校验策略**:配置是否开启证书 Pinning 或 SAN 域名强制校验。
-
-- **常规配置**:AppID 认证管理、ECS 掩码配置、第三方 DNS 凭证复用。
-
-### 3.2 节点 API 接口
-
-- **Endpoint**: https://httpdns.example.com/resolve
-
-- **新增返回字段**:
-
- - sni_policy: 隐藏等级(none/mask/empty/ech)。
-
- - public_sni: 当级别为 mask 时下发的伪装域名。
-
- - cert_fingerprint: 用于证书绑定的公钥指纹。
-
-## 4. 技术实现方案 (Go)
-
-### 4.1 边缘节点 SNI 路由解耦逻辑
-
-边缘节点需修改 TLS 接入层,支持不依赖 SNI 的握手逻辑。
-
-// 运行在 edge-node TLS 接入层\
-func (this \*TLSEngine) HandleHandshake(conn \*tls.Conn) {\
-clientHello := conn.GetClientHello()\
-\
-// 逻辑:如果 SNI 为空或为公共伪装域名\
-if clientHello.ServerName == \"\" \|\|
-isPublicSNI(clientHello.ServerName) {\
-// 1. 使用默认证书或公共 SNI 证书完成握手\
-// 2. 握手完成后,进入 HTTP 处理器\
-// 3. 从加密的 HTTP Header 中提取真实 Host\
-realHost := extractRealHost(conn)\
-\
-// 4. 将请求路由至对应域名的虚拟主机/WAF\
-this.RouteToVirtualHost(realHost, conn)\
-}\
-}
-
-### 4.2 携带终端 IP 的外部递归查询 (ECS 实现)
-
-当本地无自定义解析时,HTTPDNS 模块需向外部 DNS 发起带终端 IP
-信息的递归查询,以确保调度精准。
-
-import (\
-\"\[github.com/miekg/dns\](https://github.com/miekg/dns)\"\
-\"net\"\
-)\
-\
-// 携带 ECS 选项向外部 DNS 发起查询\
-func (s \*HTTPDNSService) ResolveWithECS(host string, clientIP string)
-(\[\]string, uint32) {\
-m := new(dns.Msg)\
-m.SetQuestion(dns.Fqdn(host), dns.TypeA)\
-\
-// 构造 EDNS0 子网选项 (RFC 7871)\
-opt := new(dns.OPT)\
-opt.Hdr.Name = \".\"\
-opt.Hdr.Rrtype = dns.TypeOPT\
-\
-e := new(dns.EDNS0_SUBNET)\
-e.Code = dns.EDNS0SUBNET\
-e.Family = 1 // IPv4\
-\
-// 隐私掩码处理:IPv4 抹除后 8 位 (/24),IPv6 抹除后 72 位 (/56)\
-e.SourceNetmask = 24\
-e.SourceScope = 0\
-e.Address = net.ParseIP(clientIP).To4()\
-\
-opt.Option = append(opt.Option, e)\
-m.Extra = append(m.Extra, opt)\
-\
-// 发送到上游权威 DNS\
-c := new(dns.Client)\
-in, \_, err := c.Exchange(m, \"8.8.8.8:53\")\
-if err != nil \|\| in.Rcode != dns.RcodeSuccess {\
-return nil, 0\
-}\
-\
-var ips \[\]string\
-var minTTL uint32 = 300\
-for \_, ans := range in.Answer {\
-if a, ok := ans.(\*dns.A); ok {\
-ips = append(ips, a.A.String())\
-minTTL = a.Header().Ttl\
-}\
-}\
-return ips, minTTL\
-}
-
-## 5. 安全性需求 (Security)
-
-### 5.1 动态指纹与防重放
-
-- 业务请求必须携带 HMAC-SHA256 签名,强制 5
- > 分钟时间窗口校验。算法:Hex(HMAC_SHA256(Secret, AppID +
- > Timestamp + Path))。
-
-### 5.2 SNI 隐藏安全收益
-
-- **防嗅探**:旁路观察者(ISP/中间人)无法通过 TLS ClientHello
- > 识别真实业务域名。
-
-- **防封锁**:有效对抗基于域名的封锁、限速和审计。
-
-## 6. 监控与日志
-
-- **SNI 使用率统计**:记录明文/伪装/隐匿 SNI 的比例。
-
-- **TLS 成功率指标**:监控不同 SNI 策略对连接成功率的影响。
-
-## 7. 终端 SDK 需求 (iOS/Android/Flutter)
-
-### 7.1 核心解析与缓存
-
-- **双级缓存**:内存+加密持久化存储。
-
-- **软过期策略**:优先返回过期缓存,后台异步更新,保证业务 0 延迟。
-
-### 7.2 连接管理与 TLS 控制 (关键:SNI 隐藏)
-
-SDK 必须支持 IP 直连,并在 TLS 握手阶段根据服务端下发的策略控制 SNI。
-
-#### 7.2.1 Android 实现 (OkHttp)
-
-通过自定义 SSLSocketFactory 或 HostnameVerifier 来控制 SNI 置空。
-
-class GoEdgeHttpDnsInterceptor(val appId: String, val secret: String) :
-Interceptor {\
-override fun intercept(chain: Interceptor.Chain): Response {\
-val originalRequest = chain.request()\
-val host = originalRequest.url.host\
-val nodeIp = HttpDnsManager.resolve(host) ?: return
-chain.proceed(originalRequest)\
-\
-// 1. 替换为 IP 地址\
-val newUrl = originalRequest.url.newBuilder().host(nodeIp).build()\
-val ts = System.currentTimeMillis() / 1000\
-val token = calcHmac(secret,
-\"\$appId\$ts\${originalRequest.url.encodedPath}\")\
-\
-val newRequest = originalRequest.newBuilder()\
-.url(newUrl)\
-.header(\"Host\", host) // 必须手动设回原始 Host\
-.header(\"X-GE-AppID\", appId)\
-.header(\"X-GE-Timestamp\", ts.toString())\
-.header(\"X-GE-Token\", token)\
-.build()\
-\
-// 2. 特殊处理:置空 SNI (Level 2)\
-// 注意:在 OkHttp 中,若使用 IP 直连,默认 SNI 会是 IP 地址。\
-// 为实现 SNI 隐藏,需在自定义 SSLSocketFactory 中将 peerHost 设为 null
-或 Public SNI。\
-return chain.proceed(newRequest)\
-}\
-}
-
-#### 7.2.2 iOS 实现 (Swift/URLSession)
-
-利用 URLSessionDelegate 接管握手过程。
-
-class GoEdgeSessionDelegate: NSObject, URLSessionTaskDelegate {\
-func urlSession(\_ session: URLSession, task: URLSessionTask, didReceive
-challenge: URLAuthenticationChallenge, completionHandler: \@escaping
-(URLSession.AuthChallengeDisposition, URLCredential?) -\> Void) {\
-if challenge.protectionSpace.authenticationMethod ==
-NSURLAuthenticationMethodServerTrust {\
-let serverTrust = challenge.protectionSpace.serverTrust!\
-\
-// SNI 隐藏逻辑:App 内部维护一个 Host 映射\
-// 苹果底层 Network.framework 在使用 IP 直连时可能不发送 SNI\
-// 我们在此处验证证书是否包含原始域名 (api.example.com)\
-let originalHost = \"api.example.com\"\
-let policies = \[SecPolicyCreateSSL(true, originalHost as CFString)\]\
-SecTrustSetPolicies(serverTrust, policies as CFArray)\
-\
-completionHandler(.useCredential, URLCredential(trust: serverTrust))\
-}\
-}\
-}
-
-#### 7.2.3 Flutter 实现 (Dio)
-
-通过自定义 HttpClientAdapter 实现 IP 直连与 SNI 控制。
-
-(dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate =
-(client) {\
-client.findProxy = (uri) => \"DIRECT\";\
-client.badCertificateCallback = (cert, host, port) {\
-// 在 IP 直连模式下,这里的 host 是 IP\
-// 我们需要验证证书中的 SAN 是否包含原始域名\
-return true;\
-};\
-};\
-\
-// 拦截器注入\
-dio.interceptors.add(InterceptorsWrapper(\
-onRequest: (options, handler) async {\
-final originalHost = options.uri.host;\
-final nodeIp = await httpDns.resolve(originalHost);\
-if (nodeIp != null) {\
-options.path = options.path.replaceFirst(originalHost, nodeIp);\
-options.headers\[\"Host\"\] = originalHost; // 注入加密 Host\
-// \... 注入 X-GE-Token 等动态指纹\
-}\
-handler.next(options);\
-}\
-));
-
-## 8. 故障感知与 IP 切换
-
-1. **Happy Eyeballs**:IPv4/IPv6 竞速。
-
-2. **本地熔断**:单 IP 故障标记为黑名单,5 分钟内不使用。
-
-## 9. App 端集成工作流程
-
-1. **启动校准** -\> 2. **预解析** -\> 3. **业务请求(根据策略置空
- > SNI)** -\> 4. **WAF 验签与路由** -\> 5. **质量上报**。
-
-## 10. 前置条件与域名接入要求
-
-- **回源与接入**:业务域名必须在 GoEdge 管理后台配置完成。
-
-- **多证书管理**:边缘节点需部署业务证书及公共 SNI 伪装证书。
-
-## 11. iOS SDK 合规与审核注意事项
-
-- **隐私清单**:声明不收集用户设备指纹。
-
-- **ATS 策略**:解析接口强制 HTTPS。
-
-## 12. 域名/IP 被封锁场景容灾
-
-- **种子 IP**:SDK 内置原生 IP。
-
-- **白域名伪装**:当 SNI 阻断严重时,使用合法白域名进行 TLS 握手伪装。
-
-## 13. HTTPDNS 服务高可用 (HA) 解决方案
-
-- **Anycast/GSLB** 解析节点路由。
-
-- **分级降级**:API 域名 -\> 种子 IP -\> 备用域名 -\> LocalDNS。
-
-## 14. SNI 隐藏能力分级设计 (Capability Levels)
-
-- **Level 1 (基础)**:Public SNI 伪装。
-
-- **Level 2 (核心)**:IP 直连 + SNI 置空 + 加密 Host 路由。
-
-- **Level 3 (前瞻)**:ECH (Encrypted ClientHello)。
-
-## 15. 里程碑规划
-
-- **P1**:HTTPDNS 基础 + 固定 SNI。
-
-- **P2**:IP 直连 + SNI 置空控制。
-
-- **P3**:ECH 支持。
-
-**结语:**
-
-本方案通过将 HTTPDNS 与 SNI 隐藏能力有机结合,构建了覆盖 DNS、TLS、CDN
-和 SDK 的全链路隐私保护体系,确保业务在复杂网络环境下兼顾安全与稳定。
diff --git a/data/httpdns/sdk/httpdns-sdk-android-v1.0.0.md b/data/httpdns/sdk/httpdns-sdk-android-v1.0.0.md
deleted file mode 100644
index 129d04d..0000000
--- a/data/httpdns/sdk/httpdns-sdk-android-v1.0.0.md
+++ /dev/null
@@ -1,204 +0,0 @@
-# DeepAudit 安全审计报告
-
----
-
-## 报告信息
-
-| 属性 | 内容 |
-|----------|-------|
-| **项目名称** | cloudwaf |
-| **任务 ID** | `b3b752be...` |
-| **生成时间** | 2026-01-18 04:30:22 |
-| **任务状态** | COMPLETED |
-| **耗时** | 21.7 分钟 |
-
-## 执行摘要
-
-**安全评分: 0/100** [未通过]
-*严重 - 需要立即进行修复*
-
-### 漏洞发现概览
-
-| 严重程度 | 数量 | 已验证 |
-|----------|-------|----------|
-| **高危 (HIGH)** | 7 | 0 |
-| **中危 (MEDIUM)** | 1 | 0 |
-| **总计** | 8 | 0 |
-
-### 审计指标
-
-- **分析文件数:** 9265 / 9265
-- **Agent 迭代次数:** 5
-- **工具调用次数:** 3
-- **Token 消耗:** 11,437
-
-## 高危 (High) 漏洞
-
-### HIGH-1: 安装过程中敏感信息泄露
-
-**[未验证]** | 类型: `hardcoded_secret`
-
-**AI 置信度:** 95%
-
-**漏洞描述:**
-
-setup() 函数将生成的 adminNodeSecret 明文输出到标准输出,攻击者可以通过查看安装日志或控制台输出来获取该敏感信息。
-
-**漏洞代码:**
-
-```python
-fmt.Println("Admin Node Secret:", adminNodeSecret)
-```
-
-**修复建议:**
-
-1. 不要将敏感信息输出到标准输出;2. 将秘密安全地存储到配置文件中;3. 使用安全的秘密分发机制。
-
----
-
-### HIGH-2: Socket通信缺乏认证机制
-
-**[未验证]** | 类型: `auth_bypass`
-
-**AI 置信度:** 90%
-
-**漏洞描述:**
-
-gosock.NewSock 创建的 Unix domain socket 没有认证机制,任何能访问 /tmp/edge-api.sock 文件的进程都可以发送 stop 和 restart 命令,导致未授权服务停止或重启。
-
-**漏洞代码:**
-
-```python
-sock := gosock.NewSock("/tmp/edge-api.sock")
-```
-
-**修复建议:**
-
-1. 为 socket 通信添加认证令牌;2. 限制 socket 文件的权限(如仅限特定用户或组访问);3. 验证命令来源。
-
----
-
-### HIGH-3: EdgeAPI/cmd/edge-api/main.go:148 - 读取issues.log文件,可能存在路径遍历风险
-
-**[未验证]** | 类型: `path_traversal`
-
-**AI 置信度:** 60%
-
-**漏洞描述:**
-
-EdgeAPI/cmd/edge-api/main.go:148 - 读取issues.log文件,可能存在路径遍历风险
-
----
-
-### HIGH-4: EdgeAPI/cmd/edge-api/main.go:92-102 - 使用socket通信,可能存在未授权访问风险
-
-**[未验证]** | 类型: `other`
-
-**AI 置信度:** 60%
-
-**漏洞描述:**
-
-EdgeAPI/cmd/edge-api/main.go:92-102 - 使用socket通信,可能存在未授权访问风险
-
----
-
-### HIGH-5: SQL注入漏洞
-
-**[未验证]** | 类型: `sql_injection`
-
-**AI 置信度:** 95%
-
-**漏洞描述:**
-
-使用 fmt.Sprintf 将用户输入的 name 直接拼接到 SQL 查询中,攻击者可以注入恶意 SQL 代码。
-
-**漏洞代码:**
-
-```python
-query := fmt.Sprintf("SELECT * FROM users WHERE name='%s'", name)
-```
-
-**修复建议:**
-
-使用参数化查询:db.Query("SELECT * FROM users WHERE name=?", name)
-
----
-
-### HIGH-6: 服务器端请求伪造(SSRF)
-
-**[未验证]** | 类型: `ssrf`
-
-**AI 置信度:** 90%
-
-**漏洞描述:**
-
-http.Get(url) 直接使用用户提供的 URL,没有进行验证或过滤,攻击者可以请求内部网络资源。
-
-**漏洞代码:**
-
-```python
-resp, err := http.Get(url)
-```
-
-**修复建议:**
-
-1. 验证 URL 的协议(仅允许 http/https);2. 使用白名单验证域名;3. 禁用对内部 IP 地址的请求。
-
----
-
-### HIGH-7: 硬编码密钥泄露
-
-**[未验证]** | 类型: `hardcoded_secret`
-
-**AI 置信度:** 100%
-
-**漏洞描述:**
-
-配置文件中包含硬编码的 AWS 访问密钥、通用密钥和 JWT 密钥,这些密钥可能被泄露。
-
-**漏洞代码:**
-
-```python
-AKIAIOSFODNN7EXAMPLE
-```
-
-**修复建议:**
-
-1. 从配置文件中移除硬编码密钥;2. 使用环境变量或密钥管理服务(如 AWS Secrets Manager);3. 定期轮换密钥。
-
----
-
-## 中危 (Medium) 漏洞
-
-### MEDIUM-1: 跨站脚本(XSS)漏洞
-
-**[未验证]** | 类型: `xss`
-
-**AI 置信度:** 85%
-
-**漏洞描述:**
-
-username 直接通过 fmt.Fprintf 输出到 HTTP 响应,没有进行 HTML 编码,可能导致反射型 XSS。
-
-**漏洞代码:**
-
-```python
-fmt.Fprintf(w, "Welcome, %s!", username)
-```
-
-**修复建议:**
-
-对输出进行 HTML 编码:html.EscapeString(username)
-
----
-
-## 修复优先级建议
-
-基于已发现的漏洞,我们建议按以下优先级进行修复:
-
-1. **高优先级:** 在 1 周内修复 7 个高危漏洞
-2. **中优先级:** 在 2-4 周内修复 1 个中危漏洞
-
----
-
-*本报告由 DeepAudit - AI 驱动的安全分析系统生成*
diff --git a/data/httpdns/sdk/httpdns-sdk-android-v1.0.0.zip b/data/httpdns/sdk/httpdns-sdk-android-v1.0.0.zip
deleted file mode 100644
index d1df992..0000000
Binary files a/data/httpdns/sdk/httpdns-sdk-android-v1.0.0.zip and /dev/null differ
diff --git a/data/httpdns/sdk/httpdns-sdk-android-v1.0.1.zip b/data/httpdns/sdk/httpdns-sdk-android-v1.0.1.zip
deleted file mode 100644
index d1df992..0000000
Binary files a/data/httpdns/sdk/httpdns-sdk-android-v1.0.1.zip and /dev/null differ
diff --git a/data/httpdns/sdk/httpdns-sdk-ios-v1.0.0.zip b/data/httpdns/sdk/httpdns-sdk-ios-v1.0.0.zip
deleted file mode 100644
index 8cd661b..0000000
Binary files a/data/httpdns/sdk/httpdns-sdk-ios-v1.0.0.zip and /dev/null differ
diff --git a/deploy/build-amzn2023.sh b/deploy/build-amzn2023.sh
new file mode 100644
index 0000000..7103327
--- /dev/null
+++ b/deploy/build-amzn2023.sh
@@ -0,0 +1,61 @@
+#!/usr/bin/env bash
+# 在 AWS (Amazon Linux) Docker 容器中执行
+# 一键构建 edge-node、edge-dns、edge-httpdns 的 amzn2023 版本
+set -e
+
+ROOT=$(cd "$(dirname "$0")/.." && pwd)
+
+# 从 const.go 提取版本号
+lookup_version() {
+ local file=$1
+ local re='Version[ ]+=[ ]+"([0-9.]+)"'
+ local data=$(cat "$file")
+ if [[ $data =~ $re ]]; then
+ echo "${BASH_REMATCH[1]}"
+ else
+ echo "error: cannot extract version from $file" >&2
+ exit 1
+ fi
+}
+
+echo "==============================="
+echo " Building amzn2023 packages"
+echo "==============================="
+
+# --- edge-node ---
+echo ""
+echo "[1/3] Building edge-node ..."
+cd "$ROOT/EdgeNode/build"
+./build.sh linux amd64 plus
+NODE_VER=$(lookup_version "$ROOT/EdgeNode/internal/const/const.go")
+SRC="$ROOT/EdgeNode/dist/edge-node-linux-amd64-v${NODE_VER}.zip"
+DST="$ROOT/EdgeNode/dist/edge-node-linux-amd64-amzn2023-v${NODE_VER}.zip"
+cp "$SRC" "$DST"
+echo " → $DST"
+
+# --- edge-dns ---
+echo ""
+echo "[2/3] Building edge-dns ..."
+cd "$ROOT/EdgeDNS/build"
+./build.sh linux amd64
+DNS_VER=$(lookup_version "$ROOT/EdgeDNS/internal/const/const.go")
+SRC="$ROOT/EdgeDNS/dist/edge-dns-linux-amd64-v${DNS_VER}.zip"
+DST="$ROOT/EdgeDNS/dist/edge-dns-linux-amd64-amzn2023-v${DNS_VER}.zip"
+cp "$SRC" "$DST"
+echo " → $DST"
+
+# --- edge-httpdns ---
+echo ""
+echo "[3/3] Building edge-httpdns ..."
+cd "$ROOT/EdgeHttpDNS/build"
+./build.sh linux amd64
+HTTPDNS_VER=$(lookup_version "$ROOT/EdgeHttpDNS/internal/const/const.go")
+SRC="$ROOT/EdgeHttpDNS/dist/edge-httpdns-linux-amd64-v${HTTPDNS_VER}.zip"
+DST="$ROOT/EdgeHttpDNS/dist/edge-httpdns-linux-amd64-amzn2023-v${HTTPDNS_VER}.zip"
+cp "$SRC" "$DST"
+echo " → $DST"
+
+echo ""
+echo "==============================="
+echo " All amzn2023 packages built!"
+echo "==============================="
diff --git a/deploy/merge-release.sh b/deploy/merge-release.sh
new file mode 100644
index 0000000..8ea5428
--- /dev/null
+++ b/deploy/merge-release.sh
@@ -0,0 +1,70 @@
+#!/usr/bin/env bash
+# 合并 admin 包和 amzn2023 节点包
+# 无需手动解压/复制/改名
+set -e
+
+ROOT=$(cd "$(dirname "$0")/.." && pwd)
+
+lookup_version() {
+ local file=$1
+ local re='Version[ ]+=[ ]+"([0-9.]+)"'
+ local data=$(cat "$file")
+ if [[ $data =~ $re ]]; then
+ echo "${BASH_REMATCH[1]}"
+ else
+ echo "error: cannot extract version from $file" >&2
+ exit 1
+ fi
+}
+
+ADMIN_VER=$(lookup_version "$ROOT/EdgeAdmin/internal/const/const.go")
+NODE_VER=$(lookup_version "$ROOT/EdgeNode/internal/const/const.go")
+DNS_VER=$(lookup_version "$ROOT/EdgeDNS/internal/const/const.go")
+HTTPDNS_VER=$(lookup_version "$ROOT/EdgeHttpDNS/internal/const/const.go")
+
+ADMIN_ZIP="$ROOT/EdgeAdmin/dist/edge-admin-linux-amd64-v${ADMIN_VER}.zip"
+AMZN_NODE="$ROOT/EdgeNode/dist/edge-node-linux-amd64-amzn2023-v${NODE_VER}.zip"
+AMZN_DNS="$ROOT/EdgeDNS/dist/edge-dns-linux-amd64-amzn2023-v${DNS_VER}.zip"
+AMZN_HTTPDNS="$ROOT/EdgeHttpDNS/dist/edge-httpdns-linux-amd64-amzn2023-v${HTTPDNS_VER}.zip"
+
+echo "Checking required files ..."
+MISSING=0
+for f in "$ADMIN_ZIP" "$AMZN_NODE" "$AMZN_DNS" "$AMZN_HTTPDNS"; do
+ if [ ! -f "$f" ]; then
+ echo " [MISSING] $f"
+ MISSING=1
+ else
+ echo " [OK] $(basename "$f")"
+ fi
+done
+if [ "$MISSING" -ne 0 ]; then
+ echo ""
+ echo "ERROR: Missing files. Build both Ubuntu and amzn2023 packages first."
+ exit 1
+fi
+
+WORK_DIR="$ROOT/EdgeAdmin/dist"
+cd "$WORK_DIR"
+
+echo ""
+echo "Extracting admin package ..."
+rm -rf edge-admin
+unzip -q "$(basename "$ADMIN_ZIP")"
+
+DEPLOY_DIR="edge-admin/edge-api/deploy"
+echo "Injecting amzn2023 packages ..."
+cp "$AMZN_NODE" "$DEPLOY_DIR/edge-node-linux-amd64-amzn2023-v${NODE_VER}.zip"
+cp "$AMZN_DNS" "$DEPLOY_DIR/edge-dns-linux-amd64-amzn2023-v${DNS_VER}.zip"
+cp "$AMZN_HTTPDNS" "$DEPLOY_DIR/edge-httpdns-linux-amd64-amzn2023-v${HTTPDNS_VER}.zip"
+
+echo "Re-packaging ..."
+FINAL_ZIP="edge-admin-linux-amd64-v${ADMIN_VER}.zip"
+rm -f "$FINAL_ZIP"
+zip -r -X -q "$FINAL_ZIP" edge-admin/
+rm -rf edge-admin
+
+SIZE=$(du -h "$FINAL_ZIP" | cut -f1)
+echo ""
+echo "==============================="
+echo " Done! → $WORK_DIR/$FINAL_ZIP ($SIZE)"
+echo "==============================="
diff --git a/deploy/多平台打包手册.md b/deploy/多平台打包手册.md
new file mode 100644
index 0000000..34bd67c
--- /dev/null
+++ b/deploy/多平台打包手册.md
@@ -0,0 +1,163 @@
+# CloudWAF 多平台打包手册
+
+本手册介绍如何使用自动化脚本完成 **Ubuntu (amd64)** + **Amazon Linux 2023 (amzn2023)** 双平台打包,最终生成包含 6 个节点包的 admin 发布包。
+
+---
+
+## 概述
+
+### 背景
+
+admin 发布包中需要包含两套节点安装包:
+- **amd64**:适用于标准 Ubuntu/Debian 服务器
+- **amzn2023**:适用于 Amazon Linux 2023 服务器
+
+### 脚本说明
+
+| 脚本 | 位置 | 用途 |
+|------|------|------|
+| `build-amzn2023.sh` | `deploy/` | 在 AWS Docker 中一键构建 3 个 amzn2023 节点包 |
+| `merge-release.sh` | `deploy/` | 将 amzn2023 包自动注入 admin zip,生成最终发布包 |
+
+### 最终产物
+
+`EdgeAdmin/dist/edge-admin-linux-amd64-v{版本号}.zip`,内含 6 个节点包:
+
+| 包名 | 平台 |
+|------|------|
+| `edge-node-linux-amd64-v{ver}.zip` | Ubuntu/Debian |
+| `edge-node-linux-amd64-amzn2023-v{ver}.zip` | Amazon Linux 2023 |
+| `edge-dns-linux-amd64-v{ver}.zip` | Ubuntu/Debian |
+| `edge-dns-linux-amd64-amzn2023-v{ver}.zip` | Amazon Linux 2023 |
+| `edge-httpdns-linux-amd64-v{ver}.zip` | Ubuntu/Debian |
+| `edge-httpdns-linux-amd64-amzn2023-v{ver}.zip` | Amazon Linux 2023 |
+
+---
+
+## 前置条件
+
+1. **两个 Docker 容器**已准备好:
+ - **Ubuntu 容器**:用于构建 admin 及标准 amd64 节点包
+ - **AWS (Amazon Linux 2023) 容器**:用于构建 amzn2023 节点包
+2. 两个容器均已挂载项目源码目录
+3. Go 编译环境已就绪(两个容器中均已配置)
+
+---
+
+## 打包流程(3 步)
+
+### 第 1 步:构建 amzn2023 节点包
+
+**在 AWS Docker 容器中执行:**
+
+```bash
+cd /项目挂载路径/deploy
+chmod +x build-amzn2023.sh
+./build-amzn2023.sh
+```
+
+脚本会自动:
+1. 构建 `edge-node`(linux/amd64/plus)
+2. 构建 `edge-dns`(linux/amd64)
+3. 构建 `edge-httpdns`(linux/amd64)
+4. 将每个包复制一份并加上 `amzn2023` 后缀
+
+**产出文件:**
+```
+EdgeNode/dist/edge-node-linux-amd64-amzn2023-v{ver}.zip
+EdgeDNS/dist/edge-dns-linux-amd64-amzn2023-v{ver}.zip
+EdgeHttpDNS/dist/edge-httpdns-linux-amd64-amzn2023-v{ver}.zip
+```
+
+### 第 2 步:构建 admin 包(含标准 amd64 节点包)
+
+**在 Ubuntu Docker 容器中执行:**
+
+```bash
+cd /项目挂载路径/EdgeAdmin/build
+./build.sh linux amd64 plus
+```
+
+此步骤与原有流程完全一致,无需任何改动。
+
+**产出文件:**
+```
+EdgeAdmin/dist/edge-admin-linux-amd64-v{ver}.zip
+```
+
+> 注意:此 zip 中已包含 3 个标准 amd64 节点包。
+
+### 第 3 步:合并生成最终发布包
+
+**在任意终端(能访问项目目录即可)中执行:**
+
+```bash
+cd /项目路径/deploy
+chmod +x merge-release.sh
+./merge-release.sh
+```
+
+脚本会自动:
+1. 检查 admin zip 和 3 个 amzn2023 zip 是否都存在
+2. 解压 admin zip
+3. 将 3 个 amzn2023 包复制到 `edge-admin/edge-api/deploy/` 目录
+4. 重新打包为最终 zip
+5. 清理临时文件
+
+**最终产出:**
+```
+EdgeAdmin/dist/edge-admin-linux-amd64-v{ver}.zip
+```
+
+---
+
+## 验证
+
+打包完成后,可以用以下命令验证最终 zip 中包含 6 个节点包:
+
+```bash
+unzip -l EdgeAdmin/dist/edge-admin-linux-amd64-v*.zip | grep "deploy/edge-"
+```
+
+预期输出(6 行):
+```
+ ... edge-admin/edge-api/deploy/edge-node-linux-amd64-v{ver}.zip
+ ... edge-admin/edge-api/deploy/edge-node-linux-amd64-amzn2023-v{ver}.zip
+ ... edge-admin/edge-api/deploy/edge-dns-linux-amd64-v{ver}.zip
+ ... edge-admin/edge-api/deploy/edge-dns-linux-amd64-amzn2023-v{ver}.zip
+ ... edge-admin/edge-api/deploy/edge-httpdns-linux-amd64-v{ver}.zip
+ ... edge-admin/edge-api/deploy/edge-httpdns-linux-amd64-amzn2023-v{ver}.zip
+```
+
+---
+
+## 常见问题
+
+### Q: merge-release.sh 报 MISSING 怎么办?
+
+说明某个构建产物不存在。请确认:
+- 第 1 步(amzn2023)和第 2 步(admin)都已执行成功
+- 两个 Docker 容器挂载的是同一份项目源码目录
+
+### Q: 版本号从哪里读取?
+
+脚本自动从各组件的 `internal/const/const.go` 文件中提取 `Version` 常量,无需手动指定。
+
+### Q: 第 1 步和第 2 步的执行顺序可以换吗?
+
+可以。两步互相独立,先后顺序不影响结果。只需确保第 3 步在前两步都完成后执行。
+
+### Q: Windows 上能执行 merge-release.sh 吗?
+
+可以,需要在 Git Bash 或 WSL 中执行,并确保系统已安装 `zip` 和 `unzip` 命令。
+
+---
+
+## 流程对比
+
+| | 旧流程(手动 6+ 步) | 新流程(3 条命令) |
+|---|---|---|
+| AWS 构建 | 分别 3 次 cd + build | `./build-amzn2023.sh` |
+| Ubuntu 构建 | 不变 | 不变 |
+| 合并 | 手动解压 → 改名 → 复制 → 重新 zip | `./merge-release.sh` |
+| 出错风险 | 高(文件名易写错) | 低(版本号自动提取) |
diff --git a/logs/issues.log b/logs/issues.log
new file mode 100644
index 0000000..7118b9c
--- /dev/null
+++ b/logs/issues.log
@@ -0,0 +1 @@
+[{"code":"db","message":"check database connection failed: could not find database config file 'db.yaml' (at E:\\AI_PRODUCT\\waf-platform\\configs\\db.yaml)","suggestion":""}]
\ No newline at end of file
diff --git a/logs/run.log b/logs/run.log
new file mode 100644
index 0000000..60f1b0b
--- /dev/null
+++ b/logs/run.log
@@ -0,0 +1,63 @@
+2026/03/02 01:10:42 [API_NODE]start api node, pid: 22168
+2026/03/02 01:10:42 [API_NODE]listening sock ...
+2026/03/02 01:10:42 [API_NODE]initializing ip library ...
+2026/03/02 01:10:42 [IP_LIBRARY]embedded MaxMind database loaded successfully (size: 63053355 bytes)
+2026/03/02 01:10:42 [API_NODE]ip library initialized successfully
+2026/03/02 01:10:42 [API_NODE]checking database connection ...
+2026/03/02 01:10:42 [API_NODE]check database connection failed: could not find database config file 'db.yaml' (at E:\AI_PRODUCT\waf-platform\configs\db.yaml)
+2026/03/02 01:10:42 [DB]could not load database config file from 'E:\AI_PRODUCT\waf-platform\configs'/[.db.yaml, db.yaml, db.conf]
+ :/Users/robin/go/pkg/mod/github.com/iwind/!tea!go@v0.0.0-20240508072741-7647e70b7070/dbs/db.go:152
+2026/03/02 01:12:29 [API_NODE]start api node, pid: 35320
+2026/03/02 01:12:29 [API_NODE]listening sock ...
+2026/03/02 01:12:29 [API_NODE]initializing ip library ...
+2026/03/02 01:12:29 [IP_LIBRARY]embedded MaxMind database loaded successfully (size: 63053355 bytes)
+2026/03/02 01:12:29 [API_NODE]ip library initialized successfully
+2026/03/02 01:12:29 [API_NODE]checking database connection ...
+2026/03/02 01:12:29 [API_NODE]check database connection failed: could not find database config file 'db.yaml' (at E:\AI_PRODUCT\waf-platform\configs\db.yaml)
+2026/03/02 01:12:29 [DB]could not load database config file from 'E:\AI_PRODUCT\waf-platform\configs'/[.db.yaml, db.yaml, db.conf]
+ :/Users/robin/go/pkg/mod/github.com/iwind/!tea!go@v0.0.0-20240508072741-7647e70b7070/dbs/db.go:152
+2026/03/02 01:13:49 [API_NODE]start api node, pid: 47284
+2026/03/02 01:13:49 [API_NODE]listening sock ...
+2026/03/02 01:13:49 [API_NODE]initializing ip library ...
+2026/03/02 01:13:49 [IP_LIBRARY]embedded MaxMind database loaded successfully (size: 63053355 bytes)
+2026/03/02 01:13:49 [API_NODE]ip library initialized successfully
+2026/03/02 01:13:49 [API_NODE]checking database connection ...
+2026/03/02 01:13:49 [API_NODE]check database connection failed: could not find database config file 'db.yaml' (at E:\AI_PRODUCT\waf-platform\configs\db.yaml)
+2026/03/02 01:13:49 [DB]could not load database config file from 'E:\AI_PRODUCT\waf-platform\configs'/[.db.yaml, db.yaml, db.conf]
+ :/Users/robin/go/pkg/mod/github.com/iwind/!tea!go@v0.0.0-20240508072741-7647e70b7070/dbs/db.go:152
+2026/03/02 01:22:55 [API_NODE]start api node, pid: 38420
+2026/03/02 01:22:55 [API_NODE]listening sock ...
+2026/03/02 01:22:55 [API_NODE]initializing ip library ...
+2026/03/02 01:22:56 [IP_LIBRARY]embedded MaxMind database loaded successfully (size: 63053355 bytes)
+2026/03/02 01:22:56 [API_NODE]ip library initialized successfully
+2026/03/02 01:22:56 [API_NODE]checking database connection ...
+2026/03/02 01:22:56 [API_NODE]check database connection failed: could not find database config file 'db.yaml' (at E:\AI_PRODUCT\waf-platform\configs\db.yaml)
+2026/03/02 01:22:56 [DB]could not load database config file from 'E:\AI_PRODUCT\waf-platform\configs'/[.db.yaml, db.yaml, db.conf]
+ :/Users/robin/go/pkg/mod/github.com/iwind/!tea!go@v0.0.0-20240508072741-7647e70b7070/dbs/db.go:152
+2026/03/02 01:30:23 [API_NODE]start api node, pid: 40484
+2026/03/02 01:30:23 [API_NODE]listening sock ...
+2026/03/02 01:30:23 [API_NODE]initializing ip library ...
+2026/03/02 01:30:23 [IP_LIBRARY]embedded MaxMind database loaded successfully (size: 63053355 bytes)
+2026/03/02 01:30:23 [API_NODE]ip library initialized successfully
+2026/03/02 01:30:23 [API_NODE]checking database connection ...
+2026/03/02 01:30:23 [API_NODE]check database connection failed: could not find database config file 'db.yaml' (at E:\AI_PRODUCT\waf-platform\configs\db.yaml)
+2026/03/02 01:30:23 [DB]could not load database config file from 'E:\AI_PRODUCT\waf-platform\configs'/[.db.yaml, db.yaml, db.conf]
+ :/Users/robin/go/pkg/mod/github.com/iwind/!tea!go@v0.0.0-20240508072741-7647e70b7070/dbs/db.go:152
+2026/03/02 01:30:44 [API_NODE]start api node, pid: 22616
+2026/03/02 01:30:44 [API_NODE]listening sock ...
+2026/03/02 01:30:44 [API_NODE]initializing ip library ...
+2026/03/02 01:30:44 [IP_LIBRARY]embedded MaxMind database loaded successfully (size: 63053355 bytes)
+2026/03/02 01:30:44 [API_NODE]ip library initialized successfully
+2026/03/02 01:30:44 [API_NODE]checking database connection ...
+2026/03/02 01:30:44 [API_NODE]check database connection failed: could not find database config file 'db.yaml' (at E:\AI_PRODUCT\waf-platform\configs\db.yaml)
+2026/03/02 01:30:44 [DB]could not load database config file from 'E:\AI_PRODUCT\waf-platform\configs'/[.db.yaml, db.yaml, db.conf]
+ :/Users/robin/go/pkg/mod/github.com/iwind/!tea!go@v0.0.0-20240508072741-7647e70b7070/dbs/db.go:152
+2026/03/02 01:31:08 [API_NODE]start api node, pid: 41804
+2026/03/02 01:31:08 [API_NODE]listening sock ...
+2026/03/02 01:31:08 [API_NODE]initializing ip library ...
+2026/03/02 01:31:08 [IP_LIBRARY]embedded MaxMind database loaded successfully (size: 63053355 bytes)
+2026/03/02 01:31:08 [API_NODE]ip library initialized successfully
+2026/03/02 01:31:08 [API_NODE]checking database connection ...
+2026/03/02 01:31:08 [API_NODE]check database connection failed: could not find database config file 'db.yaml' (at E:\AI_PRODUCT\waf-platform\configs\db.yaml)
+2026/03/02 01:31:08 [DB]could not load database config file from 'E:\AI_PRODUCT\waf-platform\configs'/[.db.yaml, db.yaml, db.conf]
+ :/Users/robin/go/pkg/mod/github.com/iwind/!tea!go@v0.0.0-20240508072741-7647e70b7070/dbs/db.go:152