diff --git a/proxy/proxy.go b/proxy/proxy.go index 01c05fa..f1a7701 100644 --- a/proxy/proxy.go +++ b/proxy/proxy.go @@ -13,6 +13,8 @@ import ( "github.com/xvzc/SpoofDPI/util" ) +const BUFFER_SIZE = 1024 + type Proxy struct { addr string port int @@ -31,7 +33,7 @@ func New(config *util.Config) *Proxy { windowSize: *config.WindowSize, allowedPattern: config.AllowedPattern, resolver: dns.NewResolver(config), - bufferSize: *config.BufferSize, + bufferSize: BUFFER_SIZE, } } diff --git a/util/config.go b/util/config.go index 2b5a9d1..27ec576 100644 --- a/util/config.go +++ b/util/config.go @@ -22,7 +22,6 @@ type Config struct { AllowedPattern []*regexp.Regexp WindowSize *int Version *bool - BufferSize *int } 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 `) 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 flag.Var( &allowedPattern,