mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-04 12:40:11 +00:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d52a8932d | ||
|
|
06441afa79 | ||
|
|
f7b588fb45 | ||
|
|
9be082ede6 | ||
|
|
dce3ec1079 | ||
|
|
2990999f7b | ||
|
|
fe003fcb19 | ||
|
|
ea26985d7c | ||
|
|
32437f5e48 | ||
|
|
39dfd8b6dd | ||
|
|
eb51d3e13c | ||
|
|
dadeb6304b | ||
|
|
4c7b9f5eb9 | ||
|
|
63d88843b6 | ||
|
|
8d225f811b | ||
|
|
f6b587b275 | ||
|
|
d9b3d24465 |
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@@ -109,7 +109,7 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.24.1'
|
||||
go-version: '1.25.0'
|
||||
|
||||
- name: Get project dependencies
|
||||
run: |
|
||||
@@ -126,13 +126,13 @@ jobs:
|
||||
run: |
|
||||
echo "version: $version"
|
||||
mkdir -p build_assets
|
||||
go build -v -o build_assets/V2bX -tags "sing xray hysteria2 with_quic with_grpc with_utls with_wireguard with_acme with_gvisor" -trimpath -ldflags "-X 'github.com/InazumaV/V2bX/cmd.version=$version' -s -w -buildid="
|
||||
GOEXPERIMENT=jsonv2 go build -v -o build_assets/V2bX -tags "sing xray hysteria2 with_quic with_grpc with_utls with_wireguard with_acme with_gvisor" -trimpath -ldflags "-X 'github.com/InazumaV/V2bX/cmd.version=$version' -s -w -buildid="
|
||||
|
||||
- name: Build Mips softfloat V2bX
|
||||
if: matrix.goarch == 'mips' || matrix.goarch == 'mipsle'
|
||||
run: |
|
||||
echo "version: $version"
|
||||
GOMIPS=softfloat go build -v -o build_assets/V2bX_softfloat -tags "sing xray hysteria2 with_quic with_grpc with_utls with_wireguard with_acme with_gvisor" -trimpath -ldflags "-X 'github.com/InazumaV/V2bX/cmd.version=$version' -s -w -buildid="
|
||||
GOEXPERIMENT=jsonv2 GOMIPS=softfloat go build -v -o build_assets/V2bX_softfloat -tags "sing xray hysteria2 with_quic with_grpc with_utls with_wireguard with_acme with_gvisor" -trimpath -ldflags "-X 'github.com/InazumaV/V2bX/cmd.version=$version' -s -w -buildid="
|
||||
- name: Rename Windows V2bX
|
||||
if: matrix.goos == 'windows'
|
||||
run: |
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# Build go
|
||||
FROM golang:1.24.1-alpine AS builder
|
||||
FROM golang:1.25.0-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
ENV CGO_ENABLED=0
|
||||
RUN go mod download
|
||||
RUN go build -v -o V2bX -tags "sing xray hysteria2 with_quic with_grpc with_utls with_wireguard with_acme with_gvisor"
|
||||
RUN GOEXPERIMENT=jsonv2 go mod download
|
||||
RUN GOEXPERIMENT=jsonv2 go build -v -o V2bX -tags "sing xray hysteria2 with_quic with_grpc with_utls with_wireguard with_acme with_gvisor"
|
||||
|
||||
# Release
|
||||
FROM alpine
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/goccy/go-json"
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// Security type
|
||||
@@ -75,12 +75,13 @@ type VAllssNode struct {
|
||||
}
|
||||
|
||||
type TlsSettings struct {
|
||||
ServerName string `json:"server_name"`
|
||||
Dest string `json:"dest"`
|
||||
ServerPort string `json:"server_port"`
|
||||
ShortId string `json:"short_id"`
|
||||
PrivateKey string `json:"private_key"`
|
||||
Xver uint64 `json:"xver,string"`
|
||||
ServerName string `json:"server_name"`
|
||||
Dest string `json:"dest"`
|
||||
ServerPort string `json:"server_port"`
|
||||
ShortId string `json:"short_id"`
|
||||
PrivateKey string `json:"private_key"`
|
||||
Mldsa65Seed string `json:"mldsa65Seed"`
|
||||
Xver uint64 `json:"xver,string"`
|
||||
}
|
||||
|
||||
type RealityConfig struct {
|
||||
|
||||
@@ -2,8 +2,12 @@ package panel
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/goccy/go-json"
|
||||
"encoding/json/jsontext"
|
||||
"encoding/json/v2"
|
||||
|
||||
"github.com/vmihailenco/msgpack/v5"
|
||||
)
|
||||
|
||||
type OnlineUser struct {
|
||||
@@ -12,15 +16,14 @@ type OnlineUser struct {
|
||||
}
|
||||
|
||||
type UserInfo struct {
|
||||
Id int `json:"id"`
|
||||
Uuid string `json:"uuid"`
|
||||
SpeedLimit int `json:"speed_limit"`
|
||||
DeviceLimit int `json:"device_limit"`
|
||||
Id int `json:"id" msgpack:"id"`
|
||||
Uuid string `json:"uuid" msgpack:"uuid"`
|
||||
SpeedLimit int `json:"speed_limit" msgpack:"speed_limit"`
|
||||
DeviceLimit int `json:"device_limit" msgpack:"device_limit"`
|
||||
}
|
||||
|
||||
type UserListBody struct {
|
||||
//Msg string `json:"msg"`
|
||||
Users []UserInfo `json:"users"`
|
||||
Users []UserInfo `json:"users" msgpack:"users"`
|
||||
}
|
||||
|
||||
type AliveMap struct {
|
||||
@@ -32,7 +35,8 @@ func (c *Client) GetUserList() ([]UserInfo, error) {
|
||||
const path = "/api/v1/server/UniProxy/user"
|
||||
r, err := c.client.R().
|
||||
SetHeader("If-None-Match", c.userEtag).
|
||||
ForceContentType("application/json").
|
||||
SetHeader("X-Response-Format", "msgpack").
|
||||
SetDoNotParseResponse(true).
|
||||
Get(path)
|
||||
if r == nil || r.RawResponse == nil {
|
||||
return nil, fmt.Errorf("received nil response or raw response")
|
||||
@@ -47,8 +51,40 @@ func (c *Client) GetUserList() ([]UserInfo, error) {
|
||||
return nil, err
|
||||
}
|
||||
userlist := &UserListBody{}
|
||||
if err := json.Unmarshal(r.Body(), userlist); err != nil {
|
||||
return nil, fmt.Errorf("unmarshal user list error: %w", err)
|
||||
if strings.Contains(r.Header().Get("Content-Type"), "application/x-msgpack") {
|
||||
decoder := msgpack.NewDecoder(r.RawResponse.Body)
|
||||
if err := decoder.Decode(userlist); err != nil {
|
||||
return nil, fmt.Errorf("decode user list error: %w", err)
|
||||
}
|
||||
} else {
|
||||
dec := jsontext.NewDecoder(r.RawResponse.Body)
|
||||
for {
|
||||
tok, err := dec.ReadToken()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("decode user list error: %w", err)
|
||||
}
|
||||
if tok.Kind() == '"' && tok.String() == "users" {
|
||||
break
|
||||
}
|
||||
}
|
||||
tok, err := dec.ReadToken()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("decode user list error: %w", err)
|
||||
}
|
||||
if tok.Kind() != '[' {
|
||||
return nil, fmt.Errorf(`decode user list error: expected "users" array`)
|
||||
}
|
||||
for dec.PeekKind() != ']' {
|
||||
val, err := dec.ReadValue()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("decode user list error: read user object: %w", err)
|
||||
}
|
||||
var u UserInfo
|
||||
if err := json.Unmarshal(val, &u); err != nil {
|
||||
return nil, fmt.Errorf("decode user list error: unmarshal user error: %w", err)
|
||||
}
|
||||
userlist.Users = append(userlist.Users, u)
|
||||
}
|
||||
}
|
||||
c.userEtag = r.Header().Get("ETag")
|
||||
return userlist.Users, nil
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
type TrafficCounter struct {
|
||||
counters sync.Map
|
||||
Counters sync.Map
|
||||
}
|
||||
|
||||
type TrafficStorage struct {
|
||||
@@ -18,26 +18,26 @@ func NewTrafficCounter() *TrafficCounter {
|
||||
return &TrafficCounter{}
|
||||
}
|
||||
|
||||
func (c *TrafficCounter) GetCounter(id string) *TrafficStorage {
|
||||
if cts, ok := c.counters.Load(id); ok {
|
||||
func (c *TrafficCounter) GetCounter(uuid string) *TrafficStorage {
|
||||
if cts, ok := c.Counters.Load(uuid); ok {
|
||||
return cts.(*TrafficStorage)
|
||||
}
|
||||
newStorage := &TrafficStorage{}
|
||||
if cts, loaded := c.counters.LoadOrStore(id, newStorage); loaded {
|
||||
if cts, loaded := c.Counters.LoadOrStore(uuid, newStorage); loaded {
|
||||
return cts.(*TrafficStorage)
|
||||
}
|
||||
return newStorage
|
||||
}
|
||||
|
||||
func (c *TrafficCounter) GetUpCount(id string) int64 {
|
||||
if cts, ok := c.counters.Load(id); ok {
|
||||
func (c *TrafficCounter) GetUpCount(uuid string) int64 {
|
||||
if cts, ok := c.Counters.Load(uuid); ok {
|
||||
return cts.(*TrafficStorage).UpCounter.Load()
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (c *TrafficCounter) GetDownCount(id string) int64 {
|
||||
if cts, ok := c.counters.Load(id); ok {
|
||||
func (c *TrafficCounter) GetDownCount(uuid string) int64 {
|
||||
if cts, ok := c.Counters.Load(uuid); ok {
|
||||
return cts.(*TrafficStorage).DownCounter.Load()
|
||||
}
|
||||
return 0
|
||||
@@ -45,30 +45,30 @@ func (c *TrafficCounter) GetDownCount(id string) int64 {
|
||||
|
||||
func (c *TrafficCounter) Len() int {
|
||||
length := 0
|
||||
c.counters.Range(func(_, _ interface{}) bool {
|
||||
c.Counters.Range(func(_, _ interface{}) bool {
|
||||
length++
|
||||
return true
|
||||
})
|
||||
return length
|
||||
}
|
||||
|
||||
func (c *TrafficCounter) Reset(id string) {
|
||||
if cts, ok := c.counters.Load(id); ok {
|
||||
func (c *TrafficCounter) Reset(uuid string) {
|
||||
if cts, ok := c.Counters.Load(uuid); ok {
|
||||
cts.(*TrafficStorage).UpCounter.Store(0)
|
||||
cts.(*TrafficStorage).DownCounter.Store(0)
|
||||
}
|
||||
}
|
||||
|
||||
func (c *TrafficCounter) Delete(id string) {
|
||||
c.counters.Delete(id)
|
||||
func (c *TrafficCounter) Delete(uuid string) {
|
||||
c.Counters.Delete(uuid)
|
||||
}
|
||||
|
||||
func (c *TrafficCounter) Rx(id string, n int) {
|
||||
cts := c.GetCounter(id)
|
||||
func (c *TrafficCounter) Rx(uuid string, n int) {
|
||||
cts := c.GetCounter(uuid)
|
||||
cts.DownCounter.Add(int64(n))
|
||||
}
|
||||
|
||||
func (c *TrafficCounter) Tx(id string, n int) {
|
||||
cts := c.GetCounter(id)
|
||||
func (c *TrafficCounter) Tx(uuid string, n int) {
|
||||
cts := c.GetCounter(uuid)
|
||||
cts.UpCounter.Add(int64(n))
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
"github.com/InazumaV/V2bX/common/json5"
|
||||
|
||||
"github.com/goccy/go-json"
|
||||
"encoding/json/v2"
|
||||
)
|
||||
|
||||
type Conf struct {
|
||||
|
||||
@@ -7,8 +7,9 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"encoding/json"
|
||||
|
||||
"github.com/InazumaV/V2bX/common/json5"
|
||||
"github.com/goccy/go-json"
|
||||
)
|
||||
|
||||
type NodeConfig struct {
|
||||
@@ -109,6 +110,7 @@ type Options struct {
|
||||
ListenIP string `json:"ListenIP"`
|
||||
SendIP string `json:"SendIP"`
|
||||
DeviceOnlineMinTraffic int64 `json:"DeviceOnlineMinTraffic"`
|
||||
ReportMinTraffic int64 `json:"ReportMinTraffic"`
|
||||
LimitConfig LimitConfig `json:"LimitConfig"`
|
||||
RawOptions json.RawMessage `json:"RawOptions"`
|
||||
XrayOptions *XrayOptions `json:"XrayOptions"`
|
||||
|
||||
@@ -14,9 +14,10 @@ import (
|
||||
var _ server.TrafficLogger = (*HookServer)(nil)
|
||||
|
||||
type HookServer struct {
|
||||
Tag string
|
||||
logger *zap.Logger
|
||||
Counter sync.Map
|
||||
Tag string
|
||||
logger *zap.Logger
|
||||
Counter sync.Map
|
||||
ReportMinTrafficBytes int64
|
||||
}
|
||||
|
||||
func (h *HookServer) TraceStream(stream quic.Stream, stats *server.StreamStats) {
|
||||
|
||||
@@ -40,8 +40,9 @@ func (h *Hysteria2) AddNode(tag string, info *panel.NodeInfo, config *conf.Optio
|
||||
logger: h.Logger,
|
||||
},
|
||||
TrafficLogger: &HookServer{
|
||||
Tag: tag,
|
||||
logger: h.Logger,
|
||||
Tag: tag,
|
||||
logger: h.Logger,
|
||||
ReportMinTrafficBytes: config.ReportMinTraffic * 1024,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -14,12 +14,12 @@ var _ server.Authenticator = &V2bX{}
|
||||
|
||||
type V2bX struct {
|
||||
usersMap map[string]int
|
||||
mutex sync.Mutex
|
||||
mutex sync.RWMutex
|
||||
}
|
||||
|
||||
func (v *V2bX) Authenticate(addr net.Addr, auth string, tx uint64) (ok bool, id string) {
|
||||
v.mutex.Lock()
|
||||
defer v.mutex.Unlock()
|
||||
v.mutex.RLock()
|
||||
defer v.mutex.RUnlock()
|
||||
if _, exists := v.usersMap[auth]; exists {
|
||||
return true, auth
|
||||
}
|
||||
@@ -56,15 +56,38 @@ func (h *Hysteria2) DelUsers(users []panel.UserInfo, tag string, _ *panel.NodeIn
|
||||
return nil
|
||||
}
|
||||
|
||||
func (h *Hysteria2) GetUserTraffic(tag string, uuid string, reset bool) (up int64, down int64) {
|
||||
if v, ok := h.Hy2nodes[tag].TrafficLogger.(*HookServer).Counter.Load(tag); ok {
|
||||
c := v.(*counter.TrafficCounter)
|
||||
up = c.GetUpCount(uuid)
|
||||
down = c.GetDownCount(uuid)
|
||||
if reset {
|
||||
c.Reset(uuid)
|
||||
}
|
||||
return up, down
|
||||
func (h *Hysteria2) GetUserTrafficSlice(tag string, reset bool) ([]panel.UserTraffic, error) {
|
||||
trafficSlice := make([]panel.UserTraffic, 0)
|
||||
h.Auth.mutex.RLock()
|
||||
defer h.Auth.mutex.RUnlock()
|
||||
if _, ok := h.Hy2nodes[tag]; !ok {
|
||||
return nil, nil
|
||||
}
|
||||
return 0, 0
|
||||
hook := h.Hy2nodes[tag].TrafficLogger.(*HookServer)
|
||||
if v, ok := hook.Counter.Load(tag); ok {
|
||||
c := v.(*counter.TrafficCounter)
|
||||
c.Counters.Range(func(key, value interface{}) bool {
|
||||
uuid := key.(string)
|
||||
traffic := value.(*counter.TrafficStorage)
|
||||
up := traffic.UpCounter.Load()
|
||||
down := traffic.DownCounter.Load()
|
||||
if up+down > hook.ReportMinTrafficBytes {
|
||||
if reset {
|
||||
traffic.UpCounter.Store(0)
|
||||
traffic.DownCounter.Store(0)
|
||||
}
|
||||
trafficSlice = append(trafficSlice, panel.UserTraffic{
|
||||
UID: h.Auth.usersMap[uuid],
|
||||
Upload: up,
|
||||
Download: down,
|
||||
})
|
||||
}
|
||||
return true
|
||||
})
|
||||
if len(trafficSlice) == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
return trafficSlice, nil
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ type Core interface {
|
||||
AddNode(tag string, info *panel.NodeInfo, config *conf.Options) error
|
||||
DelNode(tag string) error
|
||||
AddUsers(p *AddUsersParams) (added int, err error)
|
||||
GetUserTraffic(tag, uuid string, reset bool) (up int64, down int64)
|
||||
GetUserTrafficSlice(tag string, reset bool) ([]panel.UserTraffic, error)
|
||||
DelUsers(users []panel.UserInfo, tag string, info *panel.NodeInfo) error
|
||||
Protocols() []string
|
||||
Type() string
|
||||
|
||||
@@ -128,12 +128,12 @@ func (s *Selector) AddUsers(p *AddUsersParams) (added int, err error) {
|
||||
return t.(Core).AddUsers(p)
|
||||
}
|
||||
|
||||
func (s *Selector) GetUserTraffic(tag, uuid string, reset bool) (up int64, down int64) {
|
||||
func (s *Selector) GetUserTrafficSlice(tag string, reset bool) ([]panel.UserTraffic, error) {
|
||||
t, e := s.nodes.Load(tag)
|
||||
if !e {
|
||||
return 0, 0
|
||||
return nil, errors.New("the node is not have")
|
||||
}
|
||||
return t.(Core).GetUserTraffic(tag, uuid, reset)
|
||||
return t.(Core).GetUserTrafficSlice(tag, reset)
|
||||
}
|
||||
|
||||
func (s *Selector) DelUsers(users []panel.UserInfo, tag string, info *panel.NodeInfo) error {
|
||||
|
||||
@@ -27,13 +27,6 @@ func (h *HookServer) ModeList() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewHookServer() *HookServer {
|
||||
server := &HookServer{
|
||||
counter: sync.Map{},
|
||||
}
|
||||
return server
|
||||
}
|
||||
|
||||
func (h *HookServer) RoutedConnection(_ context.Context, conn net.Conn, m adapter.InboundContext, _ adapter.Rule, _ adapter.Outbound) net.Conn {
|
||||
l, err := limiter.GetLimiter(m.Inbound)
|
||||
if err != nil {
|
||||
@@ -51,7 +44,7 @@ func (h *HookServer) RoutedConnection(_ context.Context, conn net.Conn, m adapte
|
||||
}
|
||||
if l != nil {
|
||||
destStr := m.Destination.AddrString()
|
||||
protocol := m.Destination.Network()
|
||||
protocol := m.Protocol
|
||||
if l.CheckDomainRule(destStr) {
|
||||
log.Error(fmt.Sprintf(
|
||||
"User %s access domain %s reject by rule",
|
||||
|
||||
@@ -10,9 +10,10 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"encoding/json"
|
||||
|
||||
"github.com/InazumaV/V2bX/api/panel"
|
||||
"github.com/InazumaV/V2bX/conf"
|
||||
"github.com/goccy/go-json"
|
||||
"github.com/sagernet/sing-box/option"
|
||||
F "github.com/sagernet/sing/common/format"
|
||||
"github.com/sagernet/sing/common/json/badoption"
|
||||
@@ -54,19 +55,10 @@ func getInboundOptions(tag string, info *panel.NodeInfo, c *conf.Options) (optio
|
||||
if err != nil {
|
||||
return option.Inbound{}, fmt.Errorf("the listen ip not vail")
|
||||
}
|
||||
var domainStrategy option.DomainStrategy
|
||||
if c.SingOptions.EnableDNS {
|
||||
domainStrategy = c.SingOptions.DomainStrategy
|
||||
}
|
||||
listen := option.ListenOptions{
|
||||
Listen: (*badoption.Addr)(&addr),
|
||||
ListenPort: uint16(info.Common.ServerPort),
|
||||
TCPFastOpen: c.SingOptions.TCPFastOpen,
|
||||
InboundOptions: option.InboundOptions{
|
||||
SniffEnabled: c.SingOptions.SniffEnabled,
|
||||
SniffOverrideDestination: c.SingOptions.SniffOverrideDestination,
|
||||
DomainStrategy: domainStrategy,
|
||||
},
|
||||
}
|
||||
var multiplex *option.InboundMultiplexOptions
|
||||
if c.SingOptions.Multiplex != nil {
|
||||
@@ -403,6 +395,7 @@ func getInboundOptions(tag string, info *panel.NodeInfo, c *conf.Options) (optio
|
||||
}
|
||||
|
||||
func (b *Sing) AddNode(tag string, info *panel.NodeInfo, config *conf.Options) error {
|
||||
b.nodeReportMinTrafficBytes[tag] = config.ReportMinTraffic * 1024
|
||||
c, err := getInboundOptions(tag, info, config)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"sync"
|
||||
|
||||
"github.com/sagernet/sing-box/include"
|
||||
"github.com/sagernet/sing-box/log"
|
||||
@@ -24,11 +25,18 @@ type DNSConfig struct {
|
||||
}
|
||||
|
||||
type Sing struct {
|
||||
box *box.Box
|
||||
ctx context.Context
|
||||
hookServer *HookServer
|
||||
router adapter.Router
|
||||
logFactory log.Factory
|
||||
box *box.Box
|
||||
ctx context.Context
|
||||
hookServer *HookServer
|
||||
router adapter.Router
|
||||
logFactory log.Factory
|
||||
users *UserMap
|
||||
nodeReportMinTrafficBytes map[string]int64
|
||||
}
|
||||
|
||||
type UserMap struct {
|
||||
uidMap map[string]int
|
||||
mapLock sync.RWMutex
|
||||
}
|
||||
|
||||
func init() {
|
||||
@@ -71,7 +79,9 @@ func New(c *conf.CoreConfig) (vCore.Core, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
hs := NewHookServer()
|
||||
hs := &HookServer{
|
||||
counter: sync.Map{},
|
||||
}
|
||||
b.Router().AppendTracker(hs)
|
||||
return &Sing{
|
||||
ctx: b.Router().GetCtx(),
|
||||
@@ -79,6 +89,10 @@ func New(c *conf.CoreConfig) (vCore.Core, error) {
|
||||
hookServer: hs,
|
||||
router: b.Router(),
|
||||
logFactory: b.LogFactory(),
|
||||
users: &UserMap{
|
||||
uidMap: make(map[string]int),
|
||||
},
|
||||
nodeReportMinTrafficBytes: make(map[string]int64),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,11 @@ func (b *Sing) AddUsers(p *core.AddUsersParams) (added int, err error) {
|
||||
if !found {
|
||||
return 0, errors.New("the inbound not found")
|
||||
}
|
||||
b.users.mapLock.Lock()
|
||||
defer b.users.mapLock.Unlock()
|
||||
for i := range p.Users {
|
||||
b.users.uidMap[p.Users[i].Uuid] = p.Users[i].Id
|
||||
}
|
||||
switch p.NodeInfo.Type {
|
||||
case "vless":
|
||||
us := make([]option.VLESSUser, len(p.Users))
|
||||
@@ -129,6 +134,39 @@ func (b *Sing) GetUserTraffic(tag, uuid string, reset bool) (up int64, down int6
|
||||
return 0, 0
|
||||
}
|
||||
|
||||
func (b *Sing) GetUserTrafficSlice(tag string, reset bool) ([]panel.UserTraffic, error) {
|
||||
trafficSlice := make([]panel.UserTraffic, 0)
|
||||
hook := b.hookServer
|
||||
b.users.mapLock.RLock()
|
||||
defer b.users.mapLock.RUnlock()
|
||||
if v, ok := hook.counter.Load(tag); ok {
|
||||
c := v.(*counter.TrafficCounter)
|
||||
c.Counters.Range(func(key, value interface{}) bool {
|
||||
uuid := key.(string)
|
||||
traffic := value.(*counter.TrafficStorage)
|
||||
up := traffic.UpCounter.Load()
|
||||
down := traffic.DownCounter.Load()
|
||||
if up+down > b.nodeReportMinTrafficBytes[tag] {
|
||||
if reset {
|
||||
traffic.UpCounter.Store(0)
|
||||
traffic.DownCounter.Store(0)
|
||||
}
|
||||
trafficSlice = append(trafficSlice, panel.UserTraffic{
|
||||
UID: b.users.uidMap[uuid],
|
||||
Upload: up,
|
||||
Download: down,
|
||||
})
|
||||
}
|
||||
return true
|
||||
})
|
||||
if len(trafficSlice) == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
return trafficSlice, nil
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
type UserDeleter interface {
|
||||
DelUsers(uuid []string) error
|
||||
}
|
||||
@@ -158,7 +196,10 @@ func (b *Sing) DelUsers(users []panel.UserInfo, tag string, info *panel.NodeInfo
|
||||
return errors.New("the inbound not found")
|
||||
}
|
||||
uuids := make([]string, len(users))
|
||||
b.users.mapLock.Lock()
|
||||
defer b.users.mapLock.Unlock()
|
||||
for i := range users {
|
||||
delete(b.users.uidMap, users[i].Uuid)
|
||||
uuids[i] = users[i].Uuid
|
||||
}
|
||||
err := del.DelUsers(uuids)
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/InazumaV/V2bX/common/counter"
|
||||
"github.com/InazumaV/V2bX/common/rate"
|
||||
"github.com/InazumaV/V2bX/limiter"
|
||||
|
||||
@@ -98,12 +99,13 @@ func (r *cachedReader) Interrupt() {
|
||||
|
||||
// DefaultDispatcher is a default implementation of Dispatcher.
|
||||
type DefaultDispatcher struct {
|
||||
ohm outbound.Manager
|
||||
router routing.Router
|
||||
policy policy.Manager
|
||||
stats stats.Manager
|
||||
dns dns.Client
|
||||
fdns dns.FakeDNSEngine
|
||||
ohm outbound.Manager
|
||||
router routing.Router
|
||||
policy policy.Manager
|
||||
stats stats.Manager
|
||||
fdns dns.FakeDNSEngine
|
||||
Wm *WriterManager
|
||||
Counter sync.Map
|
||||
}
|
||||
|
||||
func init() {
|
||||
@@ -127,6 +129,9 @@ func (d *DefaultDispatcher) Init(config *Config, om outbound.Manager, router rou
|
||||
d.router = router
|
||||
d.policy = pm
|
||||
d.stats = sm
|
||||
d.Wm = &WriterManager{
|
||||
writers: make(map[string]map[*ManagedWriter]struct{}),
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -190,28 +195,33 @@ func (d *DefaultDispatcher) getLink(ctx context.Context, network net.Network) (*
|
||||
common.Interrupt(inboundLink.Reader)
|
||||
return nil, nil, nil, errors.New("Limited ", user.Email, " by conn or ip")
|
||||
}
|
||||
managedWriter := &ManagedWriter{
|
||||
writer: uplinkWriter,
|
||||
email: user.Email,
|
||||
manager: d.Wm,
|
||||
}
|
||||
d.Wm.AddWriter(managedWriter)
|
||||
inboundLink.Writer = managedWriter
|
||||
if w != nil {
|
||||
inboundLink.Writer = rate.NewRateLimitWriter(inboundLink.Writer, w)
|
||||
outboundLink.Writer = rate.NewRateLimitWriter(outboundLink.Writer, w)
|
||||
}
|
||||
p := d.policy.ForLevel(user.Level)
|
||||
if p.Stats.UserUplink {
|
||||
name := "user>>>" + user.Email + ">>>traffic>>>uplink"
|
||||
if c, _ := stats.GetOrRegisterCounter(d.stats, name); c != nil {
|
||||
inboundLink.Writer = &SizeStatWriter{
|
||||
Counter: c,
|
||||
Writer: inboundLink.Writer,
|
||||
}
|
||||
}
|
||||
var t *counter.TrafficCounter
|
||||
if c, ok := d.Counter.Load(sessionInbound.Tag); !ok {
|
||||
t = counter.NewTrafficCounter()
|
||||
d.Counter.Store(sessionInbound.Tag, t)
|
||||
} else {
|
||||
t = c.(*counter.TrafficCounter)
|
||||
}
|
||||
if p.Stats.UserDownlink {
|
||||
name := "user>>>" + user.Email + ">>>traffic>>>downlink"
|
||||
if c, _ := stats.GetOrRegisterCounter(d.stats, name); c != nil {
|
||||
outboundLink.Writer = &SizeStatWriter{
|
||||
Counter: c,
|
||||
Writer: outboundLink.Writer,
|
||||
}
|
||||
}
|
||||
|
||||
inboundLink.Writer = &UploadTrafficWriter{
|
||||
Counter: t.GetCounter(user.Email),
|
||||
Writer: inboundLink.Writer,
|
||||
}
|
||||
|
||||
outboundLink.Writer = &DownloadTrafficWriter{
|
||||
Counter: t.GetCounter(user.Email),
|
||||
Writer: outboundLink.Writer,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
61
core/xray/app/dispatcher/linkmanager.go
Normal file
61
core/xray/app/dispatcher/linkmanager.go
Normal file
@@ -0,0 +1,61 @@
|
||||
package dispatcher
|
||||
|
||||
import (
|
||||
sync "sync"
|
||||
|
||||
"github.com/xtls/xray-core/common"
|
||||
"github.com/xtls/xray-core/common/buf"
|
||||
)
|
||||
|
||||
type WriterManager struct {
|
||||
writers map[string]map[*ManagedWriter]struct{}
|
||||
mu sync.Mutex
|
||||
}
|
||||
|
||||
func (m *WriterManager) AddWriter(writer *ManagedWriter) {
|
||||
m.mu.Lock()
|
||||
defer m.mu.Unlock()
|
||||
if _, exists := m.writers[writer.email]; !exists {
|
||||
m.writers[writer.email] = make(map[*ManagedWriter]struct{})
|
||||
}
|
||||
m.writers[writer.email][writer] = struct{}{}
|
||||
}
|
||||
|
||||
func (m *WriterManager) RemoveWriter(writer *ManagedWriter) {
|
||||
m.mu.Lock()
|
||||
defer m.mu.Unlock()
|
||||
|
||||
if _, exists := m.writers[writer.email]; !exists {
|
||||
return
|
||||
}
|
||||
delete(m.writers[writer.email], writer)
|
||||
}
|
||||
|
||||
func (m *WriterManager) RemoveWritersForUser(email string) {
|
||||
m.mu.Lock()
|
||||
defer m.mu.Unlock()
|
||||
|
||||
if _, exists := m.writers[email]; !exists {
|
||||
return
|
||||
}
|
||||
for writer := range m.writers[email] {
|
||||
delete(m.writers[email], writer)
|
||||
common.Close(writer.writer)
|
||||
}
|
||||
delete(m.writers, email)
|
||||
}
|
||||
|
||||
type ManagedWriter struct {
|
||||
writer buf.Writer
|
||||
email string
|
||||
manager *WriterManager
|
||||
}
|
||||
|
||||
func (w *ManagedWriter) WriteMultiBuffer(mb buf.MultiBuffer) error {
|
||||
return w.writer.WriteMultiBuffer(mb)
|
||||
}
|
||||
|
||||
func (w *ManagedWriter) Close() error {
|
||||
w.manager.RemoveWriter(w)
|
||||
return common.Close(w.writer)
|
||||
}
|
||||
@@ -1,25 +1,43 @@
|
||||
package dispatcher
|
||||
|
||||
import (
|
||||
"github.com/InazumaV/V2bX/common/counter"
|
||||
"github.com/xtls/xray-core/common"
|
||||
"github.com/xtls/xray-core/common/buf"
|
||||
"github.com/xtls/xray-core/features/stats"
|
||||
)
|
||||
|
||||
type SizeStatWriter struct {
|
||||
Counter stats.Counter
|
||||
type UploadTrafficWriter struct {
|
||||
Counter *counter.TrafficStorage
|
||||
Writer buf.Writer
|
||||
}
|
||||
|
||||
func (w *SizeStatWriter) WriteMultiBuffer(mb buf.MultiBuffer) error {
|
||||
w.Counter.Add(int64(mb.Len()))
|
||||
type DownloadTrafficWriter struct {
|
||||
Counter *counter.TrafficStorage
|
||||
Writer buf.Writer
|
||||
}
|
||||
|
||||
func (w *UploadTrafficWriter) WriteMultiBuffer(mb buf.MultiBuffer) error {
|
||||
w.Counter.UpCounter.Add(int64(mb.Len()))
|
||||
return w.Writer.WriteMultiBuffer(mb)
|
||||
}
|
||||
|
||||
func (w *SizeStatWriter) Close() error {
|
||||
func (w *UploadTrafficWriter) Close() error {
|
||||
return common.Close(w.Writer)
|
||||
}
|
||||
|
||||
func (w *SizeStatWriter) Interrupt() {
|
||||
func (w *UploadTrafficWriter) Interrupt() {
|
||||
common.Interrupt(w.Writer)
|
||||
}
|
||||
|
||||
func (w *DownloadTrafficWriter) WriteMultiBuffer(mb buf.MultiBuffer) error {
|
||||
w.Counter.DownCounter.Add(int64(mb.Len()))
|
||||
return w.Writer.WriteMultiBuffer(mb)
|
||||
}
|
||||
|
||||
func (w *DownloadTrafficWriter) Close() error {
|
||||
return common.Close(w.Writer)
|
||||
}
|
||||
|
||||
func (w *DownloadTrafficWriter) Interrupt() {
|
||||
common.Interrupt(w.Writer)
|
||||
}
|
||||
|
||||
@@ -7,8 +7,9 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"encoding/json"
|
||||
|
||||
"github.com/InazumaV/V2bX/api/panel"
|
||||
"github.com/goccy/go-json"
|
||||
log "github.com/sirupsen/logrus"
|
||||
coreConf "github.com/xtls/xray-core/infra/conf"
|
||||
)
|
||||
|
||||
@@ -8,9 +8,10 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"encoding/json"
|
||||
|
||||
"github.com/InazumaV/V2bX/api/panel"
|
||||
"github.com/InazumaV/V2bX/conf"
|
||||
"github.com/goccy/go-json"
|
||||
"github.com/xtls/xray-core/common/net"
|
||||
"github.com/xtls/xray-core/core"
|
||||
coreConf "github.com/xtls/xray-core/infra/conf"
|
||||
@@ -133,12 +134,14 @@ func buildInbound(option *conf.Options, nodeInfo *panel.NodeInfo, tag string) (*
|
||||
in.StreamSetting.REALITYSettings = &coreConf.REALITYConfig{
|
||||
Dest: d,
|
||||
Xver: xver,
|
||||
Show: false,
|
||||
ServerNames: []string{v.TlsSettings.ServerName},
|
||||
PrivateKey: v.TlsSettings.PrivateKey,
|
||||
MinClientVer: v.RealityConfig.MinClientVer,
|
||||
MaxClientVer: v.RealityConfig.MaxClientVer,
|
||||
MaxTimeDiff: uint64(mtd.Microseconds()),
|
||||
ShortIds: []string{v.TlsSettings.ShortId},
|
||||
Mldsa65Seed: v.TlsSettings.Mldsa65Seed,
|
||||
}
|
||||
default:
|
||||
break
|
||||
|
||||
@@ -17,6 +17,7 @@ type DNSConfig struct {
|
||||
}
|
||||
|
||||
func (c *Xray) AddNode(tag string, info *panel.NodeInfo, config *conf.Options) error {
|
||||
c.nodeReportMinTrafficBytes[tag] = config.ReportMinTraffic * 1024
|
||||
err := updateDNSConfig(info)
|
||||
if err != nil {
|
||||
return fmt.Errorf("build dns error: %s", err)
|
||||
|
||||
@@ -3,8 +3,9 @@ package xray
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"encoding/json"
|
||||
|
||||
conf2 "github.com/InazumaV/V2bX/conf"
|
||||
"github.com/goccy/go-json"
|
||||
"github.com/xtls/xray-core/core"
|
||||
"github.com/xtls/xray-core/infra/conf"
|
||||
)
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/InazumaV/V2bX/api/panel"
|
||||
"github.com/InazumaV/V2bX/common/counter"
|
||||
"github.com/InazumaV/V2bX/common/format"
|
||||
vCore "github.com/InazumaV/V2bX/core"
|
||||
"github.com/xtls/xray-core/common/protocol"
|
||||
@@ -32,46 +33,61 @@ func (c *Xray) DelUsers(users []panel.UserInfo, tag string, _ *panel.NodeInfo) e
|
||||
if err != nil {
|
||||
return fmt.Errorf("get user manager error: %s", err)
|
||||
}
|
||||
var up, down, user string
|
||||
var user string
|
||||
c.users.mapLock.Lock()
|
||||
defer c.users.mapLock.Unlock()
|
||||
for i := range users {
|
||||
user = format.UserTag(tag, users[i].Uuid)
|
||||
err = userManager.RemoveUser(context.Background(), user)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
up = "user>>>" + user + ">>>traffic>>>uplink"
|
||||
down = "user>>>" + user + ">>>traffic>>>downlink"
|
||||
c.shm.UnregisterCounter(up)
|
||||
c.shm.UnregisterCounter(down)
|
||||
delete(c.users.uidMap, user)
|
||||
c.dispatcher.Counter.Delete(user)
|
||||
c.dispatcher.Wm.RemoveWritersForUser(user)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Xray) GetUserTraffic(tag, uuid string, reset bool) (up int64, down int64) {
|
||||
upName := "user>>>" + format.UserTag(tag, uuid) + ">>>traffic>>>uplink"
|
||||
downName := "user>>>" + format.UserTag(tag, uuid) + ">>>traffic>>>downlink"
|
||||
upCounter := c.shm.GetCounter(upName)
|
||||
downCounter := c.shm.GetCounter(downName)
|
||||
if reset {
|
||||
if upCounter != nil {
|
||||
up = upCounter.Set(0)
|
||||
}
|
||||
if downCounter != nil {
|
||||
down = downCounter.Set(0)
|
||||
}
|
||||
} else {
|
||||
if upCounter != nil {
|
||||
up = upCounter.Value()
|
||||
}
|
||||
if downCounter != nil {
|
||||
down = downCounter.Value()
|
||||
func (x *Xray) GetUserTrafficSlice(tag string, reset bool) ([]panel.UserTraffic, error) {
|
||||
trafficSlice := make([]panel.UserTraffic, 0)
|
||||
x.users.mapLock.RLock()
|
||||
defer x.users.mapLock.RUnlock()
|
||||
if v, ok := x.dispatcher.Counter.Load(tag); ok {
|
||||
c := v.(*counter.TrafficCounter)
|
||||
c.Counters.Range(func(key, value interface{}) bool {
|
||||
email := key.(string)
|
||||
traffic := value.(*counter.TrafficStorage)
|
||||
up := traffic.UpCounter.Load()
|
||||
down := traffic.DownCounter.Load()
|
||||
if up+down > x.nodeReportMinTrafficBytes[tag] {
|
||||
if reset {
|
||||
traffic.UpCounter.Store(0)
|
||||
traffic.DownCounter.Store(0)
|
||||
}
|
||||
trafficSlice = append(trafficSlice, panel.UserTraffic{
|
||||
UID: x.users.uidMap[email],
|
||||
Upload: up,
|
||||
Download: down,
|
||||
})
|
||||
}
|
||||
return true
|
||||
})
|
||||
if len(trafficSlice) == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
return trafficSlice, nil
|
||||
}
|
||||
return up, down
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (c *Xray) AddUsers(p *vCore.AddUsersParams) (added int, err error) {
|
||||
users := make([]*protocol.User, 0, len(p.Users))
|
||||
c.users.mapLock.Lock()
|
||||
defer c.users.mapLock.Unlock()
|
||||
for i := range p.Users {
|
||||
c.users.uidMap[format.UserTag(p.Tag, p.Users[i].Uuid)] = p.Users[i].Id
|
||||
}
|
||||
var users []*protocol.User
|
||||
switch p.NodeInfo.Type {
|
||||
case "vmess":
|
||||
users = buildVmessUsers(p.Tag, p.Users)
|
||||
|
||||
@@ -5,11 +5,12 @@ import (
|
||||
"os"
|
||||
"sync"
|
||||
|
||||
"encoding/json/v2"
|
||||
|
||||
"github.com/InazumaV/V2bX/conf"
|
||||
vCore "github.com/InazumaV/V2bX/core"
|
||||
"github.com/InazumaV/V2bX/core/xray/app/dispatcher"
|
||||
_ "github.com/InazumaV/V2bX/core/xray/distro/all"
|
||||
"github.com/goccy/go-json"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/xtls/xray-core/app/proxyman"
|
||||
"github.com/xtls/xray-core/app/stats"
|
||||
@@ -30,16 +31,29 @@ func init() {
|
||||
|
||||
// Xray Structure
|
||||
type Xray struct {
|
||||
access sync.Mutex
|
||||
Server *core.Instance
|
||||
ihm inbound.Manager
|
||||
ohm outbound.Manager
|
||||
shm statsFeature.Manager
|
||||
dispatcher *dispatcher.DefaultDispatcher
|
||||
access sync.Mutex
|
||||
Server *core.Instance
|
||||
ihm inbound.Manager
|
||||
ohm outbound.Manager
|
||||
shm statsFeature.Manager
|
||||
dispatcher *dispatcher.DefaultDispatcher
|
||||
users *UserMap
|
||||
nodeReportMinTrafficBytes map[string]int64
|
||||
}
|
||||
|
||||
type UserMap struct {
|
||||
uidMap map[string]int
|
||||
mapLock sync.RWMutex
|
||||
}
|
||||
|
||||
func New(c *conf.CoreConfig) (vCore.Core, error) {
|
||||
return &Xray{Server: getCore(c.XrayConfig)}, nil
|
||||
return &Xray{
|
||||
Server: getCore(c.XrayConfig),
|
||||
users: &UserMap{
|
||||
uidMap: make(map[string]int),
|
||||
},
|
||||
nodeReportMinTrafficBytes: make(map[string]int64),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func parseConnectionConfig(c *conf.XrayConnectionConfig) (policy *coreConf.Policy) {
|
||||
|
||||
@@ -7,14 +7,15 @@
|
||||
{
|
||||
"Type": "sing",
|
||||
"Log": {
|
||||
"Level": "error",
|
||||
"Level": "info",
|
||||
"Timestamp": true
|
||||
},
|
||||
"NTP": {
|
||||
"Enable": true,
|
||||
"Enable": false,
|
||||
"Server": "time.apple.com",
|
||||
"ServerPort": 0
|
||||
}
|
||||
},
|
||||
"OriginalPath": "/etc/V2bX/sing_origin.json"
|
||||
}
|
||||
],
|
||||
"Nodes": [
|
||||
@@ -27,20 +28,19 @@
|
||||
"Timeout": 30,
|
||||
"ListenIP": "0.0.0.0",
|
||||
"SendIP": "0.0.0.0",
|
||||
"EnableProxyProtocol": false,
|
||||
"EnableDNS": true,
|
||||
"DomainStrategy": "ipv4_only",
|
||||
"LimitConfig": {
|
||||
"EnableRealtime": false,
|
||||
"SpeedLimit": 0,
|
||||
"IPLimit": 0,
|
||||
"ConnLimit": 0,
|
||||
"EnableDynamicSpeedLimit": false,
|
||||
"DynamicSpeedLimitConfig": {
|
||||
"Periodic": 60,
|
||||
"Traffic": 1000,
|
||||
"SpeedLimit": 100,
|
||||
"ExpireTime": 60
|
||||
"DeviceOnlineMinTraffic": 200,
|
||||
"MinReportTraffic": 0,
|
||||
"TCPFastOpen": false,
|
||||
"SniffEnabled": true,
|
||||
"CertConfig": {
|
||||
"CertMode": "self",
|
||||
"RejectUnknownSni": false,
|
||||
"CertDomain": "example.com",
|
||||
"CertFile": "/etc/V2bX/fullchain.cer",
|
||||
"KeyFile": "/etc/V2bX/cert.key",
|
||||
"Provider": "cloudflare",
|
||||
"DNSEnv": {
|
||||
"EnvName": "env1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,259 +0,0 @@
|
||||
{
|
||||
"Log": {
|
||||
// V2bX 的日志配置,独立于各 Core 的 log 配置
|
||||
|
||||
// 日志等级,info, warn, error, none
|
||||
"Level": "error",
|
||||
// 日志输出路径,默认输出到标准输出
|
||||
"Output": ""
|
||||
},
|
||||
"Cores": [
|
||||
{
|
||||
// Core类型
|
||||
"Type": "sing",
|
||||
// Core标识名,可选,如果需要启动多个同类型内核则必填
|
||||
"Name": "sing1",
|
||||
"Log": {
|
||||
// 同 SingBox log 部分配置
|
||||
|
||||
"Level": "error",
|
||||
"Timestamp": true
|
||||
},
|
||||
"NTP": {
|
||||
// 同 SingBox ntp 部分配置
|
||||
// VMess VLESS 建议开启
|
||||
"Enable": true,
|
||||
"Server": "time.apple.com",
|
||||
"ServerPort": 0
|
||||
},
|
||||
"DnsConfigPath": "/etc/V2bX/dns.json",
|
||||
// SingBox源配置文件目录,用于引用标准SingBox配置文件
|
||||
"OriginalPath": "/etc/V2bX/sing_origin.json"
|
||||
},
|
||||
{
|
||||
"Type": "sing",
|
||||
"Name": "sing2",
|
||||
"Log": {
|
||||
"Level": "info",
|
||||
"Timestamp": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"Type": "xray",
|
||||
"Log": {
|
||||
// 同 Xray-core log 部分配置
|
||||
|
||||
"Level": "error"
|
||||
},
|
||||
// 静态资源文件目录
|
||||
"AssetPath": "",
|
||||
// DNS配置文件目录
|
||||
"DnsConfigPath": "",
|
||||
// 路由配置文件目录
|
||||
"RouteConfigPath": "",
|
||||
// 本地策略相关配置
|
||||
"ConnectionConfig": {
|
||||
// 详见 https://xtls.github.io/config/policy.html#levelpolicyobject
|
||||
|
||||
"handshake": 4,
|
||||
"connIdle": 300,
|
||||
"uplinkOnly": 2,
|
||||
"downlinkOnly": 5,
|
||||
"statsUserUplink": false,
|
||||
"statsUserDownlink": false,
|
||||
"bufferSize": 4
|
||||
},
|
||||
// Inbound配置文件目录
|
||||
"InboundConfigPath": "",
|
||||
// Outbound配置文件目录
|
||||
"OutboundConfigPath": ""
|
||||
}
|
||||
],
|
||||
"Nodes": [
|
||||
// Node配置有两种写法
|
||||
{
|
||||
// 写法1
|
||||
// sing内核
|
||||
|
||||
// Node标识名,便于查看日志,不填将通过下发的节点配置自动生成
|
||||
// 务必注意不要重复,否则会出现问题
|
||||
"Name": "sing_node1",
|
||||
|
||||
// 要使用的Core的类型
|
||||
// 如果填写了CoreName可不填,但单内核务必填写
|
||||
// 建议视情况填写Core和CoreName其中一个,如果均没有填写将随机选择支持的内核
|
||||
"Core": "sing",
|
||||
|
||||
// 要使用的Core的标识名,如果没有定义多个同类型内核可不填
|
||||
"CoreName": "sing1",
|
||||
|
||||
// API接口地址
|
||||
"ApiHost": "http://127.0.0.1",
|
||||
|
||||
// API密钥,即Token
|
||||
"ApiKey": "test",
|
||||
|
||||
// 节点ID
|
||||
"NodeID": 33,
|
||||
|
||||
// 节点类型
|
||||
"NodeType": "shadowsocks",
|
||||
|
||||
// 请求超时时间
|
||||
"Timeout": 30,
|
||||
|
||||
// 监听IP
|
||||
"ListenIP": "0.0.0.0",
|
||||
|
||||
// 发送IP
|
||||
"SendIP": "0.0.0.0",
|
||||
|
||||
// 开启 Proxy Protocol,参见 https://github.com/haproxy/haproxy/blob/master/doc/proxy-protocol.txt
|
||||
"EnableProxyProtocol": false,
|
||||
|
||||
// 开启 TCP Fast Open
|
||||
"EnableTFO": true,
|
||||
|
||||
// 开启 DNS
|
||||
"EnableDNS" : true,
|
||||
// 设置 Domain Strategy 需要开启 DNS ,默认 AsIS
|
||||
// 可选 prefer_ipv4 / prefer_ipv6 / ipv4_only / ipv6_only
|
||||
"DomainStrategy": "ipv4_only",
|
||||
|
||||
// 限制器相关配置
|
||||
"LimitConfig": {
|
||||
// 开启实时连接数及IP数限制
|
||||
"EnableRealtime": false,
|
||||
|
||||
// 用户速度限制
|
||||
"SpeedLimit": 0,
|
||||
|
||||
// 用户IP限制
|
||||
"IPLimit": 0,
|
||||
|
||||
// 用户连接数限制
|
||||
"ConnLimit": 0,
|
||||
|
||||
// 开启动态限速
|
||||
"EnableDynamicSpeedLimit": false,
|
||||
|
||||
// 动态限速相关配置
|
||||
"DynamicSpeedLimitConfig": {
|
||||
// 检查周期
|
||||
"Periodic": 60,
|
||||
|
||||
// 检查周期内触发限制的流量数
|
||||
"Traffic": 1000,
|
||||
|
||||
// 触发限制后的速度限制
|
||||
"SpeedLimit": 100,
|
||||
|
||||
// 速度限制过期时间
|
||||
"ExpireTime": 60
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
// 证书相关配置
|
||||
"CertConfig": {
|
||||
// 证书申请模式,none、http、dns、self
|
||||
"CertMode": "none",
|
||||
|
||||
"RejectUnknownSni": false,
|
||||
|
||||
// 证书域名
|
||||
"CertDomain": "test.com",
|
||||
|
||||
// 证书文件目录
|
||||
"CertFile": "/etc/V2bX/cert/1.pem",
|
||||
|
||||
// 密钥文件目录
|
||||
"KeyFile": "/etc/V2bX/cert/1.key",
|
||||
|
||||
// 申请证书时使用的用户邮箱
|
||||
"Email": "1@test.com",
|
||||
|
||||
// DNS解析提供者
|
||||
"Provider": "cloudflare",
|
||||
|
||||
// DNS解析提供者的环境变量,详见 https://go-acme.github.io/lego/dns/
|
||||
"DNSEnv": {
|
||||
"EnvName": "env1"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
// xray内核
|
||||
|
||||
"Name": "xray_node1",
|
||||
"Core": "xray",
|
||||
"CoreName": "",
|
||||
"ApiHost": "http://127.0.0.1",
|
||||
"ApiKey": "test",
|
||||
"NodeID": 33,
|
||||
"NodeType": "shadowsocks",
|
||||
"Timeout": 30,
|
||||
"ListenIP": "0.0.0.0",
|
||||
"SendIP": "0.0.0.0",
|
||||
"EnableProxyProtocol": true,
|
||||
"EnableTFO": true,
|
||||
// 以上同 sing
|
||||
|
||||
// 开启自定义DNS
|
||||
"EnableDNS": false,
|
||||
|
||||
// DNS解析类型,AsIs、UseIP、UseIPv4、UseIPv6
|
||||
"DNSType": "AsIs",
|
||||
|
||||
// 开启udp over tcp
|
||||
"EnableUot": false,
|
||||
|
||||
// 禁用IVCheck
|
||||
"DisableIVCheck": false,
|
||||
|
||||
// 禁用嗅探
|
||||
"DisableSniffing": false,
|
||||
|
||||
// 开启回落
|
||||
"EnableFallback": false,
|
||||
|
||||
// 回落相关配置
|
||||
"FallBackConfigs":{
|
||||
// 详见 https://xtls.github.io/config/features/fallback.html#fallbackobject
|
||||
|
||||
"SNI": "",
|
||||
"Alpn": "",
|
||||
"Path": "",
|
||||
"Dest": "",
|
||||
"ProxyProtocolVer": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
// 写法2
|
||||
|
||||
// 类似旧配置文件 ApiConfig 部分
|
||||
"ApiConfig": {
|
||||
"ApiHost": "http://127.0.0.1",
|
||||
"ApiKey": "test",
|
||||
"NodeID": 33,
|
||||
"Timeout": 30
|
||||
},
|
||||
// 类似旧配置文件 ControllerConfig 部分
|
||||
"Options": {
|
||||
"Core": "sing",
|
||||
"EnableProxyProtocol": true,
|
||||
"EnableTFO": true,
|
||||
"DomainStrategy": "ipv4_only"
|
||||
// More
|
||||
}
|
||||
},
|
||||
{
|
||||
// 引用本地其他配置文件
|
||||
"Include": "../example/config_full_node1.json"
|
||||
},
|
||||
{
|
||||
// 通过Http引用远端配置文件
|
||||
"Include": "http://127.0.0.1:11451/config_full_node1.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"Core": "xray",
|
||||
"ApiHost": "https://127.0.0.1",
|
||||
"ApiKey": "key",
|
||||
"NodeID": 1,
|
||||
"NodeType": "vmess",
|
||||
"Timeout": 30,
|
||||
"ListenIP": "0.0.0.0",
|
||||
"SendIP": "0.0.0.0",
|
||||
"EnableProxyProtocol": false,
|
||||
"EnableTFO": true,
|
||||
"DNSType": "ipv4_only"
|
||||
}
|
||||
91
go.mod
91
go.mod
@@ -1,29 +1,29 @@
|
||||
module github.com/InazumaV/V2bX
|
||||
|
||||
go 1.24
|
||||
go 1.25
|
||||
|
||||
toolchain go1.24.1
|
||||
toolchain go1.25.0
|
||||
|
||||
require (
|
||||
github.com/apernet/hysteria/core/v2 v2.6.1
|
||||
github.com/apernet/hysteria/extras/v2 v2.6.1
|
||||
github.com/apernet/quic-go v0.49.1-0.20250204013113-43c72b1281a0
|
||||
github.com/apernet/hysteria/core/v2 v2.6.2
|
||||
github.com/apernet/hysteria/extras/v2 v2.6.2
|
||||
github.com/apernet/quic-go v0.52.1-0.20250607183305-9320c9d14431
|
||||
github.com/beevik/ntp v1.4.4-0.20240716062501-06ef196b89ec
|
||||
github.com/fsnotify/fsnotify v1.8.0
|
||||
github.com/go-acme/lego/v4 v4.21.1-0.20241220151055-ee7a9e4fa04f
|
||||
github.com/go-resty/resty/v2 v2.16.2
|
||||
github.com/goccy/go-json v0.10.4
|
||||
github.com/hashicorp/go-multierror v1.1.2-0.20241119060415-613124da9385
|
||||
github.com/juju/ratelimit v1.0.2
|
||||
github.com/sagernet/sing v0.6.11-0.20250521033217-30d675ea099b
|
||||
github.com/sagernet/sing v0.7.0-beta.2
|
||||
github.com/sagernet/sing-box v1.12.0
|
||||
github.com/sirupsen/logrus v1.9.3
|
||||
github.com/spf13/cobra v1.9.1
|
||||
github.com/spf13/viper v1.19.0
|
||||
github.com/xtls/xray-core v1.250516.1-0.20250527015530-84c8e24a6c6b
|
||||
github.com/vmihailenco/msgpack/v5 v5.4.1
|
||||
github.com/xtls/xray-core v1.250803.0
|
||||
go.uber.org/zap v1.27.0
|
||||
golang.org/x/crypto v0.38.0
|
||||
golang.org/x/sys v0.33.0
|
||||
golang.org/x/crypto v0.40.0
|
||||
golang.org/x/sys v0.34.0
|
||||
google.golang.org/protobuf v1.36.6
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1
|
||||
)
|
||||
@@ -31,7 +31,7 @@ require (
|
||||
require (
|
||||
cloud.google.com/go/auth v0.13.0 // indirect
|
||||
cloud.google.com/go/auth/oauth2adapt v0.2.6 // indirect
|
||||
cloud.google.com/go/compute/metadata v0.6.0 // indirect
|
||||
cloud.google.com/go/compute/metadata v0.7.0 // indirect
|
||||
filippo.io/edwards25519 v1.1.0 // indirect
|
||||
github.com/AdamSLevy/jsonrpc2/v14 v14.1.0 // indirect
|
||||
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect
|
||||
@@ -84,7 +84,7 @@ require (
|
||||
github.com/civo/civogo v0.3.11 // indirect
|
||||
github.com/cloudflare/circl v1.6.1 // indirect
|
||||
github.com/cloudflare/cloudflare-go v0.112.0 // indirect
|
||||
github.com/coder/websocket v1.8.12 // indirect
|
||||
github.com/coder/websocket v1.8.13 // indirect
|
||||
github.com/coreos/go-iptables v0.7.1-0.20240112124308-65c67c9f46e6 // indirect
|
||||
github.com/cpu/goacmedns v0.1.1 // indirect
|
||||
github.com/cretz/bine v0.2.0 // indirect
|
||||
@@ -103,12 +103,12 @@ require (
|
||||
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
|
||||
github.com/gaissmai/bart v0.11.1 // indirect
|
||||
github.com/ghodss/yaml v1.0.1-0.20220118164431-d8423dcdf344 // indirect
|
||||
github.com/go-chi/chi/v5 v5.2.1 // indirect
|
||||
github.com/go-chi/chi/v5 v5.2.2 // indirect
|
||||
github.com/go-chi/render v1.0.3 // indirect
|
||||
github.com/go-errors/errors v1.0.1 // indirect
|
||||
github.com/go-jose/go-jose/v4 v4.0.4 // indirect
|
||||
github.com/go-jose/go-jose/v4 v4.0.5 // indirect
|
||||
github.com/go-json-experiment/json v0.0.0-20250103232110-6a9a0fde9288 // indirect
|
||||
github.com/go-logr/logr v1.4.2 // indirect
|
||||
github.com/go-logr/logr v1.4.3 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-ole/go-ole v1.3.0 // indirect
|
||||
github.com/go-playground/locales v0.14.1 // indirect
|
||||
@@ -118,6 +118,7 @@ require (
|
||||
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
|
||||
github.com/gobwas/httphead v0.1.0 // indirect
|
||||
github.com/gobwas/pool v0.2.1 // indirect
|
||||
github.com/goccy/go-json v0.10.4 // indirect
|
||||
github.com/godbus/dbus/v5 v5.1.1-0.20230522191255-76236955d466 // indirect
|
||||
github.com/gofrs/flock v0.12.1 // indirect
|
||||
github.com/gofrs/uuid/v5 v5.3.2 // indirect
|
||||
@@ -164,9 +165,9 @@ require (
|
||||
github.com/labbsr0x/bindman-dns-webhook v1.0.2 // indirect
|
||||
github.com/labbsr0x/goh v1.0.1 // indirect
|
||||
github.com/leodido/go-urn v1.2.4 // indirect
|
||||
github.com/libdns/alidns v1.0.4-libdns.v1.beta1 // indirect
|
||||
github.com/libdns/cloudflare v0.2.2-0.20250430151523-b46a2b0885f6 // indirect
|
||||
github.com/libdns/libdns v1.0.0-beta.1 // indirect
|
||||
github.com/libdns/alidns v1.0.5-libdns.v1.beta1 // indirect
|
||||
github.com/libdns/cloudflare v0.2.2-0.20250708034226-c574dccb31a6 // indirect
|
||||
github.com/libdns/libdns v1.1.0 // indirect
|
||||
github.com/linode/linodego v1.44.0 // indirect
|
||||
github.com/liquidweb/liquidweb-cli v0.6.9 // indirect
|
||||
github.com/liquidweb/liquidweb-go v1.6.4 // indirect
|
||||
@@ -178,9 +179,9 @@ require (
|
||||
github.com/mdlayher/sdnotify v1.0.0 // indirect
|
||||
github.com/mdlayher/socket v0.5.1 // indirect
|
||||
github.com/metacubex/tfo-go v0.0.0-20241231083714-66613d49c422 // indirect
|
||||
github.com/metacubex/utls v1.7.0-alpha.3 // indirect
|
||||
github.com/metacubex/utls v1.8.0 // indirect
|
||||
github.com/mholt/acmez/v3 v3.1.2 // indirect
|
||||
github.com/miekg/dns v1.1.66 // indirect
|
||||
github.com/miekg/dns v1.1.67 // indirect
|
||||
github.com/mimuret/golang-iij-dpf v0.9.1 // indirect
|
||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||
github.com/mitchellh/go-ps v1.0.0 // indirect
|
||||
@@ -214,8 +215,8 @@ require (
|
||||
github.com/pquerna/otp v1.4.0 // indirect
|
||||
github.com/prometheus-community/pro-bing v0.4.0 // indirect
|
||||
github.com/quic-go/qpack v0.5.1 // indirect
|
||||
github.com/quic-go/quic-go v0.52.0 // indirect
|
||||
github.com/refraction-networking/utls v1.7.3 // indirect
|
||||
github.com/quic-go/quic-go v0.54.0 // indirect
|
||||
github.com/refraction-networking/utls v1.8.0 // indirect
|
||||
github.com/regfish/regfish-dnsapi-go v0.1.1 // indirect
|
||||
github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 // indirect
|
||||
github.com/sacloud/api-client-go v0.2.10 // indirect
|
||||
@@ -231,15 +232,14 @@ require (
|
||||
github.com/sagernet/nftables v0.3.0-beta.4 // indirect
|
||||
github.com/sagernet/quic-go v0.52.0-beta.1 // indirect
|
||||
github.com/sagernet/sing-mux v0.3.2 // indirect
|
||||
github.com/sagernet/sing-quic v0.5.0-beta.1 // indirect
|
||||
github.com/sagernet/sing-shadowsocks v0.2.7 // indirect
|
||||
github.com/sagernet/sing-shadowsocks2 v0.2.0 // indirect
|
||||
github.com/sagernet/sing-quic v0.5.0-beta.3 // indirect
|
||||
github.com/sagernet/sing-shadowsocks v0.2.8 // indirect
|
||||
github.com/sagernet/sing-shadowsocks2 v0.2.1 // indirect
|
||||
github.com/sagernet/sing-shadowtls v0.2.1-0.20250503051639-fcd445d33c11 // indirect
|
||||
github.com/sagernet/sing-tun v0.6.6-0.20250428031943-0686f8c4f210 // indirect
|
||||
github.com/sagernet/sing-vmess v0.2.2-0.20250503051933-9b4cf17393f8 // indirect
|
||||
github.com/sagernet/sing-tun v0.7.0-beta.1 // indirect
|
||||
github.com/sagernet/sing-vmess v0.2.6 // indirect
|
||||
github.com/sagernet/smux v1.5.34-mod.2 // indirect
|
||||
github.com/sagernet/tailscale v1.80.3-mod.5 // indirect
|
||||
github.com/sagernet/utls v1.6.7 // indirect
|
||||
github.com/sagernet/wireguard-go v0.0.1-beta.7 // indirect
|
||||
github.com/sagernet/ws v0.0.0-20231204124109-acfe8907c854 // indirect
|
||||
github.com/sagikazarmark/locafero v0.4.0 // indirect
|
||||
@@ -280,20 +280,21 @@ require (
|
||||
github.com/vinyldns/go-vinyldns v0.9.16 // indirect
|
||||
github.com/vishvananda/netlink v1.3.1 // indirect
|
||||
github.com/vishvananda/netns v0.0.5 // indirect
|
||||
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
|
||||
github.com/volcengine/volc-sdk-golang v1.0.189 // indirect
|
||||
github.com/vultr/govultr/v3 v3.9.1 // indirect
|
||||
github.com/wyx2685/sing-vmess v0.0.0-20250524094403-696835735021 // indirect
|
||||
github.com/wyx2685/sing-vmess v0.0.0-20250723121437-95d5ab59ff92 // indirect
|
||||
github.com/x448/float16 v0.8.4 // indirect
|
||||
github.com/xtls/reality v0.0.0-20250527000105-e679ef7bb130 // indirect
|
||||
github.com/xtls/reality v0.0.0-20250725142056-5b52a03d4fb7 // indirect
|
||||
github.com/yandex-cloud/go-genproto v0.0.0-20241220122821-aeb3b05efd1c // indirect
|
||||
github.com/yandex-cloud/go-sdk v0.0.0-20241220131134-2393e243c134 // indirect
|
||||
github.com/zeebo/blake3 v0.2.4 // indirect
|
||||
go.mongodb.org/mongo-driver v1.12.0 // indirect
|
||||
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect
|
||||
go.opentelemetry.io/otel v1.34.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.34.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.34.0 // indirect
|
||||
go.opentelemetry.io/otel v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.36.0 // indirect
|
||||
go.uber.org/atomic v1.10.0 // indirect
|
||||
go.uber.org/mock v0.5.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
@@ -302,22 +303,22 @@ require (
|
||||
go4.org/mem v0.0.0-20240501181205-ae6ca9944745 // indirect
|
||||
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect
|
||||
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
|
||||
golang.org/x/mod v0.24.0 // indirect
|
||||
golang.org/x/net v0.40.0 // indirect
|
||||
golang.org/x/oauth2 v0.26.0 // indirect
|
||||
golang.org/x/sync v0.14.0 // indirect
|
||||
golang.org/x/term v0.32.0 // indirect
|
||||
golang.org/x/text v0.25.0 // indirect
|
||||
golang.org/x/mod v0.26.0 // indirect
|
||||
golang.org/x/net v0.42.0 // indirect
|
||||
golang.org/x/oauth2 v0.30.0 // indirect
|
||||
golang.org/x/sync v0.16.0 // indirect
|
||||
golang.org/x/term v0.33.0 // indirect
|
||||
golang.org/x/text v0.27.0 // indirect
|
||||
golang.org/x/time v0.9.0 // indirect
|
||||
golang.org/x/tools v0.33.0 // indirect
|
||||
golang.org/x/tools v0.34.0 // indirect
|
||||
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect
|
||||
golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 // indirect
|
||||
golang.zx2c4.com/wireguard/windows v0.5.3 // indirect
|
||||
google.golang.org/api v0.214.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20241021214115-324edc3d5d38 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a // indirect
|
||||
google.golang.org/grpc v1.72.1 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a // indirect
|
||||
google.golang.org/grpc v1.74.2 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/ns1/ns1-go.v2 v2.13.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
@@ -326,6 +327,6 @@ require (
|
||||
lukechampine.com/blake3 v1.4.1 // indirect
|
||||
)
|
||||
|
||||
//replace github.com/sagernet/sing-box v1.12.0 => ./sing-box_mod
|
||||
//replace github.com/sagernet/sing-box v1.12.0 => ../sing-box_mod
|
||||
|
||||
replace github.com/sagernet/sing-box v1.12.0 => github.com/wyx2685/sing-box_mod v1.12.0-beta.17.2
|
||||
replace github.com/sagernet/sing-box v1.12.0 => github.com/wyx2685/sing-box_mod v1.12.0
|
||||
|
||||
175
go.sum
175
go.sum
@@ -23,8 +23,8 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf
|
||||
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
|
||||
cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
|
||||
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
|
||||
cloud.google.com/go/compute/metadata v0.6.0 h1:A6hENjEsCDtC1k8byVsgwvVcioamEHvZ4j01OwKxG9I=
|
||||
cloud.google.com/go/compute/metadata v0.6.0/go.mod h1:FjyFAW1MW0C203CEOMDTu3Dk1FlqW3Rga40jzHL4hfg=
|
||||
cloud.google.com/go/compute/metadata v0.7.0 h1:PBWF+iiAerVNe8UCHxdOt6eHLVc3ydFeOCw78U8ytSU=
|
||||
cloud.google.com/go/compute/metadata v0.7.0/go.mod h1:j5MvL9PprKL39t166CoB1uVHfQMs4tFQZZcKwksXUjo=
|
||||
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
|
||||
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
|
||||
cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=
|
||||
@@ -96,8 +96,6 @@ github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3
|
||||
github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo=
|
||||
github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo=
|
||||
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
|
||||
github.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0 h1:Wo41lDOevRJSGpevP+8Pk5bANX7fJacO2w04aqLiC5I=
|
||||
github.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0/go.mod h1:FVGavL/QEBQDcBpr3fAojoK17xX5k9bicBphrOpP7uM=
|
||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||
github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87 h1:xPMsUicZ3iosVPSIP7bW5EcGUzjiiMl1OYTe14y/R24=
|
||||
github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87/go.mod h1:iGLljf5n9GjT6kc0HBvyI1nOKnGQbNB66VzSNbK5iks=
|
||||
@@ -128,12 +126,12 @@ github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer5
|
||||
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
|
||||
github.com/anytls/sing-anytls v0.0.9-0.20250508103614-8bc6dd599731 h1:nc7lKMMMXlp6bWFoD5EG10hgNgvYqf7o8icqXfNpNK0=
|
||||
github.com/anytls/sing-anytls v0.0.9-0.20250508103614-8bc6dd599731/go.mod h1:7rjN6IukwysmdusYsrV51Fgu1uW6vsrdd6ctjnEAln8=
|
||||
github.com/apernet/hysteria/core/v2 v2.6.1 h1:AEUINNpk0dVV/ibxCANAWnMe00dIq+jjA5K/xQo25Dc=
|
||||
github.com/apernet/hysteria/core/v2 v2.6.1/go.mod h1:tqXntjp6tS60Z7tUiXmiHRlPNl5ADyk7Eqe6iP6Ieac=
|
||||
github.com/apernet/hysteria/extras/v2 v2.6.1 h1:Da57xlUD6SeGIsT4bYVRgIDYaUT8GlxTT7CiU3JaeS0=
|
||||
github.com/apernet/hysteria/extras/v2 v2.6.1/go.mod h1:CeYpLqY2uuTmLwtzSXIXWldHm8oOd+B/y2S5j/VTd18=
|
||||
github.com/apernet/quic-go v0.49.1-0.20250204013113-43c72b1281a0 h1:oc6//C91pY9gGOBioHeyJrmmpKv/nS8fvTeDpKNPLnI=
|
||||
github.com/apernet/quic-go v0.49.1-0.20250204013113-43c72b1281a0/go.mod h1:/mMPNt1MHqduzaVB2qFHnJwam3BR5r5b35GvYouJs/o=
|
||||
github.com/apernet/hysteria/core/v2 v2.6.2 h1:xqwl8FPr/AWysfYuph1BKE8NpxtKgxq4S/1y2pU/lnQ=
|
||||
github.com/apernet/hysteria/core/v2 v2.6.2/go.mod h1:cPk2WXzYfovpz+ai+dc0d0965EEXh59ggQkGmFBdHCE=
|
||||
github.com/apernet/hysteria/extras/v2 v2.6.2 h1:cyOXT6aol5TbXIAjPuj7Ellqx17xoYgHrq7YMo+kzcg=
|
||||
github.com/apernet/hysteria/extras/v2 v2.6.2/go.mod h1:5eNUW7Em92U87pCFqA89eyly4yw8SlAEz/oih46bSHg=
|
||||
github.com/apernet/quic-go v0.52.1-0.20250607183305-9320c9d14431 h1:9/jM7e+kVALd7Jfu1c27dcEpT/Fd/Gzq2OsQjKjakKI=
|
||||
github.com/apernet/quic-go v0.52.1-0.20250607183305-9320c9d14431/go.mod h1:I/47OIGG5H/IfAm+nz2c6hm6b/NkEhpvptAoiPcY7jQ=
|
||||
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
|
||||
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
|
||||
github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc=
|
||||
@@ -225,8 +223,8 @@ github.com/cloudflare/cloudflare-go v0.112.0/go.mod h1:QB55kuJ5ZTeLNFcLJePfMuBil
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/coder/websocket v1.8.12 h1:5bUXkEPPIbewrnkU8LTCLVaxi4N4J8ahufH2vlo4NAo=
|
||||
github.com/coder/websocket v1.8.12/go.mod h1:LNVeNrXQZfe5qhS9ALED3uA+l5pPqvwXg3CKoDBB2gs=
|
||||
github.com/coder/websocket v1.8.13 h1:f3QZdXy7uGVz+4uCJy2nTZyM0yTBj8yANEHhqlXZ9FE=
|
||||
github.com/coder/websocket v1.8.13/go.mod h1:LNVeNrXQZfe5qhS9ALED3uA+l5pPqvwXg3CKoDBB2gs=
|
||||
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
|
||||
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/go-iptables v0.7.1-0.20240112124308-65c67c9f46e6 h1:8h5+bWd7R6AYUslN6c6iuZWTKsKxUFDlpnmilO6R2n0=
|
||||
@@ -315,8 +313,8 @@ github.com/github/fakeca v0.1.0 h1:Km/MVOFvclqxPM9dZBC4+QE564nU4gz4iZ0D9pMw28I=
|
||||
github.com/github/fakeca v0.1.0/go.mod h1:+bormgoGMMuamOscx7N91aOuUST7wdaJ2rNjeohylyo=
|
||||
github.com/go-acme/lego/v4 v4.21.1-0.20241220151055-ee7a9e4fa04f h1:DrYHyS9IDUyIZtt4M9x+OeYKuY1J7k+7XhSQoh5J8q4=
|
||||
github.com/go-acme/lego/v4 v4.21.1-0.20241220151055-ee7a9e4fa04f/go.mod h1:HrSWzm3Ckj45Ie3i+p1zKVobbQoMOaGu9m4up0dUeDI=
|
||||
github.com/go-chi/chi/v5 v5.2.1 h1:KOIHODQj58PmL80G2Eak4WdvUzjSJSm0vG72crDCqb8=
|
||||
github.com/go-chi/chi/v5 v5.2.1/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops=
|
||||
github.com/go-chi/chi/v5 v5.2.2 h1:CMwsvRVTbXVytCk1Wd72Zy1LAsAh9GxMmSNWLHCG618=
|
||||
github.com/go-chi/chi/v5 v5.2.2/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops=
|
||||
github.com/go-chi/render v1.0.3 h1:AsXqd2a1/INaIfUSKq3G5uA8weYx20FOsM7uSoCyyt4=
|
||||
github.com/go-chi/render v1.0.3/go.mod h1:/gr3hVkmYR0YlEy3LxCuVRFzEu9Ruok+gFqbIofjao0=
|
||||
github.com/go-cmd/cmd v1.0.5/go.mod h1:y8q8qlK5wQibcw63djSl/ntiHUHXHGdCkPk0j4QeW4s=
|
||||
@@ -325,8 +323,8 @@ github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-jose/go-jose/v4 v4.0.4 h1:VsjPI33J0SB9vQM6PLmNjoHqMQNGPiZ0rHL7Ni7Q6/E=
|
||||
github.com/go-jose/go-jose/v4 v4.0.4/go.mod h1:NKb5HO1EZccyMpiZNbdUw/14tiXNyUJh188dfnMCAfc=
|
||||
github.com/go-jose/go-jose/v4 v4.0.5 h1:M6T8+mKZl/+fNNuFHvGIzDz7BTLQPIounk/b9dw3AaE=
|
||||
github.com/go-jose/go-jose/v4 v4.0.5/go.mod h1:s3P1lRrkT8igV8D9OjyL4WRyHvjB6a4JSllnOrmmBOA=
|
||||
github.com/go-json-experiment/json v0.0.0-20250103232110-6a9a0fde9288 h1:KbX3Z3CgiYlbaavUq3Cj9/MjpO+88S7/AGXzynVDv84=
|
||||
github.com/go-json-experiment/json v0.0.0-20250103232110-6a9a0fde9288/go.mod h1:BWmvoE1Xia34f3l/ibJweyhrT+aROb/FQ6d+37F0e2s=
|
||||
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
@@ -339,8 +337,8 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V
|
||||
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
|
||||
github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
|
||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
|
||||
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
|
||||
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
|
||||
@@ -651,12 +649,13 @@ github.com/labbsr0x/goh v1.0.1 h1:97aBJkDjpyBZGPbQuOK5/gHcSFbcr5aRsq3RSRJFpPk=
|
||||
github.com/labbsr0x/goh v1.0.1/go.mod h1:8K2UhVoaWXcCU7Lxoa2omWnC8gyW8px7/lmO61c027w=
|
||||
github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q=
|
||||
github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4=
|
||||
github.com/libdns/alidns v1.0.4-libdns.v1.beta1 h1:ods22gD4PcT0g4qRX77ucykjz7Rppnkz3vQoxDbbKTM=
|
||||
github.com/libdns/alidns v1.0.4-libdns.v1.beta1/go.mod h1:ystHmPwcGoWjPrGpensQSMY9VoCx4cpR2hXNlwk9H/g=
|
||||
github.com/libdns/cloudflare v0.2.2-0.20250430151523-b46a2b0885f6 h1:0dlpPjNr8TaYZbkpwCiee4udBNrYrWG8EZPYEbjHEn8=
|
||||
github.com/libdns/cloudflare v0.2.2-0.20250430151523-b46a2b0885f6/go.mod h1:Aq4IXdjalB6mD0ELvKqJiIGim8zSC6mlIshRPMOAb5w=
|
||||
github.com/libdns/libdns v1.0.0-beta.1 h1:KIf4wLfsrEpXpZ3vmc/poM8zCATXT2klbdPe6hyOBjQ=
|
||||
github.com/libdns/alidns v1.0.5-libdns.v1.beta1 h1:txHK7UxDed3WFBDjrTZPuMn8X+WmhjBTTAMW5xdy5pQ=
|
||||
github.com/libdns/alidns v1.0.5-libdns.v1.beta1/go.mod h1:ystHmPwcGoWjPrGpensQSMY9VoCx4cpR2hXNlwk9H/g=
|
||||
github.com/libdns/cloudflare v0.2.2-0.20250708034226-c574dccb31a6 h1:3MGrVWs2COjMkQR17oUw1zMIPbm2YAzxDC3oGVZvQs8=
|
||||
github.com/libdns/cloudflare v0.2.2-0.20250708034226-c574dccb31a6/go.mod h1:w9uTmRCDlAoafAsTPnn2nJ0XHK/eaUMh86DUk8BWi60=
|
||||
github.com/libdns/libdns v1.0.0-beta.1/go.mod h1:4Bj9+5CQiNMVGf87wjX4CY3HQJypUHRuLvlsfsZqLWQ=
|
||||
github.com/libdns/libdns v1.1.0 h1:9ze/tWvt7Df6sbhOJRB8jT33GHEHpEQXdtkE3hPthbU=
|
||||
github.com/libdns/libdns v1.1.0/go.mod h1:4Bj9+5CQiNMVGf87wjX4CY3HQJypUHRuLvlsfsZqLWQ=
|
||||
github.com/linode/linodego v1.44.0 h1:JZLLWzCAx3CmHSV9NmCoXisuqKtrmPhfY9MrgvaHMUY=
|
||||
github.com/linode/linodego v1.44.0/go.mod h1:umdoNOmtbqAdGQbmQnPFZ2YS4US+/mU/1bA7MjoKAvg=
|
||||
github.com/liquidweb/go-lwApi v0.0.0-20190605172801-52a4864d2738/go.mod h1:0sYF9rMXb0vlG+4SzdiGMXHheCZxjguMq+Zb4S2BfBs=
|
||||
@@ -701,8 +700,8 @@ github.com/mdlayher/socket v0.5.1 h1:VZaqt6RkGkt2OE9l3GcC6nZkqD3xKeQLyfleW/uBcos
|
||||
github.com/mdlayher/socket v0.5.1/go.mod h1:TjPLHI1UgwEv5J1B5q0zTZq12A/6H7nKmtTanQE37IQ=
|
||||
github.com/metacubex/tfo-go v0.0.0-20241231083714-66613d49c422 h1:zGeQt3UyNydIVrMRB97AA5WsYEau/TyCnRtTf1yUmJY=
|
||||
github.com/metacubex/tfo-go v0.0.0-20241231083714-66613d49c422/go.mod h1:l9oLnLoEXyGZ5RVLsh7QCC5XsouTUyKk4F2nLm2DHLw=
|
||||
github.com/metacubex/utls v1.7.0-alpha.3 h1:cp1cEMUnoifiWrGHRzo+nCwPRveN9yPD8QaRFmfcYxA=
|
||||
github.com/metacubex/utls v1.7.0-alpha.3/go.mod h1:oknYT0qTOwE4hjPmZOEpzVdefnW7bAdGLvZcqmk4TLU=
|
||||
github.com/metacubex/utls v1.8.0 h1:mSYi6FMnmc5riARl5UZDmWVy710z+P5b7xuGW0lV9ac=
|
||||
github.com/metacubex/utls v1.8.0/go.mod h1:FdjYzVfCtgtna19hX0ER1Xsa5uJInwdQ4IcaaI98lEQ=
|
||||
github.com/mholt/acmez/v3 v3.1.2 h1:auob8J/0FhmdClQicvJvuDavgd5ezwLBfKuYmynhYzc=
|
||||
github.com/mholt/acmez/v3 v3.1.2/go.mod h1:L1wOU06KKvq7tswuMDwKdcHeKpFFgkppZy/y0DFxagQ=
|
||||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||
@@ -710,8 +709,8 @@ github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKju
|
||||
github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4=
|
||||
github.com/miekg/dns v1.1.47/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME=
|
||||
github.com/miekg/dns v1.1.51/go.mod h1:2Z9d3CP1LQWihRZUf29mQ19yDThaI4DAYzte2CaQW5c=
|
||||
github.com/miekg/dns v1.1.66 h1:FeZXOS3VCVsKnEAd+wBkjMC3D2K+ww66Cq3VnCINuJE=
|
||||
github.com/miekg/dns v1.1.66/go.mod h1:jGFzBsSNbJw6z1HYut1RKBKHA9PBdxeHrZG8J+gC2WE=
|
||||
github.com/miekg/dns v1.1.67 h1:kg0EHj0G4bfT5/oOys6HhZw4vmMlnoZ+gDu8tJ/AlI0=
|
||||
github.com/miekg/dns v1.1.67/go.mod h1:fujopn7TB3Pu3JM69XaawiU0wqjpL9/8xGop5UrTPps=
|
||||
github.com/mimuret/golang-iij-dpf v0.9.1 h1:Gj6EhHJkOhr+q2RnvRPJsPMcjuVnWPSccEHyoEehU34=
|
||||
github.com/mimuret/golang-iij-dpf v0.9.1/go.mod h1:sl9KyOkESib9+KRD3HaGpgi1xk7eoN2+d96LCLsME2M=
|
||||
github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY=
|
||||
@@ -878,14 +877,14 @@ github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1
|
||||
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
|
||||
github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI=
|
||||
github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg=
|
||||
github.com/quic-go/quic-go v0.52.0 h1:/SlHrCRElyaU6MaEPKqKr9z83sBg2v4FLLvWM+Z47pA=
|
||||
github.com/quic-go/quic-go v0.52.0/go.mod h1:MFlGGpcpJqRAfmYi6NC2cptDPSxRWTOGNuP4wqrWmzQ=
|
||||
github.com/quic-go/quic-go v0.54.0 h1:6s1YB9QotYI6Ospeiguknbp2Znb/jZYjZLRXn9kMQBg=
|
||||
github.com/quic-go/quic-go v0.54.0/go.mod h1:e68ZEaCdyviluZmy44P6Iey98v/Wfz6HCjQEm+l8zTY=
|
||||
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
|
||||
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
|
||||
github.com/redis/go-redis/v9 v9.6.1 h1:HHDteefn6ZkTtY5fGUE8tj8uy85AHk6zP7CpzIAM0y4=
|
||||
github.com/redis/go-redis/v9 v9.6.1/go.mod h1:0C0c6ycQsdpVNQpxb1njEQIqkx5UcsM8FJCQLgE9+RA=
|
||||
github.com/refraction-networking/utls v1.7.3 h1:L0WRhHY7Oq1T0zkdzVZMR6zWZv+sXbHB9zcuvsAEqCo=
|
||||
github.com/refraction-networking/utls v1.7.3/go.mod h1:TUhh27RHMGtQvjQq+RyO11P6ZNQNBb3N0v7wsEjKAIQ=
|
||||
github.com/refraction-networking/utls v1.8.0 h1:L38krhiTAyj9EeiQQa2sg+hYb4qwLCqdMcpZrRfbONE=
|
||||
github.com/refraction-networking/utls v1.8.0/go.mod h1:jkSOEkLqn+S/jtpEHPOsVv/4V4EVnelwbMQl4vCWXAM=
|
||||
github.com/regfish/regfish-dnsapi-go v0.1.1 h1:TJFtbePHkd47q5GZwYl1h3DIYXmoxdLjW/SBsPtB5IE=
|
||||
github.com/regfish/regfish-dnsapi-go v0.1.1/go.mod h1:ubIgXSfqarSnl3XHSn8hIFwFF3h0yrq0ZiWD93Y2VjY=
|
||||
github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 h1:f/FNXud6gA3MNr8meMVVGxhp+QBTqY91tM8HjEuMjGg=
|
||||
@@ -923,28 +922,26 @@ github.com/sagernet/nftables v0.3.0-beta.4/go.mod h1:OQXAjvjNGGFxaTgVCSTRIhYB5/l
|
||||
github.com/sagernet/quic-go v0.52.0-beta.1 h1:hWkojLg64zjV+MJOvJU/kOeWndm3tiEfBLx5foisszs=
|
||||
github.com/sagernet/quic-go v0.52.0-beta.1/go.mod h1:OV+V5kEBb8kJS7k29MzDu6oj9GyMc7HA07sE1tedxz4=
|
||||
github.com/sagernet/sing v0.6.9/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak=
|
||||
github.com/sagernet/sing v0.6.11-0.20250521033217-30d675ea099b h1:ZjTCYPb5f7aHdf1UpUvE22dVmf7BL8eQ/zLZhjgh7Wo=
|
||||
github.com/sagernet/sing v0.6.11-0.20250521033217-30d675ea099b/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak=
|
||||
github.com/sagernet/sing v0.7.0-beta.2 h1:UImAKtHGQX205lGYYXKA2qnEeVSml+hKS1oaOwvA14c=
|
||||
github.com/sagernet/sing v0.7.0-beta.2/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak=
|
||||
github.com/sagernet/sing-mux v0.3.2 h1:meZVFiiStvHThb/trcpAkCrmtJOuItG5Dzl1RRP5/NE=
|
||||
github.com/sagernet/sing-mux v0.3.2/go.mod h1:pht8iFY4c9Xltj7rhVd208npkNaeCxzyXCgulDPLUDA=
|
||||
github.com/sagernet/sing-quic v0.5.0-beta.1 h1:nC0i/s8LhlZB8ev6laZCXF/uiwAE4kRdT4PcDdE4rI4=
|
||||
github.com/sagernet/sing-quic v0.5.0-beta.1/go.mod h1:SAv/qdeDN+75msGG5U5ZIwG+3Ua50jVIKNrRSY8pkx0=
|
||||
github.com/sagernet/sing-shadowsocks v0.2.7 h1:zaopR1tbHEw5Nk6FAkM05wCslV6ahVegEZaKMv9ipx8=
|
||||
github.com/sagernet/sing-shadowsocks v0.2.7/go.mod h1:0rIKJZBR65Qi0zwdKezt4s57y/Tl1ofkaq6NlkzVuyE=
|
||||
github.com/sagernet/sing-shadowsocks2 v0.2.0 h1:wpZNs6wKnR7mh1wV9OHwOyUr21VkS3wKFHi+8XwgADg=
|
||||
github.com/sagernet/sing-shadowsocks2 v0.2.0/go.mod h1:RnXS0lExcDAovvDeniJ4IKa2IuChrdipolPYWBv9hWQ=
|
||||
github.com/sagernet/sing-quic v0.5.0-beta.3 h1:X/acRNsqQNfDlmwE7SorHfaZiny5e67hqIzM/592ric=
|
||||
github.com/sagernet/sing-quic v0.5.0-beta.3/go.mod h1:SAv/qdeDN+75msGG5U5ZIwG+3Ua50jVIKNrRSY8pkx0=
|
||||
github.com/sagernet/sing-shadowsocks v0.2.8 h1:PURj5PRoAkqeHh2ZW205RWzN9E9RtKCVCzByXruQWfE=
|
||||
github.com/sagernet/sing-shadowsocks v0.2.8/go.mod h1:lo7TWEMDcN5/h5B8S0ew+r78ZODn6SwVaFhvB6H+PTI=
|
||||
github.com/sagernet/sing-shadowsocks2 v0.2.1 h1:dWV9OXCeFPuYGHb6IRqlSptVnSzOelnqqs2gQ2/Qioo=
|
||||
github.com/sagernet/sing-shadowsocks2 v0.2.1/go.mod h1:RnXS0lExcDAovvDeniJ4IKa2IuChrdipolPYWBv9hWQ=
|
||||
github.com/sagernet/sing-shadowtls v0.2.1-0.20250503051639-fcd445d33c11 h1:tK+75l64tm9WvEFrYRE1t0YxoFdWQqw/h7Uhzj0vJ+w=
|
||||
github.com/sagernet/sing-shadowtls v0.2.1-0.20250503051639-fcd445d33c11/go.mod h1:sWqKnGlMipCHaGsw1sTTlimyUpgzP4WP3pjhCsYt9oA=
|
||||
github.com/sagernet/sing-tun v0.6.6-0.20250428031943-0686f8c4f210 h1:6H4BZaTqKI3YcDMyTV3E576LuJM4S4wY99xoq2T1ECw=
|
||||
github.com/sagernet/sing-tun v0.6.6-0.20250428031943-0686f8c4f210/go.mod h1:fisFCbC4Vfb6HqQNcwPJi2CDK2bf0Xapyz3j3t4cnHE=
|
||||
github.com/sagernet/sing-vmess v0.2.2-0.20250503051933-9b4cf17393f8 h1:zW+zAOCxUIqBCgnZiPovt1uQ3S+zBS+w0NGp+1zITGA=
|
||||
github.com/sagernet/sing-vmess v0.2.2-0.20250503051933-9b4cf17393f8/go.mod h1:IL8Rr+EGwuqijszZkNrEFTQDKhilEpkqFqOlvdpS6/w=
|
||||
github.com/sagernet/sing-tun v0.7.0-beta.1 h1:mBIFXYAnGO5ey/HcCYanqnBx61E7yF8zTFGRZonGYmY=
|
||||
github.com/sagernet/sing-tun v0.7.0-beta.1/go.mod h1:AHJuRrLbNRJuivuFZ2VhXwDj4ViYp14szG5EkkKAqRQ=
|
||||
github.com/sagernet/sing-vmess v0.2.6 h1:1c4dGzeGy0kpBXXrT1sgiMZtHhdJylIT8eWrGhJYZec=
|
||||
github.com/sagernet/sing-vmess v0.2.6/go.mod h1:5aYoOtYksAyS0NXDm0qKeTYW1yoE1bJVcv+XLcVoyJs=
|
||||
github.com/sagernet/smux v1.5.34-mod.2 h1:gkmBjIjlJ2zQKpLigOkFur5kBKdV6bNRoFu2WkltRQ4=
|
||||
github.com/sagernet/smux v1.5.34-mod.2/go.mod h1:0KW0+R+ycvA2INW4gbsd7BNyg+HEfLIAxa5N02/28Zc=
|
||||
github.com/sagernet/tailscale v1.80.3-mod.5 h1:7V7z+p2C//TGtff20pPnDCt3qP6uFyY62peJoKF9z/A=
|
||||
github.com/sagernet/tailscale v1.80.3-mod.5/go.mod h1:EBxXsWu4OH2ELbQLq32WoBeIubG8KgDrg4/Oaxjs6lI=
|
||||
github.com/sagernet/utls v1.6.7 h1:Ep3+aJ8FUGGta+II2IEVNUc3EDhaRCZINWkj/LloIA8=
|
||||
github.com/sagernet/utls v1.6.7/go.mod h1:Uua1TKO/FFuAhLr9rkaVnnrTmmiItzDjv1BUb2+ERwM=
|
||||
github.com/sagernet/wireguard-go v0.0.1-beta.7 h1:ltgBwYHfr+9Wz1eG59NiWnHrYEkDKHG7otNZvu85DXI=
|
||||
github.com/sagernet/wireguard-go v0.0.1-beta.7/go.mod h1:jGXij2Gn2wbrWuYNUmmNhf1dwcZtvyAvQoe8Xd8MbUo=
|
||||
github.com/sagernet/ws v0.0.0-20231204124109-acfe8907c854 h1:6uUiZcDRnZSAegryaUGwPC/Fj13JSHwiTftrXhMmYOc=
|
||||
@@ -1086,14 +1083,18 @@ github.com/vishvananda/netlink v1.3.1/go.mod h1:ARtKouGSTGchR8aMwmkzC0qiNPrrWO5J
|
||||
github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0=
|
||||
github.com/vishvananda/netns v0.0.5 h1:DfiHV+j8bA32MFM7bfEunvT8IAqQ/NzSJHtcmW5zdEY=
|
||||
github.com/vishvananda/netns v0.0.5/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM=
|
||||
github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8=
|
||||
github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok=
|
||||
github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g=
|
||||
github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds=
|
||||
github.com/volcengine/volc-sdk-golang v1.0.189 h1:VMDTHWYXakXJtZqPYn0As/h4eB0c4imvyru6mIp+o60=
|
||||
github.com/volcengine/volc-sdk-golang v1.0.189/go.mod h1:u0VtPvlXWpXDTmc9IHkaW1q+5Jjwus4oAqRhNMDRInE=
|
||||
github.com/vultr/govultr/v3 v3.9.1 h1:uxSIb8Miel7tqTs3ee+z3t+JelZikwqBBsZzCOPBy/8=
|
||||
github.com/vultr/govultr/v3 v3.9.1/go.mod h1:Rd8ebpXm7jxH3MDmhnEs+zrlYW212ouhx+HeUMfHm2o=
|
||||
github.com/wyx2685/sing-box_mod v1.12.0-beta.17.2 h1:jBxJBXGc4z+8iV1Q8Y3b05i0iE9S/xdGx/ASmgf7kYw=
|
||||
github.com/wyx2685/sing-box_mod v1.12.0-beta.17.2/go.mod h1:ZybQCajA3r+okcxY9jNzcTIh35Kj35wbYANSoHU/kM8=
|
||||
github.com/wyx2685/sing-vmess v0.0.0-20250524094403-696835735021 h1:B/OF9zLyAl930HyOXnsVg1rN1uTZHFHOf6otkLHu1a4=
|
||||
github.com/wyx2685/sing-vmess v0.0.0-20250524094403-696835735021/go.mod h1:9GsbMmRg+GD02PRq9zv/K4MCollzq281D9qN5bpCBhM=
|
||||
github.com/wyx2685/sing-box_mod v1.12.0 h1:coAUA1NO3kd8SUIPEOlWUTN2zoXpGA8rDdWeTtx417Y=
|
||||
github.com/wyx2685/sing-box_mod v1.12.0/go.mod h1:sRM3yvlp5byib0v0WVNeT/XpF1HUnPirMH1qZ9Sffc0=
|
||||
github.com/wyx2685/sing-vmess v0.0.0-20250723121437-95d5ab59ff92 h1:A5/G1mY1M3h+j6D3BgfRlngbsfTUGwE8S3UuyR9VfbU=
|
||||
github.com/wyx2685/sing-vmess v0.0.0-20250723121437-95d5ab59ff92/go.mod h1:ZvICtYzgNgbRy2fgKTVmG4o+6pP92dzY5GhwSlfya8Q=
|
||||
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
|
||||
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
|
||||
github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=
|
||||
@@ -1105,10 +1106,10 @@ github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2
|
||||
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
|
||||
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
|
||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||
github.com/xtls/reality v0.0.0-20250527000105-e679ef7bb130 h1:v/TVypWnLferyoaNHh6a8oyggj9APBUzfl1OOgXNbpw=
|
||||
github.com/xtls/reality v0.0.0-20250527000105-e679ef7bb130/go.mod h1:bJdU3ExzfUlY40Xxfibq3THW9IHiE8mHu/tEzud5JWM=
|
||||
github.com/xtls/xray-core v1.250516.1-0.20250527015530-84c8e24a6c6b h1:vliQlr474cVfZU404dkdTRMhpShSrIcrxKMkhtLXFTM=
|
||||
github.com/xtls/xray-core v1.250516.1-0.20250527015530-84c8e24a6c6b/go.mod h1:gEwI49AiHj+J0lTqwhy0SZnpnG9GXZxo/SwJB7ulGXI=
|
||||
github.com/xtls/reality v0.0.0-20250725142056-5b52a03d4fb7 h1:Ript0vN+nSO33+Vj4n0mgNY5M+oOxFQJdrJ1VnwTBO0=
|
||||
github.com/xtls/reality v0.0.0-20250725142056-5b52a03d4fb7/go.mod h1:XxvnCCgBee4WWE0bc4E+a7wbk8gkJ/rS0vNVNtC5qp0=
|
||||
github.com/xtls/xray-core v1.250803.0 h1:sYdRC243UsujnePINH4IfM4MfHE4lj2p4wZFAfeE2GI=
|
||||
github.com/xtls/xray-core v1.250803.0/go.mod h1:z2vn2o30flYEgpSz1iEhdZP1I46UZ3+gXINZyohH3yE=
|
||||
github.com/yandex-cloud/go-genproto v0.0.0-20241220122821-aeb3b05efd1c h1:Rnr+lDYXVkP+3eT8/d68iq4G/UeIhyCQk+HKa8toTvg=
|
||||
github.com/yandex-cloud/go-genproto v0.0.0-20241220122821-aeb3b05efd1c/go.mod h1:0LDD/IZLIUIV4iPH+YcF+jysO3jkSvADFGm4dCAuwQo=
|
||||
github.com/yandex-cloud/go-sdk v0.0.0-20241220131134-2393e243c134 h1:qmpz0Kvr9GAng8LAhRcKIpY71CEAcL3EBkftVlsP5Cw=
|
||||
@@ -1143,16 +1144,16 @@ go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJyS
|
||||
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8=
|
||||
go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY=
|
||||
go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI=
|
||||
go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ=
|
||||
go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE=
|
||||
go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A=
|
||||
go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w=
|
||||
go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k=
|
||||
go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE=
|
||||
go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg=
|
||||
go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E=
|
||||
go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE=
|
||||
go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w=
|
||||
go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA=
|
||||
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
|
||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||
@@ -1209,8 +1210,8 @@ golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIi
|
||||
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
|
||||
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
|
||||
golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8=
|
||||
golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw=
|
||||
golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM=
|
||||
golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY=
|
||||
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
@@ -1254,8 +1255,8 @@ golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU=
|
||||
golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
|
||||
golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg=
|
||||
golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
@@ -1308,16 +1309,16 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA=
|
||||
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
|
||||
golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY=
|
||||
golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds=
|
||||
golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs=
|
||||
golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.26.0 h1:afQXWNNaeC4nvZ0Ed9XvCCzXM6UHJG7iCg0W4fPqSBE=
|
||||
golang.org/x/oauth2 v0.26.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
|
||||
golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
|
||||
golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@@ -1331,8 +1332,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
|
||||
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
|
||||
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@@ -1414,8 +1415,8 @@ golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
|
||||
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA=
|
||||
golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
|
||||
@@ -1425,8 +1426,8 @@ golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o=
|
||||
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
|
||||
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
|
||||
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
|
||||
golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg=
|
||||
golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ=
|
||||
golang.org/x/term v0.33.0 h1:NuFncQrRcaRvVmgRkvM3j/F00gWIAlcmlB8ACEKmGIg=
|
||||
golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
@@ -1443,8 +1444,8 @@ golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4=
|
||||
golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA=
|
||||
golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4=
|
||||
golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
@@ -1508,8 +1509,8 @@ golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyj
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc=
|
||||
golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI=
|
||||
golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo=
|
||||
golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
@@ -1582,10 +1583,10 @@ google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxH
|
||||
google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
|
||||
google.golang.org/genproto v0.0.0-20241021214115-324edc3d5d38 h1:Q3nlH8iSQSRUwOskjbcSMcF2jiYMNiQYZ0c2KEJLKKU=
|
||||
google.golang.org/genproto v0.0.0-20241021214115-324edc3d5d38/go.mod h1:xBI+tzfqGGN2JBeSebfKXFSdBpWVQ7sLW40PTupVRm4=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a h1:nwKuGPlUAt+aR+pcrkfFRrTU1BVrSmYyYMxYbUIVHr0=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a/go.mod h1:3kWAYMk1I75K4vykHtKt2ycnOgpA6974V7bREqbsenU=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a h1:51aaUVRocpvUOSQKM6Q7VuoaktNIaMCLuhZB6DKksq4=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a/go.mod h1:uRxBH1mhmO8PGhU89cMcHaXKZqO+OfakD8QQO0oYwlQ=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a h1:SGktgSolFCo75dnHJF2yMvnns6jCmHFJ0vE4Vn2JKvQ=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a/go.mod h1:a77HrdMjoeKbnd2jmgcWdaS++ZLZAEq3orIOAEIKiVw=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a h1:v2PbRU4K3llS09c7zodFpNePeamkAwG3mPrAery9VeE=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
||||
@@ -1603,8 +1604,8 @@ google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv
|
||||
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
|
||||
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
|
||||
google.golang.org/grpc v1.72.1 h1:HR03wO6eyZ7lknl75XlxABNVLLFc2PAb6mHlYh756mA=
|
||||
google.golang.org/grpc v1.72.1/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM=
|
||||
google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4=
|
||||
google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
|
||||
@@ -24,11 +24,11 @@ type Limiter struct {
|
||||
DomainRules []*regexp.Regexp
|
||||
ProtocolRules []string
|
||||
SpeedLimit int
|
||||
UserOnlineIP *sync.Map // Key: Name, value: {Key: Ip, value: Uid}
|
||||
UserOnlineIP *sync.Map // Key: TagUUID, value: {Key: Ip, value: Uid}
|
||||
OldUserOnline *sync.Map // Key: Ip, value: Uid
|
||||
UUIDtoUID map[string]int // Key: UUID, value: Uid
|
||||
UserLimitInfo *sync.Map // Key: Uid value: UserLimitInfo
|
||||
SpeedLimiter *sync.Map // key: Uid, value: *ratelimit.Bucket
|
||||
UserLimitInfo *sync.Map // Key: TagUUID value: UserLimitInfo
|
||||
SpeedLimiter *sync.Map // key: TagUUID, value: *ratelimit.Bucket
|
||||
AliveList map[int]int // Key: Uid, value: alive_ip
|
||||
}
|
||||
|
||||
@@ -91,6 +91,7 @@ func (l *Limiter) UpdateUser(tag string, added []panel.UserInfo, deleted []panel
|
||||
for i := range deleted {
|
||||
l.UserLimitInfo.Delete(format.UserTag(tag, deleted[i].Uuid))
|
||||
l.UserOnlineIP.Delete(format.UserTag(tag, deleted[i].Uuid))
|
||||
l.SpeedLimiter.Delete(format.UserTag(tag, deleted[i].Uuid))
|
||||
delete(l.UUIDtoUID, deleted[i].Uuid)
|
||||
delete(l.AliveList, deleted[i].Id)
|
||||
}
|
||||
|
||||
@@ -13,11 +13,12 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"encoding/json"
|
||||
|
||||
"github.com/go-acme/lego/v4/certificate"
|
||||
"github.com/go-acme/lego/v4/challenge/http01"
|
||||
"github.com/go-acme/lego/v4/providers/dns"
|
||||
"github.com/go-acme/lego/v4/registration"
|
||||
"github.com/goccy/go-json"
|
||||
|
||||
"github.com/InazumaV/V2bX/common/file"
|
||||
"github.com/InazumaV/V2bX/conf"
|
||||
|
||||
15
node/user.go
15
node/user.go
@@ -8,20 +8,7 @@ import (
|
||||
)
|
||||
|
||||
func (c *Controller) reportUserTrafficTask() (err error) {
|
||||
// Get User traffic
|
||||
userTraffic := make([]panel.UserTraffic, 0)
|
||||
for i := range c.userList {
|
||||
up, down := c.server.GetUserTraffic(c.tag, c.userList[i].Uuid, true)
|
||||
if up > 0 || down > 0 {
|
||||
if c.LimitConfig.EnableDynamicSpeedLimit {
|
||||
c.traffic[c.userList[i].Uuid] += up + down
|
||||
}
|
||||
userTraffic = append(userTraffic, panel.UserTraffic{
|
||||
UID: (c.userList)[i].Id,
|
||||
Upload: up,
|
||||
Download: down})
|
||||
}
|
||||
}
|
||||
userTraffic, err := c.server.GetUserTrafficSlice(c.tag, true)
|
||||
if len(userTraffic) > 0 {
|
||||
err = c.apiClient.ReportUserTraffic(userTraffic)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user