重新规划网关与节点的交互协议,实现统一命令位的识别和处理
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user