重构代理解析流程,引入端口混合协议转发

This commit is contained in:
2025-03-01 17:08:56 +08:00
parent b8a3dd93dc
commit 76139d28c4
24 changed files with 841 additions and 1042 deletions

View File

@@ -2,9 +2,9 @@ package handlers
import (
"log/slog"
"proxy-server/server/models"
"proxy-server/server/pkg/orm"
"proxy-server/server/pkg/resp"
"proxy-server/server/web/models"
"strings"
"time"

View File

@@ -2,8 +2,8 @@ package handlers
import (
"os"
"proxy-server/server/models"
"proxy-server/server/pkg/orm"
"proxy-server/server/web/models"
"github.com/gin-gonic/gin"
"github.com/pkg/errors"

View File

@@ -1,20 +0,0 @@
package models
import (
"time"
"gorm.io/gorm"
)
// Channel 连接认证模型
type Channel struct {
gorm.Model
UserId uint
NodeId uint
Protocol string
Username string
Password string
AuthIp bool
AuthPass bool
Expiration time.Time
}

View File

@@ -1,14 +0,0 @@
package models
import "gorm.io/gorm"
// Node 客户端模型
type Node struct {
gorm.Model
Name string
Provider string
Location string
IPAddress string
Channels []Channel `gorm:"foreignKey:NodeId"`
}

View File

@@ -1,9 +0,0 @@
package models
import "gorm.io/gorm"
type UserIp struct {
gorm.Model
UserId uint
IpAddress string
}

View File

@@ -1,14 +0,0 @@
package models
import "gorm.io/gorm"
type User struct {
gorm.Model
Password string
Username string
Email string
Phone string
Name string
Channels []Channel `gorm:"foreignKey:UserId"`
}