mirror of
https://github.com/xvzc/SpoofDPI.git
synced 2025-01-03 04:50:11 +00:00
Merge pull request #94 from BuzzBuzzards/main
This commit is contained in:
commit
204d18d5d5
@ -39,8 +39,10 @@ func main() {
|
|||||||
util.PrintColoredBanner()
|
util.PrintColoredBanner()
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := util.SetOsProxy(*config.Port); err != nil {
|
if *config.SystemProxy {
|
||||||
log.Fatal(err)
|
if err := util.SetOsProxy(*config.Port); err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
go pxy.Start()
|
go pxy.Start()
|
||||||
@ -63,7 +65,10 @@ func main() {
|
|||||||
}()
|
}()
|
||||||
|
|
||||||
<-done
|
<-done
|
||||||
if err := util.UnsetOsProxy(); err != nil {
|
|
||||||
log.Fatal(err)
|
if *config.SystemProxy {
|
||||||
|
if err := util.UnsetOsProxy(); err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ type Config struct {
|
|||||||
EnableDoh *bool
|
EnableDoh *bool
|
||||||
Debug *bool
|
Debug *bool
|
||||||
NoBanner *bool
|
NoBanner *bool
|
||||||
|
SystemProxy *bool
|
||||||
Timeout *int
|
Timeout *int
|
||||||
AllowedPattern *regexp.Regexp
|
AllowedPattern *regexp.Regexp
|
||||||
AllowedUrls *regexp.Regexp
|
AllowedUrls *regexp.Regexp
|
||||||
@ -54,6 +55,7 @@ func ParseArgs() {
|
|||||||
config.EnableDoh = flag.Bool("enable-doh", false, "enable 'dns over https'")
|
config.EnableDoh = flag.Bool("enable-doh", false, "enable 'dns over https'")
|
||||||
config.Debug = flag.Bool("debug", false, "enable debug output")
|
config.Debug = flag.Bool("debug", false, "enable debug output")
|
||||||
config.NoBanner = flag.Bool("no-banner", false, "disable banner")
|
config.NoBanner = flag.Bool("no-banner", false, "disable banner")
|
||||||
|
config.SystemProxy = flag.Bool("system-proxy", true, "enable system-wide proxy")
|
||||||
config.Timeout = flag.Int("timeout", 0, "timeout in milliseconds. no timeout when not given")
|
config.Timeout = flag.Int("timeout", 0, "timeout in milliseconds. no timeout when not given")
|
||||||
config.WindowSize = flag.Int("window-size", 0, `chunk size, in number of bytes, for fragmented client hello,
|
config.WindowSize = flag.Int("window-size", 0, `chunk size, in number of bytes, for fragmented client hello,
|
||||||
try lower values if the default value doesn't bypass the DPI;
|
try lower values if the default value doesn't bypass the DPI;
|
||||||
|
Loading…
Reference in New Issue
Block a user