mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-04 04:30:08 +00:00
chore: move xray dns configuration processing
This commit is contained in:
@@ -3,7 +3,6 @@ package xray
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/InazumaV/V2bX/api/panel"
|
||||
"github.com/InazumaV/V2bX/conf"
|
||||
"github.com/xtls/xray-core/core"
|
||||
@@ -11,7 +10,16 @@ import (
|
||||
"github.com/xtls/xray-core/features/outbound"
|
||||
)
|
||||
|
||||
type DNSConfig struct {
|
||||
Servers []interface{} `json:"servers"`
|
||||
Tag string `json:"tag"`
|
||||
}
|
||||
|
||||
func (c *Core) AddNode(tag string, info *panel.NodeInfo, config *conf.Options) error {
|
||||
err := updateDNSConfig(info)
|
||||
if err != nil {
|
||||
return fmt.Errorf("build dns error: %s", err)
|
||||
}
|
||||
inboundConfig, err := buildInbound(config, info, tag)
|
||||
if err != nil {
|
||||
return fmt.Errorf("build inbound error: %s", err)
|
||||
|
||||
Reference in New Issue
Block a user