remove buffer-size parameter

This commit is contained in:
Andrey Semenov 2024-08-10 21:19:52 +05:00 committed by LiquidTheDangerous
parent 173b5da2a5
commit 874256c9bc
2 changed files with 3 additions and 3 deletions

View File

@ -13,6 +13,8 @@ import (
"github.com/xvzc/SpoofDPI/util" "github.com/xvzc/SpoofDPI/util"
) )
const BUFFER_SIZE = 1024
type Proxy struct { type Proxy struct {
addr string addr string
port int port int
@ -31,7 +33,7 @@ func New(config *util.Config) *Proxy {
windowSize: *config.WindowSize, windowSize: *config.WindowSize,
allowedPattern: config.AllowedPattern, allowedPattern: config.AllowedPattern,
resolver: dns.NewResolver(config), resolver: dns.NewResolver(config),
bufferSize: *config.BufferSize, bufferSize: BUFFER_SIZE,
} }
} }

View File

@ -22,7 +22,6 @@ type Config struct {
AllowedPattern []*regexp.Regexp AllowedPattern []*regexp.Regexp
WindowSize *int WindowSize *int
Version *bool Version *bool
BufferSize *int
} }
type StringArray []string type StringArray []string
@ -59,7 +58,6 @@ when not given, the client hello packet will be sent in two parts:
fragmentation for the first data packet and the rest fragmentation for the first data packet and the rest
`) `)
config.Version = flag.Bool("v", false, "print spoof-dpi's version; this may contain some other relevant information") config.Version = flag.Bool("v", false, "print spoof-dpi's version; this may contain some other relevant information")
config.BufferSize = flag.Int("buffer-size", 1024, "buffer size, in number of bytes, is the maximum amount of data that can be read at once from a remote resource")
var allowedPattern StringArray var allowedPattern StringArray
flag.Var( flag.Var(
&allowedPattern, &allowedPattern,