重新规划网关与节点的交互协议,实现统一命令位的识别和处理

This commit is contained in:
2025-05-16 15:13:16 +08:00
parent d65fe4db6f
commit 8a6a4833d4
22 changed files with 609 additions and 373 deletions

View File

@@ -5,12 +5,13 @@ import (
"context"
"encoding/base64"
"fmt"
"github.com/google/uuid"
"io"
"net"
"net/textproto"
"net/url"
"proxy-server/server/core"
"proxy-server/server/fwd/auth"
"proxy-server/server/fwd/core"
"strings"
"errors"
@@ -132,7 +133,7 @@ func processHttps(ctx context.Context, req *Request) (*core.Conn, error) {
return &core.Conn{
Conn: req.conn,
Reader: req.reader,
Tag: req.conn.RemoteAddr().String() + "_" + req.conn.LocalAddr().String(),
Tag: uuid.New(),
Protocol: "http",
Dest: req.dest,
Auth: req.auth,
@@ -176,7 +177,7 @@ func processHttp(ctx context.Context, req *Request) (*core.Conn, error) {
return &core.Conn{
Conn: req.conn,
Reader: newReader,
Tag: req.conn.RemoteAddr().String() + "_" + req.conn.LocalAddr().String(),
Tag: uuid.New(),
Protocol: "http",
Dest: req.dest,
Auth: req.auth,